How stream_id hash is generated from input name?

Tomy Elrond tomyelrond at gmail.com
Mon Aug 22 13:04:34 UTC 2022


Thank you!


> But how can I access the *stream_id* after the *funnel* element to know
>> which *stream_id* belongs to which video *input*?
>>
>
>
 You can get the STREAM_START sticky event via a pad probe, or by using
> gst_pad_get_sticky_event() at any time.
>

I tried the following:
"
*// ------- Method 1: my previous solution -------*
gchar *opaque_stream_id = gst_pad_get_stream_id(pad);
*g_print("opaque_stream_id: %s\n", opaque_stream_id); // prints the SHA256
of the URI*

*// ------- Method 2: your proposed method -------*
GstEvent *sticky_event = NULL;
sticky_event = gst_pad_get_sticky_event(pad, GST_EVENT_STREAM_START, 0);
const gchar *stream_id = NULL;
gst_event_parse_stream_start(sticky_event, &stream_id);
*g_print("stream_id: %s\n", stream_id); // Also prints the SHA256 of the
URI*
"
But your proposed method also prints the same hash as the previous method,
so I'm still not able to distinguish the input streams. Or isn't my code
correct?
My question is still the same: How do I find out which stream_id belongs to
which video input?

Thank you
Tommy





po 22. 8. 2022 v 8:24 odesílatel Sebastian Dröge <sebastian at centricular.com>
napsal:

> On Sun, 2022-08-21 at 20:55 +0200, Tomy Elrond wrote:
>
> But how can I access the *stream_id* after the *funnel* element to know
> which *stream_id* belongs to which video *input*?
>
>
> You can get the STREAM_START sticky event via a pad probe, or by using
> gst_pad_get_sticky_event() at any time.
>
> --
>
> Sebastian Dröge, Centricular Ltd · https://www.centricular.com
> <http://www.centricular.com>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220822/df3fae0f/attachment.htm>


More information about the gstreamer-devel mailing list