Compare commits

...

5 Commits

Author SHA1 Message Date
Adam Shiervani 2fb84e8679
Merge 211d5322ac into 8e27cd6b60 2025-08-22 20:41:14 +02:00
Alex Ballas 8e27cd6b60
chore: ensure that rpc messages get processed sequentially and avoid phantom and repeated key presses (#744) 2025-08-22 20:15:46 +02:00
Adam Shiervani 211d5322ac enhancement: add new EDID for DELL IDRAC, 1280x1024 to video settings 2025-07-15 22:10:31 +02:00
Adam Shiervani 14317675fb Revert "enhancement/add-edid"
This reverts commit 57c4c3c2a6.
2025-07-15 22:02:53 +02:00
Adam Shiervani 57c4c3c2a6 enhancement/add-edid 2025-07-15 21:57:26 +02:00
2 changed files with 20 additions and 2 deletions

View File

@ -32,6 +32,11 @@ const edids = [
"00FFFFFFFFFFFF0010AC132045393639201E0103803C22782ACD25A3574B9F270D5054A54B00714F8180A9C0D1C00101010101010101023A801871382D40582C450056502100001E000000FF00335335475132330A2020202020000000FC0044454C4C204432373231480A20000000FD00384C1E5311000A202020202020018102031AB14F90050403020716010611121513141F65030C001000023A801871382D40582C450056502100001E011D8018711C1620582C250056502100009E011D007251D01E206E28550056502100001E8C0AD08A20E02D10103E960056502100001800000000000000000000000000000000000000000000000000000000004F",
label: "DELL D2721H, 1920x1080",
},
{
value:
"00ffffffffffff0010ac0100020000000111010380221bff0a00000000000000000000adce0781800101010101010101010101010101000000ff0030303030303030303030303030000000ff0030303030303030303030303030000000fd00384c1f530b000a000000000000000000fc0044454c4c2049445241430a2020000a",
label: "DELL IDRAC EDID, 1280x1024",
},
];
const streamQualityOptions = [
@ -141,7 +146,7 @@ export default function SettingsVideoRoute() {
title="Video Enhancement"
description="Adjust color settings to make the video output more vibrant and colorful"
/>
<div className="space-y-4 pl-4">
<SettingsItem
title="Saturation"

View File

@ -23,6 +23,7 @@ type Session struct {
HidChannel *webrtc.DataChannel
DiskChannel *webrtc.DataChannel
shouldUmountVirtualMedia bool
rpcQueue chan webrtc.DataChannelMessage
}
type SessionConfig struct {
@ -105,6 +106,12 @@ func newSession(config SessionConfig) (*Session, error) {
return nil, err
}
session := &Session{peerConnection: peerConnection}
session.rpcQueue = make(chan webrtc.DataChannelMessage, 256)
go func() {
for msg := range session.rpcQueue {
onRPCMessage(msg, session)
}
}()
peerConnection.OnDataChannel(func(d *webrtc.DataChannel) {
scopedLogger.Info().Str("label", d.Label()).Uint16("id", *d.ID()).Msg("New DataChannel")
@ -112,7 +119,8 @@ func newSession(config SessionConfig) (*Session, error) {
case "rpc":
session.RPCChannel = d
d.OnMessage(func(msg webrtc.DataChannelMessage) {
go onRPCMessage(msg, session)
// Enqueue to ensure ordered processing
session.rpcQueue <- msg
})
triggerOTAStateUpdate()
triggerVideoStateUpdate()
@ -186,6 +194,11 @@ func newSession(config SessionConfig) (*Session, error) {
if session == currentSession {
currentSession = nil
}
// Stop RPC processor
if session.rpcQueue != nil {
close(session.rpcQueue)
session.rpcQueue = nil
}
if session.shouldUmountVirtualMedia {
err := rpcUnmountImage()
scopedLogger.Warn().Err(err).Msg("unmount image failed on connection close")