After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 747499 - playsink: set async to false for a customed text-sink will cause sync problem when seeking
playsink: set async to false for a customed text-sink will cause sync problem...
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
1.4.5
Other Windows
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-04-08 10:15 UTC by Mingke Wang
Modified: 2018-05-01 07:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstplaysink: don't set async of custom text-sink to false (1.10 KB, patch)
2015-04-08 10:15 UTC, Mingke Wang
rejected Details | Review

Description Mingke Wang 2015-04-08 10:15:40 UTC
Created attachment 301119 [details] [review]
gstplaysink: don't set async of custom text-sink to  false

set async to false for a custom text-sink will lead to sync problem when seeking.
eg. we use appsink to catch text and use UI to render those text.
if set async to false, after seeking, the text and video are not sync.

I think the preroll need use GAP event instead of setting async to false for text sink.
Comment 1 Sebastian Dröge (slomo) 2015-04-26 18:59:47 UTC
Comment on attachment 301119 [details] [review]
gstplaysink: don't set async of custom text-sink to  false

The problem here is that text streams are sparse, so it might take a long time until the first subtitle is received and the sink prerolls.
Comment 2 Mingke Wang 2015-04-27 03:32:35 UTC
in my understanding, the GAP event can be used to solve the sink prerolls problem.if there is no text, parser should send GAP event to tell sink.
if set async to false. a custom text-sink will cause sync problem after seeking.
subtitle will come out quickly and earlier than the video after seeking.
Comment 3 Tim-Philipp Müller 2015-04-27 05:28:14 UTC
> If set async to false. a custom text-sink will cause
> sync problem after seeking. Subtitle will come out
> quickly and earlier than the video after seeking.

But why? You should be able to use async=false sync=true in which case the subtitles should still be rendered in sync with the video/audio.
Comment 4 Mingke Wang 2015-04-27 09:06:39 UTC
in my case, I use app-sink to get the subtitle text and text was rendered by UI. I didn't perform sync in UI, that means the sync will reply on app-sink, once app-sink sent me a text, UI will renders it immediately. 
I found that if async=false, then after seeking, app-sink will get subtitle text earlier than video.
Comment 5 Sebastian Dröge (slomo) 2015-04-27 09:19:35 UTC
Is this with sync=true on the sink? It shouldn't really get subs earlier then unless the video sink gets video too late.
Comment 6 Edward Hervey 2018-05-01 07:05:36 UTC
No answers in 3 years. Closing. Please re-open if you can reproduce the issue with current stable GStreamer.