Playing Multiple Files via decodebin?

Paul d'AUBIGNY visechelle at gmail.com
Fri Jan 4 01:42:22 PST 2013


Hi Stirling,

When setting the location property of filesrc for your next file, decodebin
will not to renegotiate the new video format, it does not update elements
inside (as far as I know). Therefore, it will not support the new format
and I think that why you got a 'not negotiated'. In addition, letting the
EOS event going through your pipeline elements might lead
to resource deallocation, therefore even if the video files formats are the
same, I suspect it might not work.
One solution that I have in mind, is to use an event probe on decodebin
srcpad. Inside the callback function of this event probe, you can detect
EOS event, update filesrc location property, remove decodebin element and
replace it with a new one just created, add the event probe to decodebin
src pad in order to detect EOS for the next file and link all elements
together. That should make it.

You can find details about changing the pipeline elements dynamically here:
http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/section-dynamic-pipelines.html

Cheers,

Paul HENRYS

2013/1/3 Stirling Westrup <swestrup at gmail.com>

> I have an application that tries to run through a playlist of multiple
> video files of differing formats, playing each in turn.
>
> I am using filesrc ! decodebin for this, but my application dies with
> a 'not negotiated' when changing from one file to the next.
>
> What should my behaviour be on EOS to switch to the next video in the
> playlist?  Currently I do this:
>
> 1) Detect EOS
> 2) Quit main_loop.
> 3) set pipeline to "Ready"
> 4) set filesrc's location to the next file name in list
> 5) set pipeline state to 'Playing'
> 6) enter main_loop
>
> Is there some major step I'm missing here, or is it more likely that
> I'm messing up one of the above steps?
>
>
> --
> Stirling Westrup
> Programmer, Entrepreneur.
> https://www.linkedin.com/e/fpf/77228
> http://www.linkedin.com/in/swestrup
> http://technaut.livejournal.com
> http://sourceforge.net/users/stirlingwestrup
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130104/c97137ab/attachment.html>


More information about the gstreamer-devel mailing list