Rename GESTrackImageSource to GESImageSource

This commit is contained in:
Thibault Saunier 2013-01-26 14:21:56 -03:00
parent 037b71bc16
commit 6aa01b594a
11 changed files with 74 additions and 74 deletions

View file

@ -30,7 +30,7 @@ LOCAL_SRC_FILES := \
ges-source.c \
ges-track-operation.c \
ges-uri-source.c \
ges-track-image-source.c \
ges-image-source.c \
ges-track-transition.c \
ges-track-audio-transition.c \
ges-track-video-transition.c \

View file

@ -71,7 +71,7 @@ platform as well as Windows. It is released under the GNU Library General Public
<xi:include href="xml/ges-track-transition.xml"/>
<xi:include href="xml/ges-track-video-transition.xml"/>
<xi:include href="xml/ges-track-audio-transition.xml"/>
<xi:include href="xml/ges-track-image-source.xml"/>
<xi:include href="xml/ges-image-source.xml"/>
<xi:include href="xml/ges-effect.xml"/>
</chapter>

View file

@ -178,20 +178,20 @@ ges_track_filesource_get_type
</SECTION>
<SECTION>
<FILE>ges-track-image-source</FILE>
<TITLE>GESTrackImageSource</TITLE>
GESTrackImageSource
ges_track_image_source_new
<FILE>ges-image-source</FILE>
<TITLE>GESImageSource</TITLE>
GESImageSource
ges_image_source_new
<SUBSECTION Standard>
GESTrackImageSourcePrivate
GES_IS_TRACK_IMAGE_SOURCE
GES_IS_TRACK_IMAGE_SOURCE_CLASS
GES_TRACK_IMAGE_SOURCE
GES_TRACK_IMAGE_SOURCE_CLASS
GES_TRACK_IMAGE_SOURCE_GET_CLASS
GES_TYPE_TRACK_IMAGE_SOURCE
GESTrackImageSourceClass
ges_track_image_source_get_type
GESImageSourcePrivate
GES_IS_IMAGE_SOURCE
GES_IS_IMAGE_SOURCE_CLASS
GES_IMAGE_SOURCE
GES_IMAGE_SOURCE_CLASS
GES_IMAGE_SOURCE_GET_CLASS
GES_TYPE_IMAGE_SOURCE
GESImageSourceClass
ges_image_source_get_type
</SECTION>
<SECTION>

View file

@ -25,7 +25,7 @@ ges_audio_test_source_get_type
ges_track_audio_transition_get_type
ges_track_filesource_get_type
ges_track_get_type
ges_track_image_source_get_type
ges_image_source_get_type
ges_track_element_get_type
ges_base_effect_get_type
ges_effect_get_type

View file

@ -34,7 +34,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
ges-source.c \
ges-track-operation.c \
ges-uri-source.c \
ges-track-image-source.c \
ges-image-source.c \
ges-track-transition.c \
ges-track-audio-transition.c \
ges-track-video-transition.c \
@ -90,7 +90,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-source.h \
ges-track-operation.h \
ges-uri-source.h \
ges-track-image-source.h \
ges-image-source.h \
ges-track-transition.h \
ges-track-audio-transition.h \
ges-track-video-transition.h \

View file

@ -19,7 +19,7 @@
*/
/**
* SECTION:ges-track-image-source
* SECTION:ges-image-source
* @short_description: outputs the video stream from a media file as a still
* image.
*
@ -30,11 +30,11 @@
#include "ges-internal.h"
#include "ges-track-element.h"
#include "ges-track-image-source.h"
#include "ges-image-source.h"
G_DEFINE_TYPE (GESTrackImageSource, ges_track_image_source, GES_TYPE_SOURCE);
G_DEFINE_TYPE (GESImageSource, ges_image_source, GES_TYPE_SOURCE);
struct _GESTrackImageSourcePrivate
struct _GESImageSourcePrivate
{
/* Dummy variable */
void *nothing;
@ -47,10 +47,10 @@ enum
};
static void
ges_track_image_source_get_property (GObject * object, guint property_id,
ges_image_source_get_property (GObject * object, guint property_id,
GValue * value, GParamSpec * pspec)
{
GESTrackImageSource *uriclip = GES_TRACK_IMAGE_SOURCE (object);
GESImageSource *uriclip = GES_IMAGE_SOURCE (object);
switch (property_id) {
case PROP_URI:
@ -62,10 +62,10 @@ ges_track_image_source_get_property (GObject * object, guint property_id,
}
static void
ges_track_image_source_set_property (GObject * object, guint property_id,
ges_image_source_set_property (GObject * object, guint property_id,
const GValue * value, GParamSpec * pspec)
{
GESTrackImageSource *uriclip = GES_TRACK_IMAGE_SOURCE (object);
GESImageSource *uriclip = GES_IMAGE_SOURCE (object);
switch (property_id) {
case PROP_URI:
@ -77,14 +77,14 @@ ges_track_image_source_set_property (GObject * object, guint property_id,
}
static void
ges_track_image_source_dispose (GObject * object)
ges_image_source_dispose (GObject * object)
{
GESTrackImageSource *uriclip = GES_TRACK_IMAGE_SOURCE (object);
GESImageSource *uriclip = GES_IMAGE_SOURCE (object);
if (uriclip->uri)
g_free (uriclip->uri);
G_OBJECT_CLASS (ges_track_image_source_parent_class)->dispose (object);
G_OBJECT_CLASS (ges_image_source_parent_class)->dispose (object);
}
static void
@ -110,7 +110,7 @@ pad_added_cb (GstElement * timeline, GstPad * pad, GstElement * scale)
}
static GstElement *
ges_track_image_source_create_element (GESTrackElement * object)
ges_image_source_create_element (GESTrackElement * object)
{
GstElement *bin, *source, *scale, *freeze, *iconv;
GstPad *src, *target;
@ -138,7 +138,7 @@ ges_track_image_source_create_element (GESTrackElement * object)
gst_element_add_pad (bin, src);
gst_object_unref (target);
g_object_set (source, "uri", ((GESTrackImageSource *) object)->uri, NULL);
g_object_set (source, "uri", ((GESImageSource *) object)->uri, NULL);
g_signal_connect (G_OBJECT (source), "pad-added",
G_CALLBACK (pad_added_cb), scale);
@ -147,46 +147,46 @@ ges_track_image_source_create_element (GESTrackElement * object)
}
static void
ges_track_image_source_class_init (GESTrackImageSourceClass * klass)
ges_image_source_class_init (GESImageSourceClass * klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GESTrackElementClass *gesobj_class = GES_TRACK_ELEMENT_CLASS (klass);
g_type_class_add_private (klass, sizeof (GESTrackImageSourcePrivate));
g_type_class_add_private (klass, sizeof (GESImageSourcePrivate));
object_class->get_property = ges_track_image_source_get_property;
object_class->set_property = ges_track_image_source_set_property;
object_class->dispose = ges_track_image_source_dispose;
object_class->get_property = ges_image_source_get_property;
object_class->set_property = ges_image_source_set_property;
object_class->dispose = ges_image_source_dispose;
/**
* GESTrackImageSource:uri:
* GESImageSource:uri:
*
* The location of the file/resource to use.
*/
g_object_class_install_property (object_class, PROP_URI,
g_param_spec_string ("uri", "URI", "uri of the resource",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
gesobj_class->create_element = ges_track_image_source_create_element;
gesobj_class->create_element = ges_image_source_create_element;
}
static void
ges_track_image_source_init (GESTrackImageSource * self)
ges_image_source_init (GESImageSource * self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_TRACK_IMAGE_SOURCE, GESTrackImageSourcePrivate);
GES_TYPE_IMAGE_SOURCE, GESImageSourcePrivate);
}
/**
* ges_track_image_source_new:
* ges_image_source_new:
* @uri: the URI the source should control
*
* Creates a new #GESTrackImageSource for the provided @uri.
* Creates a new #GESImageSource for the provided @uri.
*
* Returns: A new #GESTrackImageSource.
* Returns: A new #GESImageSource.
*/
GESTrackImageSource *
ges_track_image_source_new (gchar * uri)
GESImageSource *
ges_image_source_new (gchar * uri)
{
return g_object_new (GES_TYPE_TRACK_IMAGE_SOURCE, "uri", uri, "track-type",
return g_object_new (GES_TYPE_IMAGE_SOURCE, "uri", uri, "track-type",
GES_TRACK_TYPE_VIDEO, NULL);
}

View file

@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TRACK_IMAGE_SOURCE
#define _GES_TRACK_IMAGE_SOURCE
#ifndef _GES_IMAGE_SOURCE
#define _GES_IMAGE_SOURCE
#include <glib-object.h>
#include <ges/ges-types.h>
@ -27,52 +27,52 @@
G_BEGIN_DECLS
#define GES_TYPE_TRACK_IMAGE_SOURCE ges_track_image_source_get_type()
#define GES_TYPE_IMAGE_SOURCE ges_image_source_get_type()
#define GES_TRACK_IMAGE_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_IMAGE_SOURCE, GESTrackImageSource))
#define GES_IMAGE_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_IMAGE_SOURCE, GESImageSource))
#define GES_TRACK_IMAGE_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_IMAGE_SOURCE, GESTrackImageSourceClass))
#define GES_IMAGE_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_IMAGE_SOURCE, GESImageSourceClass))
#define GES_IS_TRACK_IMAGE_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_IMAGE_SOURCE))
#define GES_IS_IMAGE_SOURCE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_IMAGE_SOURCE))
#define GES_IS_TRACK_IMAGE_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_IMAGE_SOURCE))
#define GES_IS_IMAGE_SOURCE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_IMAGE_SOURCE))
#define GES_TRACK_IMAGE_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_IMAGE_SOURCE, GESTrackImageSourceClass))
#define GES_IMAGE_SOURCE_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_IMAGE_SOURCE, GESImageSourceClass))
typedef struct _GESTrackImageSourcePrivate GESTrackImageSourcePrivate;
typedef struct _GESImageSourcePrivate GESImageSourcePrivate;
/**
* GESTrackImageSource:
* GESImageSource:
*/
struct _GESTrackImageSource {
struct _GESImageSource {
/*< private >*/
GESSource parent;
gchar *uri;
GESTrackImageSourcePrivate *priv;
GESImageSourcePrivate *priv;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
struct _GESTrackImageSourceClass {
struct _GESImageSourceClass {
GESSourceClass parent_class;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
GType ges_track_image_source_get_type (void);
GType ges_image_source_get_type (void);
GESTrackImageSource* ges_track_image_source_new (gchar *uri);
GESImageSource* ges_image_source_new (gchar *uri);
G_END_DECLS
#endif /* _GES_TRACK_IMAGE_SOURCE */
#endif /* _GES_IMAGE_SOURCE */

View file

@ -104,8 +104,8 @@ typedef struct _GESEffectClass GESEffectClass;
typedef struct _GESUriSource GESUriSource;
typedef struct _GESUriSourceClass GESUriSourceClass;
typedef struct _GESTrackImageSource GESTrackImageSource;
typedef struct _GESTrackImageSourceClass GESTrackImageSourceClass;
typedef struct _GESImageSource GESImageSource;
typedef struct _GESImageSourceClass GESImageSourceClass;
typedef struct _GESTrackTransition GESTrackTransition;
typedef struct _GESTrackTransitionClass GESTrackTransitionClass;

View file

@ -33,7 +33,7 @@
#include "ges-uri-asset.h"
#include "ges-track-element-asset.h"
#include "ges-extractable.h"
#include "ges-track-image-source.h"
#include "ges-image-source.h"
#include "ges-audio-test-source.h"
static void ges_extractable_interface_init (GESExtractableInterface * iface);
@ -401,8 +401,8 @@ ges_uri_clip_create_track_element (GESClip * obj, GESTrackType type)
GST_DEBUG ("Object is still image, not adding any audio source");
return NULL;
} else {
GST_DEBUG ("Creating a GESTrackImageSource");
res = (GESTrackElement *) ges_track_image_source_new (priv->uri);
GST_DEBUG ("Creating a GESImageSource");
res = (GESTrackElement *) ges_image_source_new (priv->uri);
}
} else {

View file

@ -61,7 +61,7 @@
#include <ges/ges-track-operation.h>
#include <ges/ges-uri-source.h>
#include <ges/ges-track-image-source.h>
#include <ges/ges-image-source.h>
#include <ges/ges-video-test-source.h>
#include <ges/ges-audio-test-source.h>
#include <ges/ges-track-title-source.h>

View file

@ -201,7 +201,7 @@ GST_START_TEST (test_filesource_images)
/* the returned track object should be an image source */
trobj = ges_clip_create_track_element (clip, v->type);
ges_clip_add_track_element (clip, trobj);
fail_unless (GES_IS_TRACK_IMAGE_SOURCE (trobj));
fail_unless (GES_IS_IMAGE_SOURCE (trobj));
/* The track holds a reference to the object
* and the timelinobject holds a reference to the object */