New_sample updates only reflected on app_sink queue, not in other queues

Hi,
the video source is v4l2. It creates two queues: sdi and ovly, sdi branch connected to kmssink, and ovly branch is connected to app_sink.

> if (gst_element_link_many(data.app_source, data.capsfilter, data.tee, NULL) != TRUE ||
> gst_element_link_many(data.sdi_queue, data.kmssink, NULL) != TRUE ||
> gst_element_link_many(data.ovly_queue, data.video_convert, data.app_sink, NULL) != TRUE)
> {
> }
> 
> ```
> g_object_set(data.app_sink, "emit-signals", TRUE, NULL);
> g_object_set(G_OBJECT(data.app_sink), "emit-signals", "sync", FALSE, "async", FALSE, NULL);
> g_signal_connect(data.app_sink, "new-sample", G_CALLBACK(new_sample_), shared_mem_p);
> ```

in new_sample callback, changes the video frame buffer, e.g, adds on a title on the video.

The problem is that the updates on the new_sample frame buffer is ONLY shown on the app_sink, which displays on desktop window. I am expecting the same updates on the video frames are shown on the kmssink, which outputs to SDI output. The kmssink outputs the same video frames as the video input.

What needs to be changed or added?

Thank you,
dxyzh

if you have two different pipeline chains, then they likely have different buffers. If you need to overlay on both, then you would need to overlay before the tee.

Another emits-signal to overlay before the tee or how to overylay the sample buffer before the tee? Can you give me some suggestions?

Thank you,
dxyzhou

Added

 pad = gst_element_get_static_pad (src, "src");
  gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
      (GstPadProbeCallback) cb_have_data, NULL, NULL);

pipeline is in playing state. But cb_have_data is not called

cb_have_data is called. It was the input missing that caused callback not called.
Thanks