gst_pad_query (GstPad * pad, GstQuery * query)
{
GstObject *parent;
- gboolean res;
+ gboolean res, serialized;
GstPadQueryFunction func;
GstPadProbeType type;
GstFlowReturn ret;
GST_DEBUG_OBJECT (pad, "doing query %p (%s)", query,
GST_QUERY_TYPE_NAME (query));
+ serialized = GST_QUERY_IS_SERIALIZED (query);
+ if (G_UNLIKELY (serialized))
+ GST_PAD_STREAM_LOCK (pad);
+
GST_OBJECT_LOCK (pad);
PROBE_PUSH (pad, type | GST_PAD_PROBE_TYPE_PUSH |
GST_PAD_PROBE_TYPE_BLOCK, query, probe_stopped);
PROBE_PUSH (pad, type | GST_PAD_PROBE_TYPE_PULL, query, probe_stopped);
GST_OBJECT_UNLOCK (pad);
+ if (G_UNLIKELY (serialized))
+ GST_PAD_STREAM_UNLOCK (pad);
+
return res;
/* ERRORS */
{
GST_DEBUG_OBJECT (pad, "had no parent");
GST_OBJECT_UNLOCK (pad);
+ if (G_UNLIKELY (serialized))
+ GST_PAD_STREAM_UNLOCK (pad);
return FALSE;
}
no_func:
{
GST_DEBUG_OBJECT (pad, "had no query function");
RELEASE_PARENT (parent);
+ if (G_UNLIKELY (serialized))
+ GST_PAD_STREAM_UNLOCK (pad);
return FALSE;
}
query_failed:
{
GST_DEBUG_OBJECT (pad, "query failed");
+ if (G_UNLIKELY (serialized))
+ GST_PAD_STREAM_UNLOCK (pad);
return FALSE;
}
probe_stopped:
{
GST_DEBUG_OBJECT (pad, "probe stopped: %s", gst_flow_get_name (ret));
GST_OBJECT_UNLOCK (pad);
+ if (G_UNLIKELY (serialized))
+ GST_PAD_STREAM_UNLOCK (pad);
return FALSE;
}
}