Long delay switching media mid-stream.

Stirling Westrup swestrup at gmail.com
Tue Jun 4 14:13:30 PDT 2013


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


More information about the gstreamer-devel mailing list