mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-27 03:23:16 +00:00
Rename GESTrackAudioTestSource to GESAudioTestSource
This commit is contained in:
parent
e24cccabfd
commit
5a5aae6e63
13 changed files with 169 additions and 181 deletions
|
@ -35,7 +35,7 @@ LOCAL_SRC_FILES := \
|
|||
ges-track-audio-transition.c \
|
||||
ges-track-video-transition.c \
|
||||
ges-track-video-test-source.c \
|
||||
ges-track-audio-test-source.c \
|
||||
ges-audio-test-source.c \
|
||||
ges-track-title-source.c \
|
||||
ges-track-text-overlay.c \
|
||||
ges-screenshot.c \
|
||||
|
|
|
@ -65,7 +65,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
|||
<title>Track objects</title>
|
||||
<xi:include href="xml/ges-track-filesource.xml"/>
|
||||
<xi:include href="xml/ges-track-title-source.xml"/>
|
||||
<xi:include href="xml/ges-track-audio-test-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-track-text-overlay.xml"/>
|
||||
<xi:include href="xml/ges-track-transition.xml"/>
|
||||
|
|
|
@ -717,24 +717,24 @@ GES_TYPE_TRACK_VIDEO_TEST_SOURCE
|
|||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-track-audio-test-source</FILE>
|
||||
<TITLE>GESTrackAudioTestSource</TITLE>
|
||||
GESTrackAudioTestSource
|
||||
ges_track_audio_test_source_new
|
||||
ges_track_audio_test_source_set_freq
|
||||
ges_track_audio_test_source_set_volume
|
||||
ges_track_audio_test_source_get_freq
|
||||
ges_track_audio_test_source_get_volume
|
||||
<FILE>ges-audio-test-source</FILE>
|
||||
<TITLE>GESAudioTestSource</TITLE>
|
||||
GESAudioTestSource
|
||||
ges_audio_test_source_new
|
||||
ges_audio_test_source_set_freq
|
||||
ges_audio_test_source_set_volume
|
||||
ges_audio_test_source_get_freq
|
||||
ges_audio_test_source_get_volume
|
||||
<SUBSECTION Standard>
|
||||
GESTrackAudioTestSourceClass
|
||||
GESTrackAudioTestSourcePrivate
|
||||
ges_track_audio_test_source_get_type
|
||||
GES_TRACK_AUDIO_TEST_SOURCE
|
||||
GES_TRACK_AUDIO_TEST_SOURCE_CLASS
|
||||
GES_TRACK_AUDIO_TEST_SOURCE_GET_CLASS
|
||||
GES_TYPE_TRACK_AUDIO_TEST_SOURCE
|
||||
GES_IS_TRACK_AUDIO_TEST_SOURCE
|
||||
GES_IS_TRACK_AUDIO_TEST_SOURCE_CLASS
|
||||
GESAudioTestSourceClass
|
||||
GESAudioTestSourcePrivate
|
||||
ges_audio_test_source_get_type
|
||||
GES_AUDIO_TEST_SOURCE
|
||||
GES_AUDIO_TEST_SOURCE_CLASS
|
||||
GES_AUDIO_TEST_SOURCE_GET_CLASS
|
||||
GES_TYPE_AUDIO_TEST_SOURCE
|
||||
GES_IS_AUDIO_TEST_SOURCE
|
||||
GES_IS_AUDIO_TEST_SOURCE_CLASS
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -21,7 +21,7 @@ ges_effect_clip_get_type
|
|||
ges_uri_clip_get_type
|
||||
ges_overlay_text_clip_get_type
|
||||
ges_title_clip_get_type
|
||||
ges_track_audio_test_source_get_type
|
||||
ges_audio_test_source_get_type
|
||||
ges_track_audio_transition_get_type
|
||||
ges_track_filesource_get_type
|
||||
ges_track_get_type
|
||||
|
|
|
@ -39,7 +39,7 @@ libges_@GST_API_VERSION@_la_SOURCES = \
|
|||
ges-track-audio-transition.c \
|
||||
ges-track-video-transition.c \
|
||||
ges-track-video-test-source.c \
|
||||
ges-track-audio-test-source.c \
|
||||
ges-audio-test-source.c \
|
||||
ges-track-title-source.c \
|
||||
ges-track-text-overlay.c \
|
||||
ges-base-effect.c \
|
||||
|
@ -95,7 +95,7 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
|||
ges-track-audio-transition.h \
|
||||
ges-track-video-transition.h \
|
||||
ges-track-video-test-source.h \
|
||||
ges-track-audio-test-source.h \
|
||||
ges-audio-test-source.h \
|
||||
ges-track-title-source.h \
|
||||
ges-track-text-overlay.h \
|
||||
ges-screenshot.h \
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* SECTION:ges-track-audio-test-source
|
||||
* SECTION:ges-audio-test-source
|
||||
* @short_description: produce a simple test waveform or silence
|
||||
*
|
||||
* Outputs a test audio stream using audiotestsrc. The default property values
|
||||
|
@ -29,12 +29,12 @@
|
|||
|
||||
#include "ges-internal.h"
|
||||
#include "ges-track-element.h"
|
||||
#include "ges-track-audio-test-source.h"
|
||||
#include "ges-audio-test-source.h"
|
||||
|
||||
G_DEFINE_TYPE (GESTrackAudioTestSource, ges_track_audio_test_source,
|
||||
G_DEFINE_TYPE (GESAudioTestSource, ges_audio_test_source,
|
||||
GES_TYPE_TRACK_SOURCE);
|
||||
|
||||
struct _GESTrackAudioTestSourcePrivate
|
||||
struct _GESAudioTestSourcePrivate
|
||||
{
|
||||
gdouble freq;
|
||||
gdouble volume;
|
||||
|
@ -45,41 +45,41 @@ enum
|
|||
PROP_0,
|
||||
};
|
||||
|
||||
static void ges_track_audio_test_source_get_property (GObject * object, guint
|
||||
static void ges_audio_test_source_get_property (GObject * object, guint
|
||||
property_id, GValue * value, GParamSpec * pspec);
|
||||
|
||||
static void ges_track_audio_test_source_set_property (GObject * object, guint
|
||||
static void ges_audio_test_source_set_property (GObject * object, guint
|
||||
property_id, const GValue * value, GParamSpec * pspec);
|
||||
|
||||
static GstElement *ges_track_audio_test_source_create_element (GESTrackElement *
|
||||
static GstElement *ges_audio_test_source_create_element (GESTrackElement *
|
||||
self);
|
||||
|
||||
static void
|
||||
ges_track_audio_test_source_class_init (GESTrackAudioTestSourceClass * klass)
|
||||
ges_audio_test_source_class_init (GESAudioTestSourceClass * klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GESTrackElementClass *bg_class = GES_TRACK_ELEMENT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GESTrackAudioTestSourcePrivate));
|
||||
g_type_class_add_private (klass, sizeof (GESAudioTestSourcePrivate));
|
||||
|
||||
object_class->get_property = ges_track_audio_test_source_get_property;
|
||||
object_class->set_property = ges_track_audio_test_source_set_property;
|
||||
object_class->get_property = ges_audio_test_source_get_property;
|
||||
object_class->set_property = ges_audio_test_source_set_property;
|
||||
|
||||
bg_class->create_element = ges_track_audio_test_source_create_element;
|
||||
bg_class->create_element = ges_audio_test_source_create_element;
|
||||
}
|
||||
|
||||
static void
|
||||
ges_track_audio_test_source_init (GESTrackAudioTestSource * self)
|
||||
ges_audio_test_source_init (GESAudioTestSource * self)
|
||||
{
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
GES_TYPE_TRACK_AUDIO_TEST_SOURCE, GESTrackAudioTestSourcePrivate);
|
||||
GES_TYPE_AUDIO_TEST_SOURCE, GESAudioTestSourcePrivate);
|
||||
|
||||
self->priv->freq = 440;
|
||||
self->priv->volume = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
ges_track_audio_test_source_get_property (GObject * object,
|
||||
ges_audio_test_source_get_property (GObject * object,
|
||||
guint property_id, GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (property_id) {
|
||||
|
@ -89,7 +89,7 @@ ges_track_audio_test_source_get_property (GObject * object,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_track_audio_test_source_set_property (GObject * object,
|
||||
ges_audio_test_source_set_property (GObject * object,
|
||||
guint property_id, const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (property_id) {
|
||||
|
@ -99,12 +99,12 @@ ges_track_audio_test_source_set_property (GObject * object,
|
|||
}
|
||||
|
||||
static GstElement *
|
||||
ges_track_audio_test_source_create_element (GESTrackElement * trksrc)
|
||||
ges_audio_test_source_create_element (GESTrackElement * trksrc)
|
||||
{
|
||||
GESTrackAudioTestSource *self;
|
||||
GESAudioTestSource *self;
|
||||
GstElement *ret;
|
||||
|
||||
self = (GESTrackAudioTestSource *) trksrc;
|
||||
self = (GESAudioTestSource *) trksrc;
|
||||
ret = gst_element_factory_make ("audiotestsrc", NULL);
|
||||
g_object_set (ret, "volume", (gdouble) self->priv->volume, "freq", (gdouble)
|
||||
self->priv->freq, NULL);
|
||||
|
@ -113,15 +113,14 @@ ges_track_audio_test_source_create_element (GESTrackElement * trksrc)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_track_audio_test_source_set_freq:
|
||||
* @self: a #GESTrackAudioTestSource
|
||||
* ges_audio_test_source_set_freq:
|
||||
* @self: a #GESAudioTestSource
|
||||
* @freq: The frequency you want to apply on @self
|
||||
*
|
||||
* Lets you set the frequency applied on the track object
|
||||
*/
|
||||
void
|
||||
ges_track_audio_test_source_set_freq (GESTrackAudioTestSource * self,
|
||||
gdouble freq)
|
||||
ges_audio_test_source_set_freq (GESAudioTestSource * self, gdouble freq)
|
||||
{
|
||||
GstElement *element =
|
||||
ges_track_element_get_element (GES_TRACK_ELEMENT (self));
|
||||
|
@ -132,15 +131,14 @@ ges_track_audio_test_source_set_freq (GESTrackAudioTestSource * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_track_audio_test_source_set_volume:
|
||||
* @self: a #GESTrackAudioTestSource
|
||||
* ges_audio_test_source_set_volume:
|
||||
* @self: a #GESAudioTestSource
|
||||
* @volume: The volume you want to apply on @self
|
||||
*
|
||||
* Sets the volume of the test audio signal.
|
||||
*/
|
||||
void
|
||||
ges_track_audio_test_source_set_volume (GESTrackAudioTestSource * self,
|
||||
gdouble volume)
|
||||
ges_audio_test_source_set_volume (GESAudioTestSource * self, gdouble volume)
|
||||
{
|
||||
GstElement *element =
|
||||
ges_track_element_get_element (GES_TRACK_ELEMENT (self));
|
||||
|
@ -151,43 +149,43 @@ ges_track_audio_test_source_set_volume (GESTrackAudioTestSource * self,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_track_audio_test_source_get_freq:
|
||||
* @self: a #GESTrackAudioTestSource
|
||||
* ges_audio_test_source_get_freq:
|
||||
* @self: a #GESAudioTestSource
|
||||
*
|
||||
* Get the current frequency of @self.
|
||||
*
|
||||
* Returns: The current frequency of @self.
|
||||
*/
|
||||
double
|
||||
ges_track_audio_test_source_get_freq (GESTrackAudioTestSource * self)
|
||||
ges_audio_test_source_get_freq (GESAudioTestSource * self)
|
||||
{
|
||||
return self->priv->freq;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_track_audio_test_source_get_volume:
|
||||
* @self: a #GESTrackAudioTestSource
|
||||
* ges_audio_test_source_get_volume:
|
||||
* @self: a #GESAudioTestSource
|
||||
*
|
||||
* Get the current volume of @self.
|
||||
*
|
||||
* Returns: The current volume of @self
|
||||
*/
|
||||
double
|
||||
ges_track_audio_test_source_get_volume (GESTrackAudioTestSource * self)
|
||||
ges_audio_test_source_get_volume (GESAudioTestSource * self)
|
||||
{
|
||||
return self->priv->volume;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_track_audio_test_source_new:
|
||||
* ges_audio_test_source_new:
|
||||
*
|
||||
* Creates a new #GESTrackAudioTestSource.
|
||||
* Creates a new #GESAudioTestSource.
|
||||
*
|
||||
* Returns: The newly created #GESTrackAudioTestSource.
|
||||
* Returns: The newly created #GESAudioTestSource.
|
||||
*/
|
||||
GESTrackAudioTestSource *
|
||||
ges_track_audio_test_source_new (void)
|
||||
GESAudioTestSource *
|
||||
ges_audio_test_source_new (void)
|
||||
{
|
||||
return g_object_new (GES_TYPE_TRACK_AUDIO_TEST_SOURCE, "track-type",
|
||||
return g_object_new (GES_TYPE_AUDIO_TEST_SOURCE, "track-type",
|
||||
GES_TRACK_TYPE_AUDIO, NULL);
|
||||
}
|
89
ges/ges-audio-test-source.h
Normal file
89
ges/ges-audio-test-source.h
Normal file
|
@ -0,0 +1,89 @@
|
|||
/* 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_AUDIO_TEST_SOURCE
|
||||
#define _GES_AUDIO_TEST_SOURCE
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-track-source.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GES_TYPE_AUDIO_TEST_SOURCE ges_audio_test_source_get_type()
|
||||
|
||||
#define GES_AUDIO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_AUDIO_TEST_SOURCE, GESAudioTestSource))
|
||||
|
||||
#define GES_AUDIO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_AUDIO_TEST_SOURCE, GESAudioTestSourceClass))
|
||||
|
||||
#define GES_IS_AUDIO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_AUDIO_TEST_SOURCE))
|
||||
|
||||
#define GES_IS_AUDIO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_AUDIO_TEST_SOURCE))
|
||||
|
||||
#define GES_AUDIO_TEST_SOURCE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_AUDIO_TEST_SOURCE, GESAudioTestSourceClass))
|
||||
|
||||
typedef struct _GESAudioTestSourcePrivate GESAudioTestSourcePrivate;
|
||||
|
||||
|
||||
/**
|
||||
* GESAudioTestSource:
|
||||
*
|
||||
*/
|
||||
|
||||
struct _GESAudioTestSource {
|
||||
GESTrackSource parent;
|
||||
|
||||
/*< private >*/
|
||||
GESAudioTestSourcePrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESAudioTestSourceClass {
|
||||
/*< private >*/
|
||||
GESTrackSourceClass parent_class;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_audio_test_source_get_type (void);
|
||||
|
||||
|
||||
void ges_audio_test_source_set_freq(GESAudioTestSource *self,
|
||||
gdouble freq);
|
||||
|
||||
void ges_audio_test_source_set_volume(GESAudioTestSource *self,
|
||||
gdouble volume);
|
||||
|
||||
double ges_audio_test_source_get_freq(GESAudioTestSource *self);
|
||||
double ges_audio_test_source_get_volume(GESAudioTestSource *self);
|
||||
|
||||
GESAudioTestSource* ges_audio_test_source_new (void);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_AUDIO_TEST_SOURCE */
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
#include "ges-source-clip.h"
|
||||
#include "ges-track-element.h"
|
||||
#include "ges-track-video-test-source.h"
|
||||
#include "ges-track-audio-test-source.h"
|
||||
#include "ges-audio-test-source.h"
|
||||
#include <string.h>
|
||||
|
||||
G_DEFINE_TYPE (GESTestClip, ges_test_clip, GES_TYPE_SOURCE_CLIP);
|
||||
|
@ -253,9 +253,9 @@ ges_test_clip_set_frequency (GESTestClip * self, gdouble freq)
|
|||
trackelements = ges_clip_get_track_elements (object);
|
||||
for (tmp = trackelements; tmp; tmp = tmp->next) {
|
||||
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
|
||||
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackelement))
|
||||
ges_track_audio_test_source_set_freq (
|
||||
(GESTrackAudioTestSource *) trackelement, freq);
|
||||
if (GES_IS_AUDIO_TEST_SOURCE (trackelement))
|
||||
ges_audio_test_source_set_freq (
|
||||
(GESAudioTestSource *) trackelement, freq);
|
||||
|
||||
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
|
||||
}
|
||||
|
@ -281,9 +281,9 @@ ges_test_clip_set_volume (GESTestClip * self, gdouble volume)
|
|||
trackelements = ges_clip_get_track_elements (object);
|
||||
for (tmp = trackelements; tmp; tmp = tmp->next) {
|
||||
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
|
||||
if (GES_IS_TRACK_AUDIO_TEST_SOURCE (trackelement))
|
||||
ges_track_audio_test_source_set_volume (
|
||||
(GESTrackAudioTestSource *) trackelement, volume);
|
||||
if (GES_IS_AUDIO_TEST_SOURCE (trackelement))
|
||||
ges_audio_test_source_set_volume (
|
||||
(GESAudioTestSource *) trackelement, volume);
|
||||
|
||||
g_object_unref (GES_TRACK_ELEMENT (tmp->data));
|
||||
}
|
||||
|
@ -360,15 +360,13 @@ ges_test_clip_create_track_element (GESClip * obj, GESTrackType type)
|
|||
ges_track_video_test_source_set_pattern (
|
||||
(GESTrackVideoTestSource *) res, priv->vpattern);
|
||||
} else if (type == GES_TRACK_TYPE_AUDIO) {
|
||||
res = (GESTrackElement *) ges_track_audio_test_source_new ();
|
||||
res = (GESTrackElement *) ges_audio_test_source_new ();
|
||||
|
||||
if (priv->mute)
|
||||
ges_track_element_set_active (res, FALSE);
|
||||
|
||||
ges_track_audio_test_source_set_freq ((GESTrackAudioTestSource *) res,
|
||||
priv->freq);
|
||||
ges_track_audio_test_source_set_volume ((GESTrackAudioTestSource *) res,
|
||||
priv->volume);
|
||||
ges_audio_test_source_set_freq ((GESAudioTestSource *) res, priv->freq);
|
||||
ges_audio_test_source_set_volume ((GESAudioTestSource *) res, priv->volume);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
@ -1,89 +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_AUDIO_TEST_SOURCE
|
||||
#define _GES_TRACK_AUDIO_TEST_SOURCE
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-track-source.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GES_TYPE_TRACK_AUDIO_TEST_SOURCE ges_track_audio_test_source_get_type()
|
||||
|
||||
#define GES_TRACK_AUDIO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK_AUDIO_TEST_SOURCE, GESTrackAudioTestSource))
|
||||
|
||||
#define GES_TRACK_AUDIO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK_AUDIO_TEST_SOURCE, GESTrackAudioTestSourceClass))
|
||||
|
||||
#define GES_IS_TRACK_AUDIO_TEST_SOURCE(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK_AUDIO_TEST_SOURCE))
|
||||
|
||||
#define GES_IS_TRACK_AUDIO_TEST_SOURCE_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK_AUDIO_TEST_SOURCE))
|
||||
|
||||
#define GES_TRACK_AUDIO_TEST_SOURCE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_AUDIO_TEST_SOURCE, GESTrackAudioTestSourceClass))
|
||||
|
||||
typedef struct _GESTrackAudioTestSourcePrivate GESTrackAudioTestSourcePrivate;
|
||||
|
||||
|
||||
/**
|
||||
* GESTrackAudioTestSource:
|
||||
*
|
||||
*/
|
||||
|
||||
struct _GESTrackAudioTestSource {
|
||||
GESTrackSource parent;
|
||||
|
||||
/*< private >*/
|
||||
GESTrackAudioTestSourcePrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESTrackAudioTestSourceClass {
|
||||
/*< private >*/
|
||||
GESTrackSourceClass parent_class;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_track_audio_test_source_get_type (void);
|
||||
|
||||
|
||||
void ges_track_audio_test_source_set_freq(GESTrackAudioTestSource *self,
|
||||
gdouble freq);
|
||||
|
||||
void ges_track_audio_test_source_set_volume(GESTrackAudioTestSource *self,
|
||||
gdouble volume);
|
||||
|
||||
double ges_track_audio_test_source_get_freq(GESTrackAudioTestSource *self);
|
||||
double ges_track_audio_test_source_get_volume(GESTrackAudioTestSource *self);
|
||||
|
||||
GESTrackAudioTestSource* ges_track_audio_test_source_new (void);
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_TRACK_AUDIO_TEST_SOURCE */
|
||||
|
|
@ -122,9 +122,9 @@ typedef struct _GESTrackVideoTestSource GESTrackVideoTestSource;
|
|||
typedef struct _GESTrackVideoTestSourceClass
|
||||
GESTrackVideoTestSourceClass;
|
||||
|
||||
typedef struct _GESTrackAudioTestSource GESTrackAudioTestSource;
|
||||
typedef struct _GESTrackAudioTestSourceClass
|
||||
GESTrackAudioTestSourceClass;
|
||||
typedef struct _GESAudioTestSource GESAudioTestSource;
|
||||
typedef struct _GESAudioTestSourceClass
|
||||
GESAudioTestSourceClass;
|
||||
|
||||
typedef struct _GESTrackTitleSource GESTrackTitleSource;
|
||||
typedef struct _GESTrackTitleSourceClass
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "ges-asset-track-object.h"
|
||||
#include "ges-extractable.h"
|
||||
#include "ges-track-image-source.h"
|
||||
#include "ges-track-audio-test-source.h"
|
||||
#include "ges-audio-test-source.h"
|
||||
|
||||
static void ges_extractable_interface_init (GESExtractableInterface * iface);
|
||||
|
||||
|
|
|
@ -63,7 +63,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-track-audio-test-source.h>
|
||||
#include <ges/ges-audio-test-source.h>
|
||||
#include <ges/ges-track-title-source.h>
|
||||
#include <ges/ges-track-text-overlay.h>
|
||||
#include <ges/ges-track-transition.h>
|
||||
|
|
|
@ -148,8 +148,8 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
/* test audio properties as well */
|
||||
|
||||
trobj = ges_clip_find_track_element (GES_CLIP (source),
|
||||
a, GES_TYPE_TRACK_AUDIO_TEST_SOURCE);
|
||||
g_assert (GES_IS_TRACK_AUDIO_TEST_SOURCE (trobj));
|
||||
a, GES_TYPE_AUDIO_TEST_SOURCE);
|
||||
g_assert (GES_IS_AUDIO_TEST_SOURCE (trobj));
|
||||
assert_equals_float (ges_test_clip_get_frequency (source), 440);
|
||||
assert_equals_float (ges_test_clip_get_volume (source), 0);
|
||||
|
||||
|
@ -158,12 +158,8 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
assert_equals_float (volume, 0);
|
||||
|
||||
|
||||
freq =
|
||||
ges_track_audio_test_source_get_freq (GES_TRACK_AUDIO_TEST_SOURCE
|
||||
(trobj));
|
||||
volume =
|
||||
ges_track_audio_test_source_get_volume (GES_TRACK_AUDIO_TEST_SOURCE
|
||||
(trobj));
|
||||
freq = ges_audio_test_source_get_freq (GES_AUDIO_TEST_SOURCE (trobj));
|
||||
volume = ges_audio_test_source_get_volume (GES_AUDIO_TEST_SOURCE (trobj));
|
||||
g_assert (freq == 440);
|
||||
g_assert (volume == 0);
|
||||
|
||||
|
@ -174,12 +170,8 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
assert_equals_float (freq, 2000);
|
||||
assert_equals_float (volume, 0.5);
|
||||
|
||||
freq =
|
||||
ges_track_audio_test_source_get_freq (GES_TRACK_AUDIO_TEST_SOURCE
|
||||
(trobj));
|
||||
volume =
|
||||
ges_track_audio_test_source_get_volume (GES_TRACK_AUDIO_TEST_SOURCE
|
||||
(trobj));
|
||||
freq = ges_audio_test_source_get_freq (GES_AUDIO_TEST_SOURCE (trobj));
|
||||
volume = ges_audio_test_source_get_volume (GES_AUDIO_TEST_SOURCE (trobj));
|
||||
g_assert (freq == 2000);
|
||||
g_assert (volume == 0.5);
|
||||
|
||||
|
|
Loading…
Reference in a new issue