fix legacy capture pipeline.

This commit is contained in:
Miroslav Šedivý 2024-09-08 23:26:34 +02:00
parent 5c91621223
commit 063fa8821f
2 changed files with 4 additions and 5 deletions

View file

@ -359,7 +359,6 @@ func (s *Capture) Set() {
"min-quantizer": "4", "min-quantizer": "4",
"max-quantizer": "20", "max-quantizer": "20",
}, },
ShowPointer: viper.GetBool("legacy"),
}, },
} }
s.VideoIDs = []string{"main"} s.VideoIDs = []string{"main"}
@ -469,11 +468,11 @@ func (s *Capture) SetV2() {
} else { } else {
s.VideoPipelines = map[string]types.VideoConfig{ s.VideoPipelines = map[string]types.VideoConfig{
"main": { "main": {
GstPipeline: pipeline, // Hacky way to disable pointer.
GstPipeline: strings.Replace(pipeline, "show-pointer=true", "show-pointer=false", 1),
}, },
"legacy": { "legacy": {
GstPipeline: pipeline, GstPipeline: pipeline,
ShowPointer: true,
}, },
} }
// we do not add legacy to VideoIDs so that its ignored by bandwidth estimator // we do not add legacy to VideoIDs so that its ignored by bandwidth estimator

View file

@ -54,7 +54,7 @@ func NewBroadcastPipeline(device string, display string, pipelineSrc string, url
} }
func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc string, fps int16, bitrate uint, hwenc HwEnc) (string, error) { func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc string, fps int16, bitrate uint, hwenc HwEnc) (string, error) {
pipelineStr := " ! appsink name=appsinkvideo" pipelineStr := " ! appsink name=appsink"
// if using custom pipeline // if using custom pipeline
if pipelineSrc != "" { if pipelineSrc != "" {
@ -182,7 +182,7 @@ func NewVideoPipeline(rtpCodec codec.RTPCodec, display string, pipelineSrc strin
} }
func NewAudioPipeline(rtpCodec codec.RTPCodec, device string, pipelineSrc string, bitrate uint) (string, error) { func NewAudioPipeline(rtpCodec codec.RTPCodec, device string, pipelineSrc string, bitrate uint) (string, error) {
pipelineStr := " ! appsink name=appsinkaudio" pipelineStr := " ! appsink name=appsink"
// if using custom pipeline // if using custom pipeline
if pipelineSrc != "" { if pipelineSrc != "" {