disable video and audio by default in buildK10002; start them later in probe
This commit is contained in:
+2
-2
@@ -402,8 +402,8 @@ func (c *Client) buildK10002(challenge []byte, status byte) []byte {
|
|||||||
b[6] = 22 // payload len
|
b[6] = 22 // payload len
|
||||||
copy(b[16:], resp[:16]) // challenge response
|
copy(b[16:], resp[:16]) // challenge response
|
||||||
copy(b[32:], sessionID) // random session ID
|
copy(b[32:], sessionID) // random session ID
|
||||||
b[36] = 1 // video enabled
|
b[36] = 0 // video disabled (start with K10010 later)
|
||||||
b[37] = 1 // audio enabled
|
b[37] = 0 // audio disabled (start with K10010 later)
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -163,8 +163,11 @@ func (p *Producer) Start() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func probe(client *Client, quality byte) ([]*core.Media, error) {
|
func probe(client *Client, quality byte) ([]*core.Media, error) {
|
||||||
_ = client.SetResolution(quality)
|
client.SetResolution(quality)
|
||||||
_ = client.SetDeadline(time.Now().Add(core.ProbeTimeout))
|
client.StartVideo()
|
||||||
|
client.StartAudio()
|
||||||
|
|
||||||
|
client.SetDeadline(time.Now().Add(core.ProbeTimeout))
|
||||||
|
|
||||||
var vcodec, acodec *core.Codec
|
var vcodec, acodec *core.Codec
|
||||||
var tutkAudioCodec uint16
|
var tutkAudioCodec uint16
|
||||||
|
|||||||
Reference in New Issue
Block a user