@@ -266,9 +266,11 @@ func newCompositorBin(name string, config combinedViewConfig) (*gst.Bin, error)
266266 queueSink1Name := "queue_sink_1_" + name
267267 capsfilterSink0Name := "capsfilter_sink_0_" + name
268268 capsfilterSink1Name := "capsfilter_sink_1_" + name
269+ capsfilterSink2Name := "capsfilter_sink_2_" + name
270+ videoTestSrcSink2Name := "videotestsrc_sink_2_" + name
269271
270272 comp_desc := fmt .Sprintf (
271- "%s name=%s sink_1::xpos=%d ! capsfilter name=%s caps=%s" ,
273+ "%s name=%s sink_1::xpos=%d sink_2::zorder=0 ! capsfilter name=%s caps=%s" ,
272274 comp ,
273275 compName ,
274276 sink1_xpos ,
@@ -293,9 +295,17 @@ func newCompositorBin(name string, config combinedViewConfig) (*gst.Bin, error)
293295 config .CameraCaps .string (),
294296 compName ,
295297 )
298+ background_desc := fmt .Sprintf (
299+ "videotestsrc name=%s pattern=black ! capsfilter name=%s caps=\" video/x-raw,width=%d,height=%d\" ! %s.sink_2" ,
300+ videoTestSrcSink2Name ,
301+ capsfilterSink2Name ,
302+ config .OutputCaps .Width ,
303+ config .OutputCaps .Height ,
304+ compName ,
305+ )
296306
297307 // Do not automatically create Ghostpads, as sink ghost-pads are not configured correctly.
298- bin , err := gst .NewBinFromString (comp_desc + " " + sink0_desc + " " + sink1_desc , false )
308+ bin , err := gst .NewBinFromString (comp_desc + " " + sink0_desc + " " + sink1_desc + " " + background_desc , false )
299309 if err != nil {
300310 return nil , err
301311 }
0 commit comments