Rename GESTimelineTestSource to GESTestSourceClip

This commit is contained in:
Thibault Saunier 2013-01-17 00:58:28 -03:00
parent 5da46b7658
commit e3dc877c4b
21 changed files with 263 additions and 271 deletions

View file

@ -21,7 +21,7 @@ LOCAL_SRC_FILES := \
ges-operation-clip.c \
ges-transition-clip.c \
ges-standard-transition-clip.c \
ges-timeline-test-source.c \
ges-test-clip.c \
ges-title-clip.c \
ges-overlay-clip.c \
ges-text-overlay-clip.c \

View file

@ -55,7 +55,7 @@ platform as well as Windows. It is released under the GNU Library General Public
<title>Timeline objects</title>
<xi:include href="xml/ges-timeline-filesource.xml"/>
<xi:include href="xml/ges-title-clip.xml"/>
<xi:include href="xml/ges-timeline-test-source.xml"/>
<xi:include href="xml/ges-test-clip.xml"/>
<xi:include href="xml/ges-text-overlay-clip.xml"/>
<xi:include href="xml/ges-standard-transition-clip.xml"/>
<xi:include href="xml/ges-standard-effect-clip.xml"/>

View file

@ -604,29 +604,29 @@ GES_TYPE_SIMPLE_TIMELINE_LAYER
</SECTION>
<SECTION>
<FILE>ges-timeline-test-source</FILE>
<TITLE>GESTimelineTestSource</TITLE>
GESTimelineTestSource
GESTimelineTestSourceClass
ges_timeline_test_source_new
ges_timeline_test_source_new_for_nick
ges_timeline_test_source_get_vpattern
ges_timeline_test_source_get_frequency
ges_timeline_test_source_get_volume
ges_timeline_test_source_is_muted
ges_timeline_test_source_set_vpattern
ges_timeline_test_source_set_frequency
ges_timeline_test_source_set_mute
ges_timeline_test_source_set_volume
<FILE>ges-test-clip</FILE>
<TITLE>GESTestClip</TITLE>
GESTestClip
GESTestClipClass
ges_test_clip_new
ges_test_clip_new_for_nick
ges_test_clip_get_vpattern
ges_test_clip_get_frequency
ges_test_clip_get_volume
ges_test_clip_is_muted
ges_test_clip_set_vpattern
ges_test_clip_set_frequency
ges_test_clip_set_mute
ges_test_clip_set_volume
<SUBSECTION Standard>
GESTimelineTestSourcePrivate
ges_timeline_test_source_get_type
GES_TYPE_TIMELINE_TEST_SOURCE
GES_IS_TIMELINE_TEST_SOURCE
GES_IS_TIMELINE_TEST_SOURCE_CLASS
GES_TIMELINE_TEST_SOURCE
GES_TIMELINE_TEST_SOURCE_CLASS
GES_TIMELINE_TEST_SOURCE_GET_CLASS
GESTestClipPrivate
ges_test_clip_get_type
GES_TYPE_TEST_CLIP
GES_IS_TEST_CLIP
GES_IS_TEST_CLIP_CLASS
GES_TEST_CLIP
GES_TEST_CLIP_CLASS
GES_TEST_CLIP_GET_CLASS
</SECTION>
<SECTION>

View file

@ -13,7 +13,7 @@ ges_operation_clip_get_type
ges_overlay_clip_get_type
ges_timeline_pipeline_get_type
ges_source_clip_get_type
ges_timeline_test_source_get_type
ges_test_clip_get_type
ges_transition_clip_get_type
ges_standard_transition_clip_get_type
ges_effect_clip_get_type

View file

@ -25,7 +25,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
ges-operation-clip.c \
ges-transition-clip.c \
ges-standard-transition-clip.c \
ges-timeline-test-source.c \
ges-test-clip.c \
ges-title-clip.c \
ges-overlay-clip.c \
ges-text-overlay-clip.c \
@ -79,7 +79,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-operation-clip.h \
ges-transition-clip.h \
ges-standard-transition-clip.h \
ges-timeline-test-source.h \
ges-test-clip.h \
ges-title-clip.h \
ges-overlay-clip.h \
ges-text-overlay-clip.h \

View file

@ -19,28 +19,27 @@
*/
/**
* SECTION:ges-timeline-test-source
* SECTION:ges-test-clip
* @short_description: Render video and audio test patterns in a
* #GESTimelineLayer
*
* Useful for testing purposes.
*
* You can use the ges_asset_request_simple API to create a Asset
* capable of extractinf GESTimelineTestSource-s
* capable of extractinf GESTestClip-s
*/
#include "ges-internal.h"
#include "ges-timeline-test-source.h"
#include "ges-test-clip.h"
#include "ges-source-clip.h"
#include "ges-track-object.h"
#include "ges-track-video-test-source.h"
#include "ges-track-audio-test-source.h"
#include <string.h>
G_DEFINE_TYPE (GESTimelineTestSource, ges_timeline_test_source,
GES_TYPE_SOURCE_CLIP);
G_DEFINE_TYPE (GESTestClip, ges_test_clip, GES_TYPE_SOURCE_CLIP);
struct _GESTimelineTestSourcePrivate
struct _GESTestClipPrivate
{
gboolean mute;
GESVideoTestPattern vpattern;
@ -58,14 +57,13 @@ enum
};
static GESTrackObject
* ges_timeline_test_source_create_track_object (GESClip * obj,
GESTrackType type);
* ges_test_clip_create_track_object (GESClip * obj, GESTrackType type);
static void
ges_timeline_test_source_get_property (GObject * object, guint property_id,
ges_test_clip_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GESTimelineTestSourcePrivate *priv = GES_TIMELINE_TEST_SOURCE (object)->priv;
GESTestClipPrivate *priv = GES_TEST_CLIP (object)->priv;
switch (property_id) {
case PROP_MUTE:
@ -86,24 +84,23 @@ ges_timeline_test_source_get_property (GObject * object, guint property_id,
}
static void
ges_timeline_test_source_set_property (GObject * object, guint property_id,
ges_test_clip_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
GESTimelineTestSource *uriclip = GES_TIMELINE_TEST_SOURCE (object);
GESTestClip *uriclip = GES_TEST_CLIP (object);
switch (property_id) {
case PROP_MUTE:
ges_timeline_test_source_set_mute (uriclip, g_value_get_boolean (value));
ges_test_clip_set_mute (uriclip, g_value_get_boolean (value));
break;
case PROP_VPATTERN:
ges_timeline_test_source_set_vpattern (uriclip, g_value_get_enum (value));
ges_test_clip_set_vpattern (uriclip, g_value_get_enum (value));
break;
case PROP_FREQ:
ges_timeline_test_source_set_frequency (uriclip,
g_value_get_double (value));
ges_test_clip_set_frequency (uriclip, g_value_get_double (value));
break;
case PROP_VOLUME:
ges_timeline_test_source_set_volume (uriclip, g_value_get_double (value));
ges_test_clip_set_volume (uriclip, g_value_get_double (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@ -111,18 +108,18 @@ ges_timeline_test_source_set_property (GObject * object, guint property_id,
}
static void
ges_timeline_test_source_class_init (GESTimelineTestSourceClass * klass)
ges_test_clip_class_init (GESTestClipClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESClipClass *timobj_class = GES_CLIP_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTimelineTestSourcePrivate));
g_type_class_add_private (klass, sizeof (GESTestClipPrivate));
object_class->get_property = ges_timeline_test_source_get_property;
object_class->set_property = ges_timeline_test_source_set_property;
object_class->get_property = ges_test_clip_get_property;
object_class->set_property = ges_test_clip_set_property;
/**
* GESTimelineTestSource:vpattern:
* GESTestClip:vpattern:
*
* Video pattern to display in video track objects.
*/
@ -133,7 +130,7 @@ ges_timeline_test_source_class_init (GESTimelineTestSourceClass * klass)
GES_VIDEO_TEST_PATTERN_BLACK, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
/**
* GESTimelineTestSource:freq:
* GESTestClip:freq:
*
* The frequency to generate for audio track objects.
*/
@ -143,7 +140,7 @@ ges_timeline_test_source_class_init (GESTimelineTestSourceClass * klass)
0, 20000, 440, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
/**
* GESTimelineTestSource:volume:
* GESTestClip:volume:
*
* The volume for the audio track objects.
*/
@ -154,7 +151,7 @@ ges_timeline_test_source_class_init (GESTimelineTestSourceClass * klass)
/**
* GESTimelineTestSource:mute:
* GESTestClip:mute:
*
* Whether the sound will be played or not.
*/
@ -162,16 +159,15 @@ ges_timeline_test_source_class_init (GESTimelineTestSourceClass * klass)
g_param_spec_boolean ("mute", "Mute", "Mute audio track",
FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
timobj_class->create_track_object =
ges_timeline_test_source_create_track_object;
timobj_class->create_track_object = ges_test_clip_create_track_object;
timobj_class->need_fill_track = FALSE;
}
static void
ges_timeline_test_source_init (GESTimelineTestSource * self)
ges_test_clip_init (GESTestClip * self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSourcePrivate);
GES_TYPE_TEST_CLIP, GESTestClipPrivate);
self->priv->freq = 0;
self->priv->volume = 0;
@ -179,15 +175,15 @@ ges_timeline_test_source_init (GESTimelineTestSource * self)
}
/**
* ges_timeline_test_source_set_mute:
* @self: the #GESTimelineTestSource on which to mute or unmute the audio track
* ges_test_clip_set_mute:
* @self: the #GESTestClip on which to mute or unmute the audio track
* @mute: %TRUE to mute the audio track, %FALSE to unmute it
*
* Sets whether the audio track of this timeline object is muted or not.
*
*/
void
ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute)
ges_test_clip_set_mute (GESTestClip * self, gboolean mute)
{
GList *tmp, *trackobjects;
GESClip *object = (GESClip *) self;
@ -210,16 +206,15 @@ ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute)
}
/**
* ges_timeline_test_source_set_vpattern:
* @self: the #GESTimelineTestSource to set the pattern on
* ges_test_clip_set_vpattern:
* @self: the #GESTestClip to set the pattern on
* @vpattern: the #GESVideoTestPattern to use on @self
*
* Sets which video pattern to display on @self.
*
*/
void
ges_timeline_test_source_set_vpattern (GESTimelineTestSource * self,
GESVideoTestPattern vpattern)
ges_test_clip_set_vpattern (GESTestClip * self, GESVideoTestPattern vpattern)
{
GList *tmp, *trackobjects;
GESClip *object = (GESClip *) self;
@ -239,16 +234,15 @@ ges_timeline_test_source_set_vpattern (GESTimelineTestSource * self,
}
/**
* ges_timeline_test_source_set_frequency:
* @self: the #GESTimelineTestSource to set the frequency on
* ges_test_clip_set_frequency:
* @self: the #GESTestClip to set the frequency on
* @freq: the frequency you want to use on @self
*
* Sets the frequency to generate. See audiotestsrc element.
*
*/
void
ges_timeline_test_source_set_frequency (GESTimelineTestSource * self,
gdouble freq)
ges_test_clip_set_frequency (GESTestClip * self, gdouble freq)
{
GList *tmp, *trackobjects;
GESClip *object = (GESClip *) self;
@ -268,16 +262,15 @@ ges_timeline_test_source_set_frequency (GESTimelineTestSource * self,
}
/**
* ges_timeline_test_source_set_volume:
* @self: the #GESTimelineTestSource to set the volume on
* ges_test_clip_set_volume:
* @self: the #GESTestClip to set the volume on
* @volume: the volume of the audio signal you want to use on @self
*
* Sets the volume of the test audio signal.
*
*/
void
ges_timeline_test_source_set_volume (GESTimelineTestSource * self,
gdouble volume)
ges_test_clip_set_volume (GESTestClip * self, gdouble volume)
{
GList *tmp, *trackobjects;
GESClip *object = (GESClip *) self;
@ -297,65 +290,65 @@ ges_timeline_test_source_set_volume (GESTimelineTestSource * self,
}
/**
* ges_timeline_test_source_get_vpattern:
* @self: a #GESTimelineTestSource
* ges_test_clip_get_vpattern:
* @self: a #GESTestClip
*
* Get the #GESVideoTestPattern which is applied on @self.
*
* Returns: The #GESVideoTestPattern which is applied on @self.
*/
GESVideoTestPattern
ges_timeline_test_source_get_vpattern (GESTimelineTestSource * self)
ges_test_clip_get_vpattern (GESTestClip * self)
{
return self->priv->vpattern;
}
/**
* ges_timeline_test_source_is_muted:
* @self: a #GESTimelineTestSource
* ges_test_clip_is_muted:
* @self: a #GESTestClip
*
* Let you know if the audio track of @self is muted or not.
*
* Returns: Whether the audio track of @self is muted or not.
*/
gboolean
ges_timeline_test_source_is_muted (GESTimelineTestSource * self)
ges_test_clip_is_muted (GESTestClip * self)
{
return self->priv->mute;
}
/**
* ges_timeline_test_source_get_frequency:
* @self: a #GESTimelineTestSource
* ges_test_clip_get_frequency:
* @self: a #GESTestClip
*
* Get the frequency @self generates.
*
* Returns: The frequency @self generates. See audiotestsrc element.
*/
gdouble
ges_timeline_test_source_get_frequency (GESTimelineTestSource * self)
ges_test_clip_get_frequency (GESTestClip * self)
{
return self->priv->freq;
}
/**
* ges_timeline_test_source_get_volume:
* @self: a #GESTimelineTestSource
* ges_test_clip_get_volume:
* @self: a #GESTestClip
*
* Get the volume of the test audio signal applied on @self.
*
* Returns: The volume of the test audio signal applied on @self.
*/
gdouble
ges_timeline_test_source_get_volume (GESTimelineTestSource * self)
ges_test_clip_get_volume (GESTestClip * self)
{
return self->priv->volume;
}
static GESTrackObject *
ges_timeline_test_source_create_track_object (GESClip * obj, GESTrackType type)
ges_test_clip_create_track_object (GESClip * obj, GESTrackType type)
{
GESTimelineTestSourcePrivate *priv = GES_TIMELINE_TEST_SOURCE (obj)->priv;
GESTestClipPrivate *priv = GES_TEST_CLIP (obj)->priv;
GESTrackObject *res = NULL;
GST_DEBUG ("Creating a GESTrackTestSource for type: %s",
@ -381,35 +374,35 @@ ges_timeline_test_source_create_track_object (GESClip * obj, GESTrackType type)
}
/**
* ges_timeline_test_source_new:
* ges_test_clip_new:
*
* Creates a new #GESTimelineTestSource.
* Creates a new #GESTestClip.
*
* Returns: The newly created #GESTimelineTestSource, or NULL if there was an
* Returns: The newly created #GESTestClip, or NULL if there was an
* error.
*/
GESTimelineTestSource *
ges_timeline_test_source_new (void)
GESTestClip *
ges_test_clip_new (void)
{
/* FIXME : Check for validity/existence of URI */
return g_object_new (GES_TYPE_TIMELINE_TEST_SOURCE, NULL);
return g_object_new (GES_TYPE_TEST_CLIP, NULL);
}
/**
* ges_timeline_test_source_new_for_nick:
* @nick: the nickname for which to create the #GESTimelineTestSource
* ges_test_clip_new_for_nick:
* @nick: the nickname for which to create the #GESTestClip
*
* Creates a new #GESTimelineTestSource for the provided @nick.
* Creates a new #GESTestClip for the provided @nick.
*
* Returns: The newly created #GESTimelineTestSource, or NULL if there was an
* Returns: The newly created #GESTestClip, or NULL if there was an
* error.
*/
GESTimelineTestSource *
ges_timeline_test_source_new_for_nick (gchar * nick)
GESTestClip *
ges_test_clip_new_for_nick (gchar * nick)
{
GEnumValue *value;
GEnumClass *klass;
GESTimelineTestSource *ret = NULL;
GESTestClip *ret = NULL;
klass = G_ENUM_CLASS (g_type_class_ref (GES_VIDEO_TEST_PATTERN_TYPE));
if (!klass)
@ -417,7 +410,7 @@ ges_timeline_test_source_new_for_nick (gchar * nick)
value = g_enum_get_value_by_nick (klass, nick);
if (value) {
ret = g_object_new (GES_TYPE_TIMELINE_TEST_SOURCE, "vpattern",
ret = g_object_new (GES_TYPE_TEST_CLIP, "vpattern",
(gint) value->value, NULL);
}

109
ges/ges-test-clip.h Normal file
View file

@ -0,0 +1,109 @@
/* GStreamer Editing Services
* Copyright (C) 2009 Brandon Lewis <brandon.lewis@collabora.co.uk>
* 2009 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., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TL_TESTSOURCE
#define _GES_TL_TESTSOURCE
#include <glib-object.h>
#include <ges/ges-enums.h>
#include <ges/ges-types.h>
#include <ges/ges-source-clip.h>
#include <ges/ges-track.h>
G_BEGIN_DECLS
#define GES_TYPE_TEST_CLIP ges_test_clip_get_type()
#define GES_TEST_CLIP(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TEST_CLIP, GESTestClip))
#define GES_TEST_CLIP_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TEST_CLIP, GESTestClipClass))
#define GES_IS_TEST_CLIP(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TEST_CLIP))
#define GES_IS_TEST_CLIP_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TEST_CLIP))
#define GES_TEST_CLIP_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TEST_CLIP, GESTestClipClass))
typedef struct _GESTestClipPrivate GESTestClipPrivate;
/**
* GESTestClip:
*
*/
struct _GESTestClip {
GESSourceClip parent;
/*< private >*/
GESTestClipPrivate *priv;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
/**
* GESTestClipClass:
*/
struct _GESTestClipClass {
/*< private >*/
GESSourceClipClass parent_class;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
GType ges_test_clip_get_type (void);
void
ges_test_clip_set_mute (GESTestClip * self, gboolean mute);
void
ges_test_clip_set_vpattern (GESTestClip * self,
GESVideoTestPattern vpattern);
void
ges_test_clip_set_frequency (GESTestClip * self, gdouble freq);
void
ges_test_clip_set_volume (GESTestClip * self,
gdouble volume);
GESVideoTestPattern
ges_test_clip_get_vpattern (GESTestClip * self);
gboolean ges_test_clip_is_muted (GESTestClip * self);
gdouble ges_test_clip_get_frequency (GESTestClip * self);
gdouble ges_test_clip_get_volume (GESTestClip * self);
GESTestClip* ges_test_clip_new (void);
GESTestClip* ges_test_clip_new_for_nick(gchar * nick);
G_END_DECLS
#endif /* _GES_TL_TESTSOURCE */

View file

@ -1,109 +0,0 @@
/* GStreamer Editing Services
* Copyright (C) 2009 Brandon Lewis <brandon.lewis@collabora.co.uk>
* 2009 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., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TL_TESTSOURCE
#define _GES_TL_TESTSOURCE
#include <glib-object.h>
#include <ges/ges-enums.h>
#include <ges/ges-types.h>
#include <ges/ges-source-clip.h>
#include <ges/ges-track.h>
G_BEGIN_DECLS
#define GES_TYPE_TIMELINE_TEST_SOURCE ges_timeline_test_source_get_type()
#define GES_TIMELINE_TEST_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSource))
#define GES_TIMELINE_TEST_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSourceClass))
#define GES_IS_TIMELINE_TEST_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_TEST_SOURCE))
#define GES_IS_TIMELINE_TEST_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_TEST_SOURCE))
#define GES_TIMELINE_TEST_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TEST_SOURCE, GESTimelineTestSourceClass))
typedef struct _GESTimelineTestSourcePrivate GESTimelineTestSourcePrivate;
/**
* GESTimelineTestSource:
*
*/
struct _GESTimelineTestSource {
GESSourceClip parent;
/*< private >*/
GESTimelineTestSourcePrivate *priv;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
/**
* GESTimelineTestSourceClass:
*/
struct _GESTimelineTestSourceClass {
/*< private >*/
GESSourceClipClass parent_class;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
GType ges_timeline_test_source_get_type (void);
void
ges_timeline_test_source_set_mute (GESTimelineTestSource * self, gboolean mute);
void
ges_timeline_test_source_set_vpattern (GESTimelineTestSource * self,
GESVideoTestPattern vpattern);
void
ges_timeline_test_source_set_frequency (GESTimelineTestSource * self, gdouble freq);
void
ges_timeline_test_source_set_volume (GESTimelineTestSource * self,
gdouble volume);
GESVideoTestPattern
ges_timeline_test_source_get_vpattern (GESTimelineTestSource * self);
gboolean ges_timeline_test_source_is_muted (GESTimelineTestSource * self);
gdouble ges_timeline_test_source_get_frequency (GESTimelineTestSource * self);
gdouble ges_timeline_test_source_get_volume (GESTimelineTestSource * self);
GESTimelineTestSource* ges_timeline_test_source_new (void);
GESTimelineTestSource* ges_timeline_test_source_new_for_nick(gchar * nick);
G_END_DECLS
#endif /* _GES_TL_TESTSOURCE */

View file

@ -68,8 +68,8 @@ typedef struct _GESTransitionClipClass GESTransitionClipClass;
typedef struct _GESStandardTransitionClip GESStandardTransitionClip;
typedef struct _GESStandardTransitionClipClass GESStandardTransitionClipClass;
typedef struct _GESTimelineTestSource GESTimelineTestSource;
typedef struct _GESTimelineTestSourceClass GESTimelineTestSourceClass;
typedef struct _GESTestClip GESTestClip;
typedef struct _GESTestClipClass GESTestClipClass;
typedef struct _GESTitleClip GESTitleClip;
typedef struct _GESTitleClipClass GESTitleClipClass;

View file

@ -71,7 +71,7 @@ ges_init (void)
/* register timeline object classes with the system */
GES_TYPE_TIMELINE_TEST_SOURCE;
GES_TYPE_TEST_CLIP;
GES_TYPE_URI_CLIP;
GES_TYPE_TITLE_CLIP;
GES_TYPE_STANDARD_TRANSITION_CLIP;

View file

@ -33,7 +33,7 @@
#include <ges/ges-clip.h>
#include <ges/ges-timeline-pipeline.h>
#include <ges/ges-source-clip.h>
#include <ges/ges-timeline-test-source.h>
#include <ges/ges-test-clip.h>
#include <ges/ges-title-clip.h>
#include <ges/ges-operation-clip.h>
#include <ges/ges-effect-clip.h>

View file

@ -36,7 +36,7 @@ main (gint argc, gchar * argv[])
gst_init (&argc, &argv);
ges_init ();
asset = ges_asset_request (GES_TYPE_TIMELINE_TEST_SOURCE, NULL, NULL);
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
layer = ges_timeline_layer_new ();
timeline = ges_timeline_new_audio_video ();

View file

@ -23,11 +23,11 @@
GST_START_TEST (test_test_source_basic)
{
GESTimelineTestSource *source;
GESTestClip *source;
ges_init ();
source = ges_timeline_test_source_new ();
source = ges_test_clip_new ();
fail_unless (source != NULL);
g_object_unref (source);
@ -47,7 +47,7 @@ GST_START_TEST (test_test_source_properties)
fail_unless (track != NULL);
object = (GESClip *)
ges_timeline_test_source_new ();
ges_test_clip_new ();
fail_unless (object != NULL);
/* Set some properties */
@ -105,7 +105,7 @@ GST_START_TEST (test_test_source_in_layer)
GESTimelineLayer *layer;
GESTrack *a, *v;
GESTrackObject *trobj;
GESTimelineTestSource *source;
GESTestClip *source;
GESVideoTestPattern ptrn;
gdouble freq, volume;
@ -120,7 +120,7 @@ GST_START_TEST (test_test_source_in_layer)
ges_timeline_add_track (timeline, v);
ges_timeline_add_layer (timeline, layer);
source = ges_timeline_test_source_new_for_nick ((gchar *) "red");
source = ges_test_clip_new_for_nick ((gchar *) "red");
g_object_get (source, "vpattern", &ptrn, NULL);
assert_equals_int (ptrn, GES_VIDEO_TEST_PATTERN_RED);
@ -150,8 +150,8 @@ GST_START_TEST (test_test_source_in_layer)
trobj = ges_clip_find_track_object (GES_CLIP (source),
a, GES_TYPE_TRACK_AUDIO_TEST_SOURCE);
g_assert (GES_IS_TRACK_AUDIO_TEST_SOURCE (trobj));
assert_equals_float (ges_timeline_test_source_get_frequency (source), 440);
assert_equals_float (ges_timeline_test_source_get_volume (source), 0);
assert_equals_float (ges_test_clip_get_frequency (source), 440);
assert_equals_float (ges_test_clip_get_volume (source), 0);
g_object_get (source, "freq", &freq, "volume", &volume, NULL);
assert_equals_float (freq, 440);
@ -251,7 +251,7 @@ GST_START_TEST (test_gap_filling_basic)
composition = find_composition (track);
fail_unless (composition != NULL);
object = GES_CLIP (ges_timeline_test_source_new ());
object = GES_CLIP (ges_test_clip_new ());
fail_unless (object != NULL);
/* Set some properties */
@ -274,7 +274,7 @@ GST_START_TEST (test_gap_filling_basic)
/* Check no gap were wrongly added */
assert_equals_int (g_list_length (GST_BIN_CHILDREN (composition)), 1);
object1 = GES_CLIP (ges_timeline_test_source_new ());
object1 = GES_CLIP (ges_test_clip_new ());
fail_unless (object1 != NULL);
g_object_set (object1, "start", (guint64) 15, "duration", (guint64) 5, NULL);
@ -305,7 +305,7 @@ GST_START_TEST (test_gap_filling_basic)
fail_unless (gap != NULL);
gap_object_check (gap, 5, 10, 0)
object2 = GES_CLIP (ges_timeline_test_source_new ());
object2 = GES_CLIP (ges_test_clip_new ());
fail_unless (object2 != NULL);
g_object_set (object2, "start", (guint64) 35, "duration", (guint64) 5, NULL);
trackobject2 = ges_clip_create_track_object (object2, track->type);

View file

@ -45,7 +45,7 @@ GST_START_TEST (test_add_effect_to_clip)
GESTimelineLayer *layer;
GESTrack *track_audio, *track_video;
GESTrackParseLaunchEffect *track_effect;
GESTimelineTestSource *source;
GESTestClip *source;
ges_init ();
@ -58,7 +58,7 @@ GST_START_TEST (test_add_effect_to_clip)
ges_timeline_add_track (timeline, track_video);
ges_timeline_add_layer (timeline, layer);
source = ges_timeline_test_source_new ();
source = ges_test_clip_new ();
g_object_set (source, "duration", 10 * GST_SECOND, NULL);
@ -92,7 +92,7 @@ GST_START_TEST (test_get_effects_from_tl)
GESTimelineLayer *layer;
GESTrack *track_video;
GESTrackParseLaunchEffect *track_effect, *track_effect1, *track_effect2;
GESTimelineTestSource *source;
GESTestClip *source;
GList *effects, *tmp = NULL;
gint effect_prio = -1;
guint clip_height = 0;
@ -106,7 +106,7 @@ GST_START_TEST (test_get_effects_from_tl)
ges_timeline_add_track (timeline, track_video);
ges_timeline_add_layer (timeline, layer);
source = ges_timeline_test_source_new ();
source = ges_test_clip_new ();
g_object_set (source, "duration", 10 * GST_SECOND, NULL);

View file

@ -284,7 +284,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
ges_init ();
asset = ges_asset_request (GES_TYPE_TIMELINE_TEST_SOURCE, NULL, NULL);
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
fail_unless (GES_IS_ASSET (asset));
GST_DEBUG ("Create timeline");
@ -329,7 +329,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
GST_DEBUG ("Checking that a transition has been added");
objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (objects->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
transition = objects->next->data;
assert_is_type (transition, GES_TYPE_STANDARD_TRANSITION_CLIP);
@ -359,7 +359,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (objects->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
transition = objects->next->data;
assert_is_type (transition, GES_TYPE_STANDARD_TRANSITION_CLIP);
@ -483,7 +483,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
src2 =
GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 1250, 0,
1000, 1, GES_TRACK_TYPE_UNKNOWN));
assert_is_type (src2, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (src2, GES_TYPE_TEST_CLIP);
/* 600____src___1100
* 500___________src1________1250
@ -517,7 +517,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 7);
assert_is_type (objects->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
fail_unless (objects->data == src1);
current = current->next;
@ -592,7 +592,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 5);
assert_is_type (objects->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
fail_unless (current->data == src1);
current = current->next;
@ -633,7 +633,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
current = objects = ges_timeline_layer_get_objects (layer);
current = objects;
assert_equals_int (g_list_length (objects), 7);
assert_is_type (objects->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
fail_unless (current->data == src1);
current = current->next;
@ -683,7 +683,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
ges_init ();
asset = ges_asset_request (GES_TYPE_TIMELINE_TEST_SOURCE, NULL, NULL);
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
fail_unless (GES_IS_ASSET (asset));
GST_DEBUG ("Create timeline");
@ -733,7 +733,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking that a transition has been added");
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
transition = current->data;
@ -755,7 +755,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Adding object 3 from 500 -- 1000 to second layer");
src3 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer1, asset, 500,
0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
assert_is_type (src3, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (src3, GES_TYPE_TEST_CLIP);
/* 500__transition__1000
* 0___________src_________1000
@ -777,7 +777,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking transitions on first layer");
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
transition = current->data;
@ -825,7 +825,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking transitions on first layer");
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
transition = current->data;
@ -844,7 +844,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking transitions has been added on second layer");
current = objects = ges_timeline_layer_get_objects (layer1);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
transition = current->data;
@ -883,7 +883,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking transitions on first layer");
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
transition = current->data;
@ -1019,8 +1019,8 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking second layer");
current = objects = ges_timeline_layer_get_objects (layer1);
assert_equals_int (g_list_length (objects), 2);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->next->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
assert_is_type (current->next->data, GES_TYPE_TEST_CLIP);
g_list_free_full (objects, gst_object_unref);
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
@ -1085,7 +1085,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking second layer");
current = objects = ges_timeline_layer_get_objects (layer1);
assert_equals_int (g_list_length (objects), 1);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
g_list_free_full (objects, gst_object_unref);
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
@ -1150,7 +1150,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
GST_DEBUG ("Checking second layer");
current = objects = ges_timeline_layer_get_objects (layer1);
assert_equals_int (g_list_length (objects), 1);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
g_list_free_full (objects, gst_object_unref);
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
@ -1170,7 +1170,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
ges_init ();
asset = ges_asset_request (GES_TYPE_TIMELINE_TEST_SOURCE, NULL, NULL);
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
transition_asset =
ges_asset_request (GES_TYPE_STANDARD_TRANSITION_CLIP, "crossfade", NULL);
fail_unless (GES_IS_ASSET (asset));
@ -1222,7 +1222,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
GST_DEBUG ("Checking that no transition has been added");
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 4);
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
g_list_free_full (objects, gst_object_unref);
GST_DEBUG ("Adding transition from 1000 -- 1500 to layer");
@ -1245,13 +1245,13 @@ GST_START_TEST (test_layer_activate_automatic_transition)
current = objects = ges_timeline_layer_get_objects (layer);
assert_equals_int (g_list_length (objects), 5);
current = current->next;
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
assert_is_type (current->data, GES_TYPE_STANDARD_TRANSITION_CLIP);
current = current->next;
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
current = current->next;
assert_is_type (current->data, GES_TYPE_TIMELINE_TEST_SOURCE);
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
g_list_free_full (objects, gst_object_unref);
ges_timeline_layer_set_auto_transition (layer, TRUE);

View file

@ -86,7 +86,7 @@ GST_START_TEST (test_project_add_assets)
g_signal_connect (project, "asset-removed",
(GCallback) asset_removed_add_cb, &removed_cb_called);
asset = ges_asset_request (GES_TYPE_TIMELINE_TEST_SOURCE, NULL, NULL);
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
fail_unless (GES_IS_ASSET (asset));
fail_unless (ges_project_add_asset (project, asset));

View file

@ -27,7 +27,7 @@ GST_START_TEST (test_text_properties_in_layer)
GESTimelineLayer *layer;
GESTrack *a, *v;
GESTrackObject *trobj;
GESTimelineTestSource *source;
GESTestClip *source;
gchar *text;
gint halign, valign;
@ -42,7 +42,7 @@ GST_START_TEST (test_text_properties_in_layer)
ges_timeline_add_track (timeline, v);
ges_timeline_add_layer (timeline, layer);
source = ges_timeline_test_source_new ();
source = ges_test_clip_new ();
g_object_set (source, "duration", (guint64) GST_SECOND, NULL);

View file

@ -360,7 +360,7 @@ layer_object_added_cb (GESTimelineLayer * layer, GESClip * object, App * app)
title_source_text_changed_cb (object, NULL, app);
}
else if (GES_IS_TIMELINE_TEST_SOURCE (object)) {
else if (GES_IS_TEST_CLIP (object)) {
gtk_list_store_set (app->model, &iter, 2, object, 0, "Test Source", -1);
}
@ -638,10 +638,10 @@ connect_to_test_source (GESClip * object, App * app)
GObjectClass *klass;
GParamSpecDouble *pspec;
GESTimelineTestSource *obj;
obj = GES_TIMELINE_TEST_SOURCE (object);
GESTestClip *obj;
obj = GES_TEST_CLIP (object);
gtk_combo_box_set_active (app->background_type,
ges_timeline_test_source_get_vpattern (obj));
ges_test_clip_get_vpattern (obj));
g_signal_connect (G_OBJECT (object), "notify::volume",
G_CALLBACK (test_source_notify_volume_changed_cb), app);
@ -655,8 +655,7 @@ connect_to_test_source (GESClip * object, App * app)
pspec = G_PARAM_SPEC_DOUBLE (g_object_class_find_property (klass, "freq"));
gtk_spin_button_set_range (app->frequency, pspec->minimum, pspec->maximum);
gtk_spin_button_set_value (app->frequency,
ges_timeline_test_source_get_frequency (GES_TIMELINE_TEST_SOURCE
(object)));
ges_test_clip_get_frequency (GES_TEST_CLIP (object)));
}
static void
@ -683,7 +682,7 @@ connect_to_object (GESClip * object, App * app)
connect_to_filesource (object, app);
} else if (GES_IS_TITLE_CLIP (object)) {
connect_to_title_source (object, app);
} else if (GES_IS_TIMELINE_TEST_SOURCE (object)) {
} else if (GES_IS_TEST_CLIP (object)) {
connect_to_test_source (object, app);
}
@ -697,7 +696,7 @@ disconnect_from_object (GESClip * object, App * app)
disconnect_from_filesource (object, app);
} else if (GES_IS_TITLE_CLIP (object)) {
disconnect_from_title_source (object, app);
} else if (GES_IS_TIMELINE_TEST_SOURCE (object)) {
} else if (GES_IS_TEST_CLIP (object)) {
disconnect_from_test_source (object, app);
}
}
@ -706,8 +705,8 @@ static GtkListStore *
get_video_patterns (void)
{
GEnumClass *enum_class;
GESTimelineTestSource *tr;
GESTimelineTestSourceClass *klass;
GESTestClip *tr;
GESTestClipClass *klass;
GParamSpec *pspec;
GEnumValue *v;
GtkListStore *m;
@ -715,8 +714,8 @@ get_video_patterns (void)
m = gtk_list_store_new (1, G_TYPE_STRING);
tr = ges_timeline_test_source_new ();
klass = GES_TIMELINE_TEST_SOURCE_GET_CLASS (tr);
tr = ges_test_clip_new ();
klass = GES_TEST_CLIP_GET_CLASS (tr);
pspec = g_object_class_find_property (G_OBJECT_CLASS (klass), "vpattern");
@ -1203,7 +1202,7 @@ app_add_test (App * app)
GST_DEBUG ("adding test");
obj = GES_CLIP (ges_timeline_test_source_new ());
obj = GES_CLIP (ges_test_clip_new ());
g_object_set (G_OBJECT (obj), "duration", GST_SECOND, NULL);
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
@ -1611,7 +1610,7 @@ app_selection_changed_cb (GtkTreeSelection * selection, App * app)
app->selected_type != G_TYPE_INVALID);
gtk_widget_set_visible (app->background_properties,
app->selected_type == GES_TYPE_TIMELINE_TEST_SOURCE);
app->selected_type == GES_TYPE_TEST_CLIP);
}
gboolean

View file

@ -49,8 +49,8 @@ main (int argc, gchar ** argv)
if (!ges_timeline_add_layer (timeline, layer))
return -1;
/* We create a simple asset able to extract GESTimelineTestSource */
src_asset = ges_asset_request (GES_TYPE_TIMELINE_TEST_SOURCE, NULL, NULL);
/* We create a simple asset able to extract GESTestClip */
src_asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
/* Add sources to our layer */
ges_timeline_layer_add_asset (layer, src_asset, 0, 0, GST_SECOND, 1,

View file

@ -92,7 +92,7 @@ create_timeline (void)
return NULL;
/* Add the main audio/video file */
src = GES_CLIP (ges_timeline_test_source_new ());
src = GES_CLIP (ges_test_clip_new ());
g_object_set (src,
"vpattern", GES_VIDEO_TEST_PATTERN_SNOW,
"duration", 10 * GST_SECOND, NULL);

View file

@ -160,7 +160,7 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
guint64 duration = str_to_time (argv[(i * 3) + 2]);
if (!g_strcmp0 ("+pattern", source)) {
obj = GES_CLIP (ges_timeline_test_source_new_for_nick (arg0));
obj = GES_CLIP (ges_test_clip_new_for_nick (arg0));
if (!obj) {
g_error ("%s is an invalid pattern name!\n", arg0);
goto build_failure;