diff --git a/docs/libs/ges-docs.sgml b/docs/libs/ges-docs.sgml
index d3b3074b97..9aaae742ac 100644
--- a/docs/libs/ges-docs.sgml
+++ b/docs/libs/ges-docs.sgml
@@ -111,6 +111,12 @@ platform as well as Windows. It is released under the GNU Library General Public
+
+ Tracks
+
+
+
+
Object Hierarchy
diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt
index e8dce1d79c..3ef09271ff 100644
--- a/docs/libs/ges-sections.txt
+++ b/docs/libs/ges-sections.txt
@@ -69,8 +69,6 @@ ges_track_type_name
GESTrack
GESTrack
GESCreateElementForGapFunc
-ges_track_audio_raw_new
-ges_track_video_raw_new
ges_track_new
ges_track_add_element
ges_track_remove_element
@@ -79,7 +77,6 @@ ges_track_get_caps
ges_track_enable_update
ges_track_get_elements
ges_track_is_updating
-ges_track_set_create_element_for_gap_func
GESTrackClass
GESTrackPrivate
@@ -94,6 +91,38 @@ GES_TRACK_GET_CLASS
GES_TYPE_TRACK
+
+ges-audio-track
+GESAudioTrack
+GESAudioTrack
+ges_audio_track_new
+
+GESAudioTrackClass
+GESAudioTrackPrivate
+GES_IS_AUDIO_TRACK
+GES_IS_AUDIO_TRACK_CLASS
+GES_AUDIO_TRACK
+GES_AUDIO_TRACK_CLASS
+GES_AUDIO_TRACK_GET_CLASS
+GES_TYPE_AUDIO_TRACK
+
+
+
+ges-video-track
+GESVideoTrack
+GESVideoTrack
+ges_video_track_new
+
+GESVideoTrackClass
+GESVideoTrackPrivate
+GES_IS_VIDEO_TRACK
+GES_IS_VIDEO_TRACK_CLASS
+GES_VIDEO_TRACK
+GES_VIDEO_TRACK_CLASS
+GES_VIDEO_TRACK_GET_CLASS
+GES_TYPE_VIDEO_TRACK
+
+
ges-track-element
GESTrackElement
diff --git a/ges/Makefile.am b/ges/Makefile.am
index 6d877d6f37..ceb51711e3 100644
--- a/ges/Makefile.am
+++ b/ges/Makefile.am
@@ -30,6 +30,8 @@ libges_@GST_API_VERSION@_la_SOURCES = \
ges-overlay-clip.c \
ges-text-overlay-clip.c \
ges-track.c \
+ ges-audio-track.c \
+ ges-video-track.c \
ges-track-element.c \
ges-source.c \
ges-operation.c \
@@ -89,6 +91,8 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-base-effect.h \
ges-effect.h \
ges-track.h \
+ ges-audio-track.h \
+ ges-video-track.h \
ges-track-element.h \
ges-source.h \
ges-operation.h \
diff --git a/ges/ges-audio-track.c b/ges/ges-audio-track.c
new file mode 100644
index 0000000000..cf21709fe5
--- /dev/null
+++ b/ges/ges-audio-track.c
@@ -0,0 +1,106 @@
+/* GStreamer Editing Services
+ * Copyright (C) <2013> Thibault Saunier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: ges-audio-track:
+ * @short_description: A standard GESTrack for raw audio
+ */
+
+#include "ges-audio-track.h"
+
+#define DEFAULT_CAPS "audio/x-raw"
+
+struct _GESAudioTrackPrivate
+{
+ gpointer nothing;
+};
+
+G_DEFINE_TYPE (GESAudioTrack, ges_audio_track, GES_TYPE_TRACK);
+
+/****************************************************
+ * Private methods and utils *
+ ****************************************************/
+static GstElement *
+create_element_for_raw_audio_gap (GESTrack * track)
+{
+ GstElement *elem;
+
+ elem = gst_element_factory_make ("audiotestsrc", NULL);
+ g_object_set (elem, "wave", 4, NULL);
+
+ return elem;
+}
+
+
+/****************************************************
+ * GObject vmethods implementations *
+ ****************************************************/
+
+static void
+ges_audio_track_init (GESAudioTrack * self)
+{
+ self->priv = G_TYPE_INSTANCE_GET_PRIVATE ((self), GES_TYPE_AUDIO_TRACK,
+ GESAudioTrackPrivate);
+}
+
+static void
+ges_audio_track_finalize (GObject * object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (ges_audio_track_parent_class)->finalize (object);
+}
+
+static void
+ges_audio_track_class_init (GESAudioTrackClass * klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+/* GESTrackClass *parent_class = GES_TRACK_CLASS (klass);
+ */
+
+ g_type_class_add_private (klass, sizeof (GESAudioTrackPrivate));
+
+ object_class->finalize = ges_audio_track_finalize;
+}
+
+/****************************************************
+ * API implementation *
+ ****************************************************/
+/**
+ * ges_audio_track_new:
+ *
+ * Creates a new #GESAudioTrack of type #GES_TRACK_TYPE_AUDIO and with generic
+ * raw audio caps ("audio/x-raw");
+ *
+ * Returns: A new #GESTrack
+ */
+GESVideoTrack *
+ges_audio_track_new (void)
+{
+ GESVideoTrack *ret;
+ GstCaps *caps = gst_caps_from_string (DEFAULT_CAPS);
+
+ ret = g_object_new (GES_TYPE_AUDIO_TRACK, "caps", caps,
+ "track-type", GES_TRACK_TYPE_AUDIO, NULL);
+
+ ges_track_set_create_element_for_gap_func (GES_TRACK (ret),
+ create_element_for_raw_audio_gap);
+
+ return ret;
+}
diff --git a/ges/ges-audio-track.h b/ges/ges-audio-track.h
new file mode 100644
index 0000000000..85a37b1127
--- /dev/null
+++ b/ges/ges-audio-track.h
@@ -0,0 +1,55 @@
+/* GStreamer Editing Services
+ * Copyright (C) <2013> Thibault Saunier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GES_AUDIO_TRACK_H_
+#define _GES_AUDIO_TRACK_H_
+
+#include
+
+#include "ges-track.h"
+#include "ges-types.h"
+
+G_BEGIN_DECLS
+
+#define GES_TYPE_AUDIO_TRACK (ges_audio_track_get_type ())
+#define GES_AUDIO_TRACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_AUDIO_TRACK, GESAudioTrack))
+#define GES_AUDIO_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_AUDIO_TRACK, GESAudioTrackClass))
+#define GES_IS_AUDIO_TRACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_AUDIO_TRACK))
+#define GES_IS_AUDIO_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_AUDIO_TRACK))
+#define GES_AUDIO_TRACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_AUDIO_TRACK, GESAudioTrackClass))
+
+typedef struct _GESAudioTrackPrivate GESAudioTrackPrivate;
+
+struct _GESAudioTrackClass
+{
+ GESTrackClass parent_class;
+};
+
+struct _GESAudioTrack
+{
+ GESTrack parent_instance;
+
+ GESAudioTrackPrivate *priv;
+};
+
+GType ges_audio_track_get_type (void) G_GNUC_CONST;
+GESVideoTrack* ges_audio_track_new (void);
+
+G_END_DECLS
+#endif /* _GES_AUDIO_TRACK_H_ */
diff --git a/ges/ges-pitivi-formatter.c b/ges/ges-pitivi-formatter.c
index b7417ac1cb..a7b2a66f4e 100644
--- a/ges/ges-pitivi-formatter.c
+++ b/ges/ges-pitivi-formatter.c
@@ -184,8 +184,8 @@ create_tracks (GESFormatter * self)
return TRUE;
}
- priv->tracka = ges_track_audio_raw_new ();
- priv->trackv = ges_track_video_raw_new ();
+ priv->tracka = GES_TRACK (ges_audio_track_new ());
+ priv->trackv = GES_TRACK (ges_video_track_new ());
if (!ges_timeline_add_track (self->timeline, priv->trackv)) {
return FALSE;
diff --git a/ges/ges-track.c b/ges/ges-track.c
index 8b70db1687..eea74f5cea 100644
--- a/ges/ges-track.c
+++ b/ges/ges-track.c
@@ -33,6 +33,8 @@
#include "ges-track.h"
#include "ges-track-element.h"
#include "ges-meta-container.h"
+#include "ges-video-track.h"
+#include "ges-audio-track.h"
G_DEFINE_TYPE_WITH_CODE (GESTrack, ges_track, GST_TYPE_BIN,
G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER, NULL));
@@ -307,26 +309,6 @@ composition_duration_cb (GstElement * composition,
}
}
-/* GESCreateElementForGapFunc Gaps filler for raw tracks */
-static GstElement *
-create_element_for_raw_audio_gap (GESTrack * track)
-{
- GstElement *elem;
-
- elem = gst_element_factory_make ("audiotestsrc", NULL);
- g_object_set (elem, "wave", 4, NULL);
-
- return elem;
-}
-
-static GstElement *
-create_element_for_raw_video_gap (GESTrack * track)
-{
- return gst_parse_bin_from_description
- ("videotestsrc pattern=2 name=src ! capsfilter caps=video/x-raw", TRUE,
- NULL);
-}
-
/* FIXME: Find out how to avoid doing this "hack" using the GDestroyNotify
* function pointer in the trackelements_by_start GSequence
*
@@ -580,74 +562,38 @@ ges_track_new (GESTrackType type, GstCaps * caps)
GESTrack *track;
GstCaps *tmpcaps;
- track = g_object_new (GES_TYPE_TRACK, "caps", caps, "track-type", type, NULL);
+ /* TODO Be smarter with well known track types */
if (type == GES_TRACK_TYPE_VIDEO) {
tmpcaps = gst_caps_new_empty_simple ("video/x-raw");
- if (gst_caps_is_equal (caps, tmpcaps))
- ges_track_set_create_element_for_gap_func (track,
- create_element_for_raw_video_gap);
+ if (gst_caps_is_subset (caps, tmpcaps)) {
+ track = GES_TRACK (ges_video_track_new ());
+ ges_track_set_caps (track, caps);
+ gst_caps_unref (tmpcaps);
+ return track;
+ }
gst_caps_unref (tmpcaps);
} else if (type == GES_TRACK_TYPE_AUDIO) {
tmpcaps = gst_caps_new_empty_simple ("audio/x-raw");
- if (gst_caps_is_equal (caps, tmpcaps))
- ges_track_set_create_element_for_gap_func (track,
- create_element_for_raw_audio_gap);
+ if (gst_caps_is_subset (caps, tmpcaps)) {
+ track = GES_TRACK (ges_audio_track_new ());
+ ges_track_set_caps (track, caps);
+
+ gst_caps_unref (tmpcaps);
+ return track;
+ }
gst_caps_unref (tmpcaps);
}
+
+ track = g_object_new (GES_TYPE_TRACK, "caps", caps, "track-type", type, NULL);
gst_caps_unref (caps);
return track;
}
-/**
- * ges_track_video_raw_new:
- *
- * Creates a new #GESTrack of type #GES_TRACK_TYPE_VIDEO and with generic
- * raw video caps ("video/x-raw");
- *
- * Returns: A new #GESTrack.
- */
-GESTrack *
-ges_track_video_raw_new (void)
-{
- GESTrack *track;
- GstCaps *caps = gst_caps_new_empty_simple ("video/x-raw");
-
- track = ges_track_new (GES_TRACK_TYPE_VIDEO, caps);
- ges_track_set_create_element_for_gap_func (track,
- create_element_for_raw_video_gap);
-
- GST_DEBUG_OBJECT (track, "New raw video track");
-
- return track;
-}
-
-/**
- * ges_track_audio_raw_new:
- *
- * Creates a new #GESTrack of type #GES_TRACK_TYPE_AUDIO and with generic
- * raw audio caps ("audio/x-raw");
- *
- * Returns: A new #GESTrack.
- */
-GESTrack *
-ges_track_audio_raw_new (void)
-{
- GESTrack *track;
- GstCaps *caps = gst_caps_new_empty_simple ("audio/x-raw");
-
- track = ges_track_new (GES_TRACK_TYPE_AUDIO, caps);
- ges_track_set_create_element_for_gap_func (track,
- create_element_for_raw_audio_gap);
-
- GST_DEBUG_OBJECT (track, "New raw audio track %p",
- track->priv->create_element_for_gaps);
- return track;
-}
/**
* ges_track_set_timeline:
@@ -895,7 +841,7 @@ ges_track_commit (GESTrack * track)
*
* Sets the function that should be used to create the GstElement used to fill gaps.
* To avoid to provide such a function we advice you to use the
- * #ges_track_audio_raw_new and #ges_track_video_raw_new constructor when possible.
+ * #ges_audio_track_new and #ges_video_track_new constructor when possible.
*/
void
ges_track_set_create_element_for_gap_func (GESTrack * track,
diff --git a/ges/ges-track.h b/ges/ges-track.h
index baa10864f6..5a04c0849a 100644
--- a/ges/ges-track.h
+++ b/ges/ges-track.h
@@ -91,8 +91,6 @@ void ges_track_set_create_element_for_gap_func (GESTrack *track, G
/* standard methods */
GType ges_track_get_type (void);
-GESTrack* ges_track_video_raw_new (void);
-GESTrack* ges_track_audio_raw_new (void);
GESTrack* ges_track_new (GESTrackType type, GstCaps * caps);
G_END_DECLS
diff --git a/ges/ges-types.h b/ges/ges-types.h
index 55d86d31f2..b7b6262550 100644
--- a/ges/ges-types.h
+++ b/ges/ges-types.h
@@ -164,4 +164,10 @@ typedef struct _GESProjectClass GESProjectClass;
typedef struct _GESExtractable GESExtractable;
typedef struct _GESExtractableInterface GESExtractableInterface;
+typedef struct _GESVideoTrackClass GESVideoTrackClass;
+typedef struct _GESVideoTrack GESVideoTrack;
+
+typedef struct _GESAudioTrackClass GESAudioTrackClass;
+typedef struct _GESAudioTrack GESAudioTrack;
+
#endif /* __GES_TYPES_H__ */
diff --git a/ges/ges-utils.c b/ges/ges-utils.c
index 22640e1a8c..fc5f0eb0bf 100644
--- a/ges/ges-utils.c
+++ b/ges/ges-utils.c
@@ -47,8 +47,8 @@ ges_timeline_new_audio_video (void)
/* This is our main GESTimeline */
timeline = ges_timeline_new ();
- tracka = ges_track_audio_raw_new ();
- trackv = ges_track_video_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
+ trackv = GES_TRACK (ges_video_track_new ());
if (!ges_timeline_add_track (timeline, trackv) ||
!ges_timeline_add_track (timeline, tracka)) {
diff --git a/ges/ges-video-track.c b/ges/ges-video-track.c
new file mode 100644
index 0000000000..6811ed7a7c
--- /dev/null
+++ b/ges/ges-video-track.c
@@ -0,0 +1,94 @@
+/* GStreamer Editing Services
+ * Copyright (C) <2013> Thibault Saunier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+/**
+ * SECTION: ges-video-track:
+ * @short_description: A standard GESTrack for raw video
+ */
+
+#include "ges-video-track.h"
+
+struct _GESVideoTrackPrivate
+{
+ gpointer nothing;
+};
+
+#define GES_VIDEO_TRACK_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_VIDEO_TRACK, GESVideoTrackPrivate))
+
+G_DEFINE_TYPE (GESVideoTrack, ges_video_track, GES_TYPE_TRACK);
+
+static GstElement *
+create_element_for_raw_video_gap (GESTrack * track)
+{
+ return gst_parse_bin_from_description
+ ("videotestsrc pattern=2 name=src ! capsfilter caps=video/x-raw", TRUE,
+ NULL);
+}
+
+static void
+ges_video_track_init (GESVideoTrack * ges_video_track)
+{
+/* GESVideoTrackPrivate *priv = GES_VIDEO_TRACK_GET_PRIVATE (ges_video_track);
+ */
+
+ /* TODO: Add initialization code here */
+}
+
+static void
+ges_video_track_finalize (GObject * object)
+{
+ /* TODO: Add deinitalization code here */
+
+ G_OBJECT_CLASS (ges_video_track_parent_class)->finalize (object);
+}
+
+static void
+ges_video_track_class_init (GESVideoTrackClass * klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+/* GESTrackClass *parent_class = GES_TRACK_CLASS (klass);
+ */
+
+ g_type_class_add_private (klass, sizeof (GESVideoTrackPrivate));
+
+ object_class->finalize = ges_video_track_finalize;
+}
+
+/**
+ * ges_video_track_new:
+ *
+ * Creates a new #GESVideoTrack of type #GES_TRACK_TYPE_VIDEO and with generic
+ * raw video caps ("video/x-raw");
+ *
+ * Returns: A new #GESTrack.
+ */
+GESVideoTrack *
+ges_video_track_new (void)
+{
+ GESVideoTrack *ret;
+ GstCaps *caps = gst_caps_new_empty_simple ("video/x-raw");
+
+ ret = g_object_new (GES_TYPE_VIDEO_TRACK, "track-type", GES_TRACK_TYPE_VIDEO,
+ "caps", caps, NULL);
+
+ ges_track_set_create_element_for_gap_func (GES_TRACK (ret),
+ create_element_for_raw_video_gap);
+
+ return ret;
+}
diff --git a/ges/ges-video-track.h b/ges/ges-video-track.h
new file mode 100644
index 0000000000..e6c422ad8d
--- /dev/null
+++ b/ges/ges-video-track.h
@@ -0,0 +1,54 @@
+/* GStreamer Editing Services
+ * Copyright (C) <2013> Thibault Saunier
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef _GES_VIDEO_TRACK_H_
+#define _GES_VIDEO_TRACK_H_
+
+#include
+
+#include "ges-track.h"
+#include "ges-types.h"
+
+G_BEGIN_DECLS
+#define GES_TYPE_VIDEO_TRACK (ges_video_track_get_type ())
+#define GES_VIDEO_TRACK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_VIDEO_TRACK, GESVideoTrack))
+#define GES_VIDEO_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_VIDEO_TRACK, GESVideoTrackClass))
+#define GES_IS_VIDEO_TRACK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_VIDEO_TRACK))
+#define GES_IS_VIDEO_TRACK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_VIDEO_TRACK))
+#define GES_VIDEO_TRACK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_VIDEO_TRACK, GESVideoTrackClass))
+
+typedef struct _GESVideoTrackPrivate GESVideoTrackPrivate;
+
+struct _GESVideoTrackClass
+{
+ GESTrackClass parent_class;
+};
+
+struct _GESVideoTrack
+{
+ GESTrack parent_instance;
+
+ GESVideoTrackPrivate *priv;
+};
+
+GType ges_video_track_get_type (void) G_GNUC_CONST;
+GESVideoTrack * ges_video_track_new (void);
+
+G_END_DECLS
+#endif /* _GES_VIDEO_TRACK_H_ */
diff --git a/ges/ges.h b/ges/ges.h
index 1b0c2cad0a..013527f7ba 100644
--- a/ges/ges.h
+++ b/ges/ges.h
@@ -76,6 +76,8 @@
#include
#include
#include
+#include
+#include
G_BEGIN_DECLS
diff --git a/tests/check/ges/backgroundsource.c b/tests/check/ges/backgroundsource.c
index 10de152f5e..78cadc6eb2 100644
--- a/tests/check/ges/backgroundsource.c
+++ b/tests/check/ges/backgroundsource.c
@@ -133,8 +133,8 @@ GST_START_TEST (test_test_source_in_layer)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- a = ges_track_audio_raw_new ();
- v = ges_track_video_raw_new ();
+ a = GES_TRACK (ges_audio_track_new ());
+ v = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, a);
ges_timeline_add_track (timeline, v);
@@ -258,7 +258,7 @@ GST_START_TEST (test_gap_filling_basic)
ges_init ();
- track = ges_track_audio_raw_new ();
+ track = GES_TRACK (ges_audio_track_new ());
fail_unless (track != NULL);
composition = find_composition (track);
@@ -358,14 +358,14 @@ GST_START_TEST (test_gap_filling_empty_track)
ges_init ();
- track = ges_track_audio_raw_new ();
+ track = GES_TRACK(ges_audio_track_new ());
layer = ges_layer_new ();
timeline = ges_timeline_new ();
fail_unless (timeline != NULL);
fail_unless (ges_timeline_add_layer (timeline, layer));
fail_unless (ges_timeline_add_track (timeline, track));
- fail_unless (ges_timeline_add_track (timeline, ges_track_video_raw_new ()));
+ fail_unless (ges_timeline_add_track (timeline, GES_TRACK(ges_video_track_new ())));
/* Set some properties */
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
diff --git a/tests/check/ges/clip.c b/tests/check/ges/clip.c
index affa0a371d..f8ca96e469 100644
--- a/tests/check/ges/clip.c
+++ b/tests/check/ges/clip.c
@@ -225,8 +225,8 @@ GST_START_TEST (test_clip_group_ungroup)
timeline = ges_timeline_new ();
layer = ges_layer_new ();
- audio_track = ges_track_audio_raw_new ();
- video_track = ges_track_video_raw_new ();
+ audio_track = GES_TRACK (ges_audio_track_new ());
+ video_track = GES_TRACK (ges_video_track_new ());
fail_unless (ges_timeline_add_track (timeline, audio_track));
fail_unless (ges_timeline_add_track (timeline, video_track));
@@ -349,7 +349,7 @@ GST_START_TEST (test_clip_refcount_remove_child)
ges_init ();
clip = GES_CLIP (ges_test_clip_new ());
- track = ges_track_audio_raw_new ();
+ track = GES_TRACK (ges_audio_track_new ());
effect = GES_TRACK_ELEMENT (ges_effect_new ("identity"));
fail_unless (ges_track_add_element (track, effect));
diff --git a/tests/check/ges/effects.c b/tests/check/ges/effects.c
index cab1f0670f..141479e847 100644
--- a/tests/check/ges/effects.c
+++ b/tests/check/ges/effects.c
@@ -50,8 +50,8 @@ GST_START_TEST (test_add_effect_to_clip)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- track_audio = ges_track_audio_raw_new ();
- track_video = ges_track_video_raw_new ();
+ track_audio = GES_TRACK (ges_audio_track_new ());
+ track_video = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, track_audio);
ges_timeline_add_track (timeline, track_video);
@@ -97,7 +97,7 @@ GST_START_TEST (test_get_effects_from_tl)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- track_video = ges_track_video_raw_new ();
+ track_video = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, track_video);
ges_timeline_add_layer (timeline, layer);
@@ -175,8 +175,8 @@ GST_START_TEST (test_effect_clip)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- track_audio = ges_track_audio_raw_new ();
- track_video = ges_track_video_raw_new ();
+ track_audio = GES_TRACK (ges_audio_track_new ());
+ track_video = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, track_audio);
ges_timeline_add_track (timeline, track_video);
@@ -245,8 +245,8 @@ GST_START_TEST (test_priorities_clip)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- track_audio = ges_track_audio_raw_new ();
- track_video = ges_track_video_raw_new ();
+ track_audio = GES_TRACK (ges_audio_track_new ());
+ track_video = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, track_audio);
ges_timeline_add_track (timeline, track_video);
@@ -341,7 +341,7 @@ GST_START_TEST (test_effect_set_properties)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- track_video = ges_track_video_raw_new ();
+ track_video = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, track_video);
ges_timeline_add_layer (timeline, layer);
@@ -429,7 +429,7 @@ GST_START_TEST (test_clip_signals)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- track_video = ges_track_video_raw_new ();
+ track_video = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, track_video);
ges_timeline_add_layer (timeline, layer);
diff --git a/tests/check/ges/layer.c b/tests/check/ges/layer.c
index 340df0d5c1..eaeb7757b4 100644
--- a/tests/check/ges/layer.c
+++ b/tests/check/ges/layer.c
@@ -158,7 +158,7 @@ GST_START_TEST (test_layer_priorities)
fail_unless_equals_int (ges_layer_get_priority (layer2), 1);
fail_unless_equals_int (ges_layer_get_priority (layer3), 2);
- track = ges_track_video_raw_new ();
+ track = GES_TRACK (ges_video_track_new ());
fail_unless (track != NULL);
fail_unless (ges_timeline_add_track (timeline, track));
diff --git a/tests/check/ges/overlays.c b/tests/check/ges/overlays.c
index 86310aec12..53f2b6862e 100644
--- a/tests/check/ges/overlays.c
+++ b/tests/check/ges/overlays.c
@@ -122,8 +122,8 @@ GST_START_TEST (test_overlay_in_layer)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- a = ges_track_audio_raw_new ();
- v = ges_track_video_raw_new ();
+ a = GES_TRACK (ges_audio_track_new ());
+ v = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, a);
ges_timeline_add_track (timeline, v);
diff --git a/tests/check/ges/text_properties.c b/tests/check/ges/text_properties.c
index 1c2d71ae94..d7a8872a2a 100644
--- a/tests/check/ges/text_properties.c
+++ b/tests/check/ges/text_properties.c
@@ -35,8 +35,8 @@ GST_START_TEST (test_text_properties_in_layer)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- a = ges_track_audio_raw_new ();
- v = ges_track_video_raw_new ();
+ a = GES_TRACK (ges_audio_track_new ());
+ v = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, a);
ges_timeline_add_track (timeline, v);
diff --git a/tests/check/ges/timelineedition.c b/tests/check/ges/timelineedition.c
index d0826c22e8..c1f41ad9d1 100644
--- a/tests/check/ges/timelineedition.c
+++ b/tests/check/ges/timelineedition.c
@@ -63,7 +63,7 @@ GST_START_TEST (test_basic_timeline_edition)
ges_init ();
- track = ges_track_audio_raw_new ();
+ track = GES_TRACK (ges_audio_track_new ());
fail_unless (track != NULL);
timeline = ges_timeline_new ();
diff --git a/tests/check/ges/titles.c b/tests/check/ges/titles.c
index d2562897f7..af303ec062 100644
--- a/tests/check/ges/titles.c
+++ b/tests/check/ges/titles.c
@@ -45,7 +45,7 @@ GST_START_TEST (test_title_source_properties)
ges_init ();
- track = ges_track_video_raw_new ();
+ track = GES_TRACK (ges_video_track_new ());
fail_unless (track != NULL);
layer = ges_layer_new ();
fail_unless (layer != NULL);
@@ -122,8 +122,8 @@ GST_START_TEST (test_title_source_in_layer)
timeline = ges_timeline_new ();
layer = (GESLayer *) ges_simple_layer_new ();
- a = ges_track_audio_raw_new ();
- v = ges_track_video_raw_new ();
+ a = GES_TRACK (ges_audio_track_new ());
+ v = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, a);
ges_timeline_add_track (timeline, v);
diff --git a/tests/check/ges/transition.c b/tests/check/ges/transition.c
index f262f7ee98..2320a4a312 100644
--- a/tests/check/ges/transition.c
+++ b/tests/check/ges/transition.c
@@ -35,7 +35,7 @@ GST_START_TEST (test_transition_basic)
ges_init ();
- track = ges_track_video_raw_new ();
+ track = GES_TRACK (ges_video_track_new ());
layer = ges_layer_new ();
timeline = ges_timeline_new ();
fail_unless (track != NULL);
@@ -79,7 +79,7 @@ GST_START_TEST (test_transition_properties)
clip = GES_CLIP (ges_transition_clip_new
(GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE));
- track = ges_track_video_raw_new ();
+ track = GES_TRACK (ges_video_track_new ());
layer = ges_layer_new ();
timeline = ges_timeline_new ();
fail_unless (track != NULL);
diff --git a/tests/check/ges/uriclip.c b/tests/check/ges/uriclip.c
index 953a9e6df1..05562f7db2 100644
--- a/tests/check/ges/uriclip.c
+++ b/tests/check/ges/uriclip.c
@@ -214,8 +214,8 @@ GST_START_TEST (test_filesource_images)
ges_init ();
- a = ges_track_audio_raw_new ();
- v = ges_track_video_raw_new ();
+ a = GES_TRACK (ges_audio_track_new ());
+ v = GES_TRACK (ges_video_track_new ());
layer = ges_layer_new ();
fail_unless (layer != NULL);
diff --git a/tests/examples/ges-ui.c b/tests/examples/ges-ui.c
index a7e6fa09c8..056716cd52 100644
--- a/tests/examples/ges-ui.c
+++ b/tests/examples/ges-ui.c
@@ -1228,7 +1228,7 @@ app_add_audio_track (App * app)
if (app->audio_tracks)
return;
- app->audio_track = ges_track_audio_raw_new ();
+ app->audio_track = GES_TRACK (ges_audio_track_new ());
ges_timeline_add_track (app->timeline, app->audio_track);
}
@@ -1248,7 +1248,7 @@ app_add_video_track (App * app)
if (app->video_tracks)
return;
- app->video_track = ges_track_video_raw_new ();
+ app->video_track = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (app->timeline, app->video_track);
}
@@ -1322,13 +1322,13 @@ app_new (void)
/* add base audio and video track */
- if (!(a = ges_track_audio_raw_new ()))
+ if (!(a = GES_TRACK (ges_audio_track_new ())))
goto fail;
if (!(ges_timeline_add_track (ret->timeline, a)))
goto fail;
- if (!(v = ges_track_video_raw_new ()))
+ if (!(v = GES_TRACK (ges_video_track_new ())))
goto fail;
if (!(ges_timeline_add_track (ret->timeline, v)))
diff --git a/tests/examples/overlays.c b/tests/examples/overlays.c
index ecc4922d0b..497f287267 100644
--- a/tests/examples/overlays.c
+++ b/tests/examples/overlays.c
@@ -94,10 +94,10 @@ make_timeline (char *path, float duration, char *text, guint32 color,
timeline = ges_timeline_new ();
ges_timeline_pipeline_add_timeline (pipeline, timeline);
- trackv = ges_track_video_raw_new ();
+ trackv = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, trackv);
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
ges_timeline_add_track (timeline, tracka);
layer1 = GES_LAYER (ges_layer_new ());
diff --git a/tests/examples/simple1.c b/tests/examples/simple1.c
index 9029f63ef9..02fe522860 100644
--- a/tests/examples/simple1.c
+++ b/tests/examples/simple1.c
@@ -73,8 +73,8 @@ main (int argc, gchar ** argv)
timeline = ges_timeline_new ();
- tracka = ges_track_audio_raw_new ();
- trackv = ges_track_video_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
+ trackv = GES_TRACK (ges_video_track_new ());
layer1 = (GESLayer *) ges_simple_layer_new ();
layer2 = (GESLayer *) ges_simple_layer_new ();
diff --git a/tests/examples/test2.c b/tests/examples/test2.c
index 24e08581ae..6edb356590 100644
--- a/tests/examples/test2.c
+++ b/tests/examples/test2.c
@@ -47,7 +47,7 @@ main (int argc, gchar ** argv)
/* This is our main GESTimeline */
timeline = ges_timeline_new ();
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
/* We are only going to be doing one layer of clips */
layer = ges_layer_new ();
diff --git a/tests/examples/test3.c b/tests/examples/test3.c
index 3b80dd7ff9..310ff4c6fe 100644
--- a/tests/examples/test3.c
+++ b/tests/examples/test3.c
@@ -46,7 +46,7 @@ main (int argc, gchar ** argv)
/* This is our main GESTimeline */
timeline = ges_timeline_new ();
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
/* We are only going to be doing one layer of clips */
layer = (GESLayer *) ges_simple_layer_new ();
diff --git a/tests/examples/test4.c b/tests/examples/test4.c
index d6d0e554e1..54c9b212bf 100644
--- a/tests/examples/test4.c
+++ b/tests/examples/test4.c
@@ -101,7 +101,7 @@ main (int argc, gchar ** argv)
/* This is our main GESTimeline */
timeline = ges_timeline_new ();
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
/* We are only going to be doing one layer of clips */
layer = (GESLayer *) ges_simple_layer_new ();
diff --git a/tests/examples/text_properties.c b/tests/examples/text_properties.c
index 9cacaf261e..6a9bec7dbc 100644
--- a/tests/examples/text_properties.c
+++ b/tests/examples/text_properties.c
@@ -67,10 +67,10 @@ make_timeline (char *path, float duration, char *text)
timeline = ges_timeline_new ();
ges_timeline_pipeline_add_timeline (pipeline, timeline);
- trackv = ges_track_video_raw_new ();
+ trackv = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, trackv);
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
ges_timeline_add_track (timeline, tracka);
layer1 = GES_LAYER (ges_layer_new ());
diff --git a/tests/examples/thumbnails.c b/tests/examples/thumbnails.c
index d5c39e6df7..f896a0c73b 100644
--- a/tests/examples/thumbnails.c
+++ b/tests/examples/thumbnails.c
@@ -80,8 +80,8 @@ create_timeline (void)
timeline = ges_timeline_new ();
- tracka = ges_track_audio_raw_new ();
- trackv = ges_track_video_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
+ trackv = GES_TRACK (ges_video_track_new ());
layer = (GESLayer *) ges_simple_layer_new ();
diff --git a/tests/examples/transition.c b/tests/examples/transition.c
index 9c070928eb..91b7a5851a 100644
--- a/tests/examples/transition.c
+++ b/tests/examples/transition.c
@@ -102,10 +102,10 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur,
timeline = ges_timeline_new ();
ges_timeline_pipeline_add_timeline (pipeline, timeline);
- trackv = ges_track_video_raw_new ();
+ trackv = GES_TRACK (ges_video_track_new ());
ges_timeline_add_track (timeline, trackv);
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
ges_timeline_add_track (timeline, tracka);
layer1 = GES_LAYER (ges_layer_new ());
diff --git a/tools/ges-launch.c b/tools/ges-launch.c
index 8ed5bdc255..931a763db5 100644
--- a/tools/ges-launch.c
+++ b/tools/ges-launch.c
@@ -135,9 +135,9 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
timeline = GES_TIMELINE (ges_asset_extract (GES_ASSET (project), NULL));
if (audio)
- tracka = ges_track_audio_raw_new ();
+ tracka = GES_TRACK (ges_audio_track_new ());
if (video)
- trackv = ges_track_video_raw_new ();
+ trackv = GES_TRACK (ges_video_track_new ());
/* We are only going to be doing one layer of clips */
layer = (GESLayer *) ges_simple_layer_new ();