mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-27 17:48:26 +00:00
GESTrack: Make more properties private
And ensure exported symbols are properly documented and have argument checking.
This commit is contained in:
parent
4dae5c83f4
commit
ed6b2ce4c4
8 changed files with 119 additions and 61 deletions
|
@ -47,10 +47,12 @@ ges_track_new
|
||||||
ges_track_add_object
|
ges_track_add_object
|
||||||
ges_track_remove_object
|
ges_track_remove_object
|
||||||
ges_track_set_caps
|
ges_track_set_caps
|
||||||
|
ges_track_get_caps
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GESTrackClass
|
GESTrackClass
|
||||||
GESTrackPrivate
|
GESTrackPrivate
|
||||||
ges_track_set_timeline
|
ges_track_set_timeline
|
||||||
|
ges_track_get_timeline
|
||||||
ges_track_get_type
|
ges_track_get_type
|
||||||
GES_IS_TRACK
|
GES_IS_TRACK
|
||||||
GES_IS_TRACK_CLASS
|
GES_IS_TRACK_CLASS
|
||||||
|
@ -65,13 +67,12 @@ GES_TYPE_TRACK
|
||||||
<TITLE>GESTrackObject</TITLE>
|
<TITLE>GESTrackObject</TITLE>
|
||||||
GESTrackObject
|
GESTrackObject
|
||||||
GESTrackObjectClass
|
GESTrackObjectClass
|
||||||
GES_TRACK_OBJECT_DURATION
|
|
||||||
GES_TRACK_OBJECT_INPOINT
|
|
||||||
GES_TRACK_OBJECT_PRIORITY
|
|
||||||
GES_TRACK_OBJECT_PRIORITY_OFFSET
|
|
||||||
GES_TRACK_OBJECT_START
|
|
||||||
ges_track_object_set_active
|
ges_track_object_set_active
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
|
GES_TRACK_OBJECT_DURATION
|
||||||
|
GES_TRACK_OBJECT_INPOINT
|
||||||
|
GES_TRACK_OBJECT_START
|
||||||
|
ges_track_object_get_priority_offset
|
||||||
GESTrackObjectPrivate
|
GESTrackObjectPrivate
|
||||||
ges_track_object_set_timeline_object
|
ges_track_object_set_timeline_object
|
||||||
ges_track_object_set_track
|
ges_track_object_set_track
|
||||||
|
|
|
@ -90,7 +90,7 @@ save_keyfile (GESFormatter * keyfile_formatter, GESTimeline * timeline)
|
||||||
g_object_get_property (G_OBJECT (track), "track-type", &v);
|
g_object_get_property (G_OBJECT (track), "track-type", &v);
|
||||||
|
|
||||||
type = gst_value_serialize (&v);
|
type = gst_value_serialize (&v);
|
||||||
caps = gst_caps_to_string (track->caps);
|
caps = gst_caps_to_string (ges_track_get_caps (track));
|
||||||
|
|
||||||
g_key_file_set_value (kf, buffer, "type", type);
|
g_key_file_set_value (kf, buffer, "type", type);
|
||||||
g_key_file_set_string (kf, buffer, "caps", caps);
|
g_key_file_set_string (kf, buffer, "caps", caps);
|
||||||
|
|
|
@ -631,7 +631,7 @@ ensure_gnl_object (GESTrackObject * object)
|
||||||
if (res) {
|
if (res) {
|
||||||
/* Set some properties on the GnlObject */
|
/* Set some properties on the GnlObject */
|
||||||
g_object_set (object->gnlobject,
|
g_object_set (object->gnlobject,
|
||||||
"caps", object->track->caps,
|
"caps", ges_track_get_caps (object->track),
|
||||||
"duration", object->pending_duration,
|
"duration", object->pending_duration,
|
||||||
"media-duration", object->pending_duration,
|
"media-duration", object->pending_duration,
|
||||||
"start", object->pending_start,
|
"start", object->pending_start,
|
||||||
|
|
|
@ -80,8 +80,6 @@ typedef struct _GESTrackObjectPrivate GESTrackObjectPrivate;
|
||||||
* @start: Position (in nanoseconds) of the object the track.
|
* @start: Position (in nanoseconds) of the object the track.
|
||||||
* @inpoint: in-point (in nanoseconds) of the object in the track.
|
* @inpoint: in-point (in nanoseconds) of the object in the track.
|
||||||
* @duration: Duration of the object.
|
* @duration: Duration of the object.
|
||||||
* @base_priority: base priority of the object in the track (0:top priority)
|
|
||||||
* @priority_offset: priority relative to its parent timeline object.
|
|
||||||
* @gnl_priority: the cached gnl priority (base + offset)
|
* @gnl_priority: the cached gnl priority (base + offset)
|
||||||
* @active: Whether the object is to be used or not.
|
* @active: Whether the object is to be used or not.
|
||||||
*
|
*
|
||||||
|
|
127
ges/ges-track.c
127
ges/ges-track.c
|
@ -37,8 +37,14 @@ G_DEFINE_TYPE (GESTrack, ges_track, GST_TYPE_BIN);
|
||||||
|
|
||||||
struct _GESTrackPrivate
|
struct _GESTrackPrivate
|
||||||
{
|
{
|
||||||
/* Dummy variable */
|
/*< private > */
|
||||||
void *nothing;
|
GESTimeline *timeline;
|
||||||
|
GList *trackobjects;
|
||||||
|
|
||||||
|
GstCaps *caps;
|
||||||
|
|
||||||
|
GstElement *composition; /* The composition associated with this track */
|
||||||
|
GstPad *srcpad; /* The source GhostPad */
|
||||||
};
|
};
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
@ -61,7 +67,7 @@ ges_track_get_property (GObject * object, guint property_id,
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case ARG_CAPS:
|
case ARG_CAPS:
|
||||||
gst_value_set_caps (value, track->caps);
|
gst_value_set_caps (value, track->priv->caps);
|
||||||
break;
|
break;
|
||||||
case ARG_TYPE:
|
case ARG_TYPE:
|
||||||
g_value_set_flags (value, track->type);
|
g_value_set_flags (value, track->type);
|
||||||
|
@ -93,21 +99,22 @@ static void
|
||||||
ges_track_dispose (GObject * object)
|
ges_track_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
GESTrack *track = (GESTrack *) object;
|
GESTrack *track = (GESTrack *) object;
|
||||||
|
GESTrackPrivate *priv = track->priv;
|
||||||
|
|
||||||
while (track->trackobjects) {
|
while (priv->trackobjects) {
|
||||||
GESTrackObject *trobj = GES_TRACK_OBJECT (track->trackobjects->data);
|
GESTrackObject *trobj = GES_TRACK_OBJECT (priv->trackobjects->data);
|
||||||
ges_track_remove_object (track, trobj);
|
ges_track_remove_object (track, trobj);
|
||||||
ges_timeline_object_release_track_object (trobj->timelineobj, trobj);
|
ges_timeline_object_release_track_object (trobj->timelineobj, trobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (track->composition) {
|
if (priv->composition) {
|
||||||
gst_bin_remove (GST_BIN (object), track->composition);
|
gst_bin_remove (GST_BIN (object), priv->composition);
|
||||||
track->composition = NULL;
|
priv->composition = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (track->caps) {
|
if (priv->caps) {
|
||||||
gst_caps_unref (track->caps);
|
gst_caps_unref (priv->caps);
|
||||||
track->caps = NULL;
|
priv->caps = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (ges_track_parent_class)->dispose (object);
|
G_OBJECT_CLASS (ges_track_parent_class)->dispose (object);
|
||||||
|
@ -167,14 +174,14 @@ ges_track_init (GESTrack * self)
|
||||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||||
GES_TYPE_TRACK, GESTrackPrivate);
|
GES_TYPE_TRACK, GESTrackPrivate);
|
||||||
|
|
||||||
self->composition = gst_element_factory_make ("gnlcomposition", NULL);
|
self->priv->composition = gst_element_factory_make ("gnlcomposition", NULL);
|
||||||
|
|
||||||
g_signal_connect (self->composition, "pad-added", (GCallback) pad_added_cb,
|
g_signal_connect (self->priv->composition, "pad-added",
|
||||||
self);
|
(GCallback) pad_added_cb, self);
|
||||||
g_signal_connect (self->composition, "pad-removed",
|
g_signal_connect (self->priv->composition, "pad-removed",
|
||||||
(GCallback) pad_removed_cb, self);
|
(GCallback) pad_removed_cb, self);
|
||||||
|
|
||||||
if (!gst_bin_add (GST_BIN (self), self->composition))
|
if (!gst_bin_add (GST_BIN (self), self->priv->composition))
|
||||||
GST_ERROR ("Couldn't add composition to bin !");
|
GST_ERROR ("Couldn't add composition to bin !");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,12 +246,19 @@ ges_track_audio_raw_new (void)
|
||||||
return track;
|
return track;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ges_track_set_timeline:
|
||||||
|
* @track: a #GESTrack
|
||||||
|
* @timeline: a #GESTimeline
|
||||||
|
*
|
||||||
|
* Sets @timeline as the timeline controlling @track.
|
||||||
|
*/
|
||||||
void
|
void
|
||||||
ges_track_set_timeline (GESTrack * track, GESTimeline * timeline)
|
ges_track_set_timeline (GESTrack * track, GESTimeline * timeline)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("track:%p, timeline:%p", track, timeline);
|
GST_DEBUG ("track:%p, timeline:%p", track, timeline);
|
||||||
|
|
||||||
track->timeline = timeline;
|
track->priv->timeline = timeline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -257,15 +271,20 @@ ges_track_set_timeline (GESTrack * track, GESTimeline * timeline)
|
||||||
void
|
void
|
||||||
ges_track_set_caps (GESTrack * track, const GstCaps * caps)
|
ges_track_set_caps (GESTrack * track, const GstCaps * caps)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("track:%p, caps:%" GST_PTR_FORMAT, track, caps);
|
GESTrackPrivate *priv;
|
||||||
|
|
||||||
|
g_return_if_fail (GES_IS_TRACK (track));
|
||||||
g_return_if_fail (GST_IS_CAPS (caps));
|
g_return_if_fail (GST_IS_CAPS (caps));
|
||||||
|
|
||||||
if (track->caps)
|
GST_DEBUG ("track:%p, caps:%" GST_PTR_FORMAT, track, caps);
|
||||||
gst_caps_unref (track->caps);
|
|
||||||
track->caps = gst_caps_copy (caps);
|
|
||||||
|
|
||||||
g_object_set (track->composition, "caps", caps, NULL);
|
priv = track->priv;
|
||||||
|
|
||||||
|
if (priv->caps)
|
||||||
|
gst_caps_unref (priv->caps);
|
||||||
|
priv->caps = gst_caps_copy (caps);
|
||||||
|
|
||||||
|
g_object_set (priv->composition, "caps", caps, NULL);
|
||||||
/* FIXME : update all trackobjects ? */
|
/* FIXME : update all trackobjects ? */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,6 +301,9 @@ ges_track_set_caps (GESTrack * track, const GstCaps * caps)
|
||||||
gboolean
|
gboolean
|
||||||
ges_track_add_object (GESTrack * track, GESTrackObject * object)
|
ges_track_add_object (GESTrack * track, GESTrackObject * object)
|
||||||
{
|
{
|
||||||
|
g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
|
||||||
|
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
|
||||||
|
|
||||||
GST_DEBUG ("track:%p, object:%p", track, object);
|
GST_DEBUG ("track:%p, object:%p", track, object);
|
||||||
|
|
||||||
if (G_UNLIKELY (object->track != NULL)) {
|
if (G_UNLIKELY (object->track != NULL)) {
|
||||||
|
@ -302,13 +324,13 @@ ges_track_add_object (GESTrack * track, GESTrackObject * object)
|
||||||
GST_DEBUG ("Adding object to ourself");
|
GST_DEBUG ("Adding object to ourself");
|
||||||
|
|
||||||
/* make sure the object has a valid gnlobject ! */
|
/* make sure the object has a valid gnlobject ! */
|
||||||
if (G_UNLIKELY (!gst_bin_add (GST_BIN (track->composition),
|
if (G_UNLIKELY (!gst_bin_add (GST_BIN (track->priv->composition),
|
||||||
object->gnlobject))) {
|
object->gnlobject))) {
|
||||||
GST_WARNING ("Couldn't add object to the GnlComposition");
|
GST_WARNING ("Couldn't add object to the GnlComposition");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
track->trackobjects = g_list_append (track->trackobjects, object);
|
track->priv->trackobjects = g_list_append (track->priv->trackobjects, object);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -326,8 +348,15 @@ ges_track_add_object (GESTrack * track, GESTrackObject * object)
|
||||||
gboolean
|
gboolean
|
||||||
ges_track_remove_object (GESTrack * track, GESTrackObject * object)
|
ges_track_remove_object (GESTrack * track, GESTrackObject * object)
|
||||||
{
|
{
|
||||||
|
GESTrackPrivate *priv;
|
||||||
|
|
||||||
|
g_return_val_if_fail (GES_IS_TRACK (track), FALSE);
|
||||||
|
g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), FALSE);
|
||||||
|
|
||||||
GST_DEBUG ("track:%p, object:%p", track, object);
|
GST_DEBUG ("track:%p, object:%p", track, object);
|
||||||
|
|
||||||
|
priv = track->priv;
|
||||||
|
|
||||||
if (G_UNLIKELY (object->track != track)) {
|
if (G_UNLIKELY (object->track != track)) {
|
||||||
GST_WARNING ("Object belongs to another track");
|
GST_WARNING ("Object belongs to another track");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -335,14 +364,14 @@ ges_track_remove_object (GESTrack * track, GESTrackObject * object)
|
||||||
|
|
||||||
if (G_LIKELY (object->gnlobject != NULL)) {
|
if (G_LIKELY (object->gnlobject != NULL)) {
|
||||||
GST_DEBUG ("Removing GnlObject from composition");
|
GST_DEBUG ("Removing GnlObject from composition");
|
||||||
if (!gst_bin_remove (GST_BIN (track->composition), object->gnlobject)) {
|
if (!gst_bin_remove (GST_BIN (priv->composition), object->gnlobject)) {
|
||||||
GST_WARNING ("Failed to remove gnlobject from composition");
|
GST_WARNING ("Failed to remove gnlobject from composition");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ges_track_object_set_track (object, NULL);
|
ges_track_object_set_track (object, NULL);
|
||||||
track->trackobjects = g_list_remove (track->trackobjects, object);
|
priv->trackobjects = g_list_remove (priv->trackobjects, object);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -350,14 +379,16 @@ ges_track_remove_object (GESTrack * track, GESTrackObject * object)
|
||||||
static void
|
static void
|
||||||
pad_added_cb (GstElement * element, GstPad * pad, GESTrack * track)
|
pad_added_cb (GstElement * element, GstPad * pad, GESTrack * track)
|
||||||
{
|
{
|
||||||
|
GESTrackPrivate *priv = track->priv;
|
||||||
|
|
||||||
GST_DEBUG ("track:%p, pad %s:%s", track, GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG ("track:%p, pad %s:%s", track, GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
/* ghost the pad */
|
/* ghost the pad */
|
||||||
track->srcpad = gst_ghost_pad_new ("src", pad);
|
priv->srcpad = gst_ghost_pad_new ("src", pad);
|
||||||
|
|
||||||
gst_pad_set_active (track->srcpad, TRUE);
|
gst_pad_set_active (priv->srcpad, TRUE);
|
||||||
|
|
||||||
gst_element_add_pad (GST_ELEMENT (track), track->srcpad);
|
gst_element_add_pad (GST_ELEMENT (track), priv->srcpad);
|
||||||
|
|
||||||
GST_DEBUG ("done");
|
GST_DEBUG ("done");
|
||||||
}
|
}
|
||||||
|
@ -365,13 +396,43 @@ pad_added_cb (GstElement * element, GstPad * pad, GESTrack * track)
|
||||||
static void
|
static void
|
||||||
pad_removed_cb (GstElement * element, GstPad * pad, GESTrack * track)
|
pad_removed_cb (GstElement * element, GstPad * pad, GESTrack * track)
|
||||||
{
|
{
|
||||||
|
GESTrackPrivate *priv = track->priv;
|
||||||
|
|
||||||
GST_DEBUG ("track:%p, pad %s:%s", track, GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG ("track:%p, pad %s:%s", track, GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
if (G_LIKELY (track->srcpad)) {
|
if (G_LIKELY (priv->srcpad)) {
|
||||||
gst_pad_set_active (track->srcpad, FALSE);
|
gst_pad_set_active (priv->srcpad, FALSE);
|
||||||
gst_element_remove_pad (GST_ELEMENT (track), track->srcpad);
|
gst_element_remove_pad (GST_ELEMENT (track), priv->srcpad);
|
||||||
track->srcpad = NULL;
|
priv->srcpad = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_DEBUG ("done");
|
GST_DEBUG ("done");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ges_track_get_caps:
|
||||||
|
* @track: a #GESTrack
|
||||||
|
*
|
||||||
|
* Returns: The #GstCaps this track is configured to output.
|
||||||
|
*/
|
||||||
|
const GstCaps *
|
||||||
|
ges_track_get_caps (GESTrack * track)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GES_IS_TRACK (track), NULL);
|
||||||
|
|
||||||
|
return track->priv->caps;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ges_track_get_timeline:
|
||||||
|
* @track: a #GESTrack
|
||||||
|
*
|
||||||
|
* Returns: The #GESTimeline this track belongs to. Can be %NULL.
|
||||||
|
*/
|
||||||
|
const GESTimeline *
|
||||||
|
ges_track_get_timeline (GESTrack * track)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (GES_IS_TRACK (track), NULL);
|
||||||
|
|
||||||
|
return track->priv->timeline;
|
||||||
|
}
|
||||||
|
|
|
@ -60,15 +60,6 @@ struct _GESTrack {
|
||||||
/* READ-ONLY */
|
/* READ-ONLY */
|
||||||
GESTrackType type;
|
GESTrackType type;
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
GESTimeline * timeline;
|
|
||||||
GList * trackobjects;
|
|
||||||
|
|
||||||
GstCaps * caps;
|
|
||||||
|
|
||||||
GstElement * composition; /* The composition associated with this track */
|
|
||||||
GstPad * srcpad; /* The source GhostPad */
|
|
||||||
|
|
||||||
GESTrackPrivate * priv;
|
GESTrackPrivate * priv;
|
||||||
|
|
||||||
/* Padding for API extension */
|
/* Padding for API extension */
|
||||||
|
@ -91,11 +82,17 @@ GType ges_track_get_type (void);
|
||||||
|
|
||||||
GESTrack* ges_track_new (GESTrackType type, GstCaps * caps);
|
GESTrack* ges_track_new (GESTrackType type, GstCaps * caps);
|
||||||
|
|
||||||
void ges_track_set_timeline (GESTrack * track, GESTimeline *timeline);
|
void ges_track_set_timeline (GESTrack * track,
|
||||||
void ges_track_set_caps (GESTrack * track, const GstCaps * caps);
|
GESTimeline *timeline);
|
||||||
|
void ges_track_set_caps (GESTrack * track,
|
||||||
|
const GstCaps * caps);
|
||||||
|
const GstCaps * ges_track_get_caps (GESTrack *track);
|
||||||
|
const GESTimeline *ges_track_get_timeline (GESTrack *track);
|
||||||
|
|
||||||
gboolean ges_track_add_object (GESTrack * track, GESTrackObject * object);
|
gboolean ges_track_add_object (GESTrack * track,
|
||||||
gboolean ges_track_remove_object (GESTrack * track, GESTrackObject * object);
|
GESTrackObject * object);
|
||||||
|
gboolean ges_track_remove_object (GESTrack * track,
|
||||||
|
GESTrackObject * object);
|
||||||
|
|
||||||
GESTrack *ges_track_video_raw_new (void);
|
GESTrack *ges_track_video_raw_new (void);
|
||||||
GESTrack *ges_track_audio_raw_new (void);
|
GESTrack *ges_track_audio_raw_new (void);
|
||||||
|
|
|
@ -82,9 +82,10 @@ GST_START_TEST (test_ges_scenario)
|
||||||
|
|
||||||
GST_DEBUG ("Add the track to the timeline");
|
GST_DEBUG ("Add the track to the timeline");
|
||||||
fail_unless (ges_timeline_add_track (timeline, track));
|
fail_unless (ges_timeline_add_track (timeline, track));
|
||||||
|
|
||||||
/* The timeline steals the reference to the track */
|
/* The timeline steals the reference to the track */
|
||||||
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
||||||
fail_unless (track->timeline == timeline);
|
fail_unless (ges_track_get_timeline (track) == timeline);
|
||||||
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
||||||
|
|
||||||
/* Create a source and add it to the Layer */
|
/* Create a source and add it to the Layer */
|
||||||
|
@ -132,7 +133,7 @@ GST_START_TEST (test_ges_scenario)
|
||||||
/* Remove the track from the timeline */
|
/* Remove the track from the timeline */
|
||||||
g_object_ref (track);
|
g_object_ref (track);
|
||||||
fail_unless (ges_timeline_remove_track (timeline, track));
|
fail_unless (ges_timeline_remove_track (timeline, track));
|
||||||
fail_unless (track->timeline == NULL);
|
fail_unless (ges_track_get_timeline (track) == NULL);
|
||||||
fail_unless (timeline->tracks == NULL);
|
fail_unless (timeline->tracks == NULL);
|
||||||
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
||||||
g_object_unref (track);
|
g_object_unref (track);
|
||||||
|
@ -185,7 +186,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
||||||
fail_unless (ges_timeline_add_track (timeline, track));
|
fail_unless (ges_timeline_add_track (timeline, track));
|
||||||
/* The timeline steals the reference to the track */
|
/* The timeline steals the reference to the track */
|
||||||
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
||||||
fail_unless (track->timeline == timeline);
|
fail_unless (ges_track_get_timeline (track) == timeline);
|
||||||
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
||||||
|
|
||||||
/* Create a source and add it to the Layer */
|
/* Create a source and add it to the Layer */
|
||||||
|
@ -321,7 +322,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
||||||
GST_DEBUG ("Add the track to the timeline");
|
GST_DEBUG ("Add the track to the timeline");
|
||||||
fail_unless (ges_timeline_add_track (timeline, track));
|
fail_unless (ges_timeline_add_track (timeline, track));
|
||||||
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
||||||
fail_unless (track->timeline == timeline);
|
fail_unless (ges_track_get_timeline (track) == timeline);
|
||||||
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
||||||
|
|
||||||
/* Make sure the associated TrackObjects are in the Track */
|
/* Make sure the associated TrackObjects are in the Track */
|
||||||
|
@ -417,7 +418,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
||||||
GST_DEBUG ("Add the track to the timeline");
|
GST_DEBUG ("Add the track to the timeline");
|
||||||
fail_unless (ges_timeline_add_track (timeline, track));
|
fail_unless (ges_timeline_add_track (timeline, track));
|
||||||
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
||||||
fail_unless (track->timeline == timeline);
|
fail_unless (ges_track_get_timeline (track) == timeline);
|
||||||
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
fail_unless ((gpointer) GST_ELEMENT_PARENT (track) == (gpointer) timeline);
|
||||||
|
|
||||||
/* Make sure the associated TrackObjects are in the Track */
|
/* Make sure the associated TrackObjects are in the Track */
|
||||||
|
|
|
@ -201,7 +201,7 @@ GST_START_TEST (test_keyfile_save)
|
||||||
GST_DEBUG ("Removing track from the timeline");
|
GST_DEBUG ("Removing track from the timeline");
|
||||||
g_object_ref (track);
|
g_object_ref (track);
|
||||||
fail_unless (ges_timeline_remove_track (timeline, track));
|
fail_unless (ges_timeline_remove_track (timeline, track));
|
||||||
fail_unless (track->timeline == NULL);
|
fail_unless (ges_track_get_timeline (track) == NULL);
|
||||||
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
ASSERT_OBJECT_REFCOUNT (track, "track", 1);
|
||||||
g_object_unref (track);
|
g_object_unref (track);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue