mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
aggregator: add method to update srcpad segment
This commit is contained in:
parent
020eb2c346
commit
88999d3b0e
2 changed files with 26 additions and 0 deletions
|
@ -3460,3 +3460,26 @@ gst_aggregator_simple_get_next_time (GstAggregator * self)
|
||||||
|
|
||||||
return next_time;
|
return next_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gst_aggregator_update_segment:
|
||||||
|
*
|
||||||
|
* Subclasses should use this to update the segment on their
|
||||||
|
* source pad, instead of directly pushing new segment events
|
||||||
|
* downstream.
|
||||||
|
*
|
||||||
|
* Since: 1.18
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
gst_aggregator_update_segment (GstAggregator * self, GstSegment * segment)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GST_IS_AGGREGATOR (self));
|
||||||
|
g_return_if_fail (segment != NULL);
|
||||||
|
|
||||||
|
GST_INFO_OBJECT (self, "Updating srcpad segment: %" GST_PTR_FORMAT, segment);
|
||||||
|
|
||||||
|
GST_OBJECT_LOCK (self);
|
||||||
|
GST_AGGREGATOR_PAD (self->srcpad)->segment = *segment;
|
||||||
|
self->priv->send_segment = TRUE;
|
||||||
|
GST_OBJECT_UNLOCK (self);
|
||||||
|
}
|
||||||
|
|
|
@ -385,6 +385,9 @@ void gst_aggregator_get_allocator (GstAggregator
|
||||||
GST_BASE_API
|
GST_BASE_API
|
||||||
GstClockTime gst_aggregator_simple_get_next_time (GstAggregator * self);
|
GstClockTime gst_aggregator_simple_get_next_time (GstAggregator * self);
|
||||||
|
|
||||||
|
GST_BASE_API
|
||||||
|
void gst_aggregator_update_segment (GstAggregator * self,
|
||||||
|
GstSegment * segment);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue