mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-06 07:28:53 +00:00
GESTimelineBackgroundSource -> GESTimelineTestSource
This commit is contained in:
parent
1e7c1fa450
commit
e3718b4213
8 changed files with 106 additions and 103 deletions
|
@ -345,19 +345,20 @@ GES_TYPE_SIMPLE_TIMELINE_LAYER
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>ges-timeline-background-source</FILE>
|
<FILE>ges-timeline-test-source</FILE>
|
||||||
<TITLE>GESTimelineBackgroundSource</TITLE>
|
<TITLE>GESTimelineTestSource</TITLE>
|
||||||
GESTimelineBackgroundSource
|
GESTimelineTestSource
|
||||||
GESTimelineBackgroundSourceClass
|
GESTimelineTestSourceClass
|
||||||
ges_timeline_background_source_new
|
ges_timeline_test_source_new
|
||||||
ges_timeline_background_source_new_for_nick
|
ges_timeline_test_source_new_for_nick
|
||||||
ges_tl_bg_src_get_type
|
ges_timeline_test_source_get_type
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GES_IS_TIMELINE_BACKGROUND_SOURCE
|
GES_TYPE_TIMELINE_TEST_SOURCE
|
||||||
GES_IS_TIMELINE_BACKGROUND_SOURCE_CLASS
|
GES_IS_TIMELINE_TEST_SOURCE
|
||||||
GES_TIMELINE_BACKGROUND_SOURCE
|
GES_IS_TIMELINE_TEST_SOURCE_CLASS
|
||||||
GES_TIMELINE_BACKGROUND_SOURCE_CLASS
|
GES_TIMELINE_TEST_SOURCE
|
||||||
GES_TIMELINE_BACKGROUND_SOURCE_GET_CLASS
|
GES_TIMELINE_TEST_SOURCE_CLASS
|
||||||
|
GES_TIMELINE_TEST_SOURCE_GET_CLASS
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
|
@ -445,7 +446,6 @@ ges_track_title_source_new
|
||||||
GES_TRACK_TITLE_SOURCE
|
GES_TRACK_TITLE_SOURCE
|
||||||
GES_TRACK_TITLE_SOURCE_CLASS
|
GES_TRACK_TITLE_SOURCE_CLASS
|
||||||
GES_TRACK_TITLE_SOURCE_GET_CLASS
|
GES_TRACK_TITLE_SOURCE_GET_CLASS
|
||||||
GES_TYPE_TIMELINE_BACKGROUND_SOURCE
|
|
||||||
GES_TYPE_TIMELINE_TITLE_SOURCE
|
GES_TYPE_TIMELINE_TITLE_SOURCE
|
||||||
GES_TYPE_TRACK_TITLE_SOURCE
|
GES_TYPE_TRACK_TITLE_SOURCE
|
||||||
GES_IS_TRACK_TITLE_SOURCE
|
GES_IS_TRACK_TITLE_SOURCE
|
||||||
|
|
|
@ -18,7 +18,7 @@ libges_@GST_MAJORMINOR@_la_SOURCES = \
|
||||||
ges-timeline-source.c \
|
ges-timeline-source.c \
|
||||||
ges-timeline-file-source.c \
|
ges-timeline-file-source.c \
|
||||||
ges-timeline-transition.c \
|
ges-timeline-transition.c \
|
||||||
ges-timeline-background-source.c \
|
ges-timeline-test-source.c \
|
||||||
ges-timeline-title-source.c \
|
ges-timeline-title-source.c \
|
||||||
ges-timeline-overlay.c \
|
ges-timeline-overlay.c \
|
||||||
ges-track.c \
|
ges-track.c \
|
||||||
|
@ -49,7 +49,7 @@ libges_@GST_MAJORMINOR@include_HEADERS = \
|
||||||
ges-timeline-source.h \
|
ges-timeline-source.h \
|
||||||
ges-timeline-file-source.h \
|
ges-timeline-file-source.h \
|
||||||
ges-timeline-transition.h \
|
ges-timeline-transition.h \
|
||||||
ges-timeline-background-source.h \
|
ges-timeline-test-source.h \
|
||||||
ges-timeline-title-source.h \
|
ges-timeline-title-source.h \
|
||||||
ges-timeline-overlay.h \
|
ges-timeline-overlay.h \
|
||||||
ges-track.h \
|
ges-track.h \
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:ges-timeline-background-source
|
* SECTION:ges-timeline-test-source
|
||||||
* @short_description: An object for manipulating media files in a GESTimeline
|
* @short_description: An object for manipulating media files in a GESTimeline
|
||||||
*
|
*
|
||||||
* Represents all the output treams from a particular uri. It is assumed that
|
* Represents all the output treams from a particular uri. It is assumed that
|
||||||
|
@ -27,18 +27,18 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
#include "ges-timeline-background-source.h"
|
#include "ges-timeline-test-source.h"
|
||||||
#include "ges-timeline-source.h"
|
#include "ges-timeline-source.h"
|
||||||
#include "ges-track-object.h"
|
#include "ges-track-object.h"
|
||||||
#include "ges-track-video-test-source.h"
|
#include "ges-track-video-test-source.h"
|
||||||
#include "ges-track-audio-test-source.h"
|
#include "ges-track-audio-test-source.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTimelineBackgroundSource, ges_tl_bg_src,
|
G_DEFINE_TYPE (GESTimelineTestSource, ges_timeline_test_source,
|
||||||
GES_TYPE_TIMELINE_SOURCE);
|
GES_TYPE_TIMELINE_SOURCE);
|
||||||
|
|
||||||
#define GES_TIMELINE_BACKGROUND_SOURCE_VPATTERN_TYPE\
|
#define GES_TIMELINE_TEST_SOURCE_VPATTERN_TYPE\
|
||||||
ges_timeline_background_source_vpattern_get_type()
|
ges_timeline_test_source_vpattern_get_type()
|
||||||
|
|
||||||
/* table more-or-less copied from gstvideotestsrc.c */
|
/* table more-or-less copied from gstvideotestsrc.c */
|
||||||
static GEnumValue vpattern_enum_values[] = {
|
static GEnumValue vpattern_enum_values[] = {
|
||||||
|
@ -59,17 +59,17 @@ static GEnumValue vpattern_enum_values[] = {
|
||||||
{0, NULL, NULL}
|
{0, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
GType ges_timeline_background_source_vpattern_get_type (void);
|
GType ges_timeline_test_source_vpattern_get_type (void);
|
||||||
|
|
||||||
GType
|
GType
|
||||||
ges_timeline_background_source_vpattern_get_type (void)
|
ges_timeline_test_source_vpattern_get_type (void)
|
||||||
{
|
{
|
||||||
|
|
||||||
static gsize once = 0;
|
static gsize once = 0;
|
||||||
static GType theType = 0;
|
static GType theType = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (&once)) {
|
if (g_once_init_enter (&once)) {
|
||||||
theType = g_enum_register_static ("GESTimelineBackgroundSourceVPattern",
|
theType = g_enum_register_static ("GESTimelineTestSourceVPattern",
|
||||||
vpattern_enum_values);
|
vpattern_enum_values);
|
||||||
g_once_init_leave (&once, 1);
|
g_once_init_leave (&once, 1);
|
||||||
};
|
};
|
||||||
|
@ -85,20 +85,21 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_set_mute (GESTimelineBackgroundSource * self, gboolean mute);
|
ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_set_vpattern (GESTimelineBackgroundSource * self, gint vpattern);
|
ges_timeline_test_source_set_vpattern (GESTimelineTestSource * self,
|
||||||
|
gint vpattern);
|
||||||
|
|
||||||
static GESTrackObject
|
static GESTrackObject
|
||||||
* ges_tl_bg_src_create_track_object (GESTimelineObject * obj,
|
* ges_timeline_test_source_create_track_object (GESTimelineObject * obj,
|
||||||
GESTrack * track);
|
GESTrack * track);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_get_property (GObject * object, guint property_id,
|
ges_timeline_test_source_get_property (GObject * object, guint property_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GESTimelineBackgroundSource *tfs = GES_TIMELINE_BACKGROUND_SOURCE (object);
|
GESTimelineTestSource *tfs = GES_TIMELINE_TEST_SOURCE (object);
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_MUTE:
|
case PROP_MUTE:
|
||||||
|
@ -113,17 +114,17 @@ ges_tl_bg_src_get_property (GObject * object, guint property_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_set_property (GObject * object, guint property_id,
|
ges_timeline_test_source_set_property (GObject * object, guint property_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GESTimelineBackgroundSource *tfs = GES_TIMELINE_BACKGROUND_SOURCE (object);
|
GESTimelineTestSource *tfs = GES_TIMELINE_TEST_SOURCE (object);
|
||||||
|
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
case PROP_MUTE:
|
case PROP_MUTE:
|
||||||
ges_tl_bg_src_set_mute (tfs, g_value_get_boolean (value));
|
ges_timeline_test_source_set_mute (tfs, g_value_get_boolean (value));
|
||||||
break;
|
break;
|
||||||
case PROP_VPATTERN:
|
case PROP_VPATTERN:
|
||||||
ges_tl_bg_src_set_vpattern (tfs, g_value_get_enum (value));
|
ges_timeline_test_source_set_vpattern (tfs, g_value_get_enum (value));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
@ -131,41 +132,41 @@ ges_tl_bg_src_set_property (GObject * object, guint property_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_dispose (GObject * object)
|
ges_timeline_test_source_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
G_OBJECT_CLASS (ges_tl_bg_src_parent_class)->dispose (object);
|
G_OBJECT_CLASS (ges_timeline_test_source_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_finalize (GObject * object)
|
ges_timeline_test_source_finalize (GObject * object)
|
||||||
{
|
{
|
||||||
G_OBJECT_CLASS (ges_tl_bg_src_parent_class)->finalize (object);
|
G_OBJECT_CLASS (ges_timeline_test_source_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_class_init (GESTimelineBackgroundSourceClass * klass)
|
ges_timeline_test_source_class_init (GESTimelineTestSourceClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
GESTimelineObjectClass *timobj_class = GES_TIMELINE_OBJECT_CLASS (klass);
|
GESTimelineObjectClass *timobj_class = GES_TIMELINE_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->get_property = ges_tl_bg_src_get_property;
|
object_class->get_property = ges_timeline_test_source_get_property;
|
||||||
object_class->set_property = ges_tl_bg_src_set_property;
|
object_class->set_property = ges_timeline_test_source_set_property;
|
||||||
object_class->dispose = ges_tl_bg_src_dispose;
|
object_class->dispose = ges_timeline_test_source_dispose;
|
||||||
object_class->finalize = ges_tl_bg_src_finalize;
|
object_class->finalize = ges_timeline_test_source_finalize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineBackgroundSource:vpattern:
|
* GESTimelineTestSource:vpattern:
|
||||||
*
|
*
|
||||||
* Video pattern to display in video track objects.
|
* Video pattern to display in video track objects.
|
||||||
*/
|
*/
|
||||||
g_object_class_install_property (object_class, PROP_VPATTERN,
|
g_object_class_install_property (object_class, PROP_VPATTERN,
|
||||||
g_param_spec_enum ("vpattern", "VPattern",
|
g_param_spec_enum ("vpattern", "VPattern",
|
||||||
"Which video pattern to display. See videotestsrc element",
|
"Which video pattern to display. See videotestsrc element",
|
||||||
GES_TIMELINE_BACKGROUND_SOURCE_VPATTERN_TYPE,
|
GES_TIMELINE_TEST_SOURCE_VPATTERN_TYPE,
|
||||||
GES_TRACK_VIDEO_BG_SRC_BLACK, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
GES_TRACK_VIDEO_BG_SRC_BLACK, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineBackgroundSource:mute:
|
* GESTimelineTestSource:mute:
|
||||||
*
|
*
|
||||||
* Whether the sound will be played or not.
|
* Whether the sound will be played or not.
|
||||||
*/
|
*/
|
||||||
|
@ -173,18 +174,19 @@ ges_tl_bg_src_class_init (GESTimelineBackgroundSourceClass * klass)
|
||||||
g_param_spec_boolean ("mute", "Mute", "Mute audio track",
|
g_param_spec_boolean ("mute", "Mute", "Mute audio track",
|
||||||
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||||
|
|
||||||
timobj_class->create_track_object = ges_tl_bg_src_create_track_object;
|
timobj_class->create_track_object =
|
||||||
|
ges_timeline_test_source_create_track_object;
|
||||||
timobj_class->need_fill_track = FALSE;
|
timobj_class->need_fill_track = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_init (GESTimelineBackgroundSource * self)
|
ges_timeline_test_source_init (GESTimelineTestSource * self)
|
||||||
{
|
{
|
||||||
GES_TIMELINE_OBJECT (self)->duration = 0;
|
GES_TIMELINE_OBJECT (self)->duration = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_set_mute (GESTimelineBackgroundSource * self, gboolean mute)
|
ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||||
|
@ -203,7 +205,8 @@ ges_tl_bg_src_set_mute (GESTimelineBackgroundSource * self, gboolean mute)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ges_tl_bg_src_set_vpattern (GESTimelineBackgroundSource * self, gint vpattern)
|
ges_timeline_test_source_set_vpattern (GESTimelineTestSource * self,
|
||||||
|
gint vpattern)
|
||||||
{
|
{
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
GESTimelineObject *object = (GESTimelineObject *) self;
|
GESTimelineObject *object = (GESTimelineObject *) self;
|
||||||
|
@ -219,12 +222,13 @@ ges_tl_bg_src_set_vpattern (GESTimelineBackgroundSource * self, gint vpattern)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GESTrackObject *
|
static GESTrackObject *
|
||||||
ges_tl_bg_src_create_track_object (GESTimelineObject * obj, GESTrack * track)
|
ges_timeline_test_source_create_track_object (GESTimelineObject * obj,
|
||||||
|
GESTrack * track)
|
||||||
{
|
{
|
||||||
GESTimelineBackgroundSource *tfs = (GESTimelineBackgroundSource *) obj;
|
GESTimelineTestSource *tfs = (GESTimelineTestSource *) obj;
|
||||||
GESTrackObject *res = NULL;
|
GESTrackObject *res = NULL;
|
||||||
|
|
||||||
GST_DEBUG ("Creating a GESTrackBackgroundSource");
|
GST_DEBUG ("Creating a GESTrackTestSource");
|
||||||
|
|
||||||
if (track->type == GES_TRACK_TYPE_VIDEO) {
|
if (track->type == GES_TRACK_TYPE_VIDEO) {
|
||||||
res = (GESTrackObject *) ges_track_video_test_source_new ();
|
res = (GESTrackObject *) ges_track_video_test_source_new ();
|
||||||
|
@ -245,32 +249,32 @@ ges_tl_bg_src_create_track_object (GESTimelineObject * obj, GESTrack * track)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ges_timeline_backgroundsource_new:
|
* ges_timeline_testsource_new:
|
||||||
* @uri: the URI the source should control
|
* @uri: the URI the source should control
|
||||||
*
|
*
|
||||||
* Creates a new #GESTimelineBackgroundSource for the provided @uri.
|
* Creates a new #GESTimelineTestSource for the provided @uri.
|
||||||
*
|
*
|
||||||
* Returns: The newly created #GESTimelineBackgroundSource, or NULL if there was an
|
* Returns: The newly created #GESTimelineTestSource, or NULL if there was an
|
||||||
* error.
|
* error.
|
||||||
*/
|
*/
|
||||||
GESTimelineBackgroundSource *
|
GESTimelineTestSource *
|
||||||
ges_timeline_background_source_new (void)
|
ges_timeline_test_source_new (void)
|
||||||
{
|
{
|
||||||
/* FIXME : Check for validity/existence of URI */
|
/* FIXME : Check for validity/existence of URI */
|
||||||
return g_object_new (GES_TYPE_TIMELINE_BACKGROUND_SOURCE, NULL);
|
return g_object_new (GES_TYPE_TIMELINE_TEST_SOURCE, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
GESTimelineBackgroundSource *
|
GESTimelineTestSource *
|
||||||
ges_timeline_background_source_new_for_nick (gchar * nick)
|
ges_timeline_test_source_new_for_nick (gchar * nick)
|
||||||
{
|
{
|
||||||
GESTimelineBackgroundSource *ret;
|
GESTimelineTestSource *ret;
|
||||||
GEnumValue *value;
|
GEnumValue *value;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0, value = &vpattern_enum_values[i]; value->value_nick;
|
for (i = 0, value = &vpattern_enum_values[i]; value->value_nick;
|
||||||
value = &vpattern_enum_values[i++]) {
|
value = &vpattern_enum_values[i++]) {
|
||||||
if (!strcmp (nick, value->value_nick)) {
|
if (!strcmp (nick, value->value_nick)) {
|
||||||
ret = g_object_new (GES_TYPE_TIMELINE_BACKGROUND_SOURCE, "vpattern",
|
ret = g_object_new (GES_TYPE_TIMELINE_TEST_SOURCE, "vpattern",
|
||||||
(gint) value->value, NULL);
|
(gint) value->value, NULL);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
|
@ -18,8 +18,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GES_TL_BACKGROUNDSOURCE
|
#ifndef _GES_TL_TESTSOURCE
|
||||||
#define _GES_TL_BACKGROUNDSOURCE
|
#define _GES_TL_TESTSOURCE
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <ges/ges-types.h>
|
#include <ges/ges-types.h>
|
||||||
|
@ -28,30 +28,30 @@
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
#define GES_TYPE_TIMELINE_BACKGROUND_SOURCE ges_tl_bg_src_get_type()
|
#define GES_TYPE_TIMELINE_TEST_SOURCE ges_timeline_test_source_get_type()
|
||||||
|
|
||||||
#define GES_TIMELINE_BACKGROUND_SOURCE(obj) \
|
#define GES_TIMELINE_TEST_SOURCE(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_BACKGROUND_SOURCE, GESTimelineBackgroundSource))
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSource))
|
||||||
|
|
||||||
#define GES_TIMELINE_BACKGROUND_SOURCE_CLASS(klass) \
|
#define GES_TIMELINE_TEST_SOURCE_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_BACKGROUND_SOURCE, GESTimelineBackgroundSourceClass))
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSourceClass))
|
||||||
|
|
||||||
#define GES_IS_TIMELINE_BACKGROUND_SOURCE(obj) \
|
#define GES_IS_TIMELINE_TEST_SOURCE(obj) \
|
||||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_BACKGROUND_SOURCE))
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_TEST_SOURCE))
|
||||||
|
|
||||||
#define GES_IS_TIMELINE_BACKGROUND_SOURCE_CLASS(klass) \
|
#define GES_IS_TIMELINE_TEST_SOURCE_CLASS(klass) \
|
||||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_BACKGROUND_SOURCE))
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_TEST_SOURCE))
|
||||||
|
|
||||||
#define GES_TIMELINE_BACKGROUND_SOURCE_GET_CLASS(obj) \
|
#define GES_TIMELINE_TEST_SOURCE_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_BACKGROUND_SOURCE, GESTimelineBackgroundSourceClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSourceClass))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineBackgroundSource:
|
* GESTimelineTestSource:
|
||||||
* @parent: parent
|
* @parent: parent
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _GESTimelineBackgroundSource {
|
struct _GESTimelineTestSource {
|
||||||
GESTimelineSource parent;
|
GESTimelineSource parent;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
@ -60,23 +60,23 @@ struct _GESTimelineBackgroundSource {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GESTimelineBackgroundSourceClass:
|
* GESTimelineTestSourceClass:
|
||||||
* @parent_class: parent class
|
* @parent_class: parent class
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _GESTimelineBackgroundSourceClass {
|
struct _GESTimelineTestSourceClass {
|
||||||
GESTimelineSourceClass parent_class;
|
GESTimelineSourceClass parent_class;
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
};
|
};
|
||||||
|
|
||||||
GType ges_tl_bg_src_get_type (void);
|
GType ges_timeline_test_source_get_type (void);
|
||||||
|
|
||||||
GESTimelineBackgroundSource* ges_timeline_background_source_new (void);
|
GESTimelineTestSource* ges_timeline_test_source_new (void);
|
||||||
GESTimelineBackgroundSource* ges_timeline_background_source_new_for_nick(gchar
|
GESTimelineTestSource* ges_timeline_test_source_new_for_nick(gchar
|
||||||
* nick);
|
* nick);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* _GES_TL_BACKGROUNDSOURCE */
|
#endif /* _GES_TL_TESTSOURCE */
|
||||||
|
|
|
@ -48,8 +48,8 @@ typedef struct _GESTimelineFileSourceClass GESTimelineFileSourceClass;
|
||||||
typedef struct _GESTimelineTransition GESTimelineTransition;
|
typedef struct _GESTimelineTransition GESTimelineTransition;
|
||||||
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
||||||
|
|
||||||
typedef struct _GESTimelineBackgroundSource GESTimelineBackgroundSource;
|
typedef struct _GESTimelineTestSource GESTimelineTestSource;
|
||||||
typedef struct _GESTimelineBackgroundSourceClass GESTimelineBackgroundSourceClass;
|
typedef struct _GESTimelineTestSourceClass GESTimelineTestSourceClass;
|
||||||
|
|
||||||
typedef struct _GESTimelineTitleSource GESTimelineTitleSource;
|
typedef struct _GESTimelineTitleSource GESTimelineTitleSource;
|
||||||
typedef struct _GESTimelineTitleSourceClass GESTimelineTitleSourceClass;
|
typedef struct _GESTimelineTitleSourceClass GESTimelineTitleSourceClass;
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include <ges/ges-timeline-pipeline.h>
|
#include <ges/ges-timeline-pipeline.h>
|
||||||
#include <ges/ges-timeline-source.h>
|
#include <ges/ges-timeline-source.h>
|
||||||
#include <ges/ges-timeline-transition.h>
|
#include <ges/ges-timeline-transition.h>
|
||||||
#include <ges/ges-timeline-background-source.h>
|
#include <ges/ges-timeline-test-source.h>
|
||||||
#include <ges/ges-timeline-title-source.h>
|
#include <ges/ges-timeline-title-source.h>
|
||||||
#include <ges/ges-timeline-overlay.h>
|
#include <ges/ges-timeline-overlay.h>
|
||||||
#include <ges/ges-track.h>
|
#include <ges/ges-track.h>
|
||||||
|
|
|
@ -20,13 +20,13 @@
|
||||||
#include <ges/ges.h>
|
#include <ges/ges.h>
|
||||||
#include <gst/check/gstcheck.h>
|
#include <gst/check/gstcheck.h>
|
||||||
|
|
||||||
GST_START_TEST (test_background_source_basic)
|
GST_START_TEST (test_test_source_basic)
|
||||||
{
|
{
|
||||||
GESTimelineBackgroundSource *source;
|
GESTimelineTestSource *source;
|
||||||
|
|
||||||
ges_init ();
|
ges_init ();
|
||||||
|
|
||||||
source = ges_timeline_background_source_new ();
|
source = ges_timeline_test_source_new ();
|
||||||
fail_unless (source != NULL);
|
fail_unless (source != NULL);
|
||||||
|
|
||||||
g_object_unref (source);
|
g_object_unref (source);
|
||||||
|
@ -49,7 +49,7 @@ GST_END_TEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST (test_background_source_properties)
|
GST_START_TEST (test_test_source_properties)
|
||||||
{
|
{
|
||||||
GESTrack *track;
|
GESTrack *track;
|
||||||
GESTrackObject *trackobject;
|
GESTrackObject *trackobject;
|
||||||
|
@ -61,7 +61,7 @@ GST_START_TEST (test_background_source_properties)
|
||||||
fail_unless (track != NULL);
|
fail_unless (track != NULL);
|
||||||
|
|
||||||
object = (GESTimelineObject *)
|
object = (GESTimelineObject *)
|
||||||
ges_timeline_background_source_new ();
|
ges_timeline_test_source_new ();
|
||||||
fail_unless (object != NULL);
|
fail_unless (object != NULL);
|
||||||
|
|
||||||
/* Set some properties */
|
/* Set some properties */
|
||||||
|
@ -108,13 +108,13 @@ GST_START_TEST (test_background_source_properties)
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST (test_background_source_in_layer)
|
GST_START_TEST (test_test_source_in_layer)
|
||||||
{
|
{
|
||||||
GESTimeline *timeline;
|
GESTimeline *timeline;
|
||||||
GESTimelineLayer *layer;
|
GESTimelineLayer *layer;
|
||||||
GESTrack *a, *v;
|
GESTrack *a, *v;
|
||||||
GESTrackObject *trobj;
|
GESTrackObject *trobj;
|
||||||
GESTimelineBackgroundSource *source;
|
GESTimelineTestSource *source;
|
||||||
GESTrackVideoBgSrcPattern ptrn;
|
GESTrackVideoBgSrcPattern ptrn;
|
||||||
|
|
||||||
ges_init ();
|
ges_init ();
|
||||||
|
@ -128,7 +128,7 @@ GST_START_TEST (test_background_source_in_layer)
|
||||||
ges_timeline_add_track (timeline, v);
|
ges_timeline_add_track (timeline, v);
|
||||||
ges_timeline_add_layer (timeline, layer);
|
ges_timeline_add_layer (timeline, layer);
|
||||||
|
|
||||||
source = ges_timeline_background_source_new_for_nick ((gchar *) "red");
|
source = ges_timeline_test_source_new_for_nick ((gchar *) "red");
|
||||||
g_object_get (source, "vpattern", &ptrn, NULL);
|
g_object_get (source, "vpattern", &ptrn, NULL);
|
||||||
assert_equals_int (ptrn, GES_TRACK_VIDEO_BG_SRC_RED);
|
assert_equals_int (ptrn, GES_TRACK_VIDEO_BG_SRC_RED);
|
||||||
|
|
||||||
|
@ -168,9 +168,9 @@ ges_suite (void)
|
||||||
|
|
||||||
suite_add_tcase (s, tc_chain);
|
suite_add_tcase (s, tc_chain);
|
||||||
|
|
||||||
tcase_add_test (tc_chain, test_background_source_basic);
|
tcase_add_test (tc_chain, test_test_source_basic);
|
||||||
tcase_add_test (tc_chain, test_background_source_properties);
|
tcase_add_test (tc_chain, test_test_source_properties);
|
||||||
tcase_add_test (tc_chain, test_background_source_in_layer);
|
tcase_add_test (tc_chain, test_test_source_in_layer);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,7 +79,7 @@ GESTimelineObject *
|
||||||
pattern_source_new (guint pattern)
|
pattern_source_new (guint pattern)
|
||||||
{
|
{
|
||||||
GESTimelineObject *ret;
|
GESTimelineObject *ret;
|
||||||
ret = GES_TIMELINE_OBJECT (ges_timeline_background_source_new ());
|
ret = GES_TIMELINE_OBJECT (ges_timeline_test_source_new ());
|
||||||
g_object_set (ret, "vpattern", pattern, NULL);
|
g_object_set (ret, "vpattern", pattern, NULL);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -185,8 +185,7 @@ create_timeline (int nbargs, gchar ** argv)
|
||||||
guint64 duration = str_to_time (argv[(i * 3) + 2]);
|
guint64 duration = str_to_time (argv[(i * 3) + 2]);
|
||||||
|
|
||||||
if (!g_strcmp0 ("+pattern", source)) {
|
if (!g_strcmp0 ("+pattern", source)) {
|
||||||
obj = GES_TIMELINE_OBJECT (ges_timeline_background_source_new_for_nick
|
obj = GES_TIMELINE_OBJECT (ges_timeline_test_source_new_for_nick (arg0));
|
||||||
(arg0));
|
|
||||||
if (!obj)
|
if (!obj)
|
||||||
g_error ("%s invalid pattern!", arg0);
|
g_error ("%s invalid pattern!", arg0);
|
||||||
|
|
||||||
|
@ -315,13 +314,13 @@ void
|
||||||
print_pattern_list (void)
|
print_pattern_list (void)
|
||||||
{
|
{
|
||||||
GEnumClass *enum_class;
|
GEnumClass *enum_class;
|
||||||
GESTimelineBackgroundSource *tr;
|
GESTimelineTestSource *tr;
|
||||||
GESTimelineBackgroundSourceClass *klass;
|
GESTimelineTestSourceClass *klass;
|
||||||
GParamSpec *pspec;
|
GParamSpec *pspec;
|
||||||
GEnumValue *v;
|
GEnumValue *v;
|
||||||
|
|
||||||
tr = ges_timeline_background_source_new ();
|
tr = ges_timeline_test_source_new ();
|
||||||
klass = GES_TIMELINE_BACKGROUND_SOURCE_GET_CLASS (tr);
|
klass = GES_TIMELINE_TEST_SOURCE_GET_CLASS (tr);
|
||||||
|
|
||||||
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern");
|
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue