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 794793 - waylandsink: change to use GCond to avoid dropping video buffer
waylandsink: change to use GCond to avoid dropping video buffer
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.12.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-03-29 03:40 UTC by Haihua Hu
Modified: 2018-11-03 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
waylandsink: change to using GCond to avoid dropping video buffer (2.09 KB, patch)
2018-03-29 03:41 UTC, Haihua Hu
needs-work Details | Review

Description Haihua Hu 2018-03-29 03:40:00 UTC
waylandsink will drop video buffer when frame redraw callback didn't emit by wayland compositor. Change to use GCond to wait redraw callback
Comment 1 Haihua Hu 2018-03-29 03:41:06 UTC
Created attachment 370283 [details] [review]
waylandsink: change to using GCond to avoid dropping video buffer
Comment 2 Nicolas Dufresne (ndufresne) 2018-03-29 12:07:31 UTC
Review of attachment 370283 [details] [review]:

I'm not convinced by this solution, since you might be playing something like 60fps over 30fps display. This method will add one vblank latency that isn't needed. Also, you have a bug, since you need to unblock on state transition to READY and on flush-start event.

The is a branch that started implementing presentation timestamp support, that seems much more robust solution.
Comment 3 Haihua Hu 2018-03-30 01:22:33 UTC
(In reply to Nicolas Dufresne (stormer) from comment #2)
> Review of attachment 370283 [details] [review] [review]:
> 
> I'm not convinced by this solution, since you might be playing something
> like 60fps over 30fps display. This method will add one vblank latency that
> isn't needed. Also, you have a bug, since you need to unblock on state
> transition to READY and on flush-start event.
> 
> The is a branch that started implementing presentation timestamp support,
> that seems much more robust solution.

Which branch? Could you show me the implementing? We need this solution because sink will drop frames and video is not smooth.
Comment 4 Nicolas Dufresne (ndufresne) 2018-03-30 01:48:47 UTC
It's not production ready, and need to be rebased, follow this ticket:

 https://bugzilla.gnome.org/show_bug.cgi?id=768079

The problem with your approach is that for N frames that fits on a specific vblank (where N is 2 for 60fps stream over 30fps display), we will always display the oldest one. The rendering latency is then worst then it should.

Note that basesink will synchronize against the clock because calling show_frame(), so it's not clear why what you get is "not smooth". Have you disabled time synchronization ?
Comment 5 Nicolas Dufresne (ndufresne) 2018-03-30 01:51:14 UTC
(In reply to Haihua Hu from comment #0)
> waylandsink will drop video buffer when frame redraw callback didn't emit by
> wayland compositor. Change to use GCond to wait redraw callback

Ideally, instead of dropping, it should replace it. Though, probably that we only want to do that if it's zero copy (if the memory is already SHM or DMABuf).
Comment 6 GStreamer system administrator 2018-11-03 14:20:02 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/675.