External subtitles on media player don't work
Started by malakudi, 01 Jul 2011 12:01
17 replies to this topic
Re: External subtitles on media player don't work #2
Re: External subtitles on media player don't work #3
Re: External subtitles on media player don't work #4
Re: External subtitles on media player don't work #5
Re: External subtitles on media player don't work #6
Re: External subtitles on media player don't work #7
Re: External subtitles on media player don't work #8
Posted 1 July 2011 - 21:31
I'm currently experimenting with the appsink in sync mode.
Advantage is we do not have to keep a m_subs_to_pull count, which is very dangerous.
If we get the count wrong, the next pull-buffer might block forver.
That's why the count is heavily protected with a mutex.
And because a seek triggers new appsink buffers immediately, the mutex was held during the seek.
Which on its turn gives a potential deadlock, because the gst message pump is blocking trying to deliver the appsink notifications.
My idea is to use the messagepump we already introduced, and loose the mutex alltogether.
And to avoid the appsink from delivering 1000ths of subs right away, and redelivering them after each seek, we put the appsink in sync mode.
Advantage is we do not have to keep a m_subs_to_pull count, which is very dangerous.
If we get the count wrong, the next pull-buffer might block forver.
That's why the count is heavily protected with a mutex.
And because a seek triggers new appsink buffers immediately, the mutex was held during the seek.
Which on its turn gives a potential deadlock, because the gst message pump is blocking trying to deliver the appsink notifications.
My idea is to use the messagepump we already introduced, and loose the mutex alltogether.
And to avoid the appsink from delivering 1000ths of subs right away, and redelivering them after each seek, we put the appsink in sync mode.
Re: External subtitles on media player don't work #9
Posted 1 July 2011 - 22:32
The principle works very nicely.
However, sometimes the text sink complete looses track of time after a seek.
It seems it's not synced with the playbin2 at all...
Then, after another seek, it might suddenly jump back to the playbin2 time.
I'll try and find out whether this is something that was introduced by switching the sink to sync mode, or this was the case before I started messing with it.
If this has been the case all the time, there's no more reason not to switch to sync mode.
But if this is a new problem, it seems we cannot use sync mode.
However, sometimes the text sink complete looses track of time after a seek.
It seems it's not synced with the playbin2 at all...
Then, after another seek, it might suddenly jump back to the playbin2 time.
I'll try and find out whether this is something that was introduced by switching the sink to sync mode, or this was the case before I started messing with it.
If this has been the case all the time, there's no more reason not to switch to sync mode.
But if this is a new problem, it seems we cannot use sync mode.
Re: External subtitles on media player don't work #10
Re: External subtitles on media player don't work #11
Posted 2 July 2011 - 10:50
Isn't it possible to add a not synched detector?
yes, if you receive subtitles too late (and they are then dropped), you know you're out of sync. But then what?
There is no way to restore the synchronisation.
But the other way around also occurs, you start receiving subtitles from the beginning of the movie, whilst you're almost at the end.
So nothing will be shown, nothing will be dropped.
Re: External subtitles on media player don't work #12
Re: External subtitles on media player don't work #13
Re: External subtitles on media player don't work #14
Posted 3 July 2011 - 10:47
Indeed a gstreamer bug... I started to read here: https://bugzilla.gno...g.cgi?id=610904 and here https://bugzilla.gno...g.cgi?id=600648 ......
Re: External subtitles on media player don't work #15
Re: External subtitles on media player don't work #16
Re: External subtitles on media player don't work #17
Re: External subtitles on media player don't work #18
6 user(s) are reading this topic
0 members, 6 guests, 0 anonymous users