<div dir="ltr">Hello<div><br></div><div>I am trying to use funnel when playing multiple internal subtitle stream(mkv).</div><div>I intended to get out of subtitle data from gstreamer and treat it on application.</div><div>
Thus I used funnel instead of input-selector and link it with appsink.</div><div><br></div><div>mkvdemux subtitle pad1 \ </div><div>mkvdemux subtitle pad2 - funnel - appsink</div><div>mkvdemux subtitle pad3 /<br></div><div>
<br></div><div>However there was a problem with output caps of funnel.</div><div>Lets assume, the caps of subtitle pad 1 is text/x-raw and subtitle pad 2 is application/x-ass.</div><div>Then funnel's srcpad and appsink's sinkpad negotiated with text/x-raw mime-type.</div>
<div>In addition, when get the GstSample data from appsink by using pull-sample action,</div><div>The caps info in GstSample is always text/x-raw, even actual data is application/x-ass.</div><div><br></div><div>Thus, I pushed a caps event on funnel's srcpad before push the buffer data.</div>
<div>Then I saw the caps info in GstSample is correctly changed.</div><div>However I am not sure that this approach is correct.</div><div>Please give me an advice for it.</div><div><br></div><div>Thanks.</div><div><br></div>
<div><br></div><div>--- a/plugins/elements/gstfunnel.c<br></div><div><div>+++ b/plugins/elements/gstfunnel.c</div><div>@@ -263,9 +263,13 @@ gst_funnel_sink_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer)</div>
<div> #if 0</div><div> GstCaps *padcaps;</div><div> #endif</div><div>+ GstCaps *caps;</div><div> </div><div> GST_DEBUG_OBJECT (funnel, "received buffer %p", buffer);</div><div> </div><div>+ caps = gst_pad_get_current_caps (pad);</div>
<div>+ gst_pad_push_event (funnel->srcpad, gst_event_new_caps(caps)); </div></div><div><br></div></div>