Long delay switching media mid-stream.

Stirling Westrup swestrup at gmail.com
Tue Jun 4 14:24:17 PDT 2013


Just moments after posting this I had a breakthrough. Up until now I've
been taking the pipeline output elements down to the 'READY' state between
media files, and this has worked fine. Just now I tried putting the
elements into the 'NULL" state between files instead, and it worked without
the huge delay when switching media in media-res as it were.



On Tue, Jun 4, 2013 at 5:13 PM, Stirling Westrup <swestrup at gmail.com> wrote:

> Right now when my application is playing video files in succession there
> is only a momentary pause between the end of one and the start of another.
>
> Just today I put in an option to abort the currently playing file and move
> on to the next one. I did this in an entirely naive way, by just calling
> g_main_loop_quit as if I had received an EOS message, and letting my code
> select the next file in the sequence and setting element properties
> accordingly.
>
> This works, but I find there can be a 5-10 second delay between the first
> preroll image appearing on screen and the actual start of regular playing.
>
> I can only imagine its taking this long due to me not correctly closing
> down the previous stream. Is there some other way I should have gone about
> aborting the stream? Perhaps inserting an EOS event and waiting for it to
> cause the g_main_loop_quit when my bus message handler sees it?
>
> Looking at the log file there seems to be a lot of reference to clocks and
> synchronization, so I'm worried that some element is trying to match up
> timestamps from the old and new media streams.
>
> --
> 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
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130604/86ab3f5f/attachment.html>


More information about the gstreamer-devel mailing list