mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
nleobject: It is wrong to update object->stop in set_property.
Summary: It must only be done when the object is commited. We can do that in constructed though, as the changes will anyway be commited when the object is added to a composition. Also update the tests, as we set properties spearately then check the stop, we can commit the source at its creation without removing meaning from the tests. Reviewers: thiblahute Differential Revision: http://phabricator.freedesktop.org/D84
This commit is contained in:
parent
2e26a9e926
commit
506662e2dc
2 changed files with 11 additions and 2 deletions
|
@ -88,6 +88,7 @@ static void nle_object_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec);
|
const GValue * value, GParamSpec * pspec);
|
||||||
static void nle_object_get_property (GObject * object, guint prop_id,
|
static void nle_object_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
static void nle_object_constructed (GObject * object);
|
||||||
|
|
||||||
static GstStateChangeReturn nle_object_change_state (GstElement * element,
|
static GstStateChangeReturn nle_object_change_state (GstElement * element,
|
||||||
GstStateChange transition);
|
GstStateChange transition);
|
||||||
|
@ -114,6 +115,7 @@ nle_object_class_init (NleObjectClass * klass)
|
||||||
|
|
||||||
gobject_class->set_property = GST_DEBUG_FUNCPTR (nle_object_set_property);
|
gobject_class->set_property = GST_DEBUG_FUNCPTR (nle_object_set_property);
|
||||||
gobject_class->get_property = GST_DEBUG_FUNCPTR (nle_object_get_property);
|
gobject_class->get_property = GST_DEBUG_FUNCPTR (nle_object_get_property);
|
||||||
|
gobject_class->constructed = GST_DEBUG_FUNCPTR (nle_object_constructed);
|
||||||
gobject_class->dispose = GST_DEBUG_FUNCPTR (nle_object_dispose);
|
gobject_class->dispose = GST_DEBUG_FUNCPTR (nle_object_dispose);
|
||||||
|
|
||||||
gstelement_class->change_state = GST_DEBUG_FUNCPTR (nle_object_change_state);
|
gstelement_class->change_state = GST_DEBUG_FUNCPTR (nle_object_change_state);
|
||||||
|
@ -514,8 +516,6 @@ nle_object_set_property (GObject * object, guint prop_id,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
GST_OBJECT_UNLOCK (object);
|
GST_OBJECT_UNLOCK (object);
|
||||||
|
|
||||||
_update_stop (nleobject);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -555,6 +555,14 @@ nle_object_get_property (GObject * object, guint prop_id,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
nle_object_constructed (GObject * object)
|
||||||
|
{
|
||||||
|
NleObject *nleobject = (NleObject *) object;
|
||||||
|
|
||||||
|
_update_stop (nleobject);
|
||||||
|
}
|
||||||
|
|
||||||
static GstStateChangeReturn
|
static GstStateChangeReturn
|
||||||
nle_object_change_state (GstElement * element, GstStateChange transition)
|
nle_object_change_state (GstElement * element, GstStateChange transition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -178,6 +178,7 @@ new_nle_src (const gchar * name, guint64 start, gint64 duration, gint priority)
|
||||||
g_object_set (G_OBJECT (nlesource),
|
g_object_set (G_OBJECT (nlesource),
|
||||||
"start", start,
|
"start", start,
|
||||||
"duration", duration, "inpoint", start, "priority", priority, NULL);
|
"duration", duration, "inpoint", start, "priority", priority, NULL);
|
||||||
|
nle_object_commit (NLE_OBJECT (nlesource), FALSE);
|
||||||
|
|
||||||
return nlesource;
|
return nlesource;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue