Rename GESTrackAudioTransition to GESAudioTransition

This commit is contained in:
Thibault Saunier 2013-01-27 12:44:13 -03:00
parent ecc9eb3020
commit 997df180ea
10 changed files with 83 additions and 85 deletions

View file

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

View file

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

View file

@ -211,20 +211,20 @@ ges_transition_get_type
</SECTION>
<SECTION>
<FILE>ges-track-audio-transition</FILE>
<TITLE>GESTrackAudioTransition</TITLE>
GESTrackAudioTransition
ges_track_audio_transition_new
<FILE>ges-audio-transition</FILE>
<TITLE>GESAudioTransition</TITLE>
GESAudioTransition
ges_audio_transition_new
<SUBSECTION Standard>
GESTrackAudioTransitionClass
GESTrackAudioTransitionPrivate
GES_IS_TRACK_AUDIO_TRANSITION
ges_track_audio_transition_get_type
GES_IS_TRACK_AUDIO_TRANSITION_CLASS
GES_TRACK_AUDIO_TRANSITION
GES_TRACK_AUDIO_TRANSITION_CLASS
GES_TRACK_AUDIO_TRANSITION_GET_CLASS
GES_TYPE_TRACK_AUDIO_TRANSITION
GESAudioTransitionClass
GESAudioTransitionPrivate
GES_IS_AUDIO_TRANSITION
ges_audio_transition_get_type
GES_IS_AUDIO_TRANSITION_CLASS
GES_AUDIO_TRANSITION
GES_AUDIO_TRANSITION_CLASS
GES_AUDIO_TRANSITION_GET_CLASS
GES_TYPE_AUDIO_TRANSITION
</SECTION>
<SECTION>

View file

@ -22,7 +22,7 @@ ges_uri_clip_get_type
ges_overlay_text_clip_get_type
ges_title_clip_get_type
ges_audio_test_source_get_type
ges_track_audio_transition_get_type
ges_audio_transition_get_type
ges_track_filesource_get_type
ges_track_get_type
ges_image_source_get_type

View file

@ -36,7 +36,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
ges-uri-source.c \
ges-image-source.c \
ges-transition.c \
ges-track-audio-transition.c \
ges-audio-transition.c \
ges-video-transition.c \
ges-video-test-source.c \
ges-audio-test-source.c \
@ -92,7 +92,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-uri-source.h \
ges-image-source.h \
ges-transition.h \
ges-track-audio-transition.h \
ges-audio-transition.h \
ges-video-transition.h \
ges-video-test-source.h \
ges-audio-test-source.h \

View file

@ -19,20 +19,19 @@
*/
/**
* SECTION:ges-track-audio-transition
* SECTION:ges-audio-transition
* @short_description: implements audio crossfade transition
*/
#include "ges-internal.h"
#include "ges-track-element.h"
#include "ges-track-audio-transition.h"
#include "ges-audio-transition.h"
#include <gst/controller/gstdirectcontrolbinding.h>
G_DEFINE_TYPE (GESTrackAudioTransition, ges_track_audio_transition,
GES_TYPE_TRANSITION);
G_DEFINE_TYPE (GESAudioTransition, ges_audio_transition, GES_TYPE_TRANSITION);
struct _GESTrackAudioTransitionPrivate
struct _GESAudioTransitionPrivate
{
/* these enable volume interpolation. Unlike video, both inputs are adjusted
* simultaneously */
@ -51,57 +50,56 @@ enum
#define fast_element_link(a,b) gst_element_link_pads_full((a),"src",(b),"sink",GST_PAD_LINK_CHECK_NOTHING)
static void
ges_track_audio_transition_duration_changed (GESTrackElement * self, guint64);
ges_audio_transition_duration_changed (GESTrackElement * self, guint64);
static GstElement *ges_track_audio_transition_create_element (GESTrackElement
* self);
static GstElement *ges_audio_transition_create_element (GESTrackElement * self);
static void ges_track_audio_transition_dispose (GObject * object);
static void ges_audio_transition_dispose (GObject * object);
static void ges_track_audio_transition_finalize (GObject * object);
static void ges_audio_transition_finalize (GObject * object);
static void ges_track_audio_transition_get_property (GObject * object, guint
static void ges_audio_transition_get_property (GObject * object, guint
property_id, GValue * value, GParamSpec * pspec);
static void ges_track_audio_transition_set_property (GObject * object, guint
static void ges_audio_transition_set_property (GObject * object, guint
property_id, const GValue * value, GParamSpec * pspec);
static void
ges_track_audio_transition_class_init (GESTrackAudioTransitionClass * klass)
ges_audio_transition_class_init (GESAudioTransitionClass * klass)
{
GObjectClass *object_class;
GESTrackElementClass *toclass;
g_type_class_add_private (klass, sizeof (GESTrackAudioTransitionPrivate));
g_type_class_add_private (klass, sizeof (GESAudioTransitionPrivate));
object_class = G_OBJECT_CLASS (klass);
toclass = GES_TRACK_ELEMENT_CLASS (klass);
object_class->get_property = ges_track_audio_transition_get_property;
object_class->set_property = ges_track_audio_transition_set_property;
object_class->dispose = ges_track_audio_transition_dispose;
object_class->finalize = ges_track_audio_transition_finalize;
object_class->get_property = ges_audio_transition_get_property;
object_class->set_property = ges_audio_transition_set_property;
object_class->dispose = ges_audio_transition_dispose;
object_class->finalize = ges_audio_transition_finalize;
toclass->duration_changed = ges_track_audio_transition_duration_changed;
toclass->duration_changed = ges_audio_transition_duration_changed;
toclass->create_element = ges_track_audio_transition_create_element;
toclass->create_element = ges_audio_transition_create_element;
}
static void
ges_track_audio_transition_init (GESTrackAudioTransition * self)
ges_audio_transition_init (GESAudioTransition * self)
{
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_TRACK_AUDIO_TRANSITION, GESTrackAudioTransitionPrivate);
GES_TYPE_AUDIO_TRANSITION, GESAudioTransitionPrivate);
}
static void
ges_track_audio_transition_dispose (GObject * object)
ges_audio_transition_dispose (GObject * object)
{
GESTrackAudioTransition *self;
GESAudioTransition *self;
self = GES_TRACK_AUDIO_TRANSITION (object);
self = GES_AUDIO_TRANSITION (object);
if (self->priv->a_control_source) {
if (self->priv->a_control_source)
@ -115,17 +113,17 @@ ges_track_audio_transition_dispose (GObject * object)
self->priv->b_control_source = NULL;
}
G_OBJECT_CLASS (ges_track_audio_transition_parent_class)->dispose (object);
G_OBJECT_CLASS (ges_audio_transition_parent_class)->dispose (object);
}
static void
ges_track_audio_transition_finalize (GObject * object)
ges_audio_transition_finalize (GObject * object)
{
G_OBJECT_CLASS (ges_track_audio_transition_parent_class)->finalize (object);
G_OBJECT_CLASS (ges_audio_transition_parent_class)->finalize (object);
}
static void
ges_track_audio_transition_get_property (GObject * object,
ges_audio_transition_get_property (GObject * object,
guint property_id, GValue * value, GParamSpec * pspec)
{
switch (property_id) {
@ -135,7 +133,7 @@ ges_track_audio_transition_get_property (GObject * object,
}
static void
ges_track_audio_transition_set_property (GObject * object,
ges_audio_transition_set_property (GObject * object,
guint property_id, const GValue * value, GParamSpec * pspec)
{
switch (property_id) {
@ -161,9 +159,9 @@ link_element_to_mixer_with_volume (GstBin * bin, GstElement * element,
}
static GstElement *
ges_track_audio_transition_create_element (GESTrackElement * object)
ges_audio_transition_create_element (GESTrackElement * object)
{
GESTrackAudioTransition *self;
GESAudioTransition *self;
GstElement *topbin, *iconva, *iconvb, *oconv;
GObject *atarget, *btarget = NULL;
const gchar *propname = "volume";
@ -171,7 +169,7 @@ ges_track_audio_transition_create_element (GESTrackElement * object)
GstPad *sinka_target, *sinkb_target, *src_target, *sinka, *sinkb, *src;
GstControlSource *acontrol_source, *bcontrol_source;
self = GES_TRACK_AUDIO_TRANSITION (object);
self = GES_AUDIO_TRANSITION (object);
GST_LOG ("creating an audio bin");
@ -230,14 +228,14 @@ ges_track_audio_transition_create_element (GESTrackElement * object)
}
static void
ges_track_audio_transition_duration_changed (GESTrackElement * object,
ges_audio_transition_duration_changed (GESTrackElement * object,
guint64 duration)
{
GESTrackAudioTransition *self;
GESAudioTransition *self;
GstElement *gnlobj = ges_track_element_get_gnlobject (object);
GstTimedValueControlSource *ta, *tb;
self = GES_TRACK_AUDIO_TRANSITION (object);
self = GES_AUDIO_TRANSITION (object);
GST_LOG ("updating controller: gnlobj (%p)", gnlobj);
@ -263,15 +261,15 @@ ges_track_audio_transition_duration_changed (GESTrackElement * object,
}
/**
* ges_track_audio_transition_new:
* ges_audio_transition_new:
*
* Creates a new #GESTrackAudioTransition.
* Creates a new #GESAudioTransition.
*
* Returns: The newly created #GESTrackAudioTransition.
* Returns: The newly created #GESAudioTransition.
*/
GESTrackAudioTransition *
ges_track_audio_transition_new (void)
GESAudioTransition *
ges_audio_transition_new (void)
{
return g_object_new (GES_TYPE_TRACK_AUDIO_TRANSITION, "track-type",
return g_object_new (GES_TYPE_AUDIO_TRANSITION, "track-type",
GES_TRACK_TYPE_AUDIO, NULL);
}

View file

@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _GES_TRACK_AUDIO_TRANSITION
#define _GES_TRACK_AUDIO_TRANSITION
#ifndef _GES_AUDIO_TRANSITION
#define _GES_AUDIO_TRANSITION
#include <glib-object.h>
#include <ges/ges-types.h>
@ -27,50 +27,50 @@
G_BEGIN_DECLS
#define GES_TYPE_TRACK_AUDIO_TRANSITION ges_track_audio_transition_get_type()
#define GES_TYPE_AUDIO_TRANSITION ges_audio_transition_get_type()
#define GES_TRACK_AUDIO_TRANSITION(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_AUDIO_TRANSITION, GESTrackAudioTransition))
#define GES_AUDIO_TRANSITION(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_AUDIO_TRANSITION, GESAudioTransition))
#define GES_TRACK_AUDIO_TRANSITION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_AUDIO_TRANSITION, GESTrackAudioTransitionClass))
#define GES_AUDIO_TRANSITION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_AUDIO_TRANSITION, GESAudioTransitionClass))
#define GES_IS_TRACK_AUDIO_TRANSITION(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_AUDIO_TRANSITION))
#define GES_IS_AUDIO_TRANSITION(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_AUDIO_TRANSITION))
#define GES_IS_TRACK_AUDIO_TRANSITION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_AUDIO_TRANSITION))
#define GES_IS_AUDIO_TRANSITION_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_AUDIO_TRANSITION))
#define GES_TRACK_AUDIO_TRANSITION_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_AUDIO_TRANSITION, GESTrackAudioTransitionClass))
#define GES_AUDIO_TRANSITION_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_AUDIO_TRANSITION, GESAudioTransitionClass))
typedef struct _GESTrackAudioTransitionPrivate GESTrackAudioTransitionPrivate;
typedef struct _GESAudioTransitionPrivate GESAudioTransitionPrivate;
/**
* GESTrackAudioTransition:
* GESAudioTransition:
*
*/
struct _GESTrackAudioTransition {
struct _GESAudioTransition {
GESTransition parent;
/*< private >*/
GESTrackAudioTransitionPrivate *priv;
GESAudioTransitionPrivate *priv;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
struct _GESTrackAudioTransitionClass {
struct _GESAudioTransitionClass {
GESTransitionClass parent_class;
/* Padding for API extension */
gpointer _ges_reserved[GES_PADDING];
};
GType ges_track_audio_transition_get_type (void);
GType ges_audio_transition_get_type (void);
GESTrackAudioTransition* ges_track_audio_transition_new (void);
GESAudioTransition* ges_audio_transition_new (void);
G_END_DECLS

View file

@ -323,7 +323,7 @@ ges_tl_transition_create_track_element (GESClip * obj, GESTrackType type)
if (supportedformats == GES_TRACK_TYPE_UNKNOWN ||
supportedformats & GES_TRACK_TYPE_AUDIO)
res = GES_TRACK_ELEMENT (ges_track_audio_transition_new ());
res = GES_TRACK_ELEMENT (ges_audio_transition_new ());
else
GST_DEBUG ("Not creating transition as audio track"
" not on supportedformats");

View file

@ -110,9 +110,9 @@ typedef struct _GESImageSourceClass GESImageSourceClass;
typedef struct _GESTransition GESTransition;
typedef struct _GESTransitionClass GESTransitionClass;
typedef struct _GESTrackAudioTransition GESTrackAudioTransition;
typedef struct _GESTrackAudioTransitionClass
GESTrackAudioTransitionClass;
typedef struct _GESAudioTransition GESAudioTransition;
typedef struct _GESAudioTransitionClass
GESAudioTransitionClass;
typedef struct _GESVideoTransition GESVideoTransition;
typedef struct _GESVideoTransitionClass

View file

@ -68,7 +68,7 @@
#include <ges/ges-text-overlay.h>
#include <ges/ges-transition.h>
#include <ges/ges-video-transition.h>
#include <ges/ges-track-audio-transition.h>
#include <ges/ges-audio-transition.h>
#include <ges/ges-base-effect.h>
#include <ges/ges-effect.h>
#include <ges/ges-formatter.h>