mirror of https://github.com/jetkvm/kvm.git
Compare commits
5 Commits
4c03df46bc
...
2fb84e8679
Author | SHA1 | Date |
---|---|---|
|
2fb84e8679 | |
|
8e27cd6b60 | |
|
211d5322ac | |
|
14317675fb | |
|
57c4c3c2a6 |
|
@ -32,6 +32,11 @@ const edids = [
|
||||||
"00FFFFFFFFFFFF0010AC132045393639201E0103803C22782ACD25A3574B9F270D5054A54B00714F8180A9C0D1C00101010101010101023A801871382D40582C450056502100001E000000FF00335335475132330A2020202020000000FC0044454C4C204432373231480A20000000FD00384C1E5311000A202020202020018102031AB14F90050403020716010611121513141F65030C001000023A801871382D40582C450056502100001E011D8018711C1620582C250056502100009E011D007251D01E206E28550056502100001E8C0AD08A20E02D10103E960056502100001800000000000000000000000000000000000000000000000000000000004F",
|
"00FFFFFFFFFFFF0010AC132045393639201E0103803C22782ACD25A3574B9F270D5054A54B00714F8180A9C0D1C00101010101010101023A801871382D40582C450056502100001E000000FF00335335475132330A2020202020000000FC0044454C4C204432373231480A20000000FD00384C1E5311000A202020202020018102031AB14F90050403020716010611121513141F65030C001000023A801871382D40582C450056502100001E011D8018711C1620582C250056502100009E011D007251D01E206E28550056502100001E8C0AD08A20E02D10103E960056502100001800000000000000000000000000000000000000000000000000000000004F",
|
||||||
label: "DELL D2721H, 1920x1080",
|
label: "DELL D2721H, 1920x1080",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
value:
|
||||||
|
"00ffffffffffff0010ac0100020000000111010380221bff0a00000000000000000000adce0781800101010101010101010101010101000000ff0030303030303030303030303030000000ff0030303030303030303030303030000000fd00384c1f530b000a000000000000000000fc0044454c4c2049445241430a2020000a",
|
||||||
|
label: "DELL IDRAC EDID, 1280x1024",
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const streamQualityOptions = [
|
const streamQualityOptions = [
|
||||||
|
@ -141,7 +146,7 @@ export default function SettingsVideoRoute() {
|
||||||
title="Video Enhancement"
|
title="Video Enhancement"
|
||||||
description="Adjust color settings to make the video output more vibrant and colorful"
|
description="Adjust color settings to make the video output more vibrant and colorful"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className="space-y-4 pl-4">
|
<div className="space-y-4 pl-4">
|
||||||
<SettingsItem
|
<SettingsItem
|
||||||
title="Saturation"
|
title="Saturation"
|
||||||
|
|
15
webrtc.go
15
webrtc.go
|
@ -23,6 +23,7 @@ type Session struct {
|
||||||
HidChannel *webrtc.DataChannel
|
HidChannel *webrtc.DataChannel
|
||||||
DiskChannel *webrtc.DataChannel
|
DiskChannel *webrtc.DataChannel
|
||||||
shouldUmountVirtualMedia bool
|
shouldUmountVirtualMedia bool
|
||||||
|
rpcQueue chan webrtc.DataChannelMessage
|
||||||
}
|
}
|
||||||
|
|
||||||
type SessionConfig struct {
|
type SessionConfig struct {
|
||||||
|
@ -105,6 +106,12 @@ func newSession(config SessionConfig) (*Session, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
session := &Session{peerConnection: peerConnection}
|
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) {
|
peerConnection.OnDataChannel(func(d *webrtc.DataChannel) {
|
||||||
scopedLogger.Info().Str("label", d.Label()).Uint16("id", *d.ID()).Msg("New 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":
|
case "rpc":
|
||||||
session.RPCChannel = d
|
session.RPCChannel = d
|
||||||
d.OnMessage(func(msg webrtc.DataChannelMessage) {
|
d.OnMessage(func(msg webrtc.DataChannelMessage) {
|
||||||
go onRPCMessage(msg, session)
|
// Enqueue to ensure ordered processing
|
||||||
|
session.rpcQueue <- msg
|
||||||
})
|
})
|
||||||
triggerOTAStateUpdate()
|
triggerOTAStateUpdate()
|
||||||
triggerVideoStateUpdate()
|
triggerVideoStateUpdate()
|
||||||
|
@ -186,6 +194,11 @@ func newSession(config SessionConfig) (*Session, error) {
|
||||||
if session == currentSession {
|
if session == currentSession {
|
||||||
currentSession = nil
|
currentSession = nil
|
||||||
}
|
}
|
||||||
|
// Stop RPC processor
|
||||||
|
if session.rpcQueue != nil {
|
||||||
|
close(session.rpcQueue)
|
||||||
|
session.rpcQueue = nil
|
||||||
|
}
|
||||||
if session.shouldUmountVirtualMedia {
|
if session.shouldUmountVirtualMedia {
|
||||||
err := rpcUnmountImage()
|
err := rpcUnmountImage()
|
||||||
scopedLogger.Warn().Err(err).Msg("unmount image failed on connection close")
|
scopedLogger.Warn().Err(err).Msg("unmount image failed on connection close")
|
||||||
|
|
Loading…
Reference in New Issue