GESTrackVideoBackgroundSource -> GESTrackVideoTestSource

This commit is contained in:
Brandon Lewis 2010-06-30 19:34:29 +02:00 committed by Edward Hervey
parent 890bbb084e
commit ae8d9b1544
11 changed files with 76 additions and 74 deletions

View 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>

View 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 \

View 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) {

View 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);

View file

@ -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);
}

View file

@ -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 <glib-object.h>
#include <ges/ges-types.h>
@ -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;
/* <public> */
};
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 */

View 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

View file

@ -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>

View 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");