mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
v4l2sink: Implement unlock/unlock_stop
This will prevent deadlocks, but will also properly flush the pool and allocator when going to READY state. It should also fix issues reported on mailing list when seeking is performed. https://bugzilla.gnome.org/show_bug.cgi?id=738152
This commit is contained in:
parent
31b8cfecc2
commit
cc709d06de
1 changed files with 18 additions and 0 deletions
|
@ -116,6 +116,8 @@ static GstCaps *gst_v4l2sink_get_caps (GstBaseSink * bsink, GstCaps * filter);
|
|||
static gboolean gst_v4l2sink_set_caps (GstBaseSink * bsink, GstCaps * caps);
|
||||
static GstFlowReturn gst_v4l2sink_show_frame (GstVideoSink * bsink,
|
||||
GstBuffer * buf);
|
||||
static gboolean gst_v4l2sink_unlock (GstBaseSink * sink);
|
||||
static gboolean gst_v4l2sink_unlock_stop (GstBaseSink * sink);
|
||||
|
||||
static void
|
||||
gst_v4l2sink_class_init (GstV4l2SinkClass * klass)
|
||||
|
@ -185,6 +187,8 @@ gst_v4l2sink_class_init (GstV4l2SinkClass * klass)
|
|||
basesink_class->set_caps = GST_DEBUG_FUNCPTR (gst_v4l2sink_set_caps);
|
||||
basesink_class->propose_allocation =
|
||||
GST_DEBUG_FUNCPTR (gst_v4l2sink_propose_allocation);
|
||||
basesink_class->unlock = GST_DEBUG_FUNCPTR (gst_v4l2sink_unlock);
|
||||
basesink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_v4l2sink_unlock_stop);
|
||||
|
||||
videosink_class->show_frame = GST_DEBUG_FUNCPTR (gst_v4l2sink_show_frame);
|
||||
|
||||
|
@ -608,3 +612,17 @@ activate_failed:
|
|||
return GST_FLOW_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_v4l2sink_unlock (GstBaseSink * sink)
|
||||
{
|
||||
GstV4l2Sink *v4l2sink = GST_V4L2SINK (sink);
|
||||
return gst_v4l2_object_unlock (v4l2sink->v4l2object);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_v4l2sink_unlock_stop (GstBaseSink * sink)
|
||||
{
|
||||
GstV4l2Sink *v4l2sink = GST_V4L2SINK (sink);
|
||||
return gst_v4l2_object_unlock_stop (v4l2sink->v4l2object);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue