disable video and audio by default in buildK10002; start them later in probe

This commit is contained in:
seydx
2026-01-15 01:10:41 +01:00
parent b067c408c0
commit 7241759fea
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -402,8 +402,8 @@ func (c *Client) buildK10002(challenge []byte, status byte) []byte {
b[6] = 22 // payload len
copy(b[16:], resp[:16]) // challenge response
copy(b[32:], sessionID) // random session ID
b[36] = 1 // video enabled
b[37] = 1 // audio enabled
b[36] = 0 // video disabled (start with K10010 later)
b[37] = 0 // audio disabled (start with K10010 later)
return b
}
+5 -2
View File
@@ -163,8 +163,11 @@ func (p *Producer) Start() error {
}
func probe(client *Client, quality byte) ([]*core.Media, error) {
_ = client.SetResolution(quality)
_ = client.SetDeadline(time.Now().Add(core.ProbeTimeout))
client.SetResolution(quality)
client.StartVideo()
client.StartAudio()
client.SetDeadline(time.Now().Add(core.ProbeTimeout))
var vcodec, acodec *core.Codec
var tutkAudioCodec uint16