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 601853 - identity: sync=true ignores pipeline latency and does not present itself as live element
identity: sync=true ignores pipeline latency and does not present itself as l...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal minor
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-13 23:48 UTC by Olivier Crête
Modified: 2015-04-27 16:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
identity: Handle PTS and DTS separately (2.70 KB, patch)
2015-04-21 01:20 UTC, Olivier Crête
committed Details | Review
identity: Take upstream latency into account for sync=1 (3.68 KB, patch)
2015-04-21 01:20 UTC, Olivier Crête
none Details | Review
identity: With sync=true, don't pre-roll (3.75 KB, patch)
2015-04-21 01:20 UTC, Olivier Crête
committed Details | Review
identity: Also synchronize GAP events in sync=1 (4.83 KB, patch)
2015-04-21 01:20 UTC, Olivier Crête
none Details | Review
identity: Take upstream latency into account for sync=1 (3.75 KB, patch)
2015-04-24 00:12 UTC, Olivier Crête
committed Details | Review
identity: Also synchronize GAP events in sync=1 (4.84 KB, patch)
2015-04-24 00:12 UTC, Olivier Crête
committed Details | Review

Description Olivier Crête 2009-11-13 23:48:15 UTC
identify sync=true should take into account the latency from previous elements. So it should implement the latency query and remember what went through there.
Comment 1 Wim Taymans 2009-11-16 09:51:43 UTC
There is much wrong with sync in identity. When it syncs it should present itself as a live element (NO_PREROLL) then only sync in playing (and block data in paused). Then it could interecept the latency event and use it.
Comment 2 Olivier Crête 2015-04-21 01:20:28 UTC
Created attachment 302037 [details] [review]
identity: Handle PTS and DTS separately

I'm not sure if this is correct for the single-segment handling, but I'm pretty sure sync should happen on the DTS if possible.
Comment 3 Olivier Crête 2015-04-21 01:20:35 UTC
Created attachment 302038 [details] [review]
identity: Take upstream latency into account for sync=1
Comment 4 Olivier Crête 2015-04-21 01:20:43 UTC
Created attachment 302039 [details] [review]
identity: With sync=true, don't pre-roll

To act like a real live element, block the streaming when paused, and
return NO_PREROLL.
Comment 5 Olivier Crête 2015-04-21 01:20:49 UTC
Created attachment 302040 [details] [review]
identity: Also synchronize GAP events in sync=1
Comment 6 Tim-Philipp Müller 2015-04-23 12:59:23 UTC
Looks fine at first glance. I'd say put it in.

Should the query func take 'ret' from chaining up into account?

Obligatory bikeshedding: call the func _do_sync() like basesink? :)
Comment 7 Olivier Crête 2015-04-24 00:12:18 UTC
Created attachment 302267 [details] [review]
identity: Take upstream latency into account for sync=1

Now check if the upstream query worked, ignore the values if it didn't and claim that it now did.
Comment 8 Olivier Crête 2015-04-24 00:12:52 UTC
Created attachment 302268 [details] [review]
identity: Also synchronize GAP events in sync=1

Now with more _do_sync!
Comment 9 Sebastian Dröge (slomo) 2015-04-26 17:45:06 UTC
Comment on attachment 302039 [details] [review]
identity: With sync=true, don't pre-roll

g_cond_signal() would be enough here, no need to broadcast ;)
Comment 10 Olivier Crête 2015-04-27 16:30:08 UTC
commit d1620f1c2edd6e4f9803f327c1d12a46e8be2bbf
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Mon Apr 20 20:02:51 2015 -0400

    identity: Also synchronize GAP events in sync=1
    
    https://bugzilla.gnome.org/show_bug.cgi?id=601853

commit 5ea338907c2038111e3a731003282937450ab208
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Mon Apr 20 19:31:37 2015 -0400

    identity: With sync=true, don't pre-roll
    
    To act like a real live element, block the streaming when paused, and
    return NO_PREROLL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=601853

commit 7807296afd2a8a77d2a734386263789fe39358f2
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Mon Apr 20 19:24:45 2015 -0400

    identity: Take upstream latency into account for sync=1
    
    https://bugzilla.gnome.org/show_bug.cgi?id=601853

commit f2992654ca82d85dd5a1b2249abf76b5a2fc446f
Author: Olivier Crête <olivier.crete@collabora.com>
Date:   Mon Apr 20 19:07:27 2015 -0400

    identity: Handle PTS and DTS separately
    
    https://bugzilla.gnome.org/show_bug.cgi?id=601853