Add support maxwidth/maxheight settings for homekit source

This commit is contained in:
Alex X
2025-11-11 15:48:12 +03:00
parent 2ce38b4486
commit d053d88ce9
3 changed files with 11 additions and 4 deletions
+4 -2
View File
@@ -29,7 +29,9 @@ type Client struct {
stream *camera.Stream
Bitrate int // in bits/s
MaxWidth int
MaxHeight int
Bitrate int // in bits/s
}
func Dial(rawURL string, server *srtp.Server) (*Client, error) {
@@ -115,7 +117,7 @@ func (c *Client) Start() error {
}
videoTrack := c.trackByKind(core.KindVideo)
videoCodec := trackToVideo(videoTrack, &c.videoConfig.Codecs[0])
videoCodec := trackToVideo(videoTrack, &c.videoConfig.Codecs[0], c.MaxWidth, c.MaxHeight)
audioTrack := c.trackByKind(core.KindAudio)
audioCodec := trackToAudio(audioTrack, &c.audioConfig.Codecs[0])