mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 01:45:33 +00:00
docs/plugins/: Add audioresample to docs.
Original commit message from CVS: * docs/plugins/Makefile.am: * docs/plugins/gst-plugins-base-plugins-docs.sgml: * docs/plugins/gst-plugins-base-plugins-sections.txt: Add audioresample to docs. * gst/audioconvert/gstaudioconvert.c: Add revision date. * gst/audioresample/gstaudioresample.c: (gst_audioresample_base_init), (gst_audioresample_class_init), (gst_audioresample_init), (gst_audioresample_dispose), (audioresample_get_unit_size), (audioresample_transform_caps), (resample_set_state_from_caps), (audioresample_transform_size), (audioresample_set_caps), (audioresample_event), (audioresample_do_output), (audioresample_transform), (audioresample_pushthrough), (gst_audioresample_set_property), (gst_audioresample_get_property), (plugin_init): * gst/audioresample/gstaudioresample.h: Added docs. Small code cleanups.
This commit is contained in:
parent
c619495c5c
commit
af09257fd0
7 changed files with 136 additions and 69 deletions
23
ChangeLog
23
ChangeLog
|
@ -1,3 +1,26 @@
|
||||||
|
2006-03-02 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* docs/plugins/Makefile.am:
|
||||||
|
* docs/plugins/gst-plugins-base-plugins-docs.sgml:
|
||||||
|
* docs/plugins/gst-plugins-base-plugins-sections.txt:
|
||||||
|
Add audioresample to docs.
|
||||||
|
|
||||||
|
* gst/audioconvert/gstaudioconvert.c:
|
||||||
|
Add revision date.
|
||||||
|
|
||||||
|
* gst/audioresample/gstaudioresample.c:
|
||||||
|
(gst_audioresample_base_init), (gst_audioresample_class_init),
|
||||||
|
(gst_audioresample_init), (gst_audioresample_dispose),
|
||||||
|
(audioresample_get_unit_size), (audioresample_transform_caps),
|
||||||
|
(resample_set_state_from_caps), (audioresample_transform_size),
|
||||||
|
(audioresample_set_caps), (audioresample_event),
|
||||||
|
(audioresample_do_output), (audioresample_transform),
|
||||||
|
(audioresample_pushthrough), (gst_audioresample_set_property),
|
||||||
|
(gst_audioresample_get_property), (plugin_init):
|
||||||
|
* gst/audioresample/gstaudioresample.h:
|
||||||
|
Added docs.
|
||||||
|
Small code cleanups.
|
||||||
|
|
||||||
2006-03-02 Wim Taymans <wim@fluendo.com>
|
2006-03-02 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* docs/plugins/Makefile.am:
|
* docs/plugins/Makefile.am:
|
||||||
|
|
|
@ -89,6 +89,7 @@ EXTRA_HFILES = \
|
||||||
$(top_srcdir)/ext/vorbis/vorbisenc.h \
|
$(top_srcdir)/ext/vorbis/vorbisenc.h \
|
||||||
$(top_srcdir)/ext/vorbis/vorbisparse.h \
|
$(top_srcdir)/ext/vorbis/vorbisparse.h \
|
||||||
$(top_srcdir)/gst/audioconvert/gstaudioconvert.h \
|
$(top_srcdir)/gst/audioconvert/gstaudioconvert.h \
|
||||||
|
$(top_srcdir)/gst/audioresample/gstaudioresample.h \
|
||||||
$(top_srcdir)/gst/audiotestsrc/gstaudiotestsrc.h \
|
$(top_srcdir)/gst/audiotestsrc/gstaudiotestsrc.h \
|
||||||
$(top_srcdir)/gst/ffmpegcolorspace/gstffmpegcolorspace.h \
|
$(top_srcdir)/gst/ffmpegcolorspace/gstffmpegcolorspace.h \
|
||||||
$(top_srcdir)/gst/tcp/gstmultifdsink.h \
|
$(top_srcdir)/gst/tcp/gstmultifdsink.h \
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
<xi:include href="xml/element-alsasink.xml" />
|
<xi:include href="xml/element-alsasink.xml" />
|
||||||
<xi:include href="xml/element-alsasrc.xml" />
|
<xi:include href="xml/element-alsasrc.xml" />
|
||||||
<xi:include href="xml/element-audioconvert.xml" />
|
<xi:include href="xml/element-audioconvert.xml" />
|
||||||
|
<xi:include href="xml/element-audioresample.xml" />
|
||||||
<xi:include href="xml/element-audiotestsrc.xml" />
|
<xi:include href="xml/element-audiotestsrc.xml" />
|
||||||
<xi:include href="xml/element-clockoverlay.xml" />
|
<xi:include href="xml/element-clockoverlay.xml" />
|
||||||
<xi:include href="xml/element-ffmpegcolorspace.xml" />
|
<xi:include href="xml/element-ffmpegcolorspace.xml" />
|
||||||
|
|
|
@ -57,6 +57,20 @@ GST_TYPE_AUDIO_CONVERT
|
||||||
GstAudioConvertClass
|
GstAudioConvertClass
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
<SECTION>
|
||||||
|
<FILE>element-audioresample</FILE>
|
||||||
|
<TITLE>audioresample</TITLE>
|
||||||
|
GstAudioresample
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GST_AUDIORESAMPLE
|
||||||
|
GST_IS_AUDIORESAMPLE
|
||||||
|
GST_TYPE_AUDIORESAMPLE
|
||||||
|
gst_audioresample_get_type
|
||||||
|
GST_AUDIORESAMPLE_CLASS
|
||||||
|
GST_IS_AUDIORESAMPLE_CLASS
|
||||||
|
GstAudioresampleClass
|
||||||
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>element-audiotestsrc</FILE>
|
<FILE>element-audiotestsrc</FILE>
|
||||||
<TITLE>audiotestsrc</TITLE>
|
<TITLE>audiotestsrc</TITLE>
|
||||||
|
|
|
@ -44,6 +44,8 @@
|
||||||
* generated by audiotestsrc.
|
* generated by audiotestsrc.
|
||||||
* </para>
|
* </para>
|
||||||
* </refsect2>
|
* </refsect2>
|
||||||
|
*
|
||||||
|
* Last reviewed on 2006-03-02 (0.10.4)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -19,6 +19,25 @@
|
||||||
*/
|
*/
|
||||||
/* Element-Checklist-Version: 5 */
|
/* Element-Checklist-Version: 5 */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:element-audioresample
|
||||||
|
*
|
||||||
|
* <refsect2>
|
||||||
|
* Audioresample resamples raw audio buffers to different sample rates using
|
||||||
|
* a configurable windowing function to enhance quality.
|
||||||
|
* <title>Example launch line</title>
|
||||||
|
* <para>
|
||||||
|
* <programlisting>
|
||||||
|
* gst-launch -v filesrc location=sine.ogg ! oggdemux ! vorbisdec ! audioconvert ! audioresample ! audio/x-raw-int, rate=8000 ! alsasink
|
||||||
|
* </programlisting>
|
||||||
|
* Decode an Ogg/Vorbis downsample to 8Khz and play sound through alsa.
|
||||||
|
* To create the Ogg/Vorbis file refer to the documentation of vorbisenc.
|
||||||
|
* </para>
|
||||||
|
* </refsect2>
|
||||||
|
*
|
||||||
|
* Last reviewed on 2006-03-02 (0.10.4)
|
||||||
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -52,8 +71,8 @@ enum
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ARG_0,
|
PROP_0,
|
||||||
ARG_FILTERLEN
|
PROP_FILTERLEN
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SUPPORTED_CAPS \
|
#define SUPPORTED_CAPS \
|
||||||
|
@ -72,39 +91,38 @@ GST_STATIC_CAPS ( \
|
||||||
"audio/x-raw-float, "
|
"audio/x-raw-float, "
|
||||||
"rate = (int) [ 1, MAX ], "
|
"rate = (int) [ 1, MAX ], "
|
||||||
"channels = (int) [ 1, MAX ], "
|
"channels = (int) [ 1, MAX ], "
|
||||||
"endianness = (int) BYTE_ORDER, " "width = (int) 32")
|
"endianness = (int) BYTE_ORDER, " "width = (int) 32"
|
||||||
#endif
|
#endif
|
||||||
static GstStaticPadTemplate gst_audioresample_sink_template =
|
static GstStaticPadTemplate gst_audioresample_sink_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("sink",
|
GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK, GST_PAD_ALWAYS, SUPPORTED_CAPS);
|
GST_PAD_SINK, GST_PAD_ALWAYS, SUPPORTED_CAPS);
|
||||||
|
|
||||||
static GstStaticPadTemplate gst_audioresample_src_template =
|
static GstStaticPadTemplate gst_audioresample_src_template =
|
||||||
GST_STATIC_PAD_TEMPLATE ("src",
|
GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC, GST_PAD_ALWAYS, SUPPORTED_CAPS);
|
GST_PAD_SRC, GST_PAD_ALWAYS, SUPPORTED_CAPS);
|
||||||
|
|
||||||
static void gst_audioresample_dispose (GObject * object);
|
static void gst_audioresample_dispose (GObject * object);
|
||||||
|
|
||||||
static void gst_audioresample_set_property (GObject * object,
|
static void gst_audioresample_set_property (GObject * object,
|
||||||
guint prop_id, const GValue * value, GParamSpec * pspec);
|
guint prop_id, const GValue * value, GParamSpec * pspec);
|
||||||
static void gst_audioresample_get_property (GObject * object,
|
static void gst_audioresample_get_property (GObject * object,
|
||||||
guint prop_id, GValue * value, GParamSpec * pspec);
|
guint prop_id, GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
/* vmethods */
|
/* vmethods */
|
||||||
gboolean audioresample_get_unit_size (GstBaseTransform * base,
|
gboolean audioresample_get_unit_size (GstBaseTransform * base,
|
||||||
GstCaps * caps, guint * size);
|
GstCaps * caps, guint * size);
|
||||||
GstCaps *audioresample_transform_caps (GstBaseTransform * base,
|
GstCaps *audioresample_transform_caps (GstBaseTransform * base,
|
||||||
GstPadDirection direction, GstCaps * caps);
|
GstPadDirection direction, GstCaps * caps);
|
||||||
gboolean audioresample_transform_size (GstBaseTransform * trans,
|
gboolean audioresample_transform_size (GstBaseTransform * trans,
|
||||||
GstPadDirection direction, GstCaps * incaps, guint insize,
|
GstPadDirection direction, GstCaps * incaps, guint insize,
|
||||||
GstCaps * outcaps, guint * outsize);
|
GstCaps * outcaps, guint * outsize);
|
||||||
gboolean audioresample_set_caps (GstBaseTransform * base, GstCaps * incaps,
|
gboolean audioresample_set_caps (GstBaseTransform * base, GstCaps * incaps,
|
||||||
GstCaps * outcaps);
|
GstCaps * outcaps);
|
||||||
static GstFlowReturn audioresample_pushthrough (GstAudioresample *
|
static GstFlowReturn audioresample_pushthrough (GstAudioresample *
|
||||||
audioresample);
|
audioresample);
|
||||||
static GstFlowReturn audioresample_transform (GstBaseTransform * base,
|
static GstFlowReturn audioresample_transform (GstBaseTransform * base,
|
||||||
GstBuffer * inbuf, GstBuffer * outbuf);
|
GstBuffer * inbuf, GstBuffer * outbuf);
|
||||||
static gboolean audioresample_event (GstBaseTransform * base,
|
static gboolean audioresample_event (GstBaseTransform * base, GstEvent * event);
|
||||||
GstEvent * event);
|
|
||||||
|
|
||||||
/*static guint gst_audioresample_signals[LAST_SIGNAL] = { 0 }; */
|
/*static guint gst_audioresample_signals[LAST_SIGNAL] = { 0 }; */
|
||||||
|
|
||||||
|
@ -114,20 +132,21 @@ GST_STATIC_CAPS ( \
|
||||||
GST_BOILERPLATE_FULL (GstAudioresample, gst_audioresample, GstBaseTransform,
|
GST_BOILERPLATE_FULL (GstAudioresample, gst_audioresample, GstBaseTransform,
|
||||||
GST_TYPE_BASE_TRANSFORM, DEBUG_INIT);
|
GST_TYPE_BASE_TRANSFORM, DEBUG_INIT);
|
||||||
|
|
||||||
static void gst_audioresample_base_init (gpointer g_class)
|
static void
|
||||||
{
|
gst_audioresample_base_init (gpointer g_class)
|
||||||
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
{
|
||||||
|
GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
|
||||||
|
|
||||||
gst_element_class_add_pad_template (gstelement_class,
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
gst_static_pad_template_get (&gst_audioresample_src_template));
|
gst_static_pad_template_get (&gst_audioresample_src_template));
|
||||||
gst_element_class_add_pad_template (gstelement_class,
|
gst_element_class_add_pad_template (gstelement_class,
|
||||||
gst_static_pad_template_get (&gst_audioresample_sink_template));
|
gst_static_pad_template_get (&gst_audioresample_sink_template));
|
||||||
|
|
||||||
gst_element_class_set_details (gstelement_class,
|
gst_element_class_set_details (gstelement_class, &gst_audioresample_details);
|
||||||
&gst_audioresample_details);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
static void gst_audioresample_class_init (GstAudioresampleClass * klass)
|
static void
|
||||||
|
gst_audioresample_class_init (GstAudioresampleClass * klass)
|
||||||
{
|
{
|
||||||
GObjectClass *gobject_class;
|
GObjectClass *gobject_class;
|
||||||
|
|
||||||
|
@ -137,7 +156,7 @@ static void gst_audioresample_class_init (GstAudioresampleClass * klass)
|
||||||
gobject_class->get_property = gst_audioresample_get_property;
|
gobject_class->get_property = gst_audioresample_get_property;
|
||||||
gobject_class->dispose = gst_audioresample_dispose;
|
gobject_class->dispose = gst_audioresample_dispose;
|
||||||
|
|
||||||
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FILTERLEN,
|
g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_FILTERLEN,
|
||||||
g_param_spec_int ("filter_length", "filter_length", "filter_length",
|
g_param_spec_int ("filter_length", "filter_length", "filter_length",
|
||||||
0, G_MAXINT, DEFAULT_FILTERLEN,
|
0, G_MAXINT, DEFAULT_FILTERLEN,
|
||||||
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
|
||||||
|
@ -159,7 +178,7 @@ static void gst_audioresample_class_init (GstAudioresampleClass * klass)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_audioresample_init (GstAudioresample * audioresample,
|
gst_audioresample_init (GstAudioresample * audioresample,
|
||||||
GstAudioresampleClass * klass)
|
GstAudioresampleClass * klass)
|
||||||
{
|
{
|
||||||
ResampleState *r;
|
ResampleState *r;
|
||||||
|
@ -181,7 +200,8 @@ static void
|
||||||
resample_set_format (r, RESAMPLE_FORMAT_S16);
|
resample_set_format (r, RESAMPLE_FORMAT_S16);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void gst_audioresample_dispose (GObject * object)
|
static void
|
||||||
|
gst_audioresample_dispose (GObject * object)
|
||||||
{
|
{
|
||||||
GstAudioresample *audioresample = GST_AUDIORESAMPLE (object);
|
GstAudioresample *audioresample = GST_AUDIORESAMPLE (object);
|
||||||
|
|
||||||
|
@ -195,8 +215,9 @@ static void gst_audioresample_dispose (GObject * object)
|
||||||
|
|
||||||
/* vmethods */
|
/* vmethods */
|
||||||
gboolean
|
gboolean
|
||||||
audioresample_get_unit_size (GstBaseTransform * base, GstCaps * caps,
|
audioresample_get_unit_size (GstBaseTransform * base, GstCaps * caps,
|
||||||
guint * size) {
|
guint * size)
|
||||||
|
{
|
||||||
gint width, channels;
|
gint width, channels;
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
|
@ -214,7 +235,8 @@ gboolean
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
GstCaps *audioresample_transform_caps (GstBaseTransform * base,
|
GstCaps *
|
||||||
|
audioresample_transform_caps (GstBaseTransform * base,
|
||||||
GstPadDirection direction, GstCaps * caps)
|
GstPadDirection direction, GstCaps * caps)
|
||||||
{
|
{
|
||||||
GstCaps *res;
|
GstCaps *res;
|
||||||
|
@ -230,7 +252,7 @@ GstCaps *audioresample_transform_caps (GstBaseTransform * base,
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
resample_set_state_from_caps (ResampleState * state, GstCaps * incaps,
|
resample_set_state_from_caps (ResampleState * state, GstCaps * incaps,
|
||||||
GstCaps * outcaps, gint * channels, gint * inrate, gint * outrate)
|
GstCaps * outcaps, gint * channels, gint * inrate, gint * outrate)
|
||||||
{
|
{
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
|
@ -275,9 +297,10 @@ static gboolean
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
audioresample_transform_size (GstBaseTransform * base,
|
audioresample_transform_size (GstBaseTransform * base,
|
||||||
GstPadDirection direction, GstCaps * caps, guint size, GstCaps * othercaps,
|
GstPadDirection direction, GstCaps * caps, guint size, GstCaps * othercaps,
|
||||||
guint * othersize) {
|
guint * othersize)
|
||||||
|
{
|
||||||
GstAudioresample *audioresample = GST_AUDIORESAMPLE (base);
|
GstAudioresample *audioresample = GST_AUDIORESAMPLE (base);
|
||||||
ResampleState *state;
|
ResampleState *state;
|
||||||
GstCaps *srccaps, *sinkcaps;
|
GstCaps *srccaps, *sinkcaps;
|
||||||
|
@ -329,8 +352,9 @@ gboolean
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
audioresample_set_caps (GstBaseTransform * base, GstCaps * incaps,
|
audioresample_set_caps (GstBaseTransform * base, GstCaps * incaps,
|
||||||
GstCaps * outcaps) {
|
GstCaps * outcaps)
|
||||||
|
{
|
||||||
gboolean ret;
|
gboolean ret;
|
||||||
gint inrate, outrate;
|
gint inrate, outrate;
|
||||||
int channels;
|
int channels;
|
||||||
|
@ -362,7 +386,8 @@ gboolean
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean audioresample_event (GstBaseTransform * base, GstEvent * event)
|
static gboolean
|
||||||
|
audioresample_event (GstBaseTransform * base, GstEvent * event)
|
||||||
{
|
{
|
||||||
GstAudioresample *audioresample;
|
GstAudioresample *audioresample;
|
||||||
|
|
||||||
|
@ -397,8 +422,7 @@ static gboolean audioresample_event (GstBaseTransform * base, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
audioresample_do_output (GstAudioresample * audioresample,
|
audioresample_do_output (GstAudioresample * audioresample, GstBuffer * outbuf)
|
||||||
GstBuffer * outbuf)
|
|
||||||
{
|
{
|
||||||
int outsize;
|
int outsize;
|
||||||
int outsamples;
|
int outsamples;
|
||||||
|
@ -475,7 +499,7 @@ static GstFlowReturn
|
||||||
}
|
}
|
||||||
|
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
audioresample_transform (GstBaseTransform * base, GstBuffer * inbuf,
|
audioresample_transform (GstBaseTransform * base, GstBuffer * inbuf,
|
||||||
GstBuffer * outbuf)
|
GstBuffer * outbuf)
|
||||||
{
|
{
|
||||||
GstAudioresample *audioresample;
|
GstAudioresample *audioresample;
|
||||||
|
@ -522,7 +546,7 @@ static GstFlowReturn
|
||||||
|
|
||||||
/* push remaining data in the buffers out */
|
/* push remaining data in the buffers out */
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
audioresample_pushthrough (GstAudioresample * audioresample)
|
audioresample_pushthrough (GstAudioresample * audioresample)
|
||||||
{
|
{
|
||||||
int outsize;
|
int outsize;
|
||||||
ResampleState *r;
|
ResampleState *r;
|
||||||
|
@ -552,29 +576,30 @@ done:
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_audioresample_set_property (GObject * object, guint prop_id,
|
gst_audioresample_set_property (GObject * object, guint prop_id,
|
||||||
const GValue * value, GParamSpec * pspec)
|
const GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstAudioresample *audioresample;
|
GstAudioresample *audioresample;
|
||||||
|
|
||||||
g_return_if_fail (GST_IS_AUDIORESAMPLE (object));
|
g_return_if_fail (GST_IS_AUDIORESAMPLE (object));
|
||||||
audioresample = GST_AUDIORESAMPLE (object);
|
audioresample = GST_AUDIORESAMPLE (object);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case ARG_FILTERLEN:
|
case PROP_FILTERLEN:
|
||||||
audioresample->filter_length = g_value_get_int (value);
|
audioresample->filter_length = g_value_get_int (value);
|
||||||
GST_DEBUG_OBJECT (GST_ELEMENT (audioresample), "new filter length %d",
|
GST_DEBUG_OBJECT (GST_ELEMENT (audioresample), "new filter length %d",
|
||||||
audioresample->filter_length);
|
audioresample->filter_length);
|
||||||
resample_set_filter_length (audioresample->resample,
|
resample_set_filter_length (audioresample->resample,
|
||||||
audioresample->filter_length);
|
audioresample->filter_length);
|
||||||
break;
|
break;
|
||||||
default:G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_audioresample_get_property (GObject * object, guint prop_id,
|
gst_audioresample_get_property (GObject * object, guint prop_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
GstAudioresample *audioresample;
|
GstAudioresample *audioresample;
|
||||||
|
@ -583,7 +608,7 @@ static void
|
||||||
audioresample = GST_AUDIORESAMPLE (object);
|
audioresample = GST_AUDIORESAMPLE (object);
|
||||||
|
|
||||||
switch (prop_id) {
|
switch (prop_id) {
|
||||||
case ARG_FILTERLEN:
|
case PROP_FILTERLEN:
|
||||||
g_value_set_int (value, audioresample->filter_length);
|
g_value_set_int (value, audioresample->filter_length);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -593,7 +618,8 @@ static void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean plugin_init (GstPlugin * plugin)
|
static gboolean
|
||||||
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
resample_init ();
|
resample_init ();
|
||||||
|
|
||||||
|
|
|
@ -21,16 +21,13 @@
|
||||||
#ifndef __AUDIORESAMPLE_H__
|
#ifndef __AUDIORESAMPLE_H__
|
||||||
#define __AUDIORESAMPLE_H__
|
#define __AUDIORESAMPLE_H__
|
||||||
|
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstbasetransform.h>
|
#include <gst/base/gstbasetransform.h>
|
||||||
|
|
||||||
#include "resample.h"
|
#include "resample.h"
|
||||||
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
|
||||||
#define GST_TYPE_AUDIORESAMPLE \
|
#define GST_TYPE_AUDIORESAMPLE \
|
||||||
(gst_audioresample_get_type())
|
(gst_audioresample_get_type())
|
||||||
#define GST_AUDIORESAMPLE(obj) \
|
#define GST_AUDIORESAMPLE(obj) \
|
||||||
|
@ -45,6 +42,11 @@ G_BEGIN_DECLS
|
||||||
typedef struct _GstAudioresample GstAudioresample;
|
typedef struct _GstAudioresample GstAudioresample;
|
||||||
typedef struct _GstAudioresampleClass GstAudioresampleClass;
|
typedef struct _GstAudioresampleClass GstAudioresampleClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GstAudioresample:
|
||||||
|
*
|
||||||
|
* Opaque data structure.
|
||||||
|
*/
|
||||||
struct _GstAudioresample {
|
struct _GstAudioresample {
|
||||||
GstBaseTransform element;
|
GstBaseTransform element;
|
||||||
|
|
||||||
|
@ -70,8 +72,6 @@ struct _GstAudioresampleClass {
|
||||||
|
|
||||||
GType gst_audioresample_get_type(void);
|
GType gst_audioresample_get_type(void);
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
||||||
#endif /* __AUDIORESAMPLE_H__ */
|
#endif /* __AUDIORESAMPLE_H__ */
|
||||||
|
|
Loading…
Reference in a new issue