Need advice with using funnel on multi-subtitle stream.

Wonchul Lee chul0812 at gmail.com
Tue Aug 13 23:54:18 PDT 2013


Hello

I am trying to use funnel when playing multiple internal subtitle
stream(mkv).
I intended to get out of subtitle data from gstreamer and treat it on
application.
Thus I used funnel instead of input-selector and link it with appsink.

mkvdemux subtitle pad1 \
mkvdemux subtitle pad2 - funnel - appsink
mkvdemux subtitle pad3 /

However there was a problem with output caps of funnel.
Lets assume, the caps of subtitle pad 1 is text/x-raw and subtitle pad 2 is
application/x-ass.
Then funnel's srcpad and appsink's sinkpad negotiated with text/x-raw
mime-type.
In addition, when get the GstSample data from appsink by using pull-sample
action,
The caps info in GstSample is always text/x-raw, even actual data is
application/x-ass.

Thus, I pushed a caps event on funnel's srcpad before push the buffer data.
Then I saw the caps info in GstSample is correctly changed.
However I am not sure that this approach is correct.
Please give me an advice for it.

Thanks.


--- a/plugins/elements/gstfunnel.c
+++ b/plugins/elements/gstfunnel.c
@@ -263,9 +263,13 @@ gst_funnel_sink_chain (GstPad * pad, GstObject *
parent, GstBuffer * buffer)
 #if 0
   GstCaps *padcaps;
 #endif
+  GstCaps *caps;

   GST_DEBUG_OBJECT (funnel, "received buffer %p", buffer);

+  caps = gst_pad_get_current_caps (pad);
+  gst_pad_push_event (funnel->srcpad, gst_event_new_caps(caps));
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130814/aff4ee55/attachment.html>


More information about the gstreamer-devel mailing list