From ae8d9b15445378fa0221dde63fdef1304c3363e9 Mon Sep 17 00:00:00 2001 From: Brandon Lewis Date: Wed, 30 Jun 2010 19:34:29 +0200 Subject: [PATCH] GESTrackVideoBackgroundSource -> GESTrackVideoTestSource --- docs/libs/ges-sections.txt | 22 ++++----- ges/Makefile.am | 4 +- ges/ges-timeline-background-source.c | 14 +++--- ...ound-source.c => ges-track-audio-test-source.c} | 0 ...ound-source.h => ges-track-audio-test-source.h} | 0 ges/ges-track-title-source.c | 2 +- ...ound-source.c => ges-track-video-test-source.c} | 56 +++++++++++----------- ...ound-source.h => ges-track-video-test-source.h} | 42 ++++++++-------- ges/ges-types.h | 6 +-- ges/ges.h | 2 +- tests/check/ges/backgroundsource.c | 2 +- 11 files changed, 76 insertions(+), 74 deletions(-) rename ges/{ges-track-audio-background-source.c => ges-track-audio-test-source.c} (100%) rename ges/{ges-track-audio-background-source.h => ges-track-audio-test-source.h} (100%) rename ges/{ges-track-video-background-source.c => ges-track-video-test-source.c} (56%) rename ges/{ges-track-video-background-source.h => ges-track-video-test-source.h} (66%) diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index 83c4afb..ca94c77 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -392,20 +392,20 @@ GES_TYPE_TIMELINE_OVERLAY
-ges-track-video-background-source -GESTrackVideoBackgroundSource -GESTrackVideoBackgroundSource -GESTrackVideoBackgroundSourceClass +ges-track-video-test-source +GESTrackVideoTestSource +GESTrackVideoTestSource +GESTrackVideoTestSourceClass GESTrackVideoBgSrcPattern -ges_track_video_background_source_new +ges_track_video_test_source_new ges_track_vbg_src_get_type -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
diff --git a/ges/Makefile.am b/ges/Makefile.am index 92eaf39..bb30f3c 100644 --- a/ges/Makefile.am +++ b/ges/Makefile.am @@ -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 \ diff --git a/ges/ges-timeline-background-source.c b/ges/ges-timeline-background-source.c index ed1e7d9..fc29fa0 100644 --- a/ges/ges-timeline-background-source.c +++ b/ges/ges-timeline-background-source.c @@ -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 @@ -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-test-source.c similarity index 100% rename from ges/ges-track-audio-background-source.c rename to ges/ges-track-audio-test-source.c diff --git a/ges/ges-track-audio-background-source.h b/ges/ges-track-audio-test-source.h similarity index 100% rename from ges/ges-track-audio-background-source.h rename to ges/ges-track-audio-test-source.h diff --git a/ges/ges-track-title-source.c b/ges/ges-track-title-source.c index 97c32a3..6eec3c1 100644 --- a/ges/ges-track-title-source.c +++ b/ges/ges-track-title-source.c @@ -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-test-source.c similarity index 56% rename from ges/ges-track-video-background-source.c rename to ges/ges-track-video-test-source.c index 8304ba4..ddb8d42 100644 --- a/ges/ges-track-video-background-source.c +++ b/ges/ges-track-video-test-source.c @@ -19,15 +19,15 @@ */ /** - * SECTION:ges-track-video-background-source + * 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-background-source.h" +#include "ges-track-video-test-source.h" -G_DEFINE_TYPE (GESTrackVideoBackgroundSource, ges_track_vbg_src, +G_DEFINE_TYPE (GESTrackVideoTestSource, ges_track_video_test_source, GES_TYPE_TRACK_SOURCE); enum @@ -35,20 +35,21 @@ enum PROP_0, }; -static void ges_track_vbg_src_dispose (GObject * object); +static void ges_track_video_test_source_dispose (GObject * object); -static void ges_track_vbg_src_finalize (GObject * object); +static void ges_track_video_test_source_finalize (GObject * object); -static void ges_track_vbg_src_get_property (GObject * object, guint +static void ges_track_video_test_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); -static void ges_track_vbg_src_set_property (GObject * object, guint +static void ges_track_video_test_source_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); -static GstElement *ges_track_vbg_src_create_element (GESTrackSource * self); +static GstElement *ges_track_video_test_source_create_element (GESTrackSource * + self); static void -ges_track_vbg_src_class_init (GESTrackVideoBackgroundSourceClass * klass) +ges_track_video_test_source_class_init (GESTrackVideoTestSourceClass * klass) { GObjectClass *object_class; GESTrackSourceClass *track_source_class; @@ -56,34 +57,35 @@ ges_track_vbg_src_class_init (GESTrackVideoBackgroundSourceClass * klass) 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; + 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_vbg_src_create_element; + track_source_class->create_element = + ges_track_video_test_source_create_element; } static void -ges_track_vbg_src_init (GESTrackVideoBackgroundSource * self) +ges_track_video_test_source_init (GESTrackVideoTestSource * self) { self->pattern = GES_TRACK_VIDEO_BG_SRC_BLACK; } static void -ges_track_vbg_src_dispose (GObject * object) +ges_track_video_test_source_dispose (GObject * object) { - G_OBJECT_CLASS (ges_track_vbg_src_parent_class)->dispose (object); + G_OBJECT_CLASS (ges_track_video_test_source_parent_class)->dispose (object); } static void -ges_track_vbg_src_finalize (GObject * object) +ges_track_video_test_source_finalize (GObject * object) { - G_OBJECT_CLASS (ges_track_vbg_src_parent_class)->finalize (object); + G_OBJECT_CLASS (ges_track_video_test_source_parent_class)->finalize (object); } static void -ges_track_vbg_src_get_property (GObject * object, +ges_track_video_test_source_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { switch (property_id) { @@ -93,7 +95,7 @@ ges_track_vbg_src_get_property (GObject * object, } static void -ges_track_vbg_src_set_property (GObject * object, +ges_track_video_test_source_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { switch (property_id) { @@ -103,12 +105,12 @@ ges_track_vbg_src_set_property (GObject * object, } static GstElement * -ges_track_vbg_src_create_element (GESTrackSource * self) +ges_track_video_test_source_create_element (GESTrackSource * self) { GstElement *ret; gint pattern; - pattern = ((GESTrackVideoBackgroundSource *) self)->pattern; + pattern = ((GESTrackVideoTestSource *) self)->pattern; ret = gst_element_factory_make ("videotestsrc", NULL); g_object_set (ret, "pattern", (gint) pattern, NULL); @@ -116,7 +118,7 @@ ges_track_vbg_src_create_element (GESTrackSource * self) } void -ges_track_video_background_source_set_pattern (GESTrackVideoBackgroundSource +ges_track_video_test_source_set_pattern (GESTrackVideoTestSource * self, GESTrackVideoBgSrcPattern pattern) { GstElement *element; @@ -126,8 +128,8 @@ ges_track_video_background_source_set_pattern (GESTrackVideoBackgroundSource g_object_set (element, "pattern", (gint) pattern, NULL); } -GESTrackVideoBackgroundSource * -ges_track_video_background_source_new (void) +GESTrackVideoTestSource * +ges_track_video_test_source_new (void) { - return g_object_new (GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, NULL); + return g_object_new (GES_TYPE_TRACK_VIDEO_TEST_SOURCE, NULL); } diff --git a/ges/ges-track-video-background-source.h b/ges/ges-track-video-test-source.h similarity index 66% rename from ges/ges-track-video-background-source.h rename to ges/ges-track-video-test-source.h index 5f83eed..3f4a578 100644 --- a/ges/ges-track-video-background-source.h +++ b/ges/ges-track-video-test-source.h @@ -18,8 +18,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef _GES_TRACK_VIDEO_BACKGROUND_SOURCE -#define _GES_TRACK_VIDEO_BACKGROUND_SOURCE +#ifndef _GES_TRACK_VIDEO_TEST_SOURCE +#define _GES_TRACK_VIDEO_TEST_SOURCE #include #include @@ -27,22 +27,22 @@ G_BEGIN_DECLS -#define GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE ges_track_vbg_src_get_type() +#define GES_TYPE_TRACK_VIDEO_TEST_SOURCE ges_track_video_test_source_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_TEST_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSource)) -#define GES_TRACK_VIDEO_BACKGROUND_SOURCE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, GESTrackVideoBackgroundSourceClass)) +#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_BACKGROUND_SOURCE(obj) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE)) +#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_BACKGROUND_SOURCE_CLASS(klass) \ - (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_VIDEO_BACKGROUND_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_BACKGROUND_SOURCE_GET_CLASS(obj) \ - (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_VIDEO_BACKGROUND_SOURCE, GESTrackVideoBackgroundSourceClass)) +#define GES_TRACK_VIDEO_TEST_SOURCE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSourceClass)) /** * GESTrackVideoBgSrcPattern: @@ -82,10 +82,10 @@ typedef enum { } GESTrackVideoBgSrcPattern; /** - * GESTrackVideoBackgroundSource: + * GESTrackVideoTestSource: * @parent: parent */ -struct _GESTrackVideoBackgroundSource { +struct _GESTrackVideoTestSource { GESTrackSource parent; /*< private >*/ @@ -93,24 +93,24 @@ struct _GESTrackVideoBackgroundSource { }; /** - * GESTrackVideoBackgroundSourceClass: + * GESTrackVideoTestSourceClass: * @parent_class: parent class */ -struct _GESTrackVideoBackgroundSourceClass { +struct _GESTrackVideoTestSourceClass { GESTrackSourceClass parent_class; /* */ }; -GType ges_track_vbg_src_get_type (void); +GType ges_track_video_test_source_get_type (void); -GESTrackVideoBackgroundSource* ges_track_video_background_source_new (void); +GESTrackVideoTestSource* ges_track_video_test_source_new (void); void -ges_track_video_background_source_set_pattern(GESTrackVideoBackgroundSource *, +ges_track_video_test_source_set_pattern(GESTrackVideoTestSource *, GESTrackVideoBgSrcPattern); G_END_DECLS -#endif /* _GES_TRACK_VIDEO_BACKGROUND_SOURCE */ +#endif /* _GES_TRACK_VIDEO_TEST_SOURCE */ diff --git a/ges/ges-types.h b/ges/ges-types.h index 8d641f9..c203636 100644 --- a/ges/ges-types.h +++ b/ges/ges-types.h @@ -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 diff --git a/ges/ges.h b/ges/ges.h index db01c6a..ce634c4 100644 --- a/ges/ges.h +++ b/ges/ges.h @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/check/ges/backgroundsource.c b/tests/check/ges/backgroundsource.c index 768c565..4c10022 100644 --- a/tests/check/ges/backgroundsource.c +++ b/tests/check/ges/backgroundsource.c @@ -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"); -- 2.7.4