mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
fix: prevent overriding video pipelines with legacy settings. (#666)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user