<div dir="ltr"><div>The stream-id from the source pad of the funnel is also the SHA256 of the URI.</div><div><br></div><div>Is there any way how to get indexes of the streams (for example I mean: "file:///tmp/input_video_1.mp4" -> stream-id=0, "file:///tmp/input_video_2.mp4" -> stream-id=1)?<br></div><div>When I link <b>decodebin</b> element with <b>funnel</b> element, I request <b>pads</b> from the <b>funnel</b> element sequentially like this:</div><div>"<br></div><div>First input stream: "file:///tmp/input_video_1.mp4" -> sinkpad = gst_element_get_request_pad(funnel, "sink_0");</div><div>Second input stream: "file:///tmp/input_video_2.mp4" -> sinkpad = gst_element_get_request_pad(funnel, "sink_1");</div><div>"</div><div>So it means that the funnel element could store some indexes depending on which input was requested as the first one, second one and etc.<br></div><div>Can I find these indexes somewhere in the pipeline after (downstream) the funnel element?</div><div>Thank you</div><div>Tommy</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">út 23. 8. 2022 v 8:27 odesílatel Sebastian Dröge <<a href="mailto:sebastian@centricular.com">sebastian@centricular.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div><div>On Mon, 2022-08-22 at 15:04 +0200, Tomy Elrond via gstreamer-devel wrote:</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div>"</div><div><div><b>// ------- Method 1: my previous solution -------</b></div><div>gchar *opaque_stream_id = gst_pad_get_stream_id(pad);</div><div><b>g_print("opaque_stream_id: %s\n", opaque_stream_id); // <b> prints the SHA256 of the URI</b></b></div></div><div><br></div><div><b>// ------- Method 2: your proposed method -------</b></div><div>GstEvent *sticky_event = NULL;</div><div>sticky_event = gst_pad_get_sticky_event(pad, GST_EVENT_STREAM_START, 0);</div><div>const gchar *stream_id = NULL;</div><div>gst_event_parse_stream_start(sticky_event, &stream_id);</div><div><b>g_print("stream_id: %s\n", stream_id); // Also prints the SHA256 of the URI</b></div><div>"</div><div>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?</div><div>My question is still the same: How do I find out which stream_id belongs to which video input? <br></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div><span><pre>-- <br></pre><div style="width:71ch">Sebastian Dröge, Centricular Ltd · <a href="http://www.centricular.com" target="_blank">https://www.centricular.com</a></div><div style="width:71ch"><br></div></span></div></div>
</blockquote></div>