fix: prevent overriding video pipelines with legacy settings. (#666)

This commit is contained in:
Miroslav Šedivý
2026-07-31 14:28:06 +02:00
committed by GitHub
parent 3bb1959a55
commit baf6eee8a9
+5
View File
@@ -505,6 +505,10 @@ func (s *Capture) SetV2() {
// video pipeline
if modifiedVideoCodec || videoHWEnc != HwEncUnset || videoBitrate != 0 || videoMaxFPS != 0 || videoPipeline != "" {
// Do not override pipelines already configured via V3 settings.
if viper.IsSet("capture.video.pipeline") || viper.IsSet("capture.video.pipelines") {
log.Warn().Msg("ignoring legacy video pipeline settings (NEKO_HWENC/NEKO_VIDEO_BITRATE/NEKO_MAX_FPS) because NEKO_CAPTURE_VIDEO_PIPELINE or NEKO_CAPTURE_VIDEO_PIPELINES is already set")
} else {
pipeline, err := NewVideoPipeline(s.VideoCodec, s.Display, videoPipeline, videoMaxFPS, videoBitrate, videoHWEnc)
if err != nil {
log.Warn().Err(err).Msg("unable to create video pipeline, using default")
@@ -521,6 +525,7 @@ func (s *Capture) SetV2() {
// we do not add legacy to VideoIDs so that its ignored by bandwidth estimator
s.VideoIDs = []string{"main"}
}
}
if videoPipeline != "" {
log.Warn().Msg("you are using v2 configuration 'NEKO_VIDEO' which is deprecated, please use 'NEKO_CAPTURE_VIDEO_PIPELINE' instead")