mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
gst_object_swap -> gst_object_replace as it's a better name. Wait for next commit to make gstelement.c compile again.
Original commit message from CVS: gst_object_swap -> gst_object_replace as it's a better name. Wait for next commit to make gstelement.c compile again.
This commit is contained in:
parent
fe83917b5c
commit
f05a353f5c
6 changed files with 24 additions and 27 deletions
|
@ -714,7 +714,7 @@ gst_element_set_clock (GstElement *element, GstClock *clock)
|
|||
if (oclass->set_clock)
|
||||
oclass->set_clock (element, clock);
|
||||
|
||||
gst_object_swap ((GstObject **)&element->clock, (GstObject *)clock);
|
||||
gst_object_replace ((GstObject **)&element->clock, (GstObject *)clock);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1362,7 +1362,7 @@ gst_element_get_compatible_pad_filtered (GstElement *element, GstPad *pad,
|
|||
if (templcaps == NULL)
|
||||
return NULL;
|
||||
} else {
|
||||
templcaps = gst_caps_copy (gst_pad_get_caps (pad));
|
||||
templcaps = gst_pad_get_caps (pad);
|
||||
}
|
||||
|
||||
templ = gst_pad_template_new ((gchar *) GST_PAD_NAME (pad), GST_RPAD_DIRECTION (pad),
|
||||
|
@ -2238,9 +2238,8 @@ gst_element_clear_pad_caps (GstElement *element)
|
|||
while (pads) {
|
||||
GstRealPad *pad = GST_PAD_REALIZE (pads->data);
|
||||
|
||||
if (GST_PAD_CAPS (pad)) {
|
||||
GST_PAD_CAPS (pad) = NULL;
|
||||
}
|
||||
gst_caps_replace (&GST_PAD_CAPS (pad), NULL);
|
||||
|
||||
pads = g_list_next (pads);
|
||||
}
|
||||
}
|
||||
|
@ -2413,8 +2412,8 @@ gst_element_dispose (GObject *object)
|
|||
if (element->property_mutex)
|
||||
g_mutex_free (element->property_mutex);
|
||||
|
||||
gst_object_swap ((GstObject **)&element->sched, NULL);
|
||||
gst_object_swap ((GstObject **)&element->clock, NULL);
|
||||
gst_object_replace ((GstObject **)&element->sched, NULL);
|
||||
gst_object_replace ((GstObject **)&element->clock, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -2603,7 +2602,7 @@ gst_element_set_scheduler (GstElement *element,
|
|||
|
||||
GST_INFO_ELEMENT (GST_CAT_PARENTAGE, element, "setting scheduler to %p", sched);
|
||||
|
||||
gst_object_swap ((GstObject **)&GST_ELEMENT_SCHED (element), GST_OBJECT (sched));
|
||||
gst_object_replace ((GstObject **)&GST_ELEMENT_SCHED (element), GST_OBJECT (sched));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -234,7 +234,7 @@ gst_object_sink (GstObject *object)
|
|||
}
|
||||
|
||||
/**
|
||||
* gst_object_swap:
|
||||
* gst_object_replace:
|
||||
* @oldobj: pointer to place of old GstObject
|
||||
* @newobj: new GstObject
|
||||
*
|
||||
|
@ -242,13 +242,11 @@ gst_object_sink (GstObject *object)
|
|||
* puts the newobj in *oldobj.
|
||||
*/
|
||||
void
|
||||
gst_object_swap (GstObject **oldobj, GstObject *newobj)
|
||||
gst_object_replace (GstObject **oldobj, GstObject *newobj)
|
||||
{
|
||||
if (*oldobj != newobj) {
|
||||
if (newobj)
|
||||
gst_object_ref (newobj);
|
||||
if (*oldobj)
|
||||
gst_object_unref (*oldobj);
|
||||
if (newobj) gst_object_ref (newobj);
|
||||
if (*oldobj) gst_object_unref (*oldobj);
|
||||
|
||||
*oldobj = newobj;
|
||||
}
|
||||
|
|
|
@ -142,15 +142,15 @@ void gst_object_restore_thyself (GstObject *object, xmlNodePtr self);
|
|||
#pragma GCC poison gst_object_restore_thyself
|
||||
#endif
|
||||
|
||||
/* refcounting */
|
||||
/* refcounting + life cycle */
|
||||
GstObject * gst_object_ref (GstObject *object);
|
||||
void gst_object_unref (GstObject *object);
|
||||
void gst_object_sink (GstObject *object);
|
||||
|
||||
void gst_object_swap (GstObject **oldobj, GstObject *newobj);
|
||||
/* destroying an object */
|
||||
void gst_object_destroy (GstObject *object);
|
||||
|
||||
/* replace object pointer */
|
||||
void gst_object_replace (GstObject **oldobj, GstObject *newobj);
|
||||
|
||||
/* printing out the 'path' of the object */
|
||||
gchar * gst_object_get_path_string (GstObject *object);
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ gst_pipeline_dispose (GObject *object)
|
|||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
|
||||
gst_object_swap ((GstObject **)&GST_ELEMENT_SCHED (pipeline), NULL);
|
||||
gst_object_replace ((GstObject **)&GST_ELEMENT_SCHED (pipeline), NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -96,8 +96,8 @@ gst_scheduler_dispose (GObject *object)
|
|||
sched->clock_receivers,
|
||||
sched->schedulers);
|
||||
|
||||
gst_object_swap ((GstObject **)&sched->current_clock, NULL);
|
||||
gst_object_swap ((GstObject **)&sched->clock, NULL);
|
||||
gst_object_replace ((GstObject **)&sched->current_clock, NULL);
|
||||
gst_object_replace ((GstObject **)&sched->clock, NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint t
|
|||
GST_DEBUG (GST_CAT_CLOCK, "scheduler READY to PAUSED clock is %p (%s)", clock,
|
||||
(clock ? GST_OBJECT_NAME (clock) : "nil"));
|
||||
|
||||
gst_object_swap ((GstObject **)&sched->current_clock, (GstObject *)clock);
|
||||
gst_object_replace ((GstObject **)&sched->current_clock, (GstObject *)clock);
|
||||
break;
|
||||
}
|
||||
case GST_STATE_PAUSED_TO_PLAYING:
|
||||
|
@ -320,7 +320,7 @@ gst_scheduler_state_transition (GstScheduler *sched, GstElement *element, gint t
|
|||
GST_DEBUG (GST_CAT_CLOCK, "scheduler PAUSED to PLAYING clock is %p (%s)", clock,
|
||||
(clock ? GST_OBJECT_NAME (clock) : "nil"));
|
||||
|
||||
gst_object_swap ((GstObject **)&sched->current_clock, (GstObject *)clock);
|
||||
gst_object_replace ((GstObject **)&sched->current_clock, (GstObject *)clock);
|
||||
|
||||
gst_scheduler_set_clock (sched, sched->current_clock);
|
||||
if (sched->current_clock) {
|
||||
|
@ -614,7 +614,7 @@ gst_scheduler_use_clock (GstScheduler *sched, GstClock *clock)
|
|||
|
||||
GST_FLAG_SET (sched, GST_SCHEDULER_FLAG_FIXED_CLOCK);
|
||||
|
||||
gst_object_swap ((GstObject **)&sched->clock, (GstObject *)clock);
|
||||
gst_object_replace ((GstObject **)&sched->clock, (GstObject *)clock);
|
||||
|
||||
GST_DEBUG (GST_CAT_CLOCK, "scheduler using fixed clock %p (%s)", clock,
|
||||
(clock ? GST_OBJECT_NAME (clock) : "nil"));
|
||||
|
@ -640,7 +640,7 @@ gst_scheduler_set_clock (GstScheduler *sched, GstClock *clock)
|
|||
receivers = sched->clock_receivers;
|
||||
schedulers = sched->schedulers;
|
||||
|
||||
gst_object_swap ((GstObject **)&sched->current_clock, (GstObject *)clock);
|
||||
gst_object_replace ((GstObject **)&sched->current_clock, (GstObject *)clock);
|
||||
|
||||
while (receivers) {
|
||||
GstElement *element = GST_ELEMENT (receivers->data);
|
||||
|
@ -675,7 +675,7 @@ gst_scheduler_auto_clock (GstScheduler *sched)
|
|||
|
||||
GST_FLAG_UNSET (sched, GST_SCHEDULER_FLAG_FIXED_CLOCK);
|
||||
|
||||
gst_object_swap ((GstObject **)&sched->clock, NULL);
|
||||
gst_object_replace ((GstObject **)&sched->clock, NULL);
|
||||
|
||||
GST_DEBUG (GST_CAT_CLOCK, "scheduler using automatic clock");
|
||||
}
|
||||
|
|
|
@ -209,7 +209,7 @@ gst_thread_dispose (GObject *object)
|
|||
g_cond_free (thread->cond_t);
|
||||
g_cond_free (thread->cond_m);
|
||||
|
||||
gst_object_swap ((GstObject **)&GST_ELEMENT_SCHED (thread), NULL);
|
||||
gst_object_replace ((GstObject **)&GST_ELEMENT_SCHED (thread), NULL);
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->dispose (object);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue