From 2794ec836f6e534923b607f81dec6bf41b56a6b9 Mon Sep 17 00:00:00 2001 From: Henry Wilkes Date: Wed, 8 Apr 2020 17:08:41 +0100 Subject: [PATCH] nleoperation: stop setting next_base_time This property was unused. Part-of: --- plugins/nle/nlecomposition.c | 39 --------------------------------------- plugins/nle/nleoperation.c | 17 ----------------- plugins/nle/nleoperation.h | 2 -- 3 files changed, 58 deletions(-) diff --git a/plugins/nle/nlecomposition.c b/plugins/nle/nlecomposition.c index 277c0a3..a136a99 100644 --- a/plugins/nle/nlecomposition.c +++ b/plugins/nle/nlecomposition.c @@ -1764,31 +1764,6 @@ beach: /* WITH OBJECTS LOCK TAKEN */ static gboolean -update_base_time (GNode * node, GstClockTime * timestamp) -{ - if (NLE_IS_OPERATION (node->data)) - nle_operation_update_base_time (NLE_OPERATION (node->data), *timestamp); - - return FALSE; -} - -/* WITH OBJECTS LOCK TAKEN */ -static void -update_operations_base_time (NleComposition * comp, gboolean reverse) -{ - GstClockTime timestamp; - - if (reverse) - timestamp = comp->priv->segment->stop; - else - timestamp = comp->priv->segment->start; - - g_node_traverse (comp->priv->current, G_IN_ORDER, G_TRAVERSE_ALL, -1, - (GNodeTraverseFunc) update_base_time, ×tamp); -} - -/* WITH OBJECTS LOCK TAKEN */ -static gboolean _seek_current_stack (NleComposition * comp, GstEvent * event, gboolean flush_downstream) { @@ -1853,7 +1828,6 @@ seek_handling (NleComposition * comp, gint32 seqnum, _set_real_eos_seqnum_from_seek (comp, toplevel_seek); _remove_update_actions (comp); - update_operations_base_time (comp, !(comp->priv->segment->rate >= 0.0)); _seek_current_stack (comp, toplevel_seek, _have_to_flush_downstream (update_stack_reason)); } @@ -2255,8 +2229,6 @@ get_stack_list (NleComposition * comp, GstClockTime timestamp, GST_OBJECT_NAME (object)); stack = g_list_insert_sorted (stack, object, (GCompareFunc) priority_comp); - if (NLE_IS_OPERATION (object)) - nle_operation_update_base_time (NLE_OPERATION (object), timestamp); } } else { GST_LOG_OBJECT (comp, "too far, stopping iteration"); @@ -2282,8 +2254,6 @@ get_stack_list (NleComposition * comp, GstClockTime timestamp, GST_OBJECT_NAME (object)); stack = g_list_insert_sorted (stack, object, (GCompareFunc) priority_comp); - if (NLE_IS_OPERATION (object)) - nle_operation_update_base_time (NLE_OPERATION (object), timestamp); } } else { GST_LOG_OBJECT (comp, "too far, stopping iteration"); @@ -2300,8 +2270,6 @@ get_stack_list (NleComposition * comp, GstClockTime timestamp, GST_OBJECT_NAME (tmp->data)); stack = g_list_insert_sorted (stack, tmp->data, (GCompareFunc) priority_comp); - if (NLE_IS_OPERATION (tmp->data)) - nle_operation_update_base_time (NLE_OPERATION (tmp->data), timestamp); } /* convert that list to a stack */ @@ -2947,7 +2915,6 @@ _relink_single_node (NleComposition * comp, GNode * node, { NleObject *newobj; NleObject *newparent; - GNode *node_it; GstPad *srcpad = NULL, *sinkpad = NULL; if (G_UNLIKELY (!node)) @@ -2959,12 +2926,6 @@ _relink_single_node (NleComposition * comp, GNode * node, GST_DEBUG_OBJECT (comp, "newobj:%s", GST_ELEMENT_NAME ((GstElement *) newobj)); - newobj->recursive_media_duration_factor = 1.0f; - for (node_it = node; node_it != NULL; node_it = node_it->parent) { - NleObject *object = (NleObject *) node_it->data; - newobj->recursive_media_duration_factor *= object->media_duration_factor; - } - srcpad = NLE_OBJECT_SRC (newobj); gst_bin_add (GST_BIN (comp->priv->current_bin), GST_ELEMENT (newobj)); diff --git a/plugins/nle/nleoperation.c b/plugins/nle/nleoperation.c index 9db2a70..6f37eaa 100644 --- a/plugins/nle/nleoperation.c +++ b/plugins/nle/nleoperation.c @@ -195,7 +195,6 @@ nle_operation_reset (NleOperation * operation) { operation->num_sinks = 1; operation->realsinks = 0; - operation->next_base_time = 0; } static void @@ -827,19 +826,3 @@ nle_operation_signal_input_priority_changed (NleOperation * operation, g_signal_emit (operation, nle_operation_signals[INPUT_PRIORITY_CHANGED], 0, pad, priority); } - -void -nle_operation_update_base_time (NleOperation * operation, - GstClockTime timestamp) -{ - if (!nle_object_to_media_time (NLE_OBJECT (operation), - timestamp, &operation->next_base_time)) { - GST_WARNING_OBJECT (operation, "Trying to set a basetime outside of " - "ourself"); - - return; - } - - GST_INFO_OBJECT (operation, "Setting next_basetime to %" - GST_TIME_FORMAT, GST_TIME_ARGS (operation->next_base_time)); -} diff --git a/plugins/nle/nleoperation.h b/plugins/nle/nleoperation.h index 3f68f5d..c2db095 100644 --- a/plugins/nle/nleoperation.h +++ b/plugins/nle/nleoperation.h @@ -60,8 +60,6 @@ G_BEGIN_DECLS GList * sinks; /* The sink ghostpads */ GstElement *element; /* controlled element */ - - GstClockTime next_base_time; }; struct _NleOperationClass -- 2.7.4