Always prefer gst_object_(un)ref over g_object_(un)ref
authorThibault Saunier <thibault.saunier@collabora.com>
Sat, 16 Mar 2013 22:05:04 +0000 (19:05 -0300)
committerThibault Saunier <thibault.saunier@collabora.com>
Mon, 18 Mar 2013 15:48:41 +0000 (12:48 -0300)
Making the refcount issue debugging easier

36 files changed:
ges/ges-asset.c
ges/ges-base-xml-formatter.c
ges/ges-clip.c
ges/ges-container.c
ges/ges-pitivi-formatter.c
ges/ges-project.c
ges/ges-simple-timeline-layer.c
ges/ges-test-clip.c
ges/ges-text-overlay-clip.c
ges/ges-text-overlay.c
ges/ges-timeline-layer.c
ges/ges-timeline-pipeline.c
ges/ges-timeline.c
ges/ges-title-clip.c
ges/ges-title-source.c
ges/ges-track-element.c
ges/ges-track.c
ges/ges-transition-clip.c
ges/ges-uri-asset.c
ges/ges-utils.c
tests/check/ges/backgroundsource.c
tests/check/ges/basic.c
tests/check/ges/effects.c
tests/check/ges/layer.c
tests/check/ges/overlays.c
tests/check/ges/simplelayer.c
tests/check/ges/test-utils.c
tests/check/ges/text_properties.c
tests/check/ges/timelineedition.c
tests/check/ges/titles.c
tests/check/ges/transition.c
tests/check/ges/uriclip.c
tests/examples/assets.c
tests/examples/concatenate.c
tests/examples/ges-ui.c
tools/ges-launch.c

index 65e9a30..3aefbbb 100644 (file)
@@ -509,7 +509,7 @@ ges_asset_cache_set_loaded (GType extractable_type, const gchar * id,
 
     g_list_foreach (entry->results,
         (GFunc) g_simple_async_result_complete_in_idle, NULL);
-    g_list_free_full (entry->results, g_object_unref);
+    g_list_free_full (entry->results, gst_object_unref);
     entry->results = NULL;
     UNLOCK_CACHE;
   }
@@ -820,7 +820,7 @@ done:
  *        ges_asset_get_id (source), error->message);
  *   }
  *
- *   g_object_unref (mfs);
+ *   gst_object_unref (mfs);
  * }
  *
  * // The request:
@@ -982,7 +982,7 @@ ges_asset_request_finish (GAsyncResult * res, GError ** error)
   object = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object),
       res, error);
 
-  g_object_unref (source_object);
+  gst_object_unref (source_object);
 
   return GES_ASSET (object);
 }
index 4100f11..c692b78 100644 (file)
@@ -152,7 +152,7 @@ done:
     g_free (xmlcontent);
 
   if (file)
-    g_object_unref (file);
+    gst_object_unref (file);
 
   return parsecontext;
 
@@ -197,7 +197,7 @@ _can_load_uri (GESFormatterClass * class, const gchar * uri, GError ** error)
   g_markup_parse_context_free (ctx);
 
 done:
-  g_object_unref (self);
+  gst_object_unref (self);
   return ret;
 }
 
@@ -257,8 +257,8 @@ _save_to_uri (GESFormatter * formatter, GESTimeline * timeline,
         lerror->message);
 
   g_string_free (str, TRUE);
-  g_object_unref (file);
-  g_object_unref (stream);
+  gst_object_unref (file);
+  gst_object_unref (stream);
 
   if (lerror)
     g_propagate_error (error, lerror);
@@ -266,17 +266,17 @@ _save_to_uri (GESFormatter * formatter, GESTimeline * timeline,
   return ret;
 
 serialization_failed:
-  g_object_unref (file);
+  gst_object_unref (file);
 
   g_output_stream_close (stream, NULL, NULL);
-  g_object_unref (stream);
+  gst_object_unref (stream);
   if (lerror)
     g_propagate_error (error, lerror);
 
   return FALSE;
 
 failed_opening_file:
-  g_object_unref (file);
+  gst_object_unref (file);
 
   GST_WARNING_OBJECT (formatter, "Could not open %s because: %s", uri,
       lerror->message);
@@ -396,7 +396,7 @@ _set_child_property (GQuark field_id, const GValue * value,
 
   g_object_set_property (G_OBJECT (element), pspec->name, value);
   g_param_spec_unref (pspec);
-  g_object_unref (element);
+  gst_object_unref (element);
 }
 
 void
index 62023aa..61c4bb1 100644 (file)
@@ -167,7 +167,7 @@ _remove_child (GESContainer * container, GESTimelineElement * element)
 static void
 add_tlobj_to_list (gpointer key, gpointer tlobj, GList ** list)
 {
-  *list = g_list_prepend (*list, g_object_ref (tlobj));
+  *list = g_list_prepend (*list, gst_object_ref (tlobj));
 }
 
 static GList *
@@ -710,18 +710,18 @@ ges_clip_move_to_layer (GESClip * clip, GESTimelineLayer * layer)
       ges_timeline_layer_get_priority (layer));
 
   clip->priv->is_moving = TRUE;
-  g_object_ref (clip);
+  gst_object_ref (clip);
   ret = ges_timeline_layer_remove_clip (current_layer, clip);
 
   if (!ret) {
-    g_object_unref (clip);
+    gst_object_unref (clip);
     return FALSE;
   }
 
   ret = ges_timeline_layer_add_clip (layer, clip);
   clip->priv->is_moving = FALSE;
 
-  g_object_unref (clip);
+  gst_object_unref (clip);
 
   return ret;
 }
@@ -762,7 +762,7 @@ ges_clip_find_track_element (GESClip * clip, GESTrack * track, GType type)
         continue;
 
       ret = GES_TRACK_ELEMENT (tmp->data);
-      g_object_ref (ret);
+      gst_object_ref (ret);
       break;
     }
   }
@@ -786,7 +786,7 @@ ges_clip_get_layer (GESClip * clip)
   g_return_val_if_fail (GES_IS_CLIP (clip), NULL);
 
   if (clip->priv->layer != NULL)
-    g_object_ref (G_OBJECT (clip->priv->layer));
+    gst_object_ref (G_OBJECT (clip->priv->layer));
 
   return clip->priv->layer;
 }
@@ -817,7 +817,7 @@ ges_clip_get_top_effects (GESClip * clip)
 
   for (tmp = GES_CONTAINER_CHILDREN (clip), i = 0;
       i < clip->priv->nb_effects; tmp = tmp->next, i++) {
-    ret = g_list_append (ret, g_object_ref (tmp->data));
+    ret = g_list_append (ret, gst_object_ref (tmp->data));
   }
 
   return g_list_sort (ret, (GCompareFunc) element_start_compare);
index 41e1d3a..149393e 100644 (file)
@@ -136,7 +136,7 @@ _free_mapping (ChildMapping * mapping)
   g_signal_handler_disconnect (child, mapping->priority_notifyid);
 
   ges_timeline_element_set_parent (child, NULL);
-  g_object_unref (child);
+  gst_object_unref (child);
   g_slice_free (ChildMapping, mapping);
 }
 
@@ -568,7 +568,7 @@ ges_container_add (GESContainer * container, GESTimelineElement * child)
   priv->ignore_notifies = FALSE;
 
   mapping = g_slice_new0 (ChildMapping);
-  mapping->child = g_object_ref (child);
+  mapping->child = gst_object_ref (child);
   mapping->start_offset = _START (container) - _START (child);
   mapping->duration_offset = _DURATION (container) - _DURATION (child);
   mapping->inpoint_offset = _INPOINT (container) - _INPOINT (child);
index 779d1f3..50f956a 100644 (file)
@@ -96,7 +96,7 @@ static void
 free_src_map (SrcMapping * srcmap)
 {
   g_free (srcmap->id);
-  g_object_unref (srcmap->clip);
+  gst_object_unref (srcmap->clip);
   g_list_foreach (srcmap->track_element_ids, (GFunc) g_free, NULL);
   g_list_free (srcmap->track_element_ids);
   g_slice_free (SrcMapping, srcmap);
@@ -332,7 +332,7 @@ save_tracks (GESTimeline * timeline, xmlTextWriterPtr writer,
     xmlTextWriterEndElement (writer);
   }
 
-  g_list_foreach (tracks, (GFunc) g_object_unref, NULL);
+  g_list_foreach (tracks, (GFunc) gst_object_unref, NULL);
   g_list_free (tracks);
   xmlTextWriterEndElement (writer);
 }
@@ -388,15 +388,15 @@ save_sources (GESPitiviFormatter * formatter, GList * layers,
         srcmap->id =
             g_strdup (g_hash_table_lookup (priv->saving_source_table,
                 uriclip_uri));
-        srcmap->clip = g_object_ref (clip);
+        srcmap->clip = gst_object_ref (clip);
         srcmap->priority = ges_timeline_layer_get_priority (layer);
         /* We fill up the track_element_ids in save_track_elements */
         source_list = g_list_append (source_list, srcmap);
       }
     }
-    g_list_foreach (clips, (GFunc) g_object_unref, NULL);
+    g_list_foreach (clips, (GFunc) gst_object_unref, NULL);
     g_list_free (clips);
-    g_object_unref (G_OBJECT (layer));
+    gst_object_unref (G_OBJECT (layer));
   }
 
   return source_list;
@@ -516,7 +516,7 @@ create_tracks (GESFormatter * self)
         priv->trackv = track;
       }
     }
-    g_list_foreach (tracks, (GFunc) g_object_unref, NULL);
+    g_list_foreach (tracks, (GFunc) gst_object_unref, NULL);
     g_list_free (tracks);
     return TRUE;
   }
@@ -1147,7 +1147,7 @@ ges_pitivi_formatter_init (GESPitiviFormatter * self)
       g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
   priv->layers_table =
-      g_hash_table_new_full (g_int_hash, g_str_equal, g_free, g_object_unref);
+      g_hash_table_new_full (g_int_hash, g_str_equal, g_free, gst_object_unref);
 
   priv->sources_table =
       g_hash_table_new_full (g_str_hash, g_str_equal, g_free,
index 87efb29..7af3e91 100644 (file)
@@ -674,7 +674,7 @@ ges_project_list_assets (GESProject * project, GType filter)
   while (g_hash_table_iter_next (&iter, &key, &value)) {
     if (g_type_is_a (ges_asset_get_extractable_type (GES_ASSET (value)),
             filter))
-      ret = g_list_append (ret, g_object_ref (value));
+      ret = g_list_append (ret, gst_object_ref (value));
   }
 
   return ret;
index 4ad81f7..8fbef0f 100644 (file)
@@ -419,11 +419,11 @@ ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer * layer,
   if (G_UNLIKELY (clip_layer != (GESTimelineLayer *) layer)) {
     GST_WARNING ("Clip doesn't belong to this layer");
     if (clip_layer != NULL)
-      g_object_unref (clip_layer);
+      gst_object_unref (clip_layer);
     return FALSE;
   }
   if (clip_layer != NULL)
-    g_object_unref (clip_layer);
+    gst_object_unref (clip_layer);
 
   /* Find it's current position */
   idx = g_list_index (priv->objects, clip);
@@ -526,7 +526,7 @@ get_objects (GESTimelineLayer * l)
   ret = g_list_copy (layer->priv->objects);
 
   for (tmp = ret; tmp; tmp = tmp->next) {
-    g_object_ref (tmp->data);
+    gst_object_ref (tmp->data);
   }
 
   return ret;
index 836e47f..c29d5c1 100644 (file)
@@ -367,7 +367,7 @@ ges_test_clip_new (void)
   GESAsset *asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
 
   new_clip = GES_TEST_CLIP (ges_asset_extract (asset, NULL));
-  g_object_unref (asset);
+  gst_object_unref (asset);
 
   return new_clip;
 }
index a9afff2..2709fad 100644 (file)
@@ -606,7 +606,7 @@ ges_text_overlay_clip_new (void)
   GESAsset *asset = ges_asset_request (GES_TYPE_OVERLAY_TEXT_CLIP, NULL, NULL);
 
   new_clip = GES_OVERLAY_TEXT_CLIP (ges_asset_extract (asset, NULL));
-  g_object_unref (asset);
+  gst_object_unref (asset);
 
   return new_clip;
 }
index 2765589..454b3a6 100644 (file)
@@ -106,7 +106,7 @@ ges_text_overlay_dispose (GObject * object)
   }
 
   if (self->priv->text_el) {
-    g_object_unref (self->priv->text_el);
+    gst_object_unref (self->priv->text_el);
     self->priv->text_el = NULL;
   }
 
@@ -151,7 +151,7 @@ ges_text_overlay_create_element (GESTrackElement * track_element)
   iconv = gst_element_factory_make ("videoconvert", NULL);
   oconv = gst_element_factory_make ("videoconvert", NULL);
   self->priv->text_el = text;
-  g_object_ref (text);
+  gst_object_ref (text);
 
   if (self->priv->text)
     g_object_set (text, "text", (gchar *) self->priv->text, NULL);
@@ -173,8 +173,8 @@ ges_text_overlay_create_element (GESTrackElement * track_element)
 
   src = gst_ghost_pad_new ("src", src_target);
   sink = gst_ghost_pad_new ("video_sink", sink_target);
-  g_object_unref (src_target);
-  g_object_unref (sink_target);
+  gst_object_unref (src_target);
+  gst_object_unref (sink_target);
 
   gst_element_add_pad (ret, src);
   gst_element_add_pad (ret, sink);
index 4d42268..0d3635f 100644 (file)
@@ -271,7 +271,7 @@ new_asset_cb (GESAsset * source, GAsyncResult * res, NewAssetUData * udata)
     ges_timeline_layer_add_clip (udata->layer, udata->clip);
   }
 
-  g_object_unref (asset);
+  gst_object_unref (asset);
   g_slice_free (NewAssetUData, udata);
 }
 
@@ -284,7 +284,7 @@ new_asset_cb (GESAsset * source, GAsyncResult * res, NewAssetUData * udata)
  * Removes the given @clip from the @layer and unparents it.
  * Unparenting it means the reference owned by @layer on the @clip will be
  * removed. If you wish to use the @clip after this function, make sure you
- * call g_object_ref() before removing it from the @layer.
+ * call gst_object_ref() before removing it from the @layer.
  *
  * Returns: TRUE if the clip could be removed, FALSE if the layer does
  * not want to remove the clip.
@@ -304,11 +304,11 @@ ges_timeline_layer_remove_clip (GESTimelineLayer * layer, GESClip * clip)
     GST_WARNING ("Clip doesn't belong to this layer");
 
     if (current_layer != NULL)
-      g_object_unref (current_layer);
+      gst_object_unref (current_layer);
 
     return FALSE;
   }
-  g_object_unref (current_layer);
+  gst_object_unref (current_layer);
 
   /* emit 'clip-removed' */
   g_signal_emit (layer, ges_timeline_layer_signals[OBJECT_REMOVED], 0, clip);
@@ -322,7 +322,7 @@ ges_timeline_layer_remove_clip (GESTimelineLayer * layer, GESClip * clip)
   layer->priv->clips_start = g_list_remove (layer->priv->clips_start, clip);
 
   /* Remove our reference to the clip */
-  g_object_unref (clip);
+  gst_object_unref (clip);
 
   return TRUE;
 }
@@ -485,7 +485,7 @@ ges_timeline_layer_add_clip (GESTimelineLayer * layer, GESClip * clip)
   current_layer = ges_clip_get_layer (clip);
   if (G_UNLIKELY (current_layer)) {
     GST_WARNING ("Clip %p already belongs to another layer", clip);
-    g_object_unref (current_layer);
+    gst_object_unref (current_layer);
 
     return FALSE;
   }
index 9503878..7c353ef 100644 (file)
@@ -346,7 +346,7 @@ ges_timeline_pipeline_update_caps (GESTimelinePipeline * self)
       }
     }
 
-    g_object_unref (track);
+    gst_object_unref (track);
   }
 
   if (tracks)
@@ -796,7 +796,7 @@ ges_timeline_pipeline_set_render_settings (GESTimelinePipeline * pipeline,
   /* FIXME : We should figure out if it was added to the pipeline,
    * and if so, remove it. */
   if (pipeline->priv->urisink) {
-    g_object_unref (pipeline->priv->urisink);
+    gst_object_unref (pipeline->priv->urisink);
     pipeline->priv->urisink = NULL;
   }
 
@@ -858,7 +858,7 @@ ges_timeline_pipeline_set_mode (GESTimelinePipeline * pipeline,
       !(mode & TIMELINE_MODE_PREVIEW)) {
     /* Disable playsink */
     GST_DEBUG ("Disabling playsink");
-    g_object_ref (pipeline->priv->playsink);
+    gst_object_ref (pipeline->priv->playsink);
     gst_bin_remove (GST_BIN_CAST (pipeline), pipeline->priv->playsink);
   }
   if ((pipeline->priv->mode &
@@ -883,8 +883,8 @@ ges_timeline_pipeline_set_mode (GESTimelinePipeline * pipeline,
 
     /* Disable render bin */
     GST_DEBUG ("Disabling rendering bin");
-    g_object_ref (pipeline->priv->encodebin);
-    g_object_ref (pipeline->priv->urisink);
+    gst_object_ref (pipeline->priv->encodebin);
+    gst_object_ref (pipeline->priv->urisink);
     gst_bin_remove_many (GST_BIN_CAST (pipeline),
         pipeline->priv->encodebin, pipeline->priv->urisink, NULL);
   }
index aacb886..b51a302 100644 (file)
@@ -527,7 +527,7 @@ ges_timeline_init (GESTimeline * self)
   priv->obj_iters = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
       (GDestroyNotify) _destroy_obj_iters);
   priv->starts_ends = g_sequence_new (g_free);
-  priv->tracksources = g_sequence_new (g_object_unref);
+  priv->tracksources = g_sequence_new (gst_object_unref);
 
   priv->auto_transitions =
       g_hash_table_new_full (g_str_hash, g_str_equal, NULL, gst_object_unref);
@@ -978,7 +978,7 @@ start_tracking_track_element (GESTimeline * timeline,
         (GCompareDataFunc) compare_uint64, NULL);
     iters->iter_obj =
         g_sequence_insert_sorted (priv->tracksources,
-        g_object_ref (trackelement), (GCompareDataFunc) element_start_compare,
+        gst_object_ref (trackelement), (GCompareDataFunc) element_start_compare,
         NULL);
     iters->trackelement = trackelement;
 
@@ -1153,7 +1153,7 @@ add_moving_clip (MoveContext * mv_ctx, GESTrackElement * trackelement)
       mv_ctx->min_move_layer = MIN (mv_ctx->min_move_layer, layer_prio);
       mv_ctx->max_layer_prio = MAX (mv_ctx->max_layer_prio, layer_prio);
 
-      g_object_unref (layer);
+      gst_object_unref (layer);
     }
   }
 
@@ -1733,7 +1733,7 @@ timeline_context_to_layer (GESTimeline * timeline, gint offset)
 
       ret &= ges_clip_move_to_layer (key, new_layer);
 
-      g_object_unref (layer);
+      gst_object_unref (layer);
     }
 
     /* Readjust min_move_layer */
@@ -2355,7 +2355,7 @@ ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
   objects = ges_timeline_layer_get_clips (layer);
   for (tmp = objects; tmp; tmp = tmp->next) {
     layer_object_added_cb (layer, tmp->data, timeline);
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
     tmp->data = NULL;
   }
   g_list_free (objects);
@@ -2392,7 +2392,7 @@ ges_timeline_remove_layer (GESTimeline * timeline, GESTimelineLayer * layer)
   layer_objects = ges_timeline_layer_get_clips (layer);
   for (tmp = layer_objects; tmp; tmp = tmp->next) {
     layer_object_removed_cb (layer, GES_CLIP (tmp->data), timeline);
-    g_object_unref (G_OBJECT (tmp->data));
+    gst_object_unref (G_OBJECT (tmp->data));
     tmp->data = NULL;
   }
   g_list_free (layer_objects);
@@ -2413,7 +2413,7 @@ ges_timeline_remove_layer (GESTimeline * timeline, GESTimelineLayer * layer)
 
   g_signal_emit (timeline, ges_timeline_signals[LAYER_REMOVED], 0, layer);
 
-  g_object_unref (layer);
+  gst_object_unref (layer);
 
   return TRUE;
 }
@@ -2492,7 +2492,7 @@ ges_timeline_add_track (GESTimeline * timeline, GESTrack * track)
       GESClip *clip = obj->data;
 
       add_object_to_tracks (timeline, clip, track);
-      g_object_unref (clip);
+      gst_object_unref (clip);
     }
     g_list_free (objects);
   }
@@ -2637,7 +2637,7 @@ ges_timeline_get_layers (GESTimeline * timeline)
   GList *tmp, *res = NULL;
 
   for (tmp = timeline->layers; tmp; tmp = g_list_next (tmp)) {
-    res = g_list_insert_sorted (res, g_object_ref (tmp->data),
+    res = g_list_insert_sorted (res, gst_object_ref (tmp->data),
         (GCompareFunc) sort_layers);
   }
 
index 34c851a..f653cc0 100644 (file)
@@ -602,7 +602,7 @@ _child_removed (GESContainer * container, GESTimelineElement * element)
   if (GES_IS_TITLE_SOURCE (element)) {
     GST_DEBUG_OBJECT (container, "%" GST_PTR_FORMAT " removed", element);
     priv->track_titles = g_slist_remove (priv->track_titles, element);
-    g_object_unref (element);
+    gst_object_unref (element);
   }
 }
 
@@ -614,7 +614,7 @@ _child_added (GESContainer * container, GESTimelineElement * element)
   if (GES_IS_TITLE_SOURCE (element)) {
     GST_DEBUG_OBJECT (container, "%" GST_PTR_FORMAT " added", element);
     priv->track_titles = g_slist_prepend (priv->track_titles,
-        g_object_ref (element));
+        gst_object_ref (element));
   }
 }
 
@@ -659,7 +659,7 @@ ges_title_clip_new (void)
   GESAsset *asset = ges_asset_request (GES_TYPE_TITLE_CLIP, NULL, NULL);
 
   new_clip = GES_TITLE_CLIP (ges_asset_extract (asset, NULL));
-  g_object_unref (asset);
+  gst_object_unref (asset);
 
   return new_clip;
 }
index 3092d0e..13b5ee5 100644 (file)
@@ -106,12 +106,12 @@ ges_title_source_dispose (GObject * object)
   }
 
   if (self->priv->text_el) {
-    g_object_unref (self->priv->text_el);
+    gst_object_unref (self->priv->text_el);
     self->priv->text_el = NULL;
   }
 
   if (self->priv->background_el) {
-    g_object_unref (self->priv->background_el);
+    gst_object_unref (self->priv->background_el);
     self->priv->background_el = NULL;
   }
 
@@ -175,8 +175,8 @@ ges_title_source_create_element (GESTrackElement * object)
   src = gst_ghost_pad_new ("src", gst_element_get_static_pad (text, "src"));
   gst_element_add_pad (topbin, src);
 
-  g_object_ref (text);
-  g_object_ref (background);
+  gst_object_ref (text);
+  gst_object_ref (background);
 
   priv->text_el = text;
   priv->background_el = background;
index 0417147..26ca17c 100644 (file)
@@ -923,7 +923,7 @@ ges_track_element_lookup_child (GESTrackElement * object,
           g_strcmp0 (G_OBJECT_TYPE_NAME (G_OBJECT (value)), classename) == 0) {
         GST_DEBUG ("The %s property from %s has been found", name, classename);
         if (element)
-          *element = g_object_ref (value);
+          *element = gst_object_ref (value);
 
         *pspec = g_param_spec_ref (key);
         res = TRUE;
@@ -1036,7 +1036,7 @@ ges_track_element_set_child_property_valist (GESTrackElement * object,
 
     g_object_set_property (G_OBJECT (element), pspec->name, &value);
 
-    g_object_unref (element);
+    gst_object_unref (element);
     g_value_unset (&value);
 
     name = va_arg (var_args, gchar *);
@@ -1120,7 +1120,7 @@ ges_track_element_get_child_property_valist (GESTrackElement * object,
 
     g_value_init (&value, pspec->value_type);
     g_object_get_property (G_OBJECT (element), pspec->name, &value);
-    g_object_unref (element);
+    gst_object_unref (element);
 
     G_VALUE_LCOPY (&value, var_args, 0, &error);
     if (error)
@@ -1267,7 +1267,7 @@ ges_track_element_set_child_property (GESTrackElement * object,
 
   g_object_set_property (G_OBJECT (element), pspec->name, value);
 
-  g_object_unref (element);
+  gst_object_unref (element);
   g_param_spec_unref (pspec);
 
   return TRUE;
@@ -1316,7 +1316,7 @@ ges_track_element_get_child_property (GESTrackElement * object,
 
   g_object_get_property (G_OBJECT (element), pspec->name, value);
 
-  g_object_unref (element);
+  gst_object_unref (element);
   g_param_spec_unref (pspec);
 
   return TRUE;
index 4391516..9e360f1 100644 (file)
@@ -95,7 +95,7 @@ static void composition_duration_cb (GstElement * composition, GParamSpec * arg
 static void
 add_trackelement_to_list_foreach (GESTrackElement * trackelement, GList ** list)
 {
-  g_object_ref (trackelement);
+  gst_object_ref (trackelement);
   *list = g_list_prepend (*list, trackelement);
 }
 
@@ -375,7 +375,7 @@ remove_object_internal (GESTrack * track, GESTrackElement * object)
   g_signal_emit (track, ges_track_signals[TRACK_ELEMENT_REMOVED], 0,
       GES_TRACK_ELEMENT (object));
 
-  g_object_unref (object);
+  gst_object_unref (object);
 
   return TRUE;
 }
@@ -801,7 +801,7 @@ ges_track_get_elements (GESTrack * track)
  * Removes the object from the track and unparents it.
  * Unparenting it means the reference owned by @track on the @object will be
  * removed. If you wish to use the @object after this function, make sure you
- * call g_object_ref() before removing it from the @track.
+ * call gst_object_ref() before removing it from the @track.
  *
  * Returns: #TRUE if the object was removed, else #FALSE if the track
  * could not remove the object (like if it didn't belong to the track).
index 7fa185a..945767d 100644 (file)
@@ -275,7 +275,7 @@ _child_removed (GESContainer * container, GESTimelineElement * element)
   if (GES_IS_VIDEO_TRANSITION (element)) {
     GST_DEBUG_OBJECT (container, "%" GST_PTR_FORMAT " removed", element);
     priv->video_transitions = g_slist_remove (priv->video_transitions, element);
-    g_object_unref (element);
+    gst_object_unref (element);
   }
 }
 
@@ -287,7 +287,7 @@ _child_added (GESContainer * container, GESTimelineElement * element)
   if (GES_IS_VIDEO_TRANSITION (element)) {
     GST_DEBUG_OBJECT (container, "%" GST_PTR_FORMAT " added", element);
     priv->video_transitions =
-        g_slist_prepend (priv->video_transitions, g_object_ref (element));
+        g_slist_prepend (priv->video_transitions, gst_object_ref (element));
   }
 }
 
index ce4e03a..45fe446 100644 (file)
@@ -144,13 +144,13 @@ _request_id_update (GESAsset * self, gchar ** proposed_new_id, GError * error)
 
         *proposed_new_id = g_file_get_uri (new_file);
 
-        g_object_unref (new_file);
+        gst_object_unref (new_file);
         g_free (basename);
       }
-      g_object_unref (parent);
+      gst_object_unref (parent);
     }
 
-    g_object_unref (file);
+    gst_object_unref (file);
 
     return TRUE;
   }
@@ -168,8 +168,8 @@ _asset_proxied (GESAsset * self, const gchar * new_uri)
   parent = g_file_get_parent (file);
   new_parent = g_file_get_parent (new_file);
   g_hash_table_insert (parent_newparent_table, parent, new_parent);
-  g_object_unref (file);
-  g_object_unref (new_file);
+  gst_object_unref (file);
+  gst_object_unref (new_file);
 }
 
 static void
@@ -206,7 +206,7 @@ ges_uri_clip_asset_class_init (GESUriClipAssetClass * klass)
 
   if (parent_newparent_table == NULL) {
     parent_newparent_table = g_hash_table_new_full (g_file_hash,
-        (GEqualFunc) g_file_equal, g_object_unref, g_object_unref);
+        (GEqualFunc) g_file_equal, gst_object_unref, gst_object_unref);
   }
 }
 
@@ -245,7 +245,7 @@ _create_uri_source_asset (GESUriClipAsset * asset,
 
   priv_tckasset = GES_ASSET_TRACK_FILESOURCE (tck_filesource_asset)->priv;
   priv_tckasset->uri = ges_asset_get_id (GES_ASSET (asset));
-  priv_tckasset->sinfo = g_object_ref (sinfo);
+  priv_tckasset->sinfo = gst_object_ref (sinfo);
   priv_tckasset->parent_asset = asset;
   ges_track_element_asset_set_track_type (GES_TRACK_ELEMENT_ASSET
       (tck_filesource_asset), type);
@@ -300,7 +300,7 @@ ges_uri_clip_asset_set_info (GESUriClipAsset * self, GstDiscovererInfo * info)
     priv->duration = gst_discoverer_info_get_duration (info);
   /* else we keep #GST_CLOCK_TIME_NONE */
 
-  priv->info = g_object_ref (info);
+  priv->info = gst_object_ref (info);
 }
 
 static void
@@ -410,7 +410,7 @@ ges_uri_clip_asset_is_image (GESUriClipAsset * self)
  *        ges_asset_get_id (source), error->message);
  *   }
  *
- *   g_object_unref (mfs);
+ *   gst_object_unref (mfs);
  * }
  *
  * // The request:
index 2229b89..26245dd 100644 (file)
@@ -52,7 +52,7 @@ ges_timeline_new_audio_video (void)
 
   if (!ges_timeline_add_track (timeline, trackv) ||
       !ges_timeline_add_track (timeline, tracka)) {
-    g_object_unref (timeline);
+    gst_object_unref (timeline);
     timeline = NULL;
   }
 
index 65331d3..06c02cc 100644 (file)
@@ -30,7 +30,7 @@ GST_START_TEST (test_test_source_basic)
   source = ges_test_clip_new ();
   fail_unless (source != NULL);
 
-  g_object_unref (source);
+  gst_object_unref (source);
 }
 
 GST_END_TEST;
@@ -98,7 +98,7 @@ GST_START_TEST (test_test_source_properties)
 
   ges_container_remove (GES_CONTAINER (clip),
       GES_TIMELINE_ELEMENT (trackelement));
-  g_object_unref (clip);
+  gst_object_unref (clip);
 }
 
 GST_END_TEST;
@@ -147,7 +147,7 @@ GST_START_TEST (test_test_source_in_layer)
   ptrn = (ges_video_test_source_get_pattern ((GESVideoTestSource *)
           track_element));
   assert_equals_int (ptrn, GES_VIDEO_TEST_PATTERN_WHITE);
-  g_object_unref (track_element);
+  gst_object_unref (track_element);
 
   /* test audio properties as well */
 
@@ -181,13 +181,13 @@ GST_START_TEST (test_test_source_in_layer)
   g_assert (freq == 2000);
   g_assert (volume == 0.5);
 
-  g_object_unref (track_element);
+  gst_object_unref (track_element);
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) source);
 
   GST_DEBUG ("removing the layer");
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index 0d90ca6..56ea04d 100644 (file)
@@ -78,7 +78,7 @@ GST_START_TEST (test_ges_scenario)
 
   layers = ges_timeline_get_layers (timeline);
   fail_unless (g_list_find (layers, layer) != NULL);
-  g_list_foreach (layers, (GFunc) g_object_unref, NULL);
+  g_list_foreach (layers, (GFunc) gst_object_unref, NULL);
   g_list_free (layers);
 
   /* Give the Timeline a Track */
@@ -108,7 +108,7 @@ GST_START_TEST (test_ges_scenario)
   fail_unless (tmp_layer == layer);
   /* The timeline stole our reference */
   ASSERT_OBJECT_REFCOUNT (source, "source", 1);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
   ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
 
   /* Make sure the associated TrackElement is in the Track */
@@ -129,7 +129,7 @@ GST_START_TEST (test_ges_scenario)
   GST_DEBUG ("Remove the Clip from the layer");
 
   /* Now remove the clip */
-  g_object_ref (source);
+  gst_object_ref (source);
   ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
   fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source)));
   ASSERT_OBJECT_REFCOUNT (source, "source", 1);
@@ -138,33 +138,33 @@ GST_START_TEST (test_ges_scenario)
   fail_unless (tmp_layer == NULL);
   trackelements = GES_CONTAINER_CHILDREN (source);
   fail_unless (trackelements == NULL);  /* No unreffing then */
-  g_object_unref (source);
+  gst_object_unref (source);
 
   GST_DEBUG ("Removing track from the timeline");
   /* Remove the track from the timeline */
-  g_object_ref (track);
+  gst_object_ref (track);
   fail_unless (ges_timeline_remove_track (timeline, track));
   fail_unless (ges_track_get_timeline (track) == NULL);
 
   tracks = ges_timeline_get_tracks (timeline);
   fail_unless (tracks == NULL);
   ASSERT_OBJECT_REFCOUNT (track, "track", 1);
-  g_object_unref (track);
+  gst_object_unref (track);
 
   GST_DEBUG ("Removing layer from the timeline");
   /* Remove the layer from the timeline */
-  g_object_ref (layer);
+  gst_object_ref (layer);
   fail_unless (ges_timeline_remove_layer (timeline, layer));
   fail_unless (layer->timeline == NULL);
 
   layers = ges_timeline_get_layers (timeline);
   fail_unless (layers == NULL);
   ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
-  g_object_unref (layer);
+  gst_object_unref (layer);
 
   /* Finally clean up our object */
   ASSERT_OBJECT_REFCOUNT (timeline, "timeline", 1);
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -212,7 +212,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
   tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
   fail_unless (tmp_layer == layer);
   ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -221,7 +221,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
   tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
   fail_unless (tmp_layer == layer);
   ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -230,7 +230,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
   tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
   fail_unless (tmp_layer == layer);
   ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Add the layer to the timeline");
   fail_unless (ges_timeline_add_layer (timeline, layer));
@@ -239,7 +239,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
   fail_unless (layer->timeline == timeline);
   layers = ges_timeline_get_layers (timeline);
   fail_unless (g_list_find (layers, layer) != NULL);
-  g_list_foreach (layers, (GFunc) g_object_unref, NULL);
+  g_list_foreach (layers, (GFunc) gst_object_unref, NULL);
   g_list_free (layers);
 
   /* Make sure the associated TrackElements are in the Track */
@@ -278,7 +278,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
   ASSERT_OBJECT_REFCOUNT (trackelement, "trackelement", 3);
 
   /* theoretically this is all we need to do to ensure cleanup */
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -315,7 +315,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -323,7 +323,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -331,7 +331,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Add the layer to the timeline");
   fail_unless (ges_timeline_add_layer (timeline, layer));
@@ -340,7 +340,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
   fail_unless (layer->timeline == timeline);
   layers = ges_timeline_get_layers (timeline);
   fail_unless (g_list_find (layers, layer) != NULL);
-  g_list_foreach (layers, (GFunc) g_object_unref, NULL);
+  g_list_foreach (layers, (GFunc) gst_object_unref, NULL);
   g_list_free (layers);
 
   GST_DEBUG ("Add the track to the timeline");
@@ -381,7 +381,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
   }
 
   /* theoretically this is all we need to do to ensure cleanup */
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -417,7 +417,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -425,7 +425,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -433,7 +433,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Add the layer to the timeline");
   fail_unless (ges_timeline_add_layer (timeline, layer));
@@ -443,7 +443,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
 
   layers = ges_timeline_get_layers (timeline);
   fail_unless (g_list_find (layers, layer) != NULL);
-  g_list_foreach (layers, (GFunc) g_object_unref, NULL);
+  g_list_foreach (layers, (GFunc) gst_object_unref, NULL);
   g_list_free (layers);
 
   GST_DEBUG ("Add the track to the timeline");
@@ -463,12 +463,12 @@ GST_START_TEST (test_ges_timeline_remove_track)
      * 1 by the timeline */
     ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 3);
   }
-  g_object_ref (t1);
+  gst_object_ref (t1);
   /* There are 3 references held:
    * 1 by the container
    * 1 by the track
    * 1 by the timeline
-   * 1 added by ourselves above (g_object_ref (t1)) */
+   * 1 added by ourselves above (gst_object_ref (t1)) */
   ASSERT_OBJECT_REFCOUNT (t1, "trackelement", 4);
 
   trackelements = GES_CONTAINER_CHILDREN (s2);
@@ -481,12 +481,12 @@ GST_START_TEST (test_ges_timeline_remove_track)
      * 1 by the timeline */
     ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 3);
   }
-  g_object_ref (t2);
+  gst_object_ref (t2);
   /* There are 3 references held:
    * 1 by the container
    * 1 by the track
    * 1 by the timeline
-   * 1 added by ourselves above (g_object_ref (t2)) */
+   * 1 added by ourselves above (gst_object_ref (t2)) */
   ASSERT_OBJECT_REFCOUNT (t2, "t2", 4);
 
   trackelements = GES_CONTAINER_CHILDREN (s3);
@@ -499,12 +499,12 @@ GST_START_TEST (test_ges_timeline_remove_track)
      * 1 by the timeline */
     ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 3);
   }
-  g_object_ref (t3);
+  gst_object_ref (t3);
   /* There are 3 references held:
    * 1 by the container
    * 1 by the track
    * 1 by the timeline
-   * 1 added by ourselves above (g_object_ref (t3)) */
+   * 1 added by ourselves above (gst_object_ref (t3)) */
   ASSERT_OBJECT_REFCOUNT (t3, "t3", 4);
 
   /* remove the track and check that the track elements have been released */
@@ -514,11 +514,11 @@ GST_START_TEST (test_ges_timeline_remove_track)
   ASSERT_OBJECT_REFCOUNT (t2, "trackelement", 3);
   ASSERT_OBJECT_REFCOUNT (t3, "trackelement", 3);
 
-  g_object_unref (t1);
-  g_object_unref (t2);
-  g_object_unref (t3);
+  gst_object_unref (t1);
+  gst_object_unref (t2);
+  gst_object_unref (t3);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
   ASSERT_OBJECT_REFCOUNT (t1, "trackelement", 0);
   ASSERT_OBJECT_REFCOUNT (t2, "trackelement", 0);
   ASSERT_OBJECT_REFCOUNT (t3, "trackelement", 0);
@@ -598,7 +598,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -606,7 +606,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Creating a source");
   s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
@@ -614,7 +614,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
   fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
   tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
   fail_unless (tmp_layer == layer);
-  g_object_unref (tmp_layer);
+  gst_object_unref (tmp_layer);
 
   GST_DEBUG ("Add the layer to the timeline");
   fail_unless (ges_timeline_add_layer (timeline, layer));
@@ -624,7 +624,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
 
   layers = ges_timeline_get_layers (timeline);
   fail_unless (g_list_find (layers, layer) != NULL);
-  g_list_foreach (layers, (GFunc) g_object_unref, NULL);
+  g_list_foreach (layers, (GFunc) gst_object_unref, NULL);
   g_list_free (layers);
 
   /* Make sure the associated TrackElements are in the Track */
@@ -639,12 +639,12 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
     ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 3);
     fail_unless (ges_track_element_get_track (tmp->data) == track1);
   }
-  g_object_ref (t1);
+  gst_object_ref (t1);
   /* There are 3 references held:
    * 1 by the container
    * 1 by the track
    * 1 by the timeline
-   * 1 added by ourselves above (g_object_ref (t1)) */
+   * 1 added by ourselves above (gst_object_ref (t1)) */
   ASSERT_OBJECT_REFCOUNT (t1, "trackelement", 4);
 
   trackelements = GES_CONTAINER_CHILDREN (s2);
@@ -658,12 +658,12 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
     ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 3);
     fail_unless (ges_track_element_get_track (tmp->data) == track2);
   }
-  g_object_ref (t2);
+  gst_object_ref (t2);
   /* There are 3 references held:
    * 1 by the container
    * 1 by the track
    * 1 by the timeline
-   * 1 added by ourselves above (g_object_ref (t2)) */
+   * 1 added by ourselves above (gst_object_ref (t2)) */
   ASSERT_OBJECT_REFCOUNT (t2, "t2", 4);
 
   trackelements = GES_CONTAINER_CHILDREN (s3);
@@ -677,19 +677,19 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
     ASSERT_OBJECT_REFCOUNT (GES_TRACK_ELEMENT (tmp->data), "trackelement", 3);
     fail_unless (ges_track_element_get_track (tmp->data) == track1);
   }
-  g_object_ref (t3);
+  gst_object_ref (t3);
   /* There are 3 references held:
    * 1 by the container
    * 1 by the track
    * 1 by the timeline
-   * 1 added by ourselves above (g_object_ref (t3)) */
+   * 1 added by ourselves above (gst_object_ref (t3)) */
   ASSERT_OBJECT_REFCOUNT (t3, "t3", 4);
 
-  g_object_unref (t1);
-  g_object_unref (t2);
-  g_object_unref (t3);
+  gst_object_unref (t1);
+  gst_object_unref (t2);
+  gst_object_unref (t3);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index bc598b3..10b1309 100644 (file)
@@ -33,7 +33,7 @@ GST_START_TEST (test_effect_basic)
 
   effect = ges_effect_new ("agingtv");
   fail_unless (effect != NULL);
-  g_object_unref (effect);
+  gst_object_unref (effect);
 }
 
 GST_END_TEST;
@@ -78,7 +78,7 @@ GST_START_TEST (test_add_effect_to_clip)
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) source);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -144,13 +144,13 @@ GST_START_TEST (test_get_effects_from_tl)
     fail_unless (GES_IS_EFFECT (tmp->data));
     effect_prio = priority;
 
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
   g_list_free (effects);
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) source);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -220,13 +220,13 @@ GST_START_TEST (test_effect_clip)
         type == track_type[i]);
     effect_prio = priority;
 
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
   g_list_free (effects);
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -317,13 +317,13 @@ GST_START_TEST (test_priorities_clip)
     fail_unless (GES_IS_EFFECT (tmp->data));
     effect_prio = priority;
 
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
   g_list_free (effects);
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -397,7 +397,7 @@ GST_START_TEST (test_effect_set_properties)
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -472,7 +472,7 @@ GST_START_TEST (test_clip_signals)
 
   ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index e827be6..1e87a2e 100644 (file)
@@ -116,11 +116,11 @@ GST_START_TEST (test_layer_properties)
   gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
       51, 0, TRUE);
 
-  g_object_unref (trackelement);
+  gst_object_unref (trackelement);
   fail_unless (ges_timeline_layer_remove_clip (layer, clip));
   fail_unless (ges_timeline_remove_track (timeline, track));
   fail_unless (ges_timeline_remove_layer (timeline, layer));
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -242,7 +242,7 @@ GST_START_TEST (test_layer_priorities)
   fail_unless (ges_timeline_layer_get_clips (layer3) == NULL);
 
   for (tmp = objs; tmp; tmp = g_list_next (tmp)) {
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
   g_list_free (objs);
 
@@ -265,10 +265,10 @@ GST_START_TEST (test_layer_priorities)
   assert_equals_int (prio3, 2 * LAYER_HEIGHT);
   assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1);
 
-  g_object_unref (trackelement1);
-  g_object_unref (trackelement2);
-  g_object_unref (trackelement3);
-  g_object_unref (timeline);
+  gst_object_unref (trackelement1);
+  gst_object_unref (trackelement2);
+  gst_object_unref (trackelement3);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -667,7 +667,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
   fail_unless (current->data == src2);
   g_list_free_full (objects, gst_object_unref);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -1154,7 +1154,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
   g_list_free_full (objects, gst_object_unref);
   ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index aaa07ce..1eeb32e 100644 (file)
@@ -30,7 +30,7 @@ GST_START_TEST (test_overlay_basic)
   source = ges_text_overlay_clip_new ();
   fail_unless (source != NULL);
 
-  g_object_unref (source);
+  gst_object_unref (source);
 }
 
 GST_END_TEST;
@@ -86,7 +86,7 @@ GST_START_TEST (test_overlay_properties)
 
   ges_container_remove (GES_CONTAINER (clip),
       GES_TIMELINE_ELEMENT (trackelement));
-  g_object_unref (clip);
+  gst_object_unref (clip);
 }
 
 GST_END_TEST;
@@ -182,8 +182,8 @@ GST_START_TEST (test_overlay_in_layer)
 
   GST_DEBUG ("removing the layer");
 
-  g_object_unref (track_element);
-  g_object_unref (timeline);
+  gst_object_unref (track_element);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index bc1003a..6b7b5db 100644 (file)
@@ -113,7 +113,7 @@ GST_START_TEST (test_gsl_add)
   fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source)));
   fail_unless (ges_timeline_remove_track (timeline, track));
   fail_unless (ges_timeline_remove_layer (timeline, layer));
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -200,7 +200,7 @@ GST_START_TEST (test_gsl_move_simple)
   fail_unless_equals_int (info.old, 0);
 
   /* remove source1, source2 should be moved to the beginning */
-  g_object_ref (source1);
+  gst_object_ref (source1);
   fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source1)));
   fail_unless_equals_uint64 (_START (source2), 0);
 
@@ -219,7 +219,7 @@ GST_START_TEST (test_gsl_move_simple)
 
   fail_unless (ges_timeline_remove_track (timeline, track));
   fail_unless (ges_timeline_remove_layer (timeline, layer));
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
@@ -489,7 +489,7 @@ GST_START_TEST (test_gsl_with_transitions)
 
   GST_DEBUG ("done removing transition");
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index 77f1519..7f3fd65 100644 (file)
@@ -34,9 +34,9 @@ ges_test_get_audio_only_uri (void)
   f_audio_only = g_file_get_child (fdir, "audio_only.ogg");
   uri = g_file_get_uri (f_audio_only);
 
-  g_object_unref (cfile);
-  g_object_unref (fdir);
-  g_object_unref (f_audio_only);
+  gst_object_unref (cfile);
+  gst_object_unref (fdir);
+  gst_object_unref (f_audio_only);
 
   return uri;
 }
@@ -53,9 +53,9 @@ ges_test_get_audio_video_uri (void)
   f_audio_video = g_file_get_child (fdir, "audio_video.ogg");
   uri = g_file_get_uri (f_audio_video);
 
-  g_object_unref (cfile);
-  g_object_unref (fdir);
-  g_object_unref (f_audio_video);
+  gst_object_unref (cfile);
+  gst_object_unref (fdir);
+  gst_object_unref (f_audio_video);
 
   return uri;
 }
@@ -72,9 +72,9 @@ ges_test_file_uri (const gchar * filename)
   f = g_file_get_child (fdir, filename);
   uri = g_file_get_uri (f);
 
-  g_object_unref (cfile);
-  g_object_unref (fdir);
-  g_object_unref (f);
+  gst_object_unref (cfile);
+  gst_object_unref (fdir);
+  gst_object_unref (f);
 
   return uri;
 }
index 2e23832..83bdb67 100644 (file)
@@ -93,8 +93,8 @@ GST_START_TEST (test_text_properties_in_layer)
 
   GST_DEBUG ("removing the layer");
 
-  g_object_unref (track_element);
-  g_object_unref (timeline);
+  gst_object_unref (track_element);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index ed11915..15e6c02 100644 (file)
@@ -245,10 +245,10 @@ GST_START_TEST (test_basic_timeline_edition)
   CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
   CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
 
-  g_object_unref (timeline);
-  g_object_unref (clip);
-  g_object_unref (clip1);
-  g_object_unref (clip2);
+  gst_object_unref (timeline);
+  gst_object_unref (clip);
+  gst_object_unref (clip1);
+  gst_object_unref (clip2);
 }
 
 GST_END_TEST;
@@ -481,7 +481,7 @@ GST_START_TEST (test_snapping)
   ASSERT_OBJECT_REFCOUNT (clip1, "Second clip", 1);
   ASSERT_OBJECT_REFCOUNT (clip2, "Third clip", 1);
 
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 
   /* Check we destroyed everything */
   fail_if (G_IS_OBJECT (timeline));
@@ -603,8 +603,8 @@ GST_START_TEST (test_timeline_edition_mode)
   /* clip2 should have moved layer too */
   fail_unless (ges_clip_get_layer (clip2) == layer2);
   /* We got 2 reference to the same clipect, unref them */
-  g_object_unref (layer2);
-  g_object_unref (layer2);
+  gst_object_unref (layer2);
+  gst_object_unref (layer2);
 
   /**
    * Rippling clip1 back to: 20 (getting to the exact same timeline as before
@@ -619,8 +619,8 @@ GST_START_TEST (test_timeline_edition_mode)
   /* clip2 should have moved layer too */
   fail_unless (ges_clip_get_layer (clip2) == layer2);
   /* We got 2 reference to the same clipect, unref them */
-  g_object_unref (layer2);
-  g_object_unref (layer2);
+  gst_object_unref (layer2);
+  gst_object_unref (layer2);
 
   /**
    * Simple move clip to 27 and clip2 to 35
@@ -683,7 +683,7 @@ GST_START_TEST (test_timeline_edition_mode)
   CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
   layer = ges_clip_get_layer (clip);
   assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
-  g_object_unref (layer);
+  gst_object_unref (layer);
 
   /* Roll end clip to 50
    * New timeline:
@@ -704,7 +704,7 @@ GST_START_TEST (test_timeline_edition_mode)
   CHECK_OBJECT_PROPS (trackelement2, 50, 15, 45);
   layer = ges_clip_get_layer (clip);
   assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
-  g_object_unref (layer);
+  gst_object_unref (layer);
 
   /* Some more intensive roll testing */
   for (i = 0; i < 20; i++) {
@@ -737,7 +737,7 @@ GST_START_TEST (test_timeline_edition_mode)
   CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
   layer = ges_clip_get_layer (clip);
   assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
-  g_object_unref (layer);
+  gst_object_unref (layer);
 
   /* Ripple clip end to 52
    * New timeline:
@@ -760,7 +760,7 @@ GST_START_TEST (test_timeline_edition_mode)
   CHECK_OBJECT_PROPS (trackelement2, 52, 0, 60)
       layer = ges_clip_get_layer (clip);
   assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
-  g_object_unref (layer);
+  gst_object_unref (layer);
 
 
   /* Little check that we have 4 layers in the timeline */
@@ -771,7 +771,7 @@ GST_START_TEST (test_timeline_edition_mode)
   /*  We have a reference to each layer in layers */
   for (tmp = layers; tmp; tmp = tmp->next)
     ASSERT_OBJECT_REFCOUNT (layer, "Layer", 2);
-  g_list_free_full (layers, g_object_unref);
+  g_list_free_full (layers, gst_object_unref);
 
   /* We have 3 references:
    *  track  + timeline  + clip
@@ -810,10 +810,10 @@ GST_START_TEST (test_timeline_edition_mode)
   assert_equals_int (ges_timeline_layer_get_priority (layer1), 1);
   assert_equals_int (ges_timeline_layer_get_priority (layer), 0);
   fail_unless (ges_clip_get_layer (clip2) == layer);
-  g_object_unref (layer1);
+  gst_object_unref (layer1);
   /* We have 2 references to @layer that we do not need anymore */ ;
-  g_object_unref (layer);
-  g_object_unref (layer);
+  gst_object_unref (layer);
+  gst_object_unref (layer);
 
   /* Trim clip start to 40
    * New timeline:
index c58482b..7528152 100644 (file)
@@ -30,7 +30,7 @@ GST_START_TEST (test_title_source_basic)
   source = ges_title_clip_new ();
   fail_unless (source != NULL);
 
-  g_object_unref (source);
+  gst_object_unref (source);
 }
 
 GST_END_TEST;
@@ -87,7 +87,7 @@ GST_START_TEST (test_title_source_properties)
 
   ges_container_remove (GES_CONTAINER (clip),
       GES_TIMELINE_ELEMENT (trackelement));
-  g_object_unref (clip);
+  gst_object_unref (clip);
 }
 
 GST_END_TEST;
@@ -187,8 +187,8 @@ GST_START_TEST (test_title_source_in_layer)
 
   GST_DEBUG ("removing the layer");
 
-  g_object_unref (track_element);
-  g_object_unref (timeline);
+  gst_object_unref (track_element);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index 5c8951a..62a91f5 100644 (file)
@@ -55,9 +55,9 @@ GST_START_TEST (test_transition_basic)
   fail_unless (ges_container_remove (GES_CONTAINER (tr2),
           GES_TIMELINE_ELEMENT (trackelement)) == TRUE);
 
-  g_object_unref (track);
-  g_object_unref (tr1);
-  g_object_unref (tr2);
+  gst_object_unref (track);
+  gst_object_unref (tr1);
+  gst_object_unref (tr2);
 }
 
 GST_END_TEST;
@@ -153,8 +153,8 @@ GST_START_TEST (test_transition_properties)
 
   ges_container_remove (GES_CONTAINER (clip),
       GES_TIMELINE_ELEMENT (trackelement));
-  g_object_unref (clip);
-  g_object_unref (track);
+  gst_object_unref (clip);
+  gst_object_unref (track);
 }
 
 GST_END_TEST;
index acd5e26..5164dd1 100644 (file)
@@ -90,7 +90,7 @@ GST_START_TEST (test_filesource_basic)
 
   g_main_loop_run (mainloop);
   g_main_loop_unref (mainloop);
-  g_object_unref (timeline);
+  gst_object_unref (timeline);
 }
 
 GST_END_TEST;
index af4f022..89450b6 100644 (file)
@@ -36,7 +36,7 @@ asset_loaded_cb (GObject * source, GAsyncResult * res, GMainLoop * mainloop)
   GST_DEBUG ("Duration is %" GST_TIME_FORMAT,
       GST_TIME_ARGS (ges_uri_clip_asset_get_duration (mfs)));
 
-  g_object_unref (mfs);
+  gst_object_unref (mfs);
 
   g_main_loop_quit (mainloop);
 }
index 1964554..3408b38 100644 (file)
@@ -63,7 +63,7 @@ asset_loaded_cb (GObject * source_object, GAsyncResult * res,
     gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
   }
 
-  g_object_unref (mfs);
+  gst_object_unref (mfs);
 }
 
 int
index 74d63e9..661920b 100644 (file)
@@ -239,10 +239,10 @@ find_row_for_object (GtkListStore * model, GtkTreeIter * ret, GESClip * clip)
     GESClip *clip2;
     gtk_tree_model_get ((GtkTreeModel *) model, ret, 2, &clip2, -1);
     if (clip2 == clip) {
-      g_object_unref (clip2);
+      gst_object_unref (clip2);
       return TRUE;
     }
-    g_object_unref (clip2);
+    gst_object_unref (clip2);
     gtk_tree_model_iter_next ((GtkTreeModel *) model, ret);
   }
   return FALSE;
@@ -729,7 +729,7 @@ get_video_patterns (void)
   }
 
   g_type_class_unref (enum_class);
-  g_object_unref (tr);
+  gst_object_unref (tr);
 
   return m;
 }
@@ -932,11 +932,11 @@ create_ui (App * app)
 
   /* success */
   gtk_builder_connect_signals (builder, app);
-  g_object_unref (G_OBJECT (builder));
+  gst_object_unref (G_OBJECT (builder));
   return TRUE;
 
 fail:
-  g_object_unref (G_OBJECT (builder));
+  gst_object_unref (G_OBJECT (builder));
   return FALSE;
 }
 
@@ -981,7 +981,7 @@ app_update_selection (App * app)
   /* clear old selection */
   for (cur = app->selected_objects; cur; cur = cur->next) {
     disconnect_from_object (cur->data, app);
-    g_object_unref (cur->data);
+    gst_object_unref (cur->data);
     cur->data = NULL;
   }
   g_list_free (app->selected_objects);
@@ -1064,7 +1064,7 @@ app_move_selected_up (App * app)
       GES_CLIP (app->selected_objects->data), pos - 1);
 
   for (tmp = objects; tmp; tmp = tmp->next) {
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
 }
 
@@ -1082,7 +1082,7 @@ app_add_effect_on_selected_clips (App * app, const gchar * bin_desc)
     effect = GES_TRACK_ELEMENT (ges_effect_new (bin_desc));
     ges_container_add (GES_CONTAINER (tmp->data),
         GES_TIMELINE_ELEMENT (effect));
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
 }
 
@@ -1133,7 +1133,7 @@ app_move_selected_down (App * app)
       GES_CLIP (app->selected_objects->data), pos - 1);
 
   for (tmp = objects; tmp; tmp = tmp->next) {
-    g_object_unref (tmp->data);
+    gst_object_unref (tmp->data);
   }
 }
 
index dd54c19..d7ada14 100644 (file)
@@ -231,7 +231,7 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
 
 build_failure:
   {
-    g_object_unref (timeline);
+    gst_object_unref (timeline);
     return NULL;
   }
 }
@@ -290,9 +290,9 @@ create_pipeline (gchar * load_path, gchar * save_path, int argc, char **argv,
 failure:
   {
     if (timeline)
-      g_object_unref (timeline);
+      gst_object_unref (timeline);
     if (pipeline)
-      g_object_unref (pipeline);
+      gst_object_unref (pipeline);
     return NULL;
   }
 }