How stream_id hash is generated from input name?

Tomy Elrond tomyelrond at gmail.com
Sun Aug 21 18:55:55 UTC 2022


Thank you.


> Or is there some other way to find out stream ids (for example first input
>> -> 0, second input -> 1)?
>
>
> Via the STREAM_START event.


In the doc I can read for *gst_event_new_stream_start* function:
"
Source elements, demuxers and other elements that create new streams are
supposed to send this event as the first event of a new stream.
"
In my pipeline before the funnel, the uridecodebin is used, so
*gst_event_new_stream_start* function should be already sent by
uridecodebin. But how can I access the *stream_id* after the *funnel*
element to know which *stream_id* belongs to which video *input*?

Thank you!
Tommy






ne 21. 8. 2022 v 18:12 odesílatel Sebastian Dröge <sebastian at centricular.com>
napsal:

> On Sat, 2022-08-20 at 15:25 +0200, Tomy Elrond via gstreamer-devel wrote:
>
>
> These "hashes" must be related with input names, because for each input
> name it generates the same hash every time. For example:
> "
> input name: "file:///tmp/input_video_1.mp4" -> generated hash:
> "0b70cf574e1fef0b694a8a449a94732091cda1ce67bc4bf7c71c59d6c331f5b1/001"
> input name: "file:///tmp/input_video_2.mp4" -> generated hash:
> "7960608e8835f3eeaf8fba46351367dd76199a9e133117d4aeeccb862e8da9aa/001"
> "
> Is there any way how to "decode" these hashes to the original string (path
> of video file?
>
>
> It's the SHA256 of the URI, currently. You can't decode that and you must
> not rely on that staying the same forever.
>
> The stream IDs are opaque IDs that only allow you to distinguish different
> streams / find same streams.
>
> Or is there some other way to find out stream ids (for example first input
> -> 0, second input -> 1)?
>
>
> Via the STREAM_START event.
>
>
> --
>
> 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/20220821/4ff2e16a/attachment.htm>


More information about the gstreamer-devel mailing list