GESTrackVideoBackgroundSource -> GESTrackVideoTestSource
authorBrandon Lewis <brandon@collabora.co.uk>
Wed, 30 Jun 2010 17:34:29 +0000 (19:34 +0200)
committerEdward Hervey <edward.hervey@collabora.co.uk>
Fri, 9 Jul 2010 11:21:14 +0000 (13:21 +0200)
15 files changed:
docs/libs/ges-sections.txt
ges/Makefile.am
ges/ges-timeline-background-source.c
ges/ges-track-audio-background-source.c [deleted file]
ges/ges-track-audio-background-source.h [deleted file]
ges/ges-track-audio-test-source.c [new file with mode: 0644]
ges/ges-track-audio-test-source.h [new file with mode: 0644]
ges/ges-track-title-source.c
ges/ges-track-video-background-source.c [deleted file]
ges/ges-track-video-background-source.h [deleted file]
ges/ges-track-video-test-source.c [new file with mode: 0644]
ges/ges-track-video-test-source.h [new file with mode: 0644]
ges/ges-types.h
ges/ges.h
tests/check/ges/backgroundsource.c

index 83c4afb7cf1d60770c905386eab88af23e7e6a39..ca94c77040c82e7ecea0458b7e4435c8d26e215d 100644 (file)
@@ -392,20 +392,20 @@ GES_TYPE_TIMELINE_OVERLAY
 </SECTION>
 
 <SECTION>
-<FILE>ges-track-video-background-source</FILE>
-<TITLE>GESTrackVideoBackgroundSource</TITLE>
-GESTrackVideoBackgroundSource
-GESTrackVideoBackgroundSourceClass
+<FILE>ges-track-video-test-source</FILE>
+<TITLE>GESTrackVideoTestSource</TITLE>
+GESTrackVideoTestSource
+GESTrackVideoTestSourceClass
 GESTrackVideoBgSrcPattern
-ges_track_video_background_source_new
+ges_track_video_test_source_new
 ges_track_vbg_src_get_type
 <SUBSECTION Standard>
-GES_IS_TRACK_VIDEO_BACKGROUND_SOURCE
-GES_IS_TRACK_VIDEO_BACKGROUND_SOURCE_CLASS
-GES_TRACK_VIDEO_BACKGROUND_SOURCE
-GES_TRACK_VIDEO_BACKGROUND_SOURCE_CLASS
-GES_TRACK_VIDEO_BACKGROUND_SOURCE_GET_CLASS
-GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE
+GES_IS_TRACK_VIDEO_TEST_SOURCE
+GES_IS_TRACK_VIDEO_TEST_SOURCE_CLASS
+GES_TRACK_VIDEO_TEST_SOURCE
+GES_TRACK_VIDEO_TEST_SOURCE_CLASS
+GES_TRACK_VIDEO_TEST_SOURCE_GET_CLASS
+GES_TYPE_TRACK_VIDEO_TEST_SOURCE
 </SECTION>
 
 <SECTION>
index 92eaf39cfe66c455e2719e7a9014259a1b850882..bb30f3c772125114f535bcff6931c900130a6df2 100644 (file)
@@ -29,7 +29,7 @@ libges_@GST_MAJORMINOR@_la_SOURCES =          \
        ges-track-transition.c                  \
        ges-track-audio-transition.c                    \
        ges-track-video-transition.c                    \
-       ges-track-video-background-source.c                     \
+       ges-track-video-test-source.c                   \
        ges-track-audio-background-source.c                     \
        ges-track-title-source.c                        \
        ges-track-text-overlay.c                        \
@@ -60,7 +60,7 @@ libges_@GST_MAJORMINOR@include_HEADERS =      \
        ges-track-transition.h                  \
        ges-track-audio-transition.h                    \
        ges-track-video-transition.h                    \
-       ges-track-video-background-source.h                     \
+       ges-track-video-test-source.h                   \
        ges-track-audio-background-source.h                     \
        ges-track-title-source.h                        \
        ges-track-text-overlay.h                        \
index ed1e7d9260ba81f7a96df331b2ac6074af96baea..fc29fa0e47c108855b4dc0faa429c2c4a21fdcbd 100644 (file)
@@ -30,7 +30,7 @@
 #include "ges-timeline-background-source.h"
 #include "ges-timeline-source.h"
 #include "ges-track-object.h"
-#include "ges-track-video-background-source.h"
+#include "ges-track-video-test-source.h"
 #include "ges-track-audio-background-source.h"
 #include <string.h>
 
@@ -212,9 +212,9 @@ ges_tl_bg_src_set_vpattern (GESTimelineBackgroundSource * self, gint vpattern)
 
   for (tmp = object->trackobjects; tmp; tmp = tmp->next) {
     GESTrackObject *trackobject = (GESTrackObject *) tmp->data;
-    if (GES_IS_TRACK_VIDEO_BACKGROUND_SOURCE (trackobject))
-      ges_track_video_background_source_set_pattern (
-          (GESTrackVideoBackgroundSource *) trackobject, vpattern);
+    if (GES_IS_TRACK_VIDEO_TEST_SOURCE (trackobject))
+      ges_track_video_test_source_set_pattern (
+          (GESTrackVideoTestSource *) trackobject, vpattern);
   }
 }
 
@@ -227,9 +227,9 @@ ges_tl_bg_src_create_track_object (GESTimelineObject * obj, GESTrack * track)
   GST_DEBUG ("Creating a GESTrackBackgroundSource");
 
   if (track->type == GES_TRACK_TYPE_VIDEO) {
-    res = (GESTrackObject *) ges_track_video_background_source_new ();
-    ges_track_video_background_source_set_pattern (
-        (GESTrackVideoBackgroundSource *) res, tfs->vpattern);
+    res = (GESTrackObject *) ges_track_video_test_source_new ();
+    ges_track_video_test_source_set_pattern (
+        (GESTrackVideoTestSource *) res, tfs->vpattern);
   }
 
   else if (track->type == GES_TRACK_TYPE_AUDIO) {
diff --git a/ges/ges-track-audio-background-source.c b/ges/ges-track-audio-background-source.c
deleted file mode 100644 (file)
index f6cace3..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/* GStreamer Editing Services
- * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
- *               2010 Nokia Corporation
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:ges-track-audio-background-source
- * @short_description: Base Class for single-media sources
- */
-
-#include "ges-internal.h"
-#include "ges-track-object.h"
-#include "ges-track-audio-background-source.h"
-
-G_DEFINE_TYPE (GESTrackAudioBackgroundSource, ges_track_abg_src,
-    GES_TYPE_TRACK_SOURCE);
-
-enum
-{
-  PROP_0,
-};
-
-static void ges_track_abg_src_dispose (GObject * object);
-
-static void ges_track_abg_src_finalize (GObject * object);
-
-static void ges_track_abg_src_get_property (GObject * object, guint
-    property_id, GValue * value, GParamSpec * pspec);
-
-static void ges_track_abg_src_set_property (GObject * object, guint
-    property_id, const GValue * value, GParamSpec * pspec);
-
-static GstElement *ges_track_abg_src_create_element (GESTrackSource * self);
-
-static void
-ges_track_abg_src_class_init (GESTrackAudioBackgroundSourceClass * klass)
-{
-  GObjectClass *object_class;
-  GESTrackSourceClass *bg_class;
-
-  object_class = G_OBJECT_CLASS (klass);
-  bg_class = GES_TRACK_SOURCE_CLASS (klass);
-
-  object_class->get_property = ges_track_abg_src_get_property;
-  object_class->set_property = ges_track_abg_src_set_property;
-  object_class->dispose = ges_track_abg_src_dispose;
-  object_class->finalize = ges_track_abg_src_finalize;
-
-  bg_class->create_element = ges_track_abg_src_create_element;
-}
-
-static void
-ges_track_abg_src_init (GESTrackAudioBackgroundSource * self)
-{
-}
-
-static void
-ges_track_abg_src_dispose (GObject * object)
-{
-  G_OBJECT_CLASS (ges_track_abg_src_parent_class)->dispose (object);
-}
-
-static void
-ges_track_abg_src_finalize (GObject * object)
-{
-  G_OBJECT_CLASS (ges_track_abg_src_parent_class)->finalize (object);
-}
-
-static void
-ges_track_abg_src_get_property (GObject * object,
-    guint property_id, GValue * value, GParamSpec * pspec)
-{
-  switch (property_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-  }
-}
-
-static void
-ges_track_abg_src_set_property (GObject * object,
-    guint property_id, const GValue * value, GParamSpec * pspec)
-{
-  switch (property_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-  }
-}
-
-static GstElement *
-ges_track_abg_src_create_element (GESTrackSource * self)
-{
-  GstElement *ret;
-  ret = gst_element_factory_make ("audiotestsrc", NULL);
-  g_object_set (ret, "volume", (gdouble) 0, NULL);
-  return ret;
-}
-
-GESTrackAudioBackgroundSource *
-ges_track_audio_background_source_new (void)
-{
-  return g_object_new (GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, NULL);
-}
diff --git a/ges/ges-track-audio-background-source.h b/ges/ges-track-audio-background-source.h
deleted file mode 100644 (file)
index 2d9ba80..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/* GStreamer Editing Services
- * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
- *               2010 Nokia Corporation
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GES_TRACK_AUDIO_BACKGROUND_SOURCE
-#define _GES_TRACK_AUDIO_BACKGROUND_SOURCE
-
-#include <glib-object.h>
-#include <ges/ges-types.h>
-#include <ges/ges-track-source.h>
-
-G_BEGIN_DECLS
-
-#define GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE ges_track_abg_src_get_type()
-
-#define GES_TRACK_AUDIO_BACKGROUND_SOURCE(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, GESTrackAudioBackgroundSource))
-
-#define GES_TRACK_AUDIO_BACKGROUND_SOURCE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, GESTrackAudioBackgroundSourceClass))
-
-#define GES_IS_TRACK_AUDIO_BACKGROUND_SOURCE(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE))
-
-#define GES_IS_TRACK_AUDIO_BACKGROUND_SOURCE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE))
-
-#define GES_TRACK_AUDIO_BACKGROUND_SOURCE_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, GESTrackAudioBackgroundSourceClass))
-
-/** 
- * GESTrackAudioBackgroundSource:
- * @parent: parent
- *
- */
-
-struct _GESTrackAudioBackgroundSource {
-  GESTrackSource parent;
-
-  /*< public >*/
-};
-
-/**
- * GESTrackAudioBackgroundSourceClass:
- * @parent_class: parent class
- *
- */
-
-struct _GESTrackAudioBackgroundSourceClass {
-  GESTrackSourceClass parent_class;
-
-  /*< public >*/
-};
-
-GType ges_track_abg_src_get_type (void);
-
-GESTrackAudioBackgroundSource* ges_track_audio_background_source_new (void);
-
-G_END_DECLS
-
-#endif /* _GES_TRACK_AUDIO_BACKGROUND_SOURCE */
-
diff --git a/ges/ges-track-audio-test-source.c b/ges/ges-track-audio-test-source.c
new file mode 100644 (file)
index 0000000..f6cace3
--- /dev/null
@@ -0,0 +1,117 @@
+/* GStreamer Editing Services
+ * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
+ *               2010 Nokia Corporation
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:ges-track-audio-background-source
+ * @short_description: Base Class for single-media sources
+ */
+
+#include "ges-internal.h"
+#include "ges-track-object.h"
+#include "ges-track-audio-background-source.h"
+
+G_DEFINE_TYPE (GESTrackAudioBackgroundSource, ges_track_abg_src,
+    GES_TYPE_TRACK_SOURCE);
+
+enum
+{
+  PROP_0,
+};
+
+static void ges_track_abg_src_dispose (GObject * object);
+
+static void ges_track_abg_src_finalize (GObject * object);
+
+static void ges_track_abg_src_get_property (GObject * object, guint
+    property_id, GValue * value, GParamSpec * pspec);
+
+static void ges_track_abg_src_set_property (GObject * object, guint
+    property_id, const GValue * value, GParamSpec * pspec);
+
+static GstElement *ges_track_abg_src_create_element (GESTrackSource * self);
+
+static void
+ges_track_abg_src_class_init (GESTrackAudioBackgroundSourceClass * klass)
+{
+  GObjectClass *object_class;
+  GESTrackSourceClass *bg_class;
+
+  object_class = G_OBJECT_CLASS (klass);
+  bg_class = GES_TRACK_SOURCE_CLASS (klass);
+
+  object_class->get_property = ges_track_abg_src_get_property;
+  object_class->set_property = ges_track_abg_src_set_property;
+  object_class->dispose = ges_track_abg_src_dispose;
+  object_class->finalize = ges_track_abg_src_finalize;
+
+  bg_class->create_element = ges_track_abg_src_create_element;
+}
+
+static void
+ges_track_abg_src_init (GESTrackAudioBackgroundSource * self)
+{
+}
+
+static void
+ges_track_abg_src_dispose (GObject * object)
+{
+  G_OBJECT_CLASS (ges_track_abg_src_parent_class)->dispose (object);
+}
+
+static void
+ges_track_abg_src_finalize (GObject * object)
+{
+  G_OBJECT_CLASS (ges_track_abg_src_parent_class)->finalize (object);
+}
+
+static void
+ges_track_abg_src_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec)
+{
+  switch (property_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+  }
+}
+
+static void
+ges_track_abg_src_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec)
+{
+  switch (property_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+  }
+}
+
+static GstElement *
+ges_track_abg_src_create_element (GESTrackSource * self)
+{
+  GstElement *ret;
+  ret = gst_element_factory_make ("audiotestsrc", NULL);
+  g_object_set (ret, "volume", (gdouble) 0, NULL);
+  return ret;
+}
+
+GESTrackAudioBackgroundSource *
+ges_track_audio_background_source_new (void)
+{
+  return g_object_new (GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, NULL);
+}
diff --git a/ges/ges-track-audio-test-source.h b/ges/ges-track-audio-test-source.h
new file mode 100644 (file)
index 0000000..2d9ba80
--- /dev/null
@@ -0,0 +1,78 @@
+/* GStreamer Editing Services
+ * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
+ *               2010 Nokia Corporation
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _GES_TRACK_AUDIO_BACKGROUND_SOURCE
+#define _GES_TRACK_AUDIO_BACKGROUND_SOURCE
+
+#include <glib-object.h>
+#include <ges/ges-types.h>
+#include <ges/ges-track-source.h>
+
+G_BEGIN_DECLS
+
+#define GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE ges_track_abg_src_get_type()
+
+#define GES_TRACK_AUDIO_BACKGROUND_SOURCE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, GESTrackAudioBackgroundSource))
+
+#define GES_TRACK_AUDIO_BACKGROUND_SOURCE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, GESTrackAudioBackgroundSourceClass))
+
+#define GES_IS_TRACK_AUDIO_BACKGROUND_SOURCE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE))
+
+#define GES_IS_TRACK_AUDIO_BACKGROUND_SOURCE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE))
+
+#define GES_TRACK_AUDIO_BACKGROUND_SOURCE_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_AUDIO_BACKGROUND_SOURCE, GESTrackAudioBackgroundSourceClass))
+
+/** 
+ * GESTrackAudioBackgroundSource:
+ * @parent: parent
+ *
+ */
+
+struct _GESTrackAudioBackgroundSource {
+  GESTrackSource parent;
+
+  /*< public >*/
+};
+
+/**
+ * GESTrackAudioBackgroundSourceClass:
+ * @parent_class: parent class
+ *
+ */
+
+struct _GESTrackAudioBackgroundSourceClass {
+  GESTrackSourceClass parent_class;
+
+  /*< public >*/
+};
+
+GType ges_track_abg_src_get_type (void);
+
+GESTrackAudioBackgroundSource* ges_track_audio_background_source_new (void);
+
+G_END_DECLS
+
+#endif /* _GES_TRACK_AUDIO_BACKGROUND_SOURCE */
+
index 97c32a35155466df7d5f820818cf6583baa40c43..6eec3c19a4fd660a9665c7f15621218b7d44a954 100644 (file)
@@ -26,7 +26,7 @@
 #include "ges-internal.h"
 #include "ges-track-object.h"
 #include "ges-track-title-source.h"
-#include "ges-track-video-background-source.h"
+#include "ges-track-video-test-source.h"
 
 G_DEFINE_TYPE (GESTrackTitleSource, ges_track_title_src, GES_TYPE_TRACK_SOURCE);
 
diff --git a/ges/ges-track-video-background-source.c b/ges/ges-track-video-background-source.c
deleted file mode 100644 (file)
index 8304ba4..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/* GStreamer Editing Services
- * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
- *               2010 Nokia Corporation
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/**
- * SECTION:ges-track-video-background-source
- * @short_description: implements solid colors and patterns with videotestsrc
- */
-
-#include "ges-internal.h"
-#include "ges-track-object.h"
-#include "ges-track-video-background-source.h"
-
-G_DEFINE_TYPE (GESTrackVideoBackgroundSource, ges_track_vbg_src,
-    GES_TYPE_TRACK_SOURCE);
-
-enum
-{
-  PROP_0,
-};
-
-static void ges_track_vbg_src_dispose (GObject * object);
-
-static void ges_track_vbg_src_finalize (GObject * object);
-
-static void ges_track_vbg_src_get_property (GObject * object, guint
-    property_id, GValue * value, GParamSpec * pspec);
-
-static void ges_track_vbg_src_set_property (GObject * object, guint
-    property_id, const GValue * value, GParamSpec * pspec);
-
-static GstElement *ges_track_vbg_src_create_element (GESTrackSource * self);
-
-static void
-ges_track_vbg_src_class_init (GESTrackVideoBackgroundSourceClass * klass)
-{
-  GObjectClass *object_class;
-  GESTrackSourceClass *track_source_class;
-
-  object_class = G_OBJECT_CLASS (klass);
-  track_source_class = GES_TRACK_SOURCE_CLASS (klass);
-
-  object_class->get_property = ges_track_vbg_src_get_property;
-  object_class->set_property = ges_track_vbg_src_set_property;
-  object_class->dispose = ges_track_vbg_src_dispose;
-  object_class->finalize = ges_track_vbg_src_finalize;
-
-  track_source_class->create_element = ges_track_vbg_src_create_element;
-}
-
-static void
-ges_track_vbg_src_init (GESTrackVideoBackgroundSource * self)
-{
-  self->pattern = GES_TRACK_VIDEO_BG_SRC_BLACK;
-}
-
-static void
-ges_track_vbg_src_dispose (GObject * object)
-{
-  G_OBJECT_CLASS (ges_track_vbg_src_parent_class)->dispose (object);
-}
-
-static void
-ges_track_vbg_src_finalize (GObject * object)
-{
-  G_OBJECT_CLASS (ges_track_vbg_src_parent_class)->finalize (object);
-}
-
-static void
-ges_track_vbg_src_get_property (GObject * object,
-    guint property_id, GValue * value, GParamSpec * pspec)
-{
-  switch (property_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-  }
-}
-
-static void
-ges_track_vbg_src_set_property (GObject * object,
-    guint property_id, const GValue * value, GParamSpec * pspec)
-{
-  switch (property_id) {
-    default:
-      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-  }
-}
-
-static GstElement *
-ges_track_vbg_src_create_element (GESTrackSource * self)
-{
-  GstElement *ret;
-  gint pattern;
-
-  pattern = ((GESTrackVideoBackgroundSource *) self)->pattern;
-
-  ret = gst_element_factory_make ("videotestsrc", NULL);
-  g_object_set (ret, "pattern", (gint) pattern, NULL);
-  return ret;
-}
-
-void
-ges_track_video_background_source_set_pattern (GESTrackVideoBackgroundSource
-    * self, GESTrackVideoBgSrcPattern pattern)
-{
-  GstElement *element;
-  element = GES_TRACK_SOURCE (self)->element;
-  self->pattern = pattern;
-  if (element)
-    g_object_set (element, "pattern", (gint) pattern, NULL);
-}
-
-GESTrackVideoBackgroundSource *
-ges_track_video_background_source_new (void)
-{
-  return g_object_new (GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, NULL);
-}
diff --git a/ges/ges-track-video-background-source.h b/ges/ges-track-video-background-source.h
deleted file mode 100644 (file)
index 5f83eed..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-/* GStreamer Editing Services
- * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
- *               2010 Nokia Corporation
- *
- * 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., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _GES_TRACK_VIDEO_BACKGROUND_SOURCE
-#define _GES_TRACK_VIDEO_BACKGROUND_SOURCE
-
-#include <glib-object.h>
-#include <ges/ges-types.h>
-#include <ges/ges-track-source.h>
-
-G_BEGIN_DECLS
-
-#define GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE ges_track_vbg_src_get_type()
-
-#define GES_TRACK_VIDEO_BACKGROUND_SOURCE(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, GESTrackVideoBackgroundSource))
-
-#define GES_TRACK_VIDEO_BACKGROUND_SOURCE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, GESTrackVideoBackgroundSourceClass))
-
-#define GES_IS_TRACK_VIDEO_BACKGROUND_SOURCE(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE))
-
-#define GES_IS_TRACK_VIDEO_BACKGROUND_SOURCE_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE))
-
-#define GES_TRACK_VIDEO_BACKGROUND_SOURCE_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, GESTrackVideoBackgroundSourceClass))
-
-/**
- * GESTrackVideoBgSrcPattern:
- * @GES_TRACK_VIDEO_BG_SRC_SMPTE: A standard SMPTE test pattern
- * @GES_TRACK_VIDEO_BG_SRC_SNOW: Random noise
- * @GES_TRACK_VIDEO_BG_SRC_BLACK: A black image
- * @GES_TRACK_VIDEO_BG_SRC_WHITE: A white image
- * @GES_TRACK_VIDEO_BG_SRC_RED: A red image
- * @GES_TRACK_VIDEO_BG_SRC_GREEN: A green image
- * @GES_TRACK_VIDEO_BG_SRC_BLUE: A blue image
- * @GES_TRACK_VIDEO_BG_SRC_CHECKERS1: Checkers pattern (1px)
- * @GES_TRACK_VIDEO_BG_SRC_CHECKERS2: Checkers pattern (2px)
- * @GES_TRACK_VIDEO_BG_SRC_CHECKERS4: Checkers pattern (4px)
- * @GES_TRACK_VIDEO_BG_SRC_CHECKERS8: Checkers pattern (8px)
- * @GES_TRACK_VIDEO_BG_SRC_CIRCULAR: Circular pattern
- * @GES_TRACK_VIDEO_BG_SRC_BLINK: Alternate between black and white
- * @GES_TRACK_VIDEO_BG_SRC_SMPTE75: SMPTE test pattern (75% color bars)
- *
- * The test pattern to produce
- */
-
-typedef enum {
-  GES_TRACK_VIDEO_BG_SRC_SMPTE,
-  GES_TRACK_VIDEO_BG_SRC_SNOW,
-  GES_TRACK_VIDEO_BG_SRC_BLACK,
-  GES_TRACK_VIDEO_BG_SRC_WHITE,
-  GES_TRACK_VIDEO_BG_SRC_RED,
-  GES_TRACK_VIDEO_BG_SRC_GREEN,
-  GES_TRACK_VIDEO_BG_SRC_BLUE,
-  GES_TRACK_VIDEO_BG_SRC_CHECKERS1,
-  GES_TRACK_VIDEO_BG_SRC_CHECKERS2,
-  GES_TRACK_VIDEO_BG_SRC_CHECKERS4,
-  GES_TRACK_VIDEO_BG_SRC_CHECKERS8,
-  GES_TRACK_VIDEO_BG_SRC_CIRCULAR,
-  GES_TRACK_VIDEO_BG_SRC_BLINK,
-  GES_TRACK_VIDEO_BG_SRC_SMPTE75,
-} GESTrackVideoBgSrcPattern;
-
-/** 
- * GESTrackVideoBackgroundSource:
- * @parent: parent
- */
-struct _GESTrackVideoBackgroundSource {
-  GESTrackSource parent;
-
-  /*< private >*/
-  GESTrackVideoBgSrcPattern pattern;
-};
-
-/**
- * GESTrackVideoBackgroundSourceClass:
- * @parent_class: parent class
- */
-
-struct _GESTrackVideoBackgroundSourceClass {
-  GESTrackSourceClass parent_class;
-
-  /* <public> */
-};
-
-GType ges_track_vbg_src_get_type (void);
-
-GESTrackVideoBackgroundSource* ges_track_video_background_source_new (void);
-void
-
-ges_track_video_background_source_set_pattern(GESTrackVideoBackgroundSource *,
-    GESTrackVideoBgSrcPattern);
-
-G_END_DECLS
-
-#endif /* _GES_TRACK_VIDEO_BACKGROUND_SOURCE */
diff --git a/ges/ges-track-video-test-source.c b/ges/ges-track-video-test-source.c
new file mode 100644 (file)
index 0000000..ddb8d42
--- /dev/null
@@ -0,0 +1,135 @@
+/* GStreamer Editing Services
+ * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
+ *               2010 Nokia Corporation
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/**
+ * SECTION:ges-track-video-test-source
+ * @short_description: implements solid colors and patterns with videotestsrc
+ */
+
+#include "ges-internal.h"
+#include "ges-track-object.h"
+#include "ges-track-video-test-source.h"
+
+G_DEFINE_TYPE (GESTrackVideoTestSource, ges_track_video_test_source,
+    GES_TYPE_TRACK_SOURCE);
+
+enum
+{
+  PROP_0,
+};
+
+static void ges_track_video_test_source_dispose (GObject * object);
+
+static void ges_track_video_test_source_finalize (GObject * object);
+
+static void ges_track_video_test_source_get_property (GObject * object, guint
+    property_id, GValue * value, GParamSpec * pspec);
+
+static void ges_track_video_test_source_set_property (GObject * object, guint
+    property_id, const GValue * value, GParamSpec * pspec);
+
+static GstElement *ges_track_video_test_source_create_element (GESTrackSource *
+    self);
+
+static void
+ges_track_video_test_source_class_init (GESTrackVideoTestSourceClass * klass)
+{
+  GObjectClass *object_class;
+  GESTrackSourceClass *track_source_class;
+
+  object_class = G_OBJECT_CLASS (klass);
+  track_source_class = GES_TRACK_SOURCE_CLASS (klass);
+
+  object_class->get_property = ges_track_video_test_source_get_property;
+  object_class->set_property = ges_track_video_test_source_set_property;
+  object_class->dispose = ges_track_video_test_source_dispose;
+  object_class->finalize = ges_track_video_test_source_finalize;
+
+  track_source_class->create_element =
+      ges_track_video_test_source_create_element;
+}
+
+static void
+ges_track_video_test_source_init (GESTrackVideoTestSource * self)
+{
+  self->pattern = GES_TRACK_VIDEO_BG_SRC_BLACK;
+}
+
+static void
+ges_track_video_test_source_dispose (GObject * object)
+{
+  G_OBJECT_CLASS (ges_track_video_test_source_parent_class)->dispose (object);
+}
+
+static void
+ges_track_video_test_source_finalize (GObject * object)
+{
+  G_OBJECT_CLASS (ges_track_video_test_source_parent_class)->finalize (object);
+}
+
+static void
+ges_track_video_test_source_get_property (GObject * object,
+    guint property_id, GValue * value, GParamSpec * pspec)
+{
+  switch (property_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+  }
+}
+
+static void
+ges_track_video_test_source_set_property (GObject * object,
+    guint property_id, const GValue * value, GParamSpec * pspec)
+{
+  switch (property_id) {
+    default:
+      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+  }
+}
+
+static GstElement *
+ges_track_video_test_source_create_element (GESTrackSource * self)
+{
+  GstElement *ret;
+  gint pattern;
+
+  pattern = ((GESTrackVideoTestSource *) self)->pattern;
+
+  ret = gst_element_factory_make ("videotestsrc", NULL);
+  g_object_set (ret, "pattern", (gint) pattern, NULL);
+  return ret;
+}
+
+void
+ges_track_video_test_source_set_pattern (GESTrackVideoTestSource
+    * self, GESTrackVideoBgSrcPattern pattern)
+{
+  GstElement *element;
+  element = GES_TRACK_SOURCE (self)->element;
+  self->pattern = pattern;
+  if (element)
+    g_object_set (element, "pattern", (gint) pattern, NULL);
+}
+
+GESTrackVideoTestSource *
+ges_track_video_test_source_new (void)
+{
+  return g_object_new (GES_TYPE_TRACK_VIDEO_TEST_SOURCE, NULL);
+}
diff --git a/ges/ges-track-video-test-source.h b/ges/ges-track-video-test-source.h
new file mode 100644 (file)
index 0000000..3f4a578
--- /dev/null
@@ -0,0 +1,116 @@
+/* GStreamer Editing Services
+ * Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
+ *               2010 Nokia Corporation
+ *
+ * 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., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef _GES_TRACK_VIDEO_TEST_SOURCE
+#define _GES_TRACK_VIDEO_TEST_SOURCE
+
+#include <glib-object.h>
+#include <ges/ges-types.h>
+#include <ges/ges-track-source.h>
+
+G_BEGIN_DECLS
+
+#define GES_TYPE_TRACK_VIDEO_TEST_SOURCE ges_track_video_test_source_get_type()
+
+#define GES_TRACK_VIDEO_TEST_SOURCE(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSource))
+
+#define GES_TRACK_VIDEO_TEST_SOURCE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSourceClass))
+
+#define GES_IS_TRACK_VIDEO_TEST_SOURCE(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE))
+
+#define GES_IS_TRACK_VIDEO_TEST_SOURCE_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_VIDEO_TEST_SOURCE))
+
+#define GES_TRACK_VIDEO_TEST_SOURCE_GET_CLASS(obj) \
+  (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSourceClass))
+
+/**
+ * GESTrackVideoBgSrcPattern:
+ * @GES_TRACK_VIDEO_BG_SRC_SMPTE: A standard SMPTE test pattern
+ * @GES_TRACK_VIDEO_BG_SRC_SNOW: Random noise
+ * @GES_TRACK_VIDEO_BG_SRC_BLACK: A black image
+ * @GES_TRACK_VIDEO_BG_SRC_WHITE: A white image
+ * @GES_TRACK_VIDEO_BG_SRC_RED: A red image
+ * @GES_TRACK_VIDEO_BG_SRC_GREEN: A green image
+ * @GES_TRACK_VIDEO_BG_SRC_BLUE: A blue image
+ * @GES_TRACK_VIDEO_BG_SRC_CHECKERS1: Checkers pattern (1px)
+ * @GES_TRACK_VIDEO_BG_SRC_CHECKERS2: Checkers pattern (2px)
+ * @GES_TRACK_VIDEO_BG_SRC_CHECKERS4: Checkers pattern (4px)
+ * @GES_TRACK_VIDEO_BG_SRC_CHECKERS8: Checkers pattern (8px)
+ * @GES_TRACK_VIDEO_BG_SRC_CIRCULAR: Circular pattern
+ * @GES_TRACK_VIDEO_BG_SRC_BLINK: Alternate between black and white
+ * @GES_TRACK_VIDEO_BG_SRC_SMPTE75: SMPTE test pattern (75% color bars)
+ *
+ * The test pattern to produce
+ */
+
+typedef enum {
+  GES_TRACK_VIDEO_BG_SRC_SMPTE,
+  GES_TRACK_VIDEO_BG_SRC_SNOW,
+  GES_TRACK_VIDEO_BG_SRC_BLACK,
+  GES_TRACK_VIDEO_BG_SRC_WHITE,
+  GES_TRACK_VIDEO_BG_SRC_RED,
+  GES_TRACK_VIDEO_BG_SRC_GREEN,
+  GES_TRACK_VIDEO_BG_SRC_BLUE,
+  GES_TRACK_VIDEO_BG_SRC_CHECKERS1,
+  GES_TRACK_VIDEO_BG_SRC_CHECKERS2,
+  GES_TRACK_VIDEO_BG_SRC_CHECKERS4,
+  GES_TRACK_VIDEO_BG_SRC_CHECKERS8,
+  GES_TRACK_VIDEO_BG_SRC_CIRCULAR,
+  GES_TRACK_VIDEO_BG_SRC_BLINK,
+  GES_TRACK_VIDEO_BG_SRC_SMPTE75,
+} GESTrackVideoBgSrcPattern;
+
+/** 
+ * GESTrackVideoTestSource:
+ * @parent: parent
+ */
+struct _GESTrackVideoTestSource {
+  GESTrackSource parent;
+
+  /*< private >*/
+  GESTrackVideoBgSrcPattern pattern;
+};
+
+/**
+ * GESTrackVideoTestSourceClass:
+ * @parent_class: parent class
+ */
+
+struct _GESTrackVideoTestSourceClass {
+  GESTrackSourceClass parent_class;
+
+  /* <public> */
+};
+
+GType ges_track_video_test_source_get_type (void);
+
+GESTrackVideoTestSource* ges_track_video_test_source_new (void);
+void
+
+ges_track_video_test_source_set_pattern(GESTrackVideoTestSource *,
+    GESTrackVideoBgSrcPattern);
+
+G_END_DECLS
+
+#endif /* _GES_TRACK_VIDEO_TEST_SOURCE */
index 8d641f9b5afded62161348828a84e44134704e91..c203636451943801b198d773356f13986ed841db 100644 (file)
@@ -83,9 +83,9 @@ typedef struct _GESTrackVideoTransition GESTrackVideoTransition;
 typedef struct _GESTrackVideoTransitionClass
   GESTrackVideoTransitionClass;
 
-typedef struct _GESTrackVideoBackgroundSource GESTrackVideoBackgroundSource;
-typedef struct _GESTrackVideoBackgroundSourceClass
-  GESTrackVideoBackgroundSourceClass;
+typedef struct _GESTrackVideoTestSource GESTrackVideoTestSource;
+typedef struct _GESTrackVideoTestSourceClass
+  GESTrackVideoTestSourceClass;
 
 typedef struct _GESTrackAudioBackgroundSource GESTrackAudioBackgroundSource;
 typedef struct _GESTrackAudioBackgroundSourceClass
index db01c6aebad62a970e4cc1f2f2aa8902955a39cf..ce634c4f9a69ec286b9042987ade22190d397707 100644 (file)
--- a/ges/ges.h
+++ b/ges/ges.h
@@ -43,7 +43,7 @@
 #include <ges/ges-custom-timeline-source.h>
 #include <ges/ges-timeline-file-source.h>
 #include <ges/ges-track-filesource.h>
-#include <ges/ges-track-video-background-source.h>
+#include <ges/ges-track-video-test-source.h>
 #include <ges/ges-track-audio-background-source.h>
 #include <ges/ges-track-title-source.h>
 #include <ges/ges-track-text-overlay.h>
index 768c565445358c10125d2f44417d228f37f07dc5..4c1002297342d3ea1f4fc5e7d4b714c3f30dd5b6 100644 (file)
@@ -145,7 +145,7 @@ GST_START_TEST (test_background_source_in_layer)
   trobj =
       ges_timeline_object_find_track_object (GES_TIMELINE_OBJECT (source), v);
 
-  ptrn = ((GESTrackVideoBackgroundSource *) trobj)->pattern;
+  ptrn = ((GESTrackVideoTestSource *) trobj)->pattern;
   assert_equals_int (ptrn, GES_TRACK_VIDEO_BG_SRC_WHITE);
 
   GST_DEBUG ("removing the source");