mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
aggregator: Document locking for gst_aggregator_get_latency_unlocked()
Renamed it to _unlocked() to make it clear. https://bugzilla.gnome.org/show_bug.cgi?id=742684
This commit is contained in:
parent
f7070dcfdc
commit
41d26673d6
3 changed files with 10 additions and 5 deletions
|
@ -524,7 +524,9 @@ gst_aggregator_wait_and_check (GstAggregator * self, gboolean * timeout)
|
||||||
|
|
||||||
SRC_STREAM_LOCK (self);
|
SRC_STREAM_LOCK (self);
|
||||||
|
|
||||||
gst_aggregator_get_latency (self, &live, &latency_min, &latency_max);
|
GST_OBJECT_LOCK (self);
|
||||||
|
gst_aggregator_get_latency_unlocked (self, &live, &latency_min, &latency_max);
|
||||||
|
GST_OBJECT_UNLOCK (self);
|
||||||
|
|
||||||
if (gst_aggregator_check_pads_ready (self)) {
|
if (gst_aggregator_check_pads_ready (self)) {
|
||||||
GST_DEBUG_OBJECT (self, "all pads have data");
|
GST_DEBUG_OBJECT (self, "all pads have data");
|
||||||
|
@ -1111,7 +1113,7 @@ gst_aggregator_query_sink_latency_foreach (GstAggregator * self,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_aggregator_get_latency:
|
* gst_aggregator_get_latency_unlocked:
|
||||||
* @self: a #GstAggregator
|
* @self: a #GstAggregator
|
||||||
* @live: (out) (allow-none): whether @self is live
|
* @live: (out) (allow-none): whether @self is live
|
||||||
* @min_latency: (out) (allow-none): the configured minimum latency of @self
|
* @min_latency: (out) (allow-none): the configured minimum latency of @self
|
||||||
|
@ -1121,9 +1123,11 @@ gst_aggregator_query_sink_latency_foreach (GstAggregator * self,
|
||||||
* query.
|
* query.
|
||||||
*
|
*
|
||||||
* Typically only called by subclasses.
|
* Typically only called by subclasses.
|
||||||
|
*
|
||||||
|
* MUST be called with the object lock held.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gst_aggregator_get_latency (GstAggregator * self, gboolean * live,
|
gst_aggregator_get_latency_unlocked (GstAggregator * self, gboolean * live,
|
||||||
GstClockTime * min_latency, GstClockTime * max_latency)
|
GstClockTime * min_latency, GstClockTime * max_latency)
|
||||||
{
|
{
|
||||||
GstClockTime our_latency;
|
GstClockTime our_latency;
|
||||||
|
|
|
@ -271,7 +271,7 @@ gboolean gst_aggregator_iterate_sinkpads (GstAggregator
|
||||||
GstAggregatorPadForeachFunc func,
|
GstAggregatorPadForeachFunc func,
|
||||||
gpointer user_data);
|
gpointer user_data);
|
||||||
|
|
||||||
void gst_aggregator_get_latency (GstAggregator * self,
|
void gst_aggregator_get_latency_unlocked (GstAggregator * self,
|
||||||
gboolean * live,
|
gboolean * live,
|
||||||
GstClockTime * min,
|
GstClockTime * min,
|
||||||
GstClockTime * max);
|
GstClockTime * max);
|
||||||
|
|
|
@ -879,7 +879,8 @@ gst_videoaggregator_update_qos (GstVideoAggregator * vagg, gdouble proportion,
|
||||||
GST_TIME_ARGS (ABS (diff)), GST_TIME_ARGS (timestamp));
|
GST_TIME_ARGS (ABS (diff)), GST_TIME_ARGS (timestamp));
|
||||||
|
|
||||||
GST_OBJECT_LOCK (vagg);
|
GST_OBJECT_LOCK (vagg);
|
||||||
gst_aggregator_get_latency (GST_AGGREGATOR (vagg), &live, NULL, NULL);
|
gst_aggregator_get_latency_unlocked (GST_AGGREGATOR (vagg), &live, NULL,
|
||||||
|
NULL);
|
||||||
|
|
||||||
vagg->priv->proportion = proportion;
|
vagg->priv->proportion = proportion;
|
||||||
if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) {
|
if (G_LIKELY (timestamp != GST_CLOCK_TIME_NONE)) {
|
||||||
|
|
Loading…
Reference in a new issue