How stream_id hash is generated from input name?
Sebastian Dröge
sebastian at centricular.com
Tue Aug 23 06:26:53 UTC 2022
On Mon, 2022-08-22 at 15:04 +0200, Tomy Elrond via gstreamer-devel
wrote:
> "
> // ------- 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?
You'd get the stream-id from the source pad of the funnel in your case.
You probably want to use a pad probe to get notified about whenever the
STREAM_START event changes and a new stream-id is in use.
--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220823/2de5c76f/attachment.htm>
More information about the gstreamer-devel
mailing list