diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-06-14 11:35:52 +0200 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-06-14 11:35:52 +0200 |
commit | 883e5ed09e851754acf70b45676481ee54b45b68 (patch) | |
tree | 15f688e95109fdf0ac91e6c46d20583fcb496d34 | |
parent | c303c915171cd442b629726402d19f60e809654a (diff) |
gnlcomposition/gnlfilesource: Don't use 'private' keyword.
This avoids build errors with C++ compilers.
-rw-r--r-- | gnl/gnlcomposition.c | 509 | ||||
-rw-r--r-- | gnl/gnlcomposition.h | 2 | ||||
-rw-r--r-- | gnl/gnlfilesource.c | 14 | ||||
-rw-r--r-- | gnl/gnlfilesource.h | 2 |
4 files changed, 259 insertions, 268 deletions
diff --git a/gnl/gnlcomposition.c b/gnl/gnlcomposition.c index 882be42..3e3e00d 100644 --- a/gnl/gnlcomposition.c +++ b/gnl/gnlcomposition.c @@ -131,8 +131,8 @@ struct _GnlCompositionPrivate }; #define OBJECT_IN_ACTIVE_SEGMENT(comp,element) \ - ((GNL_OBJECT_CAST(element)->start < comp->private->segment_stop) && \ - (GNL_OBJECT_CAST(element)->stop >= comp->private->segment_start)) + ((GNL_OBJECT_CAST(element)->start < comp->priv->segment_stop) && \ + (GNL_OBJECT_CAST(element)->stop >= comp->priv->segment_start)) static void gnl_composition_dispose (GObject * object); static void gnl_composition_finalize (GObject * object); @@ -168,20 +168,20 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, #define COMP_REAL_START(comp) \ - (MAX (comp->private->segment->start, ((GnlObject*)comp)->start)) + (MAX (comp->priv->segment->start, ((GnlObject*)comp)->start)) #define COMP_REAL_STOP(comp) \ - ((GST_CLOCK_TIME_IS_VALID (comp->private->segment->stop) \ - ? (MIN (comp->private->segment->stop, ((GnlObject*)comp)->stop))) \ + ((GST_CLOCK_TIME_IS_VALID (comp->priv->segment->stop) \ + ? (MIN (comp->priv->segment->stop, ((GnlObject*)comp)->stop))) \ : (((GnlObject*)comp)->stop)) #define COMP_ENTRY(comp, object) \ - (g_hash_table_lookup (comp->private->objects_hash, (gconstpointer) object)) + (g_hash_table_lookup (comp->priv->objects_hash, (gconstpointer) object)) #define COMP_OBJECTS_LOCK(comp) G_STMT_START { \ GST_LOG_OBJECT (comp, "locking objects_lock from thread %p", \ g_thread_self()); \ - g_mutex_lock (comp->private->objects_lock); \ + g_mutex_lock (comp->priv->objects_lock); \ GST_LOG_OBJECT (comp, "locked objects_lock from thread %p", \ g_thread_self()); \ } G_STMT_END @@ -189,14 +189,14 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, #define COMP_OBJECTS_UNLOCK(comp) G_STMT_START { \ GST_LOG_OBJECT (comp, "unlocking objects_lock from thread %p", \ g_thread_self()); \ - g_mutex_unlock (comp->private->objects_lock); \ + g_mutex_unlock (comp->priv->objects_lock); \ } G_STMT_END #define COMP_FLUSHING_LOCK(comp) G_STMT_START { \ GST_LOG_OBJECT (comp, "locking flushing_lock from thread %p", \ g_thread_self()); \ - g_mutex_lock (comp->private->flushing_lock); \ + g_mutex_lock (comp->priv->flushing_lock); \ GST_LOG_OBJECT (comp, "locked flushing_lock from thread %p", \ g_thread_self()); \ } G_STMT_END @@ -204,7 +204,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, #define COMP_FLUSHING_UNLOCK(comp) G_STMT_START { \ GST_LOG_OBJECT (comp, "unlocking flushing_lock from thread %p", \ g_thread_self()); \ - g_mutex_unlock (comp->private->flushing_lock); \ + g_mutex_unlock (comp->priv->flushing_lock); \ } G_STMT_END @@ -311,23 +311,23 @@ gnl_composition_init (GnlComposition * comp, { GST_OBJECT_FLAG_SET (comp, GNL_OBJECT_SOURCE); - comp->private = g_new0 (GnlCompositionPrivate, 1); - comp->private->objects_lock = g_mutex_new (); - comp->private->objects_start = NULL; - comp->private->objects_stop = NULL; + comp->priv = g_new0 (GnlCompositionPrivate, 1); + comp->priv->objects_lock = g_mutex_new (); + comp->priv->objects_start = NULL; + comp->priv->objects_stop = NULL; - comp->private->can_update = TRUE; - comp->private->update_required = FALSE; + comp->priv->can_update = TRUE; + comp->priv->update_required = FALSE; - comp->private->flushing_lock = g_mutex_new (); - comp->private->flushing = FALSE; - comp->private->pending_idle = 0; + comp->priv->flushing_lock = g_mutex_new (); + comp->priv->flushing = FALSE; + comp->priv->pending_idle = 0; - comp->private->segment = gst_segment_new (); + comp->priv->segment = gst_segment_new (); - comp->private->waitingpads = 0; + comp->priv->waitingpads = 0; - comp->private->objects_hash = g_hash_table_new_full + comp->priv->objects_hash = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, (GDestroyNotify) hash_value_destroy); @@ -339,33 +339,33 @@ gnl_composition_dispose (GObject * object) { GnlComposition *comp = GNL_COMPOSITION (object); - if (comp->private->dispose_has_run) + if (comp->priv->dispose_has_run) return; - comp->private->dispose_has_run = TRUE; + comp->priv->dispose_has_run = TRUE; - comp->private->can_update = TRUE; - comp->private->update_required = FALSE; + comp->priv->can_update = TRUE; + comp->priv->update_required = FALSE; - if (comp->private->ghostpad) { - gnl_object_remove_ghost_pad ((GnlObject *) object, comp->private->ghostpad); - comp->private->ghostpad = NULL; - comp->private->ghosteventprobe = 0; + if (comp->priv->ghostpad) { + gnl_object_remove_ghost_pad ((GnlObject *) object, comp->priv->ghostpad); + comp->priv->ghostpad = NULL; + comp->priv->ghosteventprobe = 0; } - if (comp->private->childseek) { - gst_event_unref (comp->private->childseek); - comp->private->childseek = NULL; + if (comp->priv->childseek) { + gst_event_unref (comp->priv->childseek); + comp->priv->childseek = NULL; } - if (comp->private->current) { - g_node_destroy (comp->private->current); - comp->private->current = NULL; + if (comp->priv->current) { + g_node_destroy (comp->priv->current); + comp->priv->current = NULL; } - if (comp->private->expandables) { - g_list_free (comp->private->expandables); - comp->private->expandables = NULL; + if (comp->priv->expandables) { + g_list_free (comp->priv->expandables); + comp->priv->expandables = NULL; } G_OBJECT_CLASS (parent_class)->dispose (object); @@ -379,20 +379,20 @@ gnl_composition_finalize (GObject * object) GST_INFO ("finalize"); COMP_OBJECTS_LOCK (comp); - g_list_free (comp->private->objects_start); - g_list_free (comp->private->objects_stop); - if (comp->private->current) - g_node_destroy (comp->private->current); - g_hash_table_destroy (comp->private->objects_hash); + g_list_free (comp->priv->objects_start); + g_list_free (comp->priv->objects_stop); + if (comp->priv->current) + g_node_destroy (comp->priv->current); + g_hash_table_destroy (comp->priv->objects_hash); COMP_OBJECTS_UNLOCK (comp); - g_mutex_free (comp->private->objects_lock); - gst_segment_free (comp->private->segment); + g_mutex_free (comp->priv->objects_lock); + gst_segment_free (comp->priv->segment); - g_mutex_free (comp->private->flushing_lock); + g_mutex_free (comp->priv->flushing_lock); - g_free (comp->private); + g_free (comp->priv); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -421,7 +421,7 @@ gnl_composition_get_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_UPDATE: - g_value_set_boolean (value, comp->private->can_update); + g_value_set_boolean (value, comp->priv->can_update); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -518,40 +518,40 @@ gnl_composition_reset (GnlComposition * comp) { GST_DEBUG_OBJECT (comp, "resetting"); - comp->private->segment_start = GST_CLOCK_TIME_NONE; - comp->private->segment_stop = GST_CLOCK_TIME_NONE; + comp->priv->segment_start = GST_CLOCK_TIME_NONE; + comp->priv->segment_stop = GST_CLOCK_TIME_NONE; - gst_segment_init (comp->private->segment, GST_FORMAT_TIME); + gst_segment_init (comp->priv->segment, GST_FORMAT_TIME); - if (comp->private->current) - g_node_destroy (comp->private->current); - comp->private->current = NULL; + if (comp->priv->current) + g_node_destroy (comp->priv->current); + comp->priv->current = NULL; - comp->private->stackvalid = FALSE; + comp->priv->stackvalid = FALSE; - if (comp->private->ghostpad) { - gnl_object_remove_ghost_pad ((GnlObject *) comp, comp->private->ghostpad); - comp->private->ghostpad = NULL; - comp->private->ghosteventprobe = 0; + if (comp->priv->ghostpad) { + gnl_object_remove_ghost_pad ((GnlObject *) comp, comp->priv->ghostpad); + comp->priv->ghostpad = NULL; + comp->priv->ghosteventprobe = 0; } - if (comp->private->childseek) { - gst_event_unref (comp->private->childseek); - comp->private->childseek = NULL; + if (comp->priv->childseek) { + gst_event_unref (comp->priv->childseek); + comp->priv->childseek = NULL; } - comp->private->waitingpads = 0; + comp->priv->waitingpads = 0; unlock_childs (comp); COMP_FLUSHING_LOCK (comp); - if (comp->private->pending_idle) - g_source_remove (comp->private->pending_idle); - comp->private->pending_idle = 0; - comp->private->flushing = FALSE; + if (comp->priv->pending_idle) + g_source_remove (comp->priv->pending_idle); + comp->priv->pending_idle = 0; + comp->priv->flushing = FALSE; COMP_FLUSHING_UNLOCK (comp); - comp->private->update_required = FALSE; + comp->priv->update_required = FALSE; GST_DEBUG_OBJECT (comp, "Composition now resetted"); } @@ -562,24 +562,24 @@ eos_main_thread (GnlComposition * comp) /* Set up a non-initial seek on segment_stop */ GST_DEBUG_OBJECT (comp, "Setting segment->start to segment_stop:%" GST_TIME_FORMAT, - GST_TIME_ARGS (comp->private->segment_stop)); - comp->private->segment->start = comp->private->segment_stop; + GST_TIME_ARGS (comp->priv->segment_stop)); + comp->priv->segment->start = comp->priv->segment_stop; seek_handling (comp, TRUE, TRUE); - if (!comp->private->current) { + if (!comp->priv->current) { /* If we're at the end, post SEGMENT_DONE, or push EOS */ GST_DEBUG_OBJECT (comp, "Nothing else to play"); - if (!(comp->private->segment->flags & GST_SEEK_FLAG_SEGMENT) - && comp->private->ghostpad) { + if (!(comp->priv->segment->flags & GST_SEEK_FLAG_SEGMENT) + && comp->priv->ghostpad) { GST_LOG_OBJECT (comp, "Pushing out EOS"); - gst_pad_push_event (comp->private->ghostpad, gst_event_new_eos ()); - } else if (comp->private->segment->flags & GST_SEEK_FLAG_SEGMENT) { + gst_pad_push_event (comp->priv->ghostpad, gst_event_new_eos ()); + } else if (comp->priv->segment->flags & GST_SEEK_FLAG_SEGMENT) { gint64 epos; - if (GST_CLOCK_TIME_IS_VALID (comp->private->segment->stop)) - epos = (MIN (comp->private->segment->stop, ((GnlObject *) comp)->stop)); + if (GST_CLOCK_TIME_IS_VALID (comp->priv->segment->stop)) + epos = (MIN (comp->priv->segment->stop, ((GnlObject *) comp)->stop)); else epos = (((GnlObject *) comp)->stop); @@ -587,7 +587,7 @@ eos_main_thread (GnlComposition * comp) GST_TIME_ARGS (epos)); gst_element_post_message (GST_ELEMENT_CAST (comp), gst_message_new_segment_done (GST_OBJECT (comp), - comp->private->segment->format, epos)); + comp->priv->segment->format, epos)); } } return FALSE; @@ -604,18 +604,18 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, GstEvent * event, switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NEWSEGMENT:{ COMP_FLUSHING_LOCK (comp); - if (comp->private->pending_idle) { + if (comp->priv->pending_idle) { GST_DEBUG_OBJECT (comp, "removing pending seek for main thread"); - g_source_remove (comp->private->pending_idle); + g_source_remove (comp->priv->pending_idle); } - comp->private->pending_idle = 0; - comp->private->flushing = FALSE; + comp->priv->pending_idle = 0; + comp->priv->flushing = FALSE; COMP_FLUSHING_UNLOCK (comp); } break; case GST_EVENT_EOS:{ COMP_FLUSHING_LOCK (comp); - if (comp->private->flushing) { + if (comp->priv->flushing) { GST_DEBUG_OBJECT (comp, "flushing, bailing out"); COMP_FLUSHING_UNLOCK (comp); keepit = FALSE; @@ -624,16 +624,16 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED, GstEvent * event, COMP_FLUSHING_UNLOCK (comp); GST_DEBUG_OBJECT (comp, "Adding eos handling to main thread"); - if (comp->private->pending_idle) { + if (comp->priv->pending_idle) { GST_WARNING_OBJECT (comp, "There was already a pending eos in main thread !"); - g_source_remove (comp->private->pending_idle); + g_source_remove (comp->priv->pending_idle); } /* FIXME : This should be switched to using a g_thread_create() instead * of a g_idle_add(). EXTENSIVE TESTING AND ANALYSIS REQUIRED BEFORE * DOING THE SWITCH !!! */ - comp->private->pending_idle = + comp->priv->pending_idle = g_idle_add ((GSourceFunc) eos_main_thread, (gpointer) comp); keepit = FALSE; @@ -708,14 +708,14 @@ have_to_update_pipeline (GnlComposition * comp) GST_DEBUG_OBJECT (comp, "segment[%" GST_TIME_FORMAT "--%" GST_TIME_FORMAT "] current[%" GST_TIME_FORMAT "--%" GST_TIME_FORMAT "]", - GST_TIME_ARGS (comp->private->segment->start), - GST_TIME_ARGS (comp->private->segment->stop), - GST_TIME_ARGS (comp->private->segment_start), - GST_TIME_ARGS (comp->private->segment_stop)); + GST_TIME_ARGS (comp->priv->segment->start), + GST_TIME_ARGS (comp->priv->segment->stop), + GST_TIME_ARGS (comp->priv->segment_start), + GST_TIME_ARGS (comp->priv->segment_stop)); - if (comp->private->segment->start < comp->private->segment_start) + if (comp->priv->segment->start < comp->priv->segment_start) return TRUE; - if (comp->private->segment->start >= comp->private->segment_stop) + if (comp->priv->segment->start >= comp->priv->segment_stop) return TRUE; return FALSE; } @@ -723,22 +723,22 @@ have_to_update_pipeline (GnlComposition * comp) static void gnl_composition_set_update (GnlComposition * comp, gboolean update) { - if (G_UNLIKELY (update == comp->private->can_update)) + if (G_UNLIKELY (update == comp->priv->can_update)) return; GST_DEBUG_OBJECT (comp, "update:%d [currently %d], update_required:%d", - update, comp->private->can_update, comp->private->update_required); + update, comp->priv->can_update, comp->priv->update_required); COMP_OBJECTS_LOCK (comp); - comp->private->can_update = update; + comp->priv->can_update = update; - if (update && comp->private->update_required) { + if (update && comp->priv->update_required) { GstClockTime curpos; /* Get current position */ if ((curpos = get_current_position (comp)) == GST_CLOCK_TIME_NONE) { - if (GST_CLOCK_TIME_IS_VALID (comp->private->segment_start)) - curpos = comp->private->segment->start = comp->private->segment_start; + if (GST_CLOCK_TIME_IS_VALID (comp->priv->segment_start)) + curpos = comp->priv->segment->start = comp->priv->segment_start; else curpos = 0; } @@ -771,23 +771,23 @@ get_new_seek_event (GnlComposition * comp, gboolean initial, GST_DEBUG_OBJECT (comp, "initial:%d", initial); /* remove the seek flag */ if (!(initial)) - flags = comp->private->segment->flags; + flags = comp->priv->segment->flags; else flags = GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH; GST_DEBUG_OBJECT (comp, "private->segment->start:%" GST_TIME_FORMAT " segment_start%" - GST_TIME_FORMAT, GST_TIME_ARGS (comp->private->segment->start), - GST_TIME_ARGS (comp->private->segment_start)); + GST_TIME_FORMAT, GST_TIME_ARGS (comp->priv->segment->start), + GST_TIME_ARGS (comp->priv->segment_start)); GST_DEBUG_OBJECT (comp, "private->segment->stop:%" GST_TIME_FORMAT " segment_stop%" - GST_TIME_FORMAT, GST_TIME_ARGS (comp->private->segment->stop), - GST_TIME_ARGS (comp->private->segment_stop)); + GST_TIME_FORMAT, GST_TIME_ARGS (comp->priv->segment->stop), + GST_TIME_ARGS (comp->priv->segment_stop)); - start = MAX (comp->private->segment->start, comp->private->segment_start); - stop = GST_CLOCK_TIME_IS_VALID (comp->private->segment->stop) - ? MIN (comp->private->segment->stop, comp->private->segment_stop) - : comp->private->segment_stop; + start = MAX (comp->priv->segment->start, comp->priv->segment_start); + stop = GST_CLOCK_TIME_IS_VALID (comp->priv->segment->stop) + ? MIN (comp->priv->segment->stop, comp->priv->segment_stop) + : comp->priv->segment_stop; if (updatestoponly) { starttype = GST_SEEK_TYPE_NONE; start = GST_CLOCK_TIME_NONE; @@ -796,8 +796,8 @@ get_new_seek_event (GnlComposition * comp, gboolean initial, GST_DEBUG_OBJECT (comp, "Created new seek event. Flags:%d, start:%" GST_TIME_FORMAT ", stop:%" GST_TIME_FORMAT, flags, GST_TIME_ARGS (start), GST_TIME_ARGS (stop)); - return gst_event_new_seek (comp->private->segment->rate, - comp->private->segment->format, flags, starttype, start, + return gst_event_new_seek (comp->priv->segment->rate, + comp->priv->segment->format, flags, starttype, start, GST_SEEK_TYPE_SET, stop); } @@ -812,8 +812,8 @@ get_current_position (GnlComposition * comp) gboolean res; /* 1. Try querying position downstream */ - if (comp->private->ghostpad) { - GstPad *peer = gst_pad_get_peer (comp->private->ghostpad); + if (comp->priv->ghostpad) { + GstPad *peer = gst_pad_get_peer (comp->priv->ghostpad); if (peer) { res = gst_pad_query_position (peer, &format, &value); gst_object_unref (peer); @@ -831,12 +831,12 @@ get_current_position (GnlComposition * comp) } /* 2. If downstream fails , try within the current stack */ - if (!comp->private->current) { + if (!comp->priv->current) { GST_DEBUG_OBJECT (comp, "No current stack, can't send query"); goto beach; } - obj = (GnlObject *) comp->private->current->data; + obj = (GnlObject *) comp->priv->current->data; if (!(pad = get_src_pad ((GstElement *) obj))) goto beach; @@ -873,12 +873,11 @@ seek_handling (GnlComposition * comp, gboolean initial, gboolean update) COMP_FLUSHING_LOCK (comp); GST_DEBUG_OBJECT (comp, "Setting flushing to TRUE"); - comp->private->flushing = TRUE; + comp->priv->flushing = TRUE; COMP_FLUSHING_UNLOCK (comp); if (update || have_to_update_pipeline (comp)) { - update_pipeline (comp, comp->private->segment->start, initial, TRUE, - !update); + update_pipeline (comp, comp->priv->segment->start, initial, TRUE, !update); } return TRUE; @@ -901,18 +900,18 @@ handle_seek_event (GnlComposition * comp, GstEvent * event) "start:%" GST_TIME_FORMAT " -- stop:%" GST_TIME_FORMAT " flags:%d", GST_TIME_ARGS (cur), GST_TIME_ARGS (stop), flags); - gst_segment_set_seek (comp->private->segment, + gst_segment_set_seek (comp->priv->segment, rate, format, flags, cur_type, cur, stop_type, stop, &update); GST_DEBUG_OBJECT (comp, "Segment now has flags:%d", - comp->private->segment->flags); + comp->priv->segment->flags); /* crop the segment start/stop values */ /* Only crop segment start value if we don't have a default object */ - if (comp->private->expandables == NULL) - comp->private->segment->start = MAX (comp->private->segment->start, + if (comp->priv->expandables == NULL) + comp->priv->segment->start = MAX (comp->priv->segment->start, ((GnlObject *) comp)->start); - comp->private->segment->stop = MIN (comp->private->segment->stop, + comp->priv->segment->stop = MIN (comp->priv->segment->stop, ((GnlObject *) comp)->stop); seek_handling (comp, TRUE, FALSE); @@ -958,10 +957,10 @@ gnl_composition_event_handler (GstPad * ghostpad, GstEvent * event) /* FIXME : What should we do here if waitingpads != 0 ?? */ /* Delay ? Ignore ? Refuse ? */ - if (res && comp->private->ghostpad) { + if (res && comp->priv->ghostpad) { GST_DEBUG_OBJECT (comp, "About to call gnl_event_pad_func()"); COMP_OBJECTS_LOCK (comp); - res = comp->private->gnl_event_pad_func (comp->private->ghostpad, event); + res = comp->priv->gnl_event_pad_func (comp->priv->ghostpad, event); COMP_OBJECTS_UNLOCK (comp); GST_DEBUG_OBJECT (comp, "Done calling gnl_event_pad_func() %d", res); } @@ -983,7 +982,7 @@ pad_blocked (GstPad * pad, gboolean blocked, GnlComposition * comp) static void gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target) { - gboolean hadghost = (comp->private->ghostpad) ? TRUE : FALSE; + gboolean hadghost = (comp->priv->ghostpad) ? TRUE : FALSE; if (target) GST_DEBUG_OBJECT (comp, "%s:%s , hadghost:%d", @@ -993,21 +992,20 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target) if (!(hadghost)) { /* Create new ghostpad */ - comp->private->ghostpad = + comp->priv->ghostpad = gnl_object_ghost_pad_no_target ((GnlObject *) comp, "src", GST_PAD_SRC); - if (!comp->private->gnl_event_pad_func) { - GST_DEBUG_OBJECT (comp->private->ghostpad, + if (!comp->priv->gnl_event_pad_func) { + GST_DEBUG_OBJECT (comp->priv->ghostpad, "About to replace event_pad_func"); - comp->private->gnl_event_pad_func = - GST_PAD_EVENTFUNC (comp->private->ghostpad); + comp->priv->gnl_event_pad_func = GST_PAD_EVENTFUNC (comp->priv->ghostpad); } - gst_pad_set_event_function (comp->private->ghostpad, + gst_pad_set_event_function (comp->priv->ghostpad, GST_DEBUG_FUNCPTR (gnl_composition_event_handler)); - GST_DEBUG_OBJECT (comp->private->ghostpad, "eventfunc is now %s", - GST_DEBUG_FUNCPTR_NAME (GST_PAD_EVENTFUNC (comp->private->ghostpad))); + GST_DEBUG_OBJECT (comp->priv->ghostpad, "eventfunc is now %s", + GST_DEBUG_FUNCPTR_NAME (GST_PAD_EVENTFUNC (comp->priv->ghostpad))); } else { GstPad *ptarget = - gst_ghost_pad_get_target (GST_GHOST_PAD (comp->private->ghostpad)); + gst_ghost_pad_get_target (GST_GHOST_PAD (comp->priv->ghostpad)); if (ptarget && ptarget == target) { GST_DEBUG_OBJECT (comp, @@ -1023,28 +1021,28 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target) gst_pad_set_blocked_async (ptarget, TRUE, (GstPadBlockCallback) pad_blocked, comp); /* remove event probe */ - if (comp->private->ghosteventprobe) { - gst_pad_remove_event_probe (ptarget, comp->private->ghosteventprobe); - comp->private->ghosteventprobe = 0; + if (comp->priv->ghosteventprobe) { + gst_pad_remove_event_probe (ptarget, comp->priv->ghosteventprobe); + comp->priv->ghosteventprobe = 0; } gst_object_unref (ptarget); } } gnl_object_ghost_pad_set_target ((GnlObject *) comp, - comp->private->ghostpad, target); + comp->priv->ghostpad, target); - if (target && (comp->private->ghosteventprobe == 0)) { - comp->private->ghosteventprobe = + if (target && (comp->priv->ghosteventprobe == 0)) { + comp->priv->ghosteventprobe = gst_pad_add_event_probe (target, G_CALLBACK (ghost_event_probe_handler), comp); GST_DEBUG_OBJECT (comp, "added event probe %d", - comp->private->ghosteventprobe); + comp->priv->ghosteventprobe); } if (!(hadghost)) { - gst_pad_set_active (comp->private->ghostpad, TRUE); - if (!(gst_element_add_pad (GST_ELEMENT (comp), comp->private->ghostpad))) + gst_pad_set_active (comp->priv->ghostpad, TRUE); + if (!(gst_element_add_pad (GST_ELEMENT (comp), comp->priv->ghostpad))) GST_WARNING ("Couldn't add the ghostpad"); else { COMP_OBJECTS_UNLOCK (comp); @@ -1070,7 +1068,7 @@ refine_start_stop_in_region_above_priority (GnlComposition * composition, GST_TIME_FORMAT " priority:%u", GST_TIME_ARGS (timestamp), GST_TIME_ARGS (start), GST_TIME_ARGS (stop), priority); - for (tmp = composition->private->objects_start; tmp; tmp = g_list_next (tmp)) { + for (tmp = composition->priv->objects_start; tmp; tmp = g_list_next (tmp)) { object = (GnlObject *) tmp->data; GST_LOG_OBJECT (object, "START %" GST_TIME_FORMAT "--%" GST_TIME_FORMAT, @@ -1093,7 +1091,7 @@ refine_start_stop_in_region_above_priority (GnlComposition * composition, break; } - for (tmp = composition->private->objects_stop; tmp; tmp = g_list_next (tmp)) { + for (tmp = composition->priv->objects_stop; tmp; tmp = g_list_next (tmp)) { object = (GnlObject *) tmp->data; GST_LOG_OBJECT (object, "STOP %" GST_TIME_FORMAT "--%" GST_TIME_FORMAT, @@ -1219,7 +1217,7 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp, guint32 priority, gboolean activeonly, GstClockTime * start, GstClockTime * stop, guint * highprio) { - GList *tmp = comp->private->objects_start; + GList *tmp = comp->priv->objects_start; GList *stack = NULL; GNode *ret = NULL; GstClockTime nstart = GST_CLOCK_TIME_NONE; @@ -1230,7 +1228,7 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp, "timestamp:%" GST_TIME_FORMAT ", priority:%u, activeonly:%d", GST_TIME_ARGS (timestamp), priority, activeonly); - GST_LOG ("objects_start:%p", comp->private->objects_start); + GST_LOG ("objects_start:%p", comp->priv->objects_start); for (; tmp; tmp = g_list_next (tmp)) { GnlObject *object = (GnlObject *) tmp->data; @@ -1258,7 +1256,7 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp, /* Insert the expandables */ if (G_LIKELY (timestamp < ((GnlObject *) comp)->stop)) - for (tmp = comp->private->expandables; tmp; tmp = g_list_next (tmp)) { + for (tmp = comp->priv->expandables; tmp; tmp = g_list_next (tmp)) { GST_DEBUG_OBJECT (comp, "Adding expandable %s sorted to the list", GST_OBJECT_NAME (tmp->data)); stack = g_list_insert_sorted (stack, tmp->data, @@ -1320,7 +1318,7 @@ get_clean_toplevel_stack (GnlComposition * comp, GstClockTime * timestamp, GST_DEBUG_OBJECT (comp, "Got empty stack, checking if it really was after the last object"); /* Find the first active object just after *timestamp */ - for (tmp = comp->private->objects_start; tmp; tmp = g_list_next (tmp)) { + for (tmp = comp->priv->objects_start; tmp; tmp = g_list_next (tmp)) { object = (GnlObject *) tmp->data; if ((object->start > *timestamp) && object->active) @@ -1509,7 +1507,7 @@ update_start_stop_duration (GnlComposition * comp) GnlObject *obj; GnlObject *cobj = (GnlObject *) comp; - if (!(comp->private->objects_start)) { + if (!(comp->priv->objects_start)) { GST_LOG ("no objects, resetting everything to 0"); if (cobj->start) { cobj->start = 0; @@ -1528,7 +1526,7 @@ update_start_stop_duration (GnlComposition * comp) } /* If we have a default object, the start position is 0 */ - if (comp->private->expandables) { + if (comp->priv->expandables) { GST_LOG_OBJECT (cobj, "Setting start to 0 because we have a default object"); if (cobj->start != 0) { @@ -1537,7 +1535,7 @@ update_start_stop_duration (GnlComposition * comp) } } else { /* Else it's the first object's start value */ - obj = (GnlObject *) comp->private->objects_start->data; + obj = (GnlObject *) comp->priv->objects_start->data; if (obj->start != cobj->start) { GST_LOG_OBJECT (obj, "setting start from %s to %" GST_TIME_FORMAT, GST_OBJECT_NAME (obj), GST_TIME_ARGS (obj->start)); @@ -1546,19 +1544,19 @@ update_start_stop_duration (GnlComposition * comp) } } - obj = (GnlObject *) comp->private->objects_stop->data; + obj = (GnlObject *) comp->priv->objects_stop->data; if (obj->stop != cobj->stop) { GST_LOG_OBJECT (obj, "setting stop from %s to %" GST_TIME_FORMAT, GST_OBJECT_NAME (obj), GST_TIME_ARGS (obj->stop)); - if (comp->private->expandables) { - GList *tmp = comp->private->expandables; + if (comp->priv->expandables) { + GList *tmp = comp->priv->expandables; while (tmp) { g_object_set (tmp->data, "duration", obj->stop, NULL); g_object_set (tmp->data, "media-duration", obj->stop, NULL); tmp = g_list_next (tmp); } } - comp->private->segment->stop = obj->stop; + comp->priv->segment->stop = obj->stop; cobj->stop = obj->stop; g_object_notify (G_OBJECT (cobj), "stop"); } @@ -1591,20 +1589,19 @@ no_more_pads_object_cb (GstElement * element, GnlComposition * comp) COMP_OBJECTS_LOCK (comp); - if (comp->private->current == NULL) { + if (comp->priv->current == NULL) { GST_DEBUG_OBJECT (comp, "current stack is empty !"); goto done; } - tmp = - g_node_find (comp->private->current, G_IN_ORDER, G_TRAVERSE_ALL, object); + tmp = g_node_find (comp->priv->current, G_IN_ORDER, G_TRAVERSE_ALL, object); if (tmp) { GnlCompositionEntry *entry = COMP_ENTRY (comp, object); - comp->private->waitingpads--; + comp->priv->waitingpads--; GST_LOG_OBJECT (comp, "Number of waiting pads is now %d", - comp->private->waitingpads); + comp->priv->waitingpads); if (tmp->parent) { /* child, link to parent */ @@ -1619,9 +1616,9 @@ no_more_pads_object_cb (GstElement * element, GnlComposition * comp) comp); } - if (comp->private->current && (comp->private->waitingpads == 0) - && comp->private->stackvalid) { - tpad = get_src_pad (GST_ELEMENT (comp->private->current->data)); + if (comp->priv->current && (comp->priv->waitingpads == 0) + && comp->priv->stackvalid) { + tpad = get_src_pad (GST_ELEMENT (comp->priv->current->data)); /* There are no more waiting pads for the currently configured timeline */ /* stack. */ @@ -1633,9 +1630,9 @@ no_more_pads_object_cb (GstElement * element, GnlComposition * comp) gnl_composition_ghost_pad_set_target (comp, tpad); /* 2. send pending seek */ - if (comp->private->childseek) { - GstEvent *childseek = comp->private->childseek; - comp->private->childseek = NULL; + if (comp->priv->childseek) { + GstEvent *childseek = comp->priv->childseek; + comp->priv->childseek = NULL; GST_INFO_OBJECT (comp, "Sending pending seek on %s:%s", GST_DEBUG_PAD_NAME (tpad)); COMP_OBJECTS_UNLOCK (comp); @@ -1643,11 +1640,11 @@ no_more_pads_object_cb (GstElement * element, GnlComposition * comp) GST_ERROR_OBJECT (comp, "Sending seek event failed!"); COMP_OBJECTS_LOCK (comp); } - comp->private->childseek = NULL; + comp->priv->childseek = NULL; /* Check again if this element is still in the stack */ - if (comp->private->current && - g_node_find (comp->private->current, G_IN_ORDER, G_TRAVERSE_ALL, + if (comp->priv->current && + g_node_find (comp->priv->current, G_IN_ORDER, G_TRAVERSE_ALL, object)) { /* 3. unblock ghostpad */ @@ -1762,7 +1759,7 @@ compare_relink_single_node (GnlComposition * comp, GNode * node, GnlCompositionEntry *entry = COMP_ENTRY (comp, newobj); GST_LOG_OBJECT (newobj, "no existing pad, connecting to 'no-more-pads'"); - comp->private->waitingpads++; + comp->priv->waitingpads++; if (!(entry->nomorepadshandler)) entry->nomorepadshandler = g_signal_connect (G_OBJECT (newobj), "no-more-pads", @@ -1886,7 +1883,7 @@ compare_deactivate_single_node (GnlComposition * comp, GNode * node, if (G_UNLIKELY (!oldparent)) { GST_LOG_OBJECT (comp, "Top-level object"); /* for top-level objects we just set the ghostpad target to NULL */ - if (comp->private->ghostpad) { + if (comp->priv->ghostpad) { GST_LOG_OBJECT (comp, "Setting ghostpad target to NULL"); gnl_composition_ghost_pad_set_target (comp, NULL); } else @@ -1967,17 +1964,16 @@ compare_relink_stack (GnlComposition * comp, GNode * stack, gboolean modify) GList *deactivate = NULL; /* 1. reset waiting pads for new stack */ - comp->private->waitingpads = 0; + comp->priv->waitingpads = 0; /* 2. Traverse old stack to deactivate no longer used objects */ deactivate = - compare_deactivate_single_node (comp, comp->private->current, stack, - modify); + compare_deactivate_single_node (comp, comp->priv->current, stack, modify); /* 3. Traverse new stack to do needed (re)links */ - compare_relink_single_node (comp, stack, comp->private->current); + compare_relink_single_node (comp, stack, comp->priv->current); return deactivate; } @@ -2069,7 +2065,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, COMP_OBJECTS_LOCK (comp); - if (G_UNLIKELY (!comp->private->can_update)) { + if (G_UNLIKELY (!comp->priv->can_update)) { COMP_OBJECTS_UNLOCK (comp); return TRUE; } @@ -2096,32 +2092,32 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, /* (re)build the stack and relink new elements */ stack = get_clean_toplevel_stack (comp, ¤ttime, &new_start, &new_stop); - samestack = are_same_stacks (comp->private->current, stack); + samestack = are_same_stacks (comp->priv->current, stack); if (!samestack) deactivate = compare_relink_stack (comp, stack, modify); - startchanged = comp->private->segment_start != currenttime; - stopchanged = comp->private->segment_stop != new_stop; + startchanged = comp->priv->segment_start != currenttime; + stopchanged = comp->priv->segment_stop != new_stop; /* set new segment_start/stop */ - comp->private->segment_start = currenttime; - comp->private->segment_stop = new_stop; + comp->priv->segment_start = currenttime; + comp->priv->segment_stop = new_stop; /* Clear pending child seek */ - if (comp->private->childseek) { - GST_DEBUG ("unreffing event %p", comp->private->childseek); - gst_event_unref (comp->private->childseek); - comp->private->childseek = NULL; + if (comp->priv->childseek) { + GST_DEBUG ("unreffing event %p", comp->priv->childseek); + gst_event_unref (comp->priv->childseek); + comp->priv->childseek = NULL; } /* activate new stack */ - if (comp->private->current) - g_node_destroy (comp->private->current); - comp->private->current = NULL; + if (comp->priv->current) + g_node_destroy (comp->priv->current); + comp->priv->current = NULL; /* invalidate the stack while modifying it */ - comp->private->stackvalid = FALSE; + comp->priv->stackvalid = FALSE; COMP_OBJECTS_UNLOCK (comp); @@ -2143,7 +2139,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, GST_DEBUG_OBJECT (comp, "Finished de-activating objects no longer used"); } - comp->private->current = stack; + comp->priv->current = stack; GST_DEBUG_OBJECT (comp, "activating objects in new stack to %s", gst_element_state_get_name (nextstate)); @@ -2152,14 +2148,14 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, unlock_activate_stack (comp, stack, change_state, nextstate); GST_DEBUG_OBJECT (comp, "Finished activating objects in new stack"); - if (comp->private->current) { + if (comp->priv->current) { GstEvent *event; /* There is a valid timeline stack */ COMP_OBJECTS_LOCK (comp); - comp->private->stackvalid = TRUE; + comp->priv->stackvalid = TRUE; /* 1. Create new seek event for newly configured timeline stack */ if (samestack && (startchanged || stopchanged)) @@ -2170,13 +2166,13 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, event = get_new_seek_event (comp, initial, FALSE); /* 2. Is the stack entirely ready ? */ - if (comp->private->waitingpads == 0) { + if (comp->priv->waitingpads == 0) { GstPad *pad = NULL; /* 2.a. Stack is entirely ready */ /* 3. Get toplevel object source pad */ - if ((pad = get_src_pad (GST_ELEMENT (comp->private->current->data)))) { + if ((pad = get_src_pad (GST_ELEMENT (comp->priv->current->data)))) { GST_DEBUG_OBJECT (comp, "We have a valid toplevel element pad %s:%s", GST_DEBUG_PAD_NAME (pad)); @@ -2207,21 +2203,20 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, /* 2.b. Stack isn't entirely ready, save seek event for later on */ GST_LOG_OBJECT (comp, "The timeline stack isn't entirely linked, delaying sending seek event (waitingpads:%d)", - comp->private->waitingpads); - comp->private->childseek = event; + comp->priv->waitingpads); + comp->priv->childseek = event; ret = TRUE; } COMP_OBJECTS_UNLOCK (comp); } else { - if ((!comp->private->objects_start) && comp->private->ghostpad) { + if ((!comp->priv->objects_start) && comp->priv->ghostpad) { GST_DEBUG_OBJECT (comp, "composition is now empty, removing ghostpad"); - gnl_object_remove_ghost_pad ((GnlObject *) comp, - comp->private->ghostpad); - comp->private->ghostpad = NULL; - comp->private->ghosteventprobe = 0; - comp->private->segment_start = 0; - comp->private->segment_stop = GST_CLOCK_TIME_NONE; + gnl_object_remove_ghost_pad ((GnlObject *) comp, comp->priv->ghostpad); + comp->priv->ghostpad = NULL; + comp->priv->ghosteventprobe = 0; + comp->priv->segment_start = 0; + comp->priv->segment_stop = GST_CLOCK_TIME_NONE; } } } else { @@ -2246,26 +2241,26 @@ object_start_stop_priority_changed (GnlObject * object, GST_TIME_ARGS (object->stop), object->priority); /* The topology of the ocmposition might have changed, update the lists */ - comp->private->objects_start = g_list_sort - (comp->private->objects_start, (GCompareFunc) objects_start_compare); + comp->priv->objects_start = g_list_sort + (comp->priv->objects_start, (GCompareFunc) objects_start_compare); - comp->private->objects_stop = g_list_sort - (comp->private->objects_stop, (GCompareFunc) objects_stop_compare); + comp->priv->objects_stop = g_list_sort + (comp->priv->objects_stop, (GCompareFunc) objects_stop_compare); - if (!comp->private->can_update) { - comp->private->update_required = TRUE; + if (!comp->priv->can_update) { + comp->priv->update_required = TRUE; update_start_stop_duration (comp); return; } /* Update pipeline if needed */ - if (comp->private->current && + if (comp->priv->current && (OBJECT_IN_ACTIVE_SEGMENT (comp, object) || - g_node_find (comp->private->current, G_IN_ORDER, G_TRAVERSE_ALL, + g_node_find (comp->priv->current, G_IN_ORDER, G_TRAVERSE_ALL, object))) { GstClockTime curpos = get_current_position (comp); if (curpos == GST_CLOCK_TIME_NONE) - curpos = comp->private->segment->start = comp->private->segment_start; + curpos = comp->priv->segment->start = comp->priv->segment_start; update_pipeline (comp, curpos, TRUE, TRUE, TRUE); } else update_start_stop_duration (comp); @@ -2278,15 +2273,15 @@ object_active_changed (GnlObject * object, GParamSpec * arg G_GNUC_UNUSED, GST_DEBUG_OBJECT (object, "active flag changed (%d), evaluating pipeline update", object->active); - if (!comp->private->can_update) { - comp->private->update_required = TRUE; + if (!comp->priv->can_update) { + comp->priv->update_required = TRUE; return; } - if (comp->private->current && OBJECT_IN_ACTIVE_SEGMENT (comp, object)) { + if (comp->priv->current && OBJECT_IN_ACTIVE_SEGMENT (comp, object)) { GstClockTime curpos = get_current_position (comp); if (curpos == GST_CLOCK_TIME_NONE) - curpos = comp->private->segment->start = comp->private->segment_start; + curpos = comp->priv->segment->start = comp->priv->segment_start; update_pipeline (comp, curpos, TRUE, TRUE, TRUE); } else update_start_stop_duration (comp); @@ -2297,13 +2292,12 @@ object_pad_removed (GnlObject * object, GstPad * pad, GnlComposition * comp) { GST_DEBUG_OBJECT (comp, "pad %s:%s was removed", GST_DEBUG_PAD_NAME (pad)); /* remove ghostpad if it's the current top stack object */ - if (comp->private->current - && ((GnlObject *) comp->private->current->data == object) - && comp->private->ghostpad) { + if (comp->priv->current && ((GnlObject *) comp->priv->current->data == object) + && comp->priv->ghostpad) { GST_DEBUG_OBJECT (comp, "Removing ghostpad"); - gnl_object_remove_ghost_pad ((GnlObject *) comp, comp->private->ghostpad); - comp->private->ghostpad = NULL; - comp->private->ghosteventprobe = 0; + gnl_object_remove_ghost_pad ((GnlObject *) comp, comp->priv->ghostpad); + comp->priv->ghostpad = NULL; + comp->priv->ghosteventprobe = 0; } else { /* unblock it ! */ gst_pad_set_blocked_async (pad, FALSE, (GstPadBlockCallback) pad_blocked, @@ -2348,7 +2342,7 @@ gnl_composition_add_object (GstBin * bin, GstElement * element) if (((((GnlObject *) element)->priority == G_MAXUINT32) || GNL_OBJECT_IS_EXPANDABLE (element)) && - g_list_find (comp->private->expandables, element)) { + g_list_find (comp->priv->expandables, element)) { GST_WARNING_OBJECT (comp, "We already have an expandable, remove it before adding new one"); ret = FALSE; @@ -2395,68 +2389,66 @@ gnl_composition_add_object (GstBin * bin, GstElement * element) "pad-added", G_CALLBACK (object_pad_added), comp); /* ...and add it to the hash table */ - g_hash_table_insert (comp->private->objects_hash, element, entry); + g_hash_table_insert (comp->priv->objects_hash, element, entry); /* Special case for default source. */ if ((((GnlObject *) element)->priority == G_MAXUINT32) || GNL_OBJECT_IS_EXPANDABLE (element)) { /* It doesn't get added to objects_start and objects_stop. */ - comp->private->expandables = g_list_prepend (comp->private->expandables, - element); + comp->priv->expandables = g_list_prepend (comp->priv->expandables, element); goto chiringuito; } /* add it sorted to the objects list */ - comp->private->objects_start = g_list_insert_sorted - (comp->private->objects_start, element, + comp->priv->objects_start = g_list_insert_sorted + (comp->priv->objects_start, element, (GCompareFunc) objects_start_compare); - if (comp->private->objects_start) + if (comp->priv->objects_start) GST_LOG_OBJECT (comp, "Head of objects_start is now %s [%" GST_TIME_FORMAT "--%" GST_TIME_FORMAT "]", - GST_OBJECT_NAME (comp->private->objects_start->data), + GST_OBJECT_NAME (comp->priv->objects_start->data), GST_TIME_ARGS (((GnlObject *) - comp->private->objects_start->data)->start), + comp->priv->objects_start->data)->start), GST_TIME_ARGS (((GnlObject *) - comp->private->objects_start->data)->stop)); + comp->priv->objects_start->data)->stop)); - comp->private->objects_stop = g_list_insert_sorted - (comp->private->objects_stop, element, - (GCompareFunc) objects_stop_compare); + comp->priv->objects_stop = g_list_insert_sorted + (comp->priv->objects_stop, element, (GCompareFunc) objects_stop_compare); - if (comp->private->objects_stop) + if (comp->priv->objects_stop) GST_LOG_OBJECT (comp, "Head of objects_stop is now %s [%" GST_TIME_FORMAT "--%" GST_TIME_FORMAT "]", - GST_OBJECT_NAME (comp->private->objects_stop->data), + GST_OBJECT_NAME (comp->priv->objects_stop->data), GST_TIME_ARGS (((GnlObject *) - comp->private->objects_stop->data)->start), + comp->priv->objects_stop->data)->start), GST_TIME_ARGS (((GnlObject *) - comp->private->objects_stop->data)->stop)); + comp->priv->objects_stop->data)->stop)); GST_DEBUG_OBJECT (comp, "segment_start:%" GST_TIME_FORMAT " segment_stop:%" GST_TIME_FORMAT, - GST_TIME_ARGS (comp->private->segment_start), - GST_TIME_ARGS (comp->private->segment_stop)); + GST_TIME_ARGS (comp->priv->segment_start), + GST_TIME_ARGS (comp->priv->segment_stop)); update_required = OBJECT_IN_ACTIVE_SEGMENT (comp, element) - || (!comp->private->current); + || (!comp->priv->current); /* We only need the current position if we're going to update */ - if (update_required && comp->private->can_update) + if (update_required && comp->priv->can_update) if ((curpos = get_current_position (comp)) == GST_CLOCK_TIME_NONE) - curpos = comp->private->segment_start; + curpos = comp->priv->segment_start; COMP_OBJECTS_UNLOCK (comp); /* If we added within currently configured segment OR the pipeline was * * previously empty, THEN update pipeline */ - if (G_LIKELY (update_required && comp->private->can_update)) + if (G_LIKELY (update_required && comp->priv->can_update)) update_pipeline (comp, curpos, TRUE, TRUE, TRUE); else { - if (!comp->private->can_update) - comp->private->update_required |= update_required; + if (!comp->priv->can_update) + comp->priv->update_required |= update_required; update_start_stop_duration (comp); } @@ -2493,30 +2485,29 @@ gnl_composition_remove_object (GstBin * bin, GstElement * element) if ((((GnlObject *) element)->priority == G_MAXUINT32) || GNL_OBJECT_IS_EXPANDABLE (element)) { /* Find it in the list */ - comp->private->expandables = - g_list_remove (comp->private->expandables, element); + comp->priv->expandables = g_list_remove (comp->priv->expandables, element); } else { /* remove it from the objects list and resort the lists */ - comp->private->objects_start = g_list_remove - (comp->private->objects_start, element); + comp->priv->objects_start = g_list_remove + (comp->priv->objects_start, element); - comp->private->objects_stop = g_list_remove - (comp->private->objects_stop, element); + comp->priv->objects_stop = g_list_remove + (comp->priv->objects_stop, element); GST_LOG_OBJECT (element, "Removed from the objects start/stop list"); } - if (!(g_hash_table_remove (comp->private->objects_hash, element))) + if (!(g_hash_table_remove (comp->priv->objects_hash, element))) goto chiringuito; update_required = OBJECT_IN_ACTIVE_SEGMENT (comp, element) || (((GnlObject *) element)->priority == G_MAXUINT32) || GNL_OBJECT_IS_EXPANDABLE (element); - if (update_required && comp->private->can_update) { + if (update_required && comp->priv->can_update) { curpos = get_current_position (comp); if (G_UNLIKELY (curpos == GST_CLOCK_TIME_NONE)) - curpos = comp->private->segment_start; + curpos = comp->priv->segment_start; } COMP_OBJECTS_UNLOCK (comp); @@ -2526,8 +2517,8 @@ gnl_composition_remove_object (GstBin * bin, GstElement * element) if (G_LIKELY (update_required)) update_pipeline (comp, curpos, TRUE, TRUE, TRUE); else { - if (!comp->private->can_update) - comp->private->update_required |= update_required; + if (!comp->priv->can_update) + comp->priv->update_required |= update_required; update_start_stop_duration (comp); } diff --git a/gnl/gnlcomposition.h b/gnl/gnlcomposition.h index 7e91a74..d47a8a9 100644 --- a/gnl/gnlcomposition.h +++ b/gnl/gnlcomposition.h @@ -48,7 +48,7 @@ struct _GnlComposition /*< private >*/ - GnlCompositionPrivate *private; + GnlCompositionPrivate *priv; }; struct _GnlCompositionClass diff --git a/gnl/gnlfilesource.c b/gnl/gnlfilesource.c index ca3c888..21c01f4 100644 --- a/gnl/gnlfilesource.c +++ b/gnl/gnlfilesource.c @@ -121,7 +121,7 @@ gnl_filesource_init (GnlFileSource * filesource, GstElement *filesrc, *decodebin; GST_OBJECT_FLAG_SET (filesource, GNL_OBJECT_SOURCE); - filesource->private = g_new0 (GnlFileSourcePrivate, 1); + filesource->priv = g_new0 (GnlFileSourcePrivate, 1); /* We create a bin with source and decodebin within */ @@ -138,7 +138,7 @@ gnl_filesource_init (GnlFileSource * filesource, g_warning ("Could not create a decodebin element, are you sure you have decodebin installed ?"); - filesource->private->filesource = filesrc; + filesource->priv->filesource = filesrc; if (filesrc && decodebin) { gst_bin_add_many (GST_BIN (filesource), filesrc, decodebin, NULL); @@ -159,11 +159,11 @@ gnl_filesource_dispose (GObject * object) { GnlFileSource *filesource = (GnlFileSource *) object; - if (filesource->private->dispose_has_run) + if (filesource->priv->dispose_has_run) return; GST_INFO_OBJECT (object, "dispose"); - filesource->private->dispose_has_run = TRUE; + filesource->priv->dispose_has_run = TRUE; G_OBJECT_CLASS (parent_class)->dispose (object); GST_INFO_OBJECT (object, "dispose END"); @@ -175,7 +175,7 @@ gnl_filesource_finalize (GObject * object) GnlFileSource *filesource = (GnlFileSource *) object; GST_INFO_OBJECT (object, "finalize"); - g_free (filesource->private); + g_free (filesource->priv); G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -189,7 +189,7 @@ gnl_filesource_set_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_LOCATION: /* proxy to gnomevfssrc */ - g_object_set_property (G_OBJECT (fs->private->filesource), "location", + g_object_set_property (G_OBJECT (fs->priv->filesource), "location", value); break; default: @@ -207,7 +207,7 @@ gnl_filesource_get_property (GObject * object, guint prop_id, switch (prop_id) { case ARG_LOCATION: /* proxy from gnomevfssrc */ - g_object_get_property (G_OBJECT (fs->private->filesource), "location", + g_object_get_property (G_OBJECT (fs->priv->filesource), "location", value); break; default: diff --git a/gnl/gnlfilesource.h b/gnl/gnlfilesource.h index bbc5ffc..9eb08af 100644 --- a/gnl/gnlfilesource.h +++ b/gnl/gnlfilesource.h @@ -46,7 +46,7 @@ struct _GnlFileSource /*< private >*/ - GnlFileSourcePrivate *private; + GnlFileSourcePrivate *priv; }; struct _GnlFileSourceClass |