mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-18 12:15:19 +00:00
composition: Remove useless functions to add GSources and add debugging
Co-Authored by: Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
This commit is contained in:
parent
668331561b
commit
82cbbf3b86
1 changed files with 18 additions and 30 deletions
|
@ -247,6 +247,7 @@ static GstPadProbeReturn _add_emit_commited_and_restart_task (GnlComposition *
|
||||||
comp);
|
comp);
|
||||||
static gboolean _set_real_eos_seqnum_from_seek (GnlComposition * comp,
|
static gboolean _set_real_eos_seqnum_from_seek (GnlComposition * comp,
|
||||||
GstEvent * event);
|
GstEvent * event);
|
||||||
|
static gboolean _emit_commited_signal_func (GnlComposition * comp);
|
||||||
|
|
||||||
|
|
||||||
/* COMP_REAL_START: actual position to start current playback at. */
|
/* COMP_REAL_START: actual position to start current playback at. */
|
||||||
|
@ -494,6 +495,9 @@ _add_gsource (GnlComposition * comp, GSourceFunc func,
|
||||||
GSource *source;
|
GSource *source;
|
||||||
GnlCompositionPrivate *priv = comp->priv;
|
GnlCompositionPrivate *priv = comp->priv;
|
||||||
|
|
||||||
|
GST_INFO_OBJECT (comp, "Adding GSource for function: %s",
|
||||||
|
GST_DEBUG_FUNCPTR_NAME (func));
|
||||||
|
|
||||||
MAIN_CONTEXT_LOCK (comp);
|
MAIN_CONTEXT_LOCK (comp);
|
||||||
source = g_idle_source_new ();
|
source = g_idle_source_new ();
|
||||||
g_source_set_callback (source, func, data, destroy);
|
g_source_set_callback (source, func, data, destroy);
|
||||||
|
@ -503,24 +507,6 @@ _add_gsource (GnlComposition * comp, GSourceFunc func,
|
||||||
MAIN_CONTEXT_UNLOCK (comp);
|
MAIN_CONTEXT_UNLOCK (comp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_add_update_gsource (GnlComposition * comp)
|
|
||||||
{
|
|
||||||
GST_DEBUG_OBJECT (comp, "Adding GSource");
|
|
||||||
|
|
||||||
_add_gsource (comp, (GSourceFunc) update_pipeline_func, comp,
|
|
||||||
NULL, G_PRIORITY_DEFAULT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
_add_commit_gsource (GnlComposition * comp)
|
|
||||||
{
|
|
||||||
GST_DEBUG_OBJECT (comp, "Adding GSource");
|
|
||||||
|
|
||||||
_add_gsource (comp, (GSourceFunc) _commit_func, comp, NULL,
|
|
||||||
G_PRIORITY_DEFAULT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_add_seek_gsource (GnlComposition * comp, GstEvent * event)
|
_add_seek_gsource (GnlComposition * comp, GstEvent * event)
|
||||||
{
|
{
|
||||||
|
@ -556,15 +542,6 @@ _initialize_stack_func (GnlComposition * comp)
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_add_initialize_stack_gsource (GnlComposition * comp)
|
|
||||||
{
|
|
||||||
GST_DEBUG_OBJECT (comp, "Adding GSource");
|
|
||||||
|
|
||||||
_add_gsource (comp, (GSourceFunc) _initialize_stack_func, comp,
|
|
||||||
NULL, G_PRIORITY_DEFAULT);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_free_child_io_data (gpointer childio)
|
_free_child_io_data (gpointer childio)
|
||||||
{
|
{
|
||||||
|
@ -806,6 +783,14 @@ gnl_composition_class_init (GnlCompositionClass * klass)
|
||||||
gnlobject_class->commit = gnl_composition_commit_func;
|
gnlobject_class->commit = gnl_composition_commit_func;
|
||||||
klass->remove_object_handler = remove_object_handler;
|
klass->remove_object_handler = remove_object_handler;
|
||||||
klass->add_object_handler = add_object_handler;
|
klass->add_object_handler = add_object_handler;
|
||||||
|
|
||||||
|
GST_DEBUG_FUNCPTR (_seek_pipeline_func);
|
||||||
|
GST_DEBUG_FUNCPTR (_remove_object_func);
|
||||||
|
GST_DEBUG_FUNCPTR (_add_object_func);
|
||||||
|
GST_DEBUG_FUNCPTR (update_pipeline_func);
|
||||||
|
GST_DEBUG_FUNCPTR (_commit_func);
|
||||||
|
GST_DEBUG_FUNCPTR (_emit_commited_signal_func);
|
||||||
|
GST_DEBUG_FUNCPTR (_initialize_stack_func);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1269,7 +1254,8 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED,
|
||||||
return GST_PAD_PROBE_OK;
|
return GST_PAD_PROBE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
_add_update_gsource (comp);
|
_add_gsource (comp, (GSourceFunc) update_pipeline_func, comp,
|
||||||
|
NULL, G_PRIORITY_DEFAULT);
|
||||||
retval = GST_PAD_PROBE_DROP;
|
retval = GST_PAD_PROBE_DROP;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1363,7 +1349,8 @@ have_to_update_pipeline (GnlComposition * comp)
|
||||||
static gboolean
|
static gboolean
|
||||||
gnl_composition_commit_func (GnlObject * object, gboolean recurse)
|
gnl_composition_commit_func (GnlObject * object, gboolean recurse)
|
||||||
{
|
{
|
||||||
_add_commit_gsource (GNL_COMPOSITION (object));
|
_add_gsource (GNL_COMPOSITION (object), (GSourceFunc) _commit_func,
|
||||||
|
GNL_COMPOSITION (object), NULL, G_PRIORITY_DEFAULT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2418,7 +2405,8 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition)
|
||||||
gst_iterator_free (children);
|
gst_iterator_free (children);
|
||||||
}
|
}
|
||||||
|
|
||||||
_add_initialize_stack_gsource (comp);
|
_add_gsource (comp, (GSourceFunc) _initialize_stack_func, comp,
|
||||||
|
NULL, G_PRIORITY_DEFAULT);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
_set_all_children_state (comp, GST_STATE_READY);
|
_set_all_children_state (comp, GST_STATE_READY);
|
||||||
|
|
Loading…
Reference in a new issue