GNOME Bugzilla – Bug 794793
waylandsink: change to use GCond to avoid dropping video buffer
Last modified: 2018-11-03 14:20:02 UTC
waylandsink will drop video buffer when frame redraw callback didn't emit by wayland compositor. Change to use GCond to wait redraw callback
Created attachment 370283 [details] [review] waylandsink: change to using GCond to avoid dropping video buffer
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.
(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.
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 ?
(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).
-- 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.