mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
Rename GESTrackVideoTestSource to GESVideoTestSource
This commit is contained in:
parent
5a5aae6e63
commit
273f27a269
13 changed files with 140 additions and 141 deletions
|
@ -34,7 +34,7 @@ LOCAL_SRC_FILES := \
|
|||
ges-track-transition.c \
|
||||
ges-track-audio-transition.c \
|
||||
ges-track-video-transition.c \
|
||||
ges-track-video-test-source.c \
|
||||
ges-video-test-source.c \
|
||||
ges-audio-test-source.c \
|
||||
ges-track-title-source.c \
|
||||
ges-track-text-overlay.c \
|
||||
|
|
|
@ -66,7 +66,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
|||
<xi:include href="xml/ges-track-filesource.xml"/>
|
||||
<xi:include href="xml/ges-track-title-source.xml"/>
|
||||
<xi:include href="xml/ges-audio-test-source.xml"/>
|
||||
<xi:include href="xml/ges-track-video-test-source.xml"/>
|
||||
<xi:include href="xml/ges-video-test-source.xml"/>
|
||||
<xi:include href="xml/ges-track-text-overlay.xml"/>
|
||||
<xi:include href="xml/ges-track-transition.xml"/>
|
||||
<xi:include href="xml/ges-track-video-transition.xml"/>
|
||||
|
|
|
@ -698,22 +698,22 @@ GES_TYPE_OVERLAY_TEXT_CLIP
|
|||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-track-video-test-source</FILE>
|
||||
<TITLE>GESTrackVideoTestSource</TITLE>
|
||||
GESTrackVideoTestSource
|
||||
ges_track_video_test_source_new
|
||||
ges_track_video_test_source_set_pattern
|
||||
ges_track_video_test_source_get_pattern
|
||||
<FILE>ges-video-test-source</FILE>
|
||||
<TITLE>GESVideoTestSource</TITLE>
|
||||
GESVideoTestSource
|
||||
ges_video_test_source_new
|
||||
ges_video_test_source_set_pattern
|
||||
ges_video_test_source_get_pattern
|
||||
<SUBSECTION Standard>
|
||||
GESTrackVideoTestSourceClass
|
||||
GESTrackVideoTestSourcePrivate
|
||||
ges_track_video_test_source_get_type
|
||||
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
|
||||
GESVideoTestSourceClass
|
||||
GESVideoTestSourcePrivate
|
||||
ges_video_test_source_get_type
|
||||
GES_IS_VIDEO_TEST_SOURCE
|
||||
GES_IS_VIDEO_TEST_SOURCE_CLASS
|
||||
GES_VIDEO_TEST_SOURCE
|
||||
GES_VIDEO_TEST_SOURCE_CLASS
|
||||
GES_VIDEO_TEST_SOURCE_GET_CLASS
|
||||
GES_TYPE_VIDEO_TEST_SOURCE
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -35,7 +35,7 @@ ges_track_text_overlay_get_type
|
|||
ges_track_title_source_get_type
|
||||
ges_track_transition_get_type
|
||||
%ges_track_type_get_type
|
||||
ges_track_video_test_source_get_type
|
||||
ges_video_test_source_get_type
|
||||
ges_track_video_transition_get_type
|
||||
ges_project_get_type
|
||||
%ges_video_test_pattern_get_type
|
||||
|
|
|
@ -38,7 +38,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
|
|||
ges-track-transition.c \
|
||||
ges-track-audio-transition.c \
|
||||
ges-track-video-transition.c \
|
||||
ges-track-video-test-source.c \
|
||||
ges-video-test-source.c \
|
||||
ges-audio-test-source.c \
|
||||
ges-track-title-source.c \
|
||||
ges-track-text-overlay.c \
|
||||
|
@ -94,7 +94,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
|||
ges-track-transition.h \
|
||||
ges-track-audio-transition.h \
|
||||
ges-track-video-transition.h \
|
||||
ges-track-video-test-source.h \
|
||||
ges-video-test-source.h \
|
||||
ges-audio-test-source.h \
|
||||
ges-track-title-source.h \
|
||||
ges-track-text-overlay.h \
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "ges-test-clip.h"
|
||||
#include "ges-source-clip.h"
|
||||
#include "ges-track-element.h"
|
||||
#include "ges-track-video-test-source.h"
|
||||
#include "ges-video-test-source.h"
|
||||
#include "ges-audio-test-source.h"
|
||||
#include <string.h>
|
||||
|
||||
|
@ -225,9 +225,9 @@ ges_test_clip_set_vpattern (GESTestClip * self, GESVideoTestPattern vpattern)
|
|||
trackelements = ges_clip_get_track_elements (object);
|
||||
for (tmp = trackelements; tmp; tmp = tmp->next) {
|
||||
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
|
||||
if (GES_IS_TRACK_VIDEO_TEST_SOURCE (trackelement))
|
||||
ges_track_video_test_source_set_pattern (
|
||||
(GESTrackVideoTestSource *) trackelement, vpattern);
|
||||
if (GES_IS_VIDEO_TEST_SOURCE (trackelement))
|
||||
ges_video_test_source_set_pattern (
|
||||
(GESVideoTestSource *) trackelement, vpattern);
|
||||
|
||||
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
|
||||
}
|
||||
|
@ -356,9 +356,9 @@ ges_test_clip_create_track_element (GESClip * obj, GESTrackType type)
|
|||
ges_track_type_name (type));
|
||||
|
||||
if (type == GES_TRACK_TYPE_VIDEO) {
|
||||
res = (GESTrackElement *) ges_track_video_test_source_new ();
|
||||
ges_track_video_test_source_set_pattern (
|
||||
(GESTrackVideoTestSource *) res, priv->vpattern);
|
||||
res = (GESTrackElement *) ges_video_test_source_new ();
|
||||
ges_video_test_source_set_pattern (
|
||||
(GESVideoTestSource *) res, priv->vpattern);
|
||||
} else if (type == GES_TRACK_TYPE_AUDIO) {
|
||||
res = (GESTrackElement *) ges_audio_test_source_new ();
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "ges-internal.h"
|
||||
#include "ges-track-element.h"
|
||||
#include "ges-track-title-source.h"
|
||||
#include "ges-track-video-test-source.h"
|
||||
#include "ges-video-test-source.h"
|
||||
|
||||
G_DEFINE_TYPE (GESTrackTitleSource, ges_track_title_source,
|
||||
GES_TYPE_TRACK_SOURCE);
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
/* GStreamer Editing Services
|
||||
* Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
|
||||
* 2010 Nokia Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_TRACK_VIDEO_TEST_SOURCE
|
||||
#define _GES_TRACK_VIDEO_TEST_SOURCE
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-enums.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-track-source.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GES_TYPE_TRACK_VIDEO_TEST_SOURCE ges_track_video_test_source_get_type()
|
||||
|
||||
#define GES_TRACK_VIDEO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSource))
|
||||
|
||||
#define GES_TRACK_VIDEO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSourceClass))
|
||||
|
||||
#define GES_IS_TRACK_VIDEO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE))
|
||||
|
||||
#define GES_IS_TRACK_VIDEO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_VIDEO_TEST_SOURCE))
|
||||
|
||||
#define GES_TRACK_VIDEO_TEST_SOURCE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSourceClass))
|
||||
|
||||
typedef struct _GESTrackVideoTestSourcePrivate GESTrackVideoTestSourcePrivate;
|
||||
|
||||
/**
|
||||
* GESTrackVideoTestSource:
|
||||
*/
|
||||
struct _GESTrackVideoTestSource {
|
||||
/*< private >*/
|
||||
GESTrackSource parent;
|
||||
|
||||
GESTrackVideoTestSourcePrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESTrackVideoTestSourceClass {
|
||||
GESTrackSourceClass parent_class;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_track_video_test_source_get_type (void);
|
||||
|
||||
GESTrackVideoTestSource* ges_track_video_test_source_new (void);
|
||||
|
||||
void
|
||||
ges_track_video_test_source_set_pattern(GESTrackVideoTestSource *self,
|
||||
GESVideoTestPattern pattern);
|
||||
GESVideoTestPattern
|
||||
ges_track_video_test_source_get_pattern (GESTrackVideoTestSource *source);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_TRACK_VIDEO_TEST_SOURCE */
|
|
@ -118,9 +118,9 @@ typedef struct _GESTrackVideoTransition GESTrackVideoTransition;
|
|||
typedef struct _GESTrackVideoTransitionClass
|
||||
GESTrackVideoTransitionClass;
|
||||
|
||||
typedef struct _GESTrackVideoTestSource GESTrackVideoTestSource;
|
||||
typedef struct _GESTrackVideoTestSourceClass
|
||||
GESTrackVideoTestSourceClass;
|
||||
typedef struct _GESVideoTestSource GESVideoTestSource;
|
||||
typedef struct _GESVideoTestSourceClass
|
||||
GESVideoTestSourceClass;
|
||||
|
||||
typedef struct _GESAudioTestSource GESAudioTestSource;
|
||||
typedef struct _GESAudioTestSourceClass
|
||||
|
|
|
@ -19,52 +19,51 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* SECTION:ges-track-video-test-source
|
||||
* SECTION:ges-video-test-source
|
||||
* @short_description: produce solid colors and patterns
|
||||
*/
|
||||
|
||||
#include "ges-internal.h"
|
||||
#include "ges-track-element.h"
|
||||
#include "ges-track-video-test-source.h"
|
||||
#include "ges-video-test-source.h"
|
||||
|
||||
G_DEFINE_TYPE (GESTrackVideoTestSource, ges_track_video_test_source,
|
||||
G_DEFINE_TYPE (GESVideoTestSource, ges_video_test_source,
|
||||
GES_TYPE_TRACK_SOURCE);
|
||||
|
||||
struct _GESTrackVideoTestSourcePrivate
|
||||
struct _GESVideoTestSourcePrivate
|
||||
{
|
||||
GESVideoTestPattern pattern;
|
||||
};
|
||||
|
||||
static GstElement *ges_track_video_test_source_create_element (GESTrackElement *
|
||||
static GstElement *ges_video_test_source_create_element (GESTrackElement *
|
||||
self);
|
||||
|
||||
static void
|
||||
ges_track_video_test_source_class_init (GESTrackVideoTestSourceClass * klass)
|
||||
ges_video_test_source_class_init (GESVideoTestSourceClass * klass)
|
||||
{
|
||||
GESTrackElementClass *track_element_class = GES_TRACK_ELEMENT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GESTrackVideoTestSourcePrivate));
|
||||
g_type_class_add_private (klass, sizeof (GESVideoTestSourcePrivate));
|
||||
|
||||
track_element_class->create_element =
|
||||
ges_track_video_test_source_create_element;
|
||||
track_element_class->create_element = ges_video_test_source_create_element;
|
||||
}
|
||||
|
||||
static void
|
||||
ges_track_video_test_source_init (GESTrackVideoTestSource * self)
|
||||
ges_video_test_source_init (GESVideoTestSource * self)
|
||||
{
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
GES_TYPE_TRACK_VIDEO_TEST_SOURCE, GESTrackVideoTestSourcePrivate);
|
||||
GES_TYPE_VIDEO_TEST_SOURCE, GESVideoTestSourcePrivate);
|
||||
|
||||
self->priv->pattern = GES_VIDEO_TEST_PATTERN_BLACK;
|
||||
}
|
||||
|
||||
static GstElement *
|
||||
ges_track_video_test_source_create_element (GESTrackElement * self)
|
||||
ges_video_test_source_create_element (GESTrackElement * self)
|
||||
{
|
||||
GstElement *ret;
|
||||
gint pattern;
|
||||
|
||||
pattern = ((GESTrackVideoTestSource *) self)->priv->pattern;
|
||||
pattern = ((GESVideoTestSource *) self)->priv->pattern;
|
||||
|
||||
ret = gst_element_factory_make ("videotestsrc", NULL);
|
||||
g_object_set (ret, "pattern", (gint) pattern, NULL);
|
||||
|
@ -73,14 +72,14 @@ ges_track_video_test_source_create_element (GESTrackElement * self)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_track_video_test_source_set_pattern:
|
||||
* @self: a #GESTrackVideoTestSource
|
||||
* ges_video_test_source_set_pattern:
|
||||
* @self: a #GESVideoTestSource
|
||||
* @pattern: a #GESVideoTestPattern
|
||||
*
|
||||
* Sets the source to use the given @pattern.
|
||||
*/
|
||||
void
|
||||
ges_track_video_test_source_set_pattern (GESTrackVideoTestSource
|
||||
ges_video_test_source_set_pattern (GESVideoTestSource
|
||||
* self, GESVideoTestPattern pattern)
|
||||
{
|
||||
GstElement *element =
|
||||
|
@ -93,7 +92,7 @@ ges_track_video_test_source_set_pattern (GESTrackVideoTestSource
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_track_video_test_source_get_pattern:
|
||||
* ges_video_test_source_get_pattern:
|
||||
* @source: a #GESVideoTestPattern
|
||||
*
|
||||
* Get the video pattern used by the @source.
|
||||
|
@ -101,22 +100,22 @@ ges_track_video_test_source_set_pattern (GESTrackVideoTestSource
|
|||
* Returns: The video pattern used by the @source.
|
||||
*/
|
||||
GESVideoTestPattern
|
||||
ges_track_video_test_source_get_pattern (GESTrackVideoTestSource * source)
|
||||
ges_video_test_source_get_pattern (GESVideoTestSource * source)
|
||||
{
|
||||
return source->priv->pattern;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_track_video_test_source_new:
|
||||
* ges_video_test_source_new:
|
||||
*
|
||||
* Creates a new #GESTrackVideoTestSource.
|
||||
* Creates a new #GESVideoTestSource.
|
||||
*
|
||||
* Returns: The newly created #GESTrackVideoTestSource, or %NULL if there was an
|
||||
* Returns: The newly created #GESVideoTestSource, or %NULL if there was an
|
||||
* error.
|
||||
*/
|
||||
GESTrackVideoTestSource *
|
||||
ges_track_video_test_source_new (void)
|
||||
GESVideoTestSource *
|
||||
ges_video_test_source_new (void)
|
||||
{
|
||||
return g_object_new (GES_TYPE_TRACK_VIDEO_TEST_SOURCE, "track-type",
|
||||
return g_object_new (GES_TYPE_VIDEO_TEST_SOURCE, "track-type",
|
||||
GES_TRACK_TYPE_VIDEO, NULL);
|
||||
}
|
82
ges/ges-video-test-source.h
Normal file
82
ges/ges-video-test-source.h
Normal file
|
@ -0,0 +1,82 @@
|
|||
/* GStreamer Editing Services
|
||||
* Copyright (C) 2010 Brandon Lewis <brandon.lewis@collabora.co.uk>
|
||||
* 2010 Nokia Corporation
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_VIDEO_TEST_SOURCE
|
||||
#define _GES_VIDEO_TEST_SOURCE
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-enums.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-track-source.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GES_TYPE_VIDEO_TEST_SOURCE ges_video_test_source_get_type()
|
||||
|
||||
#define GES_VIDEO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_VIDEO_TEST_SOURCE, GESVideoTestSource))
|
||||
|
||||
#define GES_VIDEO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_VIDEO_TEST_SOURCE, GESVideoTestSourceClass))
|
||||
|
||||
#define GES_IS_VIDEO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_VIDEO_TEST_SOURCE))
|
||||
|
||||
#define GES_IS_VIDEO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_VIDEO_TEST_SOURCE))
|
||||
|
||||
#define GES_VIDEO_TEST_SOURCE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_VIDEO_TEST_SOURCE, GESVideoTestSourceClass))
|
||||
|
||||
typedef struct _GESVideoTestSourcePrivate GESVideoTestSourcePrivate;
|
||||
|
||||
/**
|
||||
* GESVideoTestSource:
|
||||
*/
|
||||
struct _GESVideoTestSource {
|
||||
/*< private >*/
|
||||
GESTrackSource parent;
|
||||
|
||||
GESVideoTestSourcePrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESVideoTestSourceClass {
|
||||
GESTrackSourceClass parent_class;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_video_test_source_get_type (void);
|
||||
|
||||
GESVideoTestSource* ges_video_test_source_new (void);
|
||||
|
||||
void
|
||||
ges_video_test_source_set_pattern(GESVideoTestSource *self,
|
||||
GESVideoTestPattern pattern);
|
||||
GESVideoTestPattern
|
||||
ges_video_test_source_get_pattern (GESVideoTestSource *source);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_VIDEO_TEST_SOURCE */
|
|
@ -62,7 +62,7 @@
|
|||
|
||||
#include <ges/ges-track-filesource.h>
|
||||
#include <ges/ges-track-image-source.h>
|
||||
#include <ges/ges-track-video-test-source.h>
|
||||
#include <ges/ges-video-test-source.h>
|
||||
#include <ges/ges-audio-test-source.h>
|
||||
#include <ges/ges-track-title-source.h>
|
||||
#include <ges/ges-track-text-overlay.h>
|
||||
|
|
|
@ -136,11 +136,11 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
|
||||
trobj =
|
||||
ges_clip_find_track_element (GES_CLIP (source), v,
|
||||
GES_TYPE_TRACK_VIDEO_TEST_SOURCE);
|
||||
GES_TYPE_VIDEO_TEST_SOURCE);
|
||||
|
||||
g_assert (GES_IS_TRACK_VIDEO_TEST_SOURCE (trobj));
|
||||
g_assert (GES_IS_VIDEO_TEST_SOURCE (trobj));
|
||||
|
||||
ptrn = (ges_track_video_test_source_get_pattern ((GESTrackVideoTestSource *)
|
||||
ptrn = (ges_video_test_source_get_pattern ((GESVideoTestSource *)
|
||||
trobj));
|
||||
assert_equals_int (ptrn, GES_VIDEO_TEST_PATTERN_WHITE);
|
||||
g_object_unref (trobj);
|
||||
|
|
Loading…
Reference in a new issue