# New\_sample updates only reflected on app\_sink queue, not in other queues

**URL:** <https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506>\
**Category:** Application Development\
**Created:** [October 30, 2024, 8:35pm UTC](https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506 "2024-10-30T20:35:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dxyzhou](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@dxyzhou](https://discourse.gstreamer.org/u/dxyzhou)\
**Post date:** [October 30, 2024, 8:35pm UTC](https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506/1 "2024-10-30T20:35:25Z")

</div>

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.

````auto
> 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

---

<div class="post-metadata">

**Author:** ![ystreet00](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/y/3d9bf3/32.png) [@ystreet00](https://discourse.gstreamer.org/u/ystreet00)\
**Post date:** [October 31, 2024, 12:31am UTC](https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506/2 "2024-10-31T00:31:59Z")

</div>

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`.

---

<div class="post-metadata">

**Author:** ![dxyzhou](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@dxyzhou](https://discourse.gstreamer.org/u/dxyzhou)\
**Post date:** [October 31, 2024, 12:26pm UTC](https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506/3 "2024-10-31T12:26:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dxyzhou](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@dxyzhou](https://discourse.gstreamer.org/u/dxyzhou)\
**Post date:** [October 31, 2024, 1:34pm UTC](https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506/4 "2024-10-31T13:34:19Z")

</div>

Added

```auto
 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

---

<div class="post-metadata">

**Author:** ![dxyzhou](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@dxyzhou](https://discourse.gstreamer.org/u/dxyzhou)\
**Post date:** [October 31, 2024, 2:14pm UTC](https://discourse.gstreamer.org/t/new-sample-updates-only-reflected-on-app-sink-queue-not-in-other-queues/3506/5 "2024-10-31T14:14:34Z")

</div>

cb\_have\_data is called. It was the input missing that caused callback not called.  
Thanks
