Add video bitrate setting for HomeKit source

This commit is contained in:
Alex X
2024-05-28 14:01:42 +03:00
parent ea17b420d6
commit a9e7a73cc8
3 changed files with 43 additions and 6 deletions
+3 -1
View File
@@ -28,6 +28,8 @@ type Client struct {
audioSession *srtp.Session
stream *camera.Stream
Bitrate int // in bits/s
}
func Dial(rawURL string, server *srtp.Server) (*Client, error) {
@@ -132,7 +134,7 @@ func (c *Client) Start() error {
c.audioSession = &srtp.Session{Local: c.srtpEndpoint()}
var err error
c.stream, err = camera.NewStream(c.hap, videoCodec, audioCodec, c.videoSession, c.audioSession)
c.stream, err = camera.NewStream(c.hap, videoCodec, audioCodec, c.videoSession, c.audioSession, c.Bitrate)
if err != nil {
return err
}