</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>
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 \
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 \
#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>
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);
}
}
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) {
+++ /dev/null
-/* 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);
-}
+++ /dev/null
-/* 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 */
-
--- /dev/null
+/* 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);
+}
--- /dev/null
+/* 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 */
+
#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);
+++ /dev/null
-/* 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);
-}
+++ /dev/null
-/* 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 */
--- /dev/null
+/* 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);
+}
--- /dev/null
+/* 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 */
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
#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>
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");