Merge remote-tracking branch 'origin/0.10'

This commit is contained in:
Thibault Saunier 2012-05-10 14:56:34 -04:00
commit 406bc5fe28
4 changed files with 34 additions and 13 deletions

View file

@ -776,9 +776,12 @@ ges_timeline_snap_position (GESTimeline * timeline, GESTrackObject * trackobj,
/* We emit the snapping signal only if we snapped with a different value
* than the current one */
if (emit) {
GstClockTime snap_time = ret ? *ret : GST_CLOCK_TIME_NONE;
ges_timeline_emit_snappig (timeline, trackobj, ret);
GST_DEBUG_OBJECT (timeline, "Snaping at %" GST_TIME_FORMAT,
GST_TIME_ARGS (*ret));
GST_TIME_ARGS (snap_time));
}
return ret;

View file

@ -197,9 +197,29 @@ static void
ges_track_object_dispose (GObject * object)
{
GESTrackObjectPrivate *priv = GES_TRACK_OBJECT (object)->priv;
if (priv->properties_hashtable)
g_hash_table_destroy (priv->properties_hashtable);
if (priv->gnlobject) {
GstState cstate;
if (priv->track != NULL) {
GST_ERROR_OBJECT (object, "Still in %p, this means that you forgot"
" to remove it from the GESTrack it is contained in. You always need"
" to remove a GESTrackObject from its track before dropping the last"
" reference\n"
"This problem may also be caused by a refcounting bug in"
" the application or GES itself.", priv->track);
gst_element_get_state (priv->gnlobject, &cstate, NULL, 0);
if (cstate != GST_STATE_NULL)
gst_element_set_state (priv->gnlobject, GST_STATE_NULL);
}
gst_object_unref (priv->gnlobject);
priv->gnlobject = NULL;
}
G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
}
@ -779,7 +799,7 @@ ensure_gnl_object (GESTrackObject * object)
GST_DEBUG_OBJECT (object, "Got a valid GnlObject, now filling it in");
object->priv->gnlobject = gnlobject;
object->priv->gnlobject = gst_object_ref (gnlobject);
if (object->priv->timelineobj)
res = ges_timeline_object_fill_track_object (object->priv->timelineobj,
@ -920,6 +940,8 @@ ges_track_object_get_timeline_object (GESTrackObject * object)
GstElement *
ges_track_object_get_gnlobject (GESTrackObject * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
return object->priv->gnlobject;
}
@ -935,6 +957,8 @@ ges_track_object_get_gnlobject (GESTrackObject * object)
GstElement *
ges_track_object_get_element (GESTrackObject * object)
{
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
return object->priv->element;
}

View file

@ -688,10 +688,10 @@ ges_track_video_transition_set_inverted_internal (GESTrackVideoTransition *
GESTrackVideoTransitionPrivate *priv = self->priv;
if (!priv->smpte) {
priv->pending_inverted = inverted;
priv->pending_inverted = !inverted;
return;
}
g_object_set (priv->smpte, "invert", inverted, NULL);
g_object_set (priv->smpte, "invert", !inverted, NULL);
}
@ -800,7 +800,7 @@ void
ges_track_video_transition_set_inverted (GESTrackVideoTransition * self,
gboolean inverted)
{
ges_track_video_transition_set_inverted (self, inverted);
ges_track_video_transition_set_inverted_internal (self, inverted);
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_INVERT]);
}
@ -825,7 +825,7 @@ ges_track_video_transition_is_inverted (GESTrackVideoTransition * self)
g_object_get (self->priv->smpte, "invert", &inverted, NULL);
return inverted;
return !inverted;
}
/**

View file

@ -547,19 +547,13 @@ ges_track_remove_object (GESTrack * track, GESTrackObject * object)
if ((gnlobject = ges_track_object_get_gnlobject (object))) {
GST_DEBUG ("Removing GnlObject '%s' from composition '%s'",
GST_ELEMENT_NAME (gnlobject), GST_ELEMENT_NAME (priv->composition));
/* We can't just set state of gnlobject to GST_STATE_NULL, because it will
* result in deadlock. Adding a ref to the gnlobj so we finalize it after
* removing it from the composition */
gst_object_ref (gnlobject);
if (!gst_bin_remove (GST_BIN (priv->composition), gnlobject)) {
GST_WARNING ("Failed to remove gnlobject from composition");
return FALSE;
}
gst_element_set_state (gnlobject, GST_STATE_NULL);
/* Wait for the state change to actually happen */
gst_element_get_state (gnlobject, NULL, NULL, GST_CLOCK_TIME_NONE);
gst_object_unref (gnlobject);
}
g_signal_handlers_disconnect_by_func (object, sort_track_objects_cb, NULL);