Need advice with using funnel on multi-subtitle stream.

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Aug 16 01:25:00 PDT 2013


On Fri, 2013-08-16 at 09:00 +0900, Wonchul Lee wrote:

> 
> 1. If I add this caps event code, it will not affect video/audio data
> flow. Is it correct?

Not unless you also use funnel in the audio/video branches.

> 2. Can I guarantee caps and buffer are always matched?
> I push buffer right after sent caps event by using  gst_pad_push_event
> function.

Yes, CAPS events are 'serialized' with buffer flow. You just need a lock
in funnel to make sure only one branch is pushing on the source pad at a
time, so you always get

 CAPS1
 BUFFER1
 CAPS2
 BUFFER2

and not e.g.

 CAPS1
 CAPS2
 BUFFER1
 BUFFER2

Cheers
 -Tim

Cheers
 -Tim

> 2013/8/15 Tim-Philipp Müller <t.i.m at zen.co.uk>
>         On Wed, 2013-08-14 at 15:54 +0900, Wonchul Lee wrote:
>         
>         Hi,
>         
>         > 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.
>         
>         
>         Out of curiosity - do you really need to get all subs at the
>         same time?
>         Why? (Instead of one selected one)
>         
>         > 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.
>         
>         
>         I suppose it's correct and required for some use cases, but
>         might be
>         quite expensive/noisy, if caps change before almost every
>         buffer.
>         
>         Cheers
>          -Tim
>         
>         
>         _______________________________________________
>         gstreamer-devel mailing list
>         gstreamer-devel at lists.freedesktop.org
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list