mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
aggregator: fix type for latency property (int64 -> GStClockTime)
The value is used as GstClockTiem in the code. Adapt the hack^H^H^H^Hcode in live-adder.
This commit is contained in:
parent
3d0dad59a0
commit
063787d770
1 changed files with 10 additions and 11 deletions
|
@ -103,8 +103,8 @@ gst_aggregator_start_time_selection_get_type (void)
|
||||||
static void gst_aggregator_merge_tags (GstAggregator * aggregator,
|
static void gst_aggregator_merge_tags (GstAggregator * aggregator,
|
||||||
const GstTagList * tags, GstTagMergeMode mode);
|
const GstTagList * tags, GstTagMergeMode mode);
|
||||||
static void gst_aggregator_set_latency_property (GstAggregator * agg,
|
static void gst_aggregator_set_latency_property (GstAggregator * agg,
|
||||||
gint64 latency);
|
GstClockTime latency);
|
||||||
static gint64 gst_aggregator_get_latency_property (GstAggregator * agg);
|
static GstClockTime gst_aggregator_get_latency_property (GstAggregator * agg);
|
||||||
|
|
||||||
static GstClockTime gst_aggregator_get_latency_unlocked (GstAggregator * self);
|
static GstClockTime gst_aggregator_get_latency_unlocked (GstAggregator * self);
|
||||||
|
|
||||||
|
@ -2170,7 +2170,7 @@ gst_aggregator_finalize (GObject * object)
|
||||||
* as unresponsive.
|
* as unresponsive.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
gst_aggregator_set_latency_property (GstAggregator * self, gint64 latency)
|
gst_aggregator_set_latency_property (GstAggregator * self, GstClockTime latency)
|
||||||
{
|
{
|
||||||
gboolean changed;
|
gboolean changed;
|
||||||
|
|
||||||
|
@ -2221,12 +2221,12 @@ gst_aggregator_set_latency_property (GstAggregator * self, gint64 latency)
|
||||||
* before a pad is deemed unresponsive. A value of -1 means an
|
* before a pad is deemed unresponsive. A value of -1 means an
|
||||||
* unlimited time.
|
* unlimited time.
|
||||||
*/
|
*/
|
||||||
static gint64
|
static GstClockTime
|
||||||
gst_aggregator_get_latency_property (GstAggregator * agg)
|
gst_aggregator_get_latency_property (GstAggregator * agg)
|
||||||
{
|
{
|
||||||
gint64 res;
|
GstClockTime res;
|
||||||
|
|
||||||
g_return_val_if_fail (GST_IS_AGGREGATOR (agg), -1);
|
g_return_val_if_fail (GST_IS_AGGREGATOR (agg), GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (agg);
|
GST_OBJECT_LOCK (agg);
|
||||||
res = agg->priv->latency;
|
res = agg->priv->latency;
|
||||||
|
@ -2243,7 +2243,7 @@ gst_aggregator_set_property (GObject * object, guint prop_id,
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_LATENCY:
|
case PROP_LATENCY:
|
||||||
gst_aggregator_set_latency_property (agg, g_value_get_int64 (value));
|
gst_aggregator_set_latency_property (agg, g_value_get_uint64 (value));
|
||||||
break;
|
break;
|
||||||
case PROP_START_TIME_SELECTION:
|
case PROP_START_TIME_SELECTION:
|
||||||
agg->priv->start_time_selection = g_value_get_enum (value);
|
agg->priv->start_time_selection = g_value_get_enum (value);
|
||||||
|
@ -2265,7 +2265,7 @@ gst_aggregator_get_property (GObject * object, guint prop_id,
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case PROP_LATENCY:
|
case PROP_LATENCY:
|
||||||
g_value_set_int64 (value, gst_aggregator_get_latency_property (agg));
|
g_value_set_uint64 (value, gst_aggregator_get_latency_property (agg));
|
||||||
break;
|
break;
|
||||||
case PROP_START_TIME_SELECTION:
|
case PROP_START_TIME_SELECTION:
|
||||||
g_value_set_enum (value, agg->priv->start_time_selection);
|
g_value_set_enum (value, agg->priv->start_time_selection);
|
||||||
|
@ -2318,11 +2318,10 @@ gst_aggregator_class_init (GstAggregatorClass * klass)
|
||||||
gobject_class->finalize = gst_aggregator_finalize;
|
gobject_class->finalize = gst_aggregator_finalize;
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_LATENCY,
|
g_object_class_install_property (gobject_class, PROP_LATENCY,
|
||||||
g_param_spec_int64 ("latency", "Buffer latency",
|
g_param_spec_uint64 ("latency", "Buffer latency",
|
||||||
"Additional latency in live mode to allow upstream "
|
"Additional latency in live mode to allow upstream "
|
||||||
"to take longer to produce buffers for the current "
|
"to take longer to produce buffers for the current "
|
||||||
"position (in nanoseconds)", 0,
|
"position (in nanoseconds)", 0, G_MAXUINT64,
|
||||||
(G_MAXLONG == G_MAXINT64) ? G_MAXINT64 : (G_MAXLONG * GST_SECOND - 1),
|
|
||||||
DEFAULT_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
DEFAULT_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||||
|
|
||||||
g_object_class_install_property (gobject_class, PROP_START_TIME_SELECTION,
|
g_object_class_install_property (gobject_class, PROP_START_TIME_SELECTION,
|
||||||
|
|
Loading…
Reference in a new issue