[Bug 783301] basesrc: Should not hold LIVE_LOCK when calling GstBaseSrcClass::create

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Jun 21 13:38:54 UTC 2017


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

Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #353021|needs-work                  |none
             status|                            |
 Attachment #353021|0                           |1
        is obsolete|                            |

--- Comment #8 from Nicolas Dufresne (stormer) <nicolas at ndufresne.ca> ---
Created attachment 354154
  --> https://bugzilla.gnome.org/attachment.cgi?id=354154&action=edit
basesrc: Don't hold LIVE_LOCK in create/alloc/fill

Holding this lock on live source prevents the source from changing
the caps in ::create() without risking a deadlock. This has consequences
as the LIVE_LOCK was replacing the STREAM_LOCK in many situation. As a
side effect:

- We no longer need to unlock when doing play/pause as the LIVE_LOCK
  isn't held. We then let the create() call finish, but will block if
  the state have changed meanwhile. This has the benefit that
  wait_preroll() calls in subclass is no longer needed.
- We no longer need to change the state to unlock, simplifying the
  set_flushing() interface
- We need different handling for EOS depending if we are in push or pull
  mode.

This patch also document the locking of each private class member and
the locking order.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list