I have achieved add/delete source during runtime for deepstream-app. Now I want also to achieve same function for sink rather than source.
In runtime_source_add_add_delete from github, the sink is only one tiled display. I would like to display it in different rtsp port.
Can you give me some advices for this function?
Hi,
We don’t have implementation for this case. In deepstream-app, you can configure multiple sinks in initialization, but cannot delete them during runtime. Would suggest you have fixed number of sinks since this is a case well verified/tested.
Hi, DaneLLL
As far as I know, the tee element has request pad. Whether I can use it for dynamic add sink just like streammux element for dynamic add source?
Or whether I can create multi_sink_bin just like create multi_source_bin in deepstream_source_bin.c?
Thanks !
Hi,
The reference code of creating multiple sinks is create_sink_bin() in
deepstream_sdk_v4.0.2_jetson\sources\apps\apps-common\src\deepstream_sink_bin.c
Please take a look.
Dynamic removal is possible as well… it’s very similar to the dynamic stream add/remove example provided by NIVIDIA, except that…
With the stream example they have
sinkpad = gst_element_get_static_pad (streammux, pad_name);
gst_pad_send_event (sinkpad, gst_event_new_flush_stop (FALSE));
gst_element_release_request_pad (streammux, sinkpad);
gst_object_unref (sinkpad);
# remove source bin and unref
With the sink you would do,
srcpad = gst_element_get_static_pad (tee, pad_name);
gst_pad_send_event (srcpad, gst_event_new_eos());
gst_element_release_request_pad (tee, srcpad);
gst_object_unref (srcpad);
# remove sink bin and unref
There’s also good blog article on the subject here, just look for " Example 2: Adding & removing sinks"
there’s a link to their example code on GitHub
Hi rjhowell44,
Thanks very much for your anwser.
Can you give me the link of " Example 2: Adding & removing sinks ". I cann’t find it on Github.
I’m sorry, I forgot to past the blog link … GStreamer Dynamic Pipelines – coaxion.net – slomo's blog
You will find the Github link under Example2 …
OK,thanks. I’ll have a try.