port to more audio api changes
This commit is contained in:
parent
77ad0a1363
commit
445bf71bd1
@ -112,7 +112,7 @@ static void gst_audio_amplify_get_property (GObject * object, guint prop_id,
|
|||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static gboolean gst_audio_amplify_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_amplify_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static GstFlowReturn gst_audio_amplify_transform_ip (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_amplify_transform_ip (GstBaseTransform * base,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ gst_audio_amplify_get_property (GObject * object, guint prop_id,
|
|||||||
|
|
||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_amplify_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_amplify_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioAmplify *filter = GST_AUDIO_AMPLIFY (base);
|
GstAudioAmplify *filter = GST_AUDIO_AMPLIFY (base);
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ static void gst_audio_cheb_band_get_property (GObject * object,
|
|||||||
static void gst_audio_cheb_band_finalize (GObject * object);
|
static void gst_audio_cheb_band_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_cheb_band_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_cheb_band_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -641,7 +641,7 @@ gst_audio_cheb_band_get_property (GObject * object, guint prop_id,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_cheb_band_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_cheb_band_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioChebBand *filter = GST_AUDIO_CHEB_BAND (base);
|
GstAudioChebBand *filter = GST_AUDIO_CHEB_BAND (base);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ static void gst_audio_cheb_limit_get_property (GObject * object,
|
|||||||
static void gst_audio_cheb_limit_finalize (GObject * object);
|
static void gst_audio_cheb_limit_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_cheb_limit_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_cheb_limit_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -550,7 +550,7 @@ gst_audio_cheb_limit_get_property (GObject * object, guint prop_id,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_cheb_limit_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_cheb_limit_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioChebLimit *filter = GST_AUDIO_CHEB_LIMIT (base);
|
GstAudioChebLimit *filter = GST_AUDIO_CHEB_LIMIT (base);
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ static void gst_audio_dynamic_get_property (GObject * object, guint prop_id,
|
|||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static gboolean gst_audio_dynamic_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_dynamic_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static GstFlowReturn gst_audio_dynamic_transform_ip (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_dynamic_transform_ip (GstBaseTransform * base,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ gst_audio_dynamic_get_property (GObject * object, guint prop_id,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_dynamic_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_dynamic_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioDynamic *filter = GST_AUDIO_DYNAMIC (base);
|
GstAudioDynamic *filter = GST_AUDIO_DYNAMIC (base);
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
@ -82,7 +82,7 @@ static void gst_audio_echo_get_property (GObject * object, guint prop_id,
|
|||||||
static void gst_audio_echo_finalize (GObject * object);
|
static void gst_audio_echo_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_echo_setup (GstAudioFilter * self,
|
static gboolean gst_audio_echo_setup (GstAudioFilter * self,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static gboolean gst_audio_echo_stop (GstBaseTransform * base);
|
static gboolean gst_audio_echo_stop (GstBaseTransform * base);
|
||||||
static GstFlowReturn gst_audio_echo_transform_ip (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_echo_transform_ip (GstBaseTransform * base,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
@ -271,7 +271,7 @@ gst_audio_echo_get_property (GObject * object, guint prop_id,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_echo_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_echo_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioEcho *self = GST_AUDIO_ECHO (base);
|
GstAudioEcho *self = GST_AUDIO_ECHO (base);
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
@ -86,7 +86,7 @@ static void gst_audio_fir_filter_get_property (GObject * object, guint prop_id,
|
|||||||
static void gst_audio_fir_filter_finalize (GObject * object);
|
static void gst_audio_fir_filter_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_fir_filter_setup (GstAudioFilter * base,
|
static gboolean gst_audio_fir_filter_setup (GstAudioFilter * base,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -183,7 +183,7 @@ gst_audio_fir_filter_init (GstAudioFIRFilter * self)
|
|||||||
|
|
||||||
/* get notified of caps and plug in the correct process function */
|
/* get notified of caps and plug in the correct process function */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_fir_filter_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_fir_filter_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioFIRFilter *self = GST_AUDIO_FIR_FILTER (base);
|
GstAudioFIRFilter *self = GST_AUDIO_FIR_FILTER (base);
|
||||||
gint new_rate = GST_AUDIO_INFO_RATE (info);
|
gint new_rate = GST_AUDIO_INFO_RATE (info);
|
||||||
|
@ -70,7 +70,7 @@ static gboolean gst_audio_fx_base_fir_filter_transform_size (GstBaseTransform *
|
|||||||
base, GstPadDirection direction, GstCaps * caps, gsize size,
|
base, GstPadDirection direction, GstCaps * caps, gsize size,
|
||||||
GstCaps * othercaps, gsize * othersize);
|
GstCaps * othercaps, gsize * othersize);
|
||||||
static gboolean gst_audio_fx_base_fir_filter_setup (GstAudioFilter * base,
|
static gboolean gst_audio_fx_base_fir_filter_setup (GstAudioFilter * base,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
static gboolean gst_audio_fx_base_fir_filter_query (GstPad * pad,
|
static gboolean gst_audio_fx_base_fir_filter_query (GstPad * pad,
|
||||||
GstQuery * query);
|
GstQuery * query);
|
||||||
@ -743,7 +743,8 @@ gst_audio_fx_base_fir_filter_push_residue (GstAudioFXBaseFIRFilter * self)
|
|||||||
|
|
||||||
/* get notified of caps and plug in the correct process function */
|
/* get notified of caps and plug in the correct process function */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_fx_base_fir_filter_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_fx_base_fir_filter_setup (GstAudioFilter * base,
|
||||||
|
const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioFXBaseFIRFilter *self = GST_AUDIO_FX_BASE_FIR_FILTER (base);
|
GstAudioFXBaseFIRFilter *self = GST_AUDIO_FX_BASE_FIR_FILTER (base);
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ G_DEFINE_TYPE (GstAudioFXBaseIIRFilter,
|
|||||||
gst_audio_fx_base_iir_filter, GST_TYPE_AUDIO_FILTER);
|
gst_audio_fx_base_iir_filter, GST_TYPE_AUDIO_FILTER);
|
||||||
|
|
||||||
static gboolean gst_audio_fx_base_iir_filter_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_fx_base_iir_filter_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_audio_fx_base_iir_filter_transform_ip (GstBaseTransform * base,
|
gst_audio_fx_base_iir_filter_transform_ip (GstBaseTransform * base,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
@ -236,7 +236,8 @@ gst_audio_fx_base_iir_filter_set_coefficients (GstAudioFXBaseIIRFilter * filter,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_fx_base_iir_filter_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_fx_base_iir_filter_setup (GstAudioFilter * base,
|
||||||
|
const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioFXBaseIIRFilter *filter = GST_AUDIO_FX_BASE_IIR_FILTER (base);
|
GstAudioFXBaseIIRFilter *filter = GST_AUDIO_FX_BASE_IIR_FILTER (base);
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
@ -82,7 +82,7 @@ static void gst_audio_iir_filter_get_property (GObject * object, guint prop_id,
|
|||||||
static void gst_audio_iir_filter_finalize (GObject * object);
|
static void gst_audio_iir_filter_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_iir_filter_setup (GstAudioFilter * base,
|
static gboolean gst_audio_iir_filter_setup (GstAudioFilter * base,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_audio_iir_filter_class_init (GstAudioIIRFilterClass * klass)
|
gst_audio_iir_filter_class_init (GstAudioIIRFilterClass * klass)
|
||||||
@ -200,7 +200,7 @@ gst_audio_iir_filter_init (GstAudioIIRFilter * self)
|
|||||||
|
|
||||||
/* get notified of caps and plug in the correct process function */
|
/* get notified of caps and plug in the correct process function */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_iir_filter_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_iir_filter_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioIIRFilter *self = GST_AUDIO_IIR_FILTER (base);
|
GstAudioIIRFilter *self = GST_AUDIO_IIR_FILTER (base);
|
||||||
gint new_rate = GST_AUDIO_INFO_RATE (info);
|
gint new_rate = GST_AUDIO_INFO_RATE (info);
|
||||||
|
@ -78,7 +78,7 @@ static void gst_audio_invert_get_property (GObject * object, guint prop_id,
|
|||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static gboolean gst_audio_invert_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_invert_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static GstFlowReturn gst_audio_invert_transform_ip (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_invert_transform_ip (GstBaseTransform * base,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ gst_audio_invert_get_property (GObject * object, guint prop_id,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_invert_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_invert_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioInvert *filter = GST_AUDIO_INVERT (base);
|
GstAudioInvert *filter = GST_AUDIO_INVERT (base);
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
@ -85,7 +85,7 @@ static void gst_audio_karaoke_get_property (GObject * object, guint prop_id,
|
|||||||
GValue * value, GParamSpec * pspec);
|
GValue * value, GParamSpec * pspec);
|
||||||
|
|
||||||
static gboolean gst_audio_karaoke_setup (GstAudioFilter * filter,
|
static gboolean gst_audio_karaoke_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static GstFlowReturn gst_audio_karaoke_transform_ip (GstBaseTransform * base,
|
static GstFlowReturn gst_audio_karaoke_transform_ip (GstBaseTransform * base,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
|
|
||||||
@ -239,7 +239,7 @@ gst_audio_karaoke_get_property (GObject * object, guint prop_id,
|
|||||||
/* GstAudioFilter vmethod implementations */
|
/* GstAudioFilter vmethod implementations */
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_karaoke_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_karaoke_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioKaraoke *filter = GST_AUDIO_KARAOKE (base);
|
GstAudioKaraoke *filter = GST_AUDIO_KARAOKE (base);
|
||||||
gboolean ret = TRUE;
|
gboolean ret = TRUE;
|
||||||
|
@ -149,7 +149,7 @@ static void gst_audio_wsincband_get_property (GObject * object, guint prop_id,
|
|||||||
static void gst_audio_wsincband_finalize (GObject * object);
|
static void gst_audio_wsincband_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_wsincband_setup (GstAudioFilter * base,
|
static gboolean gst_audio_wsincband_setup (GstAudioFilter * base,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
#define POW2(x) (x)*(x)
|
#define POW2(x) (x)*(x)
|
||||||
|
|
||||||
@ -371,7 +371,7 @@ gst_audio_wsincband_build_kernel (GstAudioWSincBand * self)
|
|||||||
|
|
||||||
/* get notified of caps and plug in the correct process function */
|
/* get notified of caps and plug in the correct process function */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_wsincband_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_wsincband_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (base);
|
GstAudioWSincBand *self = GST_AUDIO_WSINC_BAND (base);
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ static void gst_audio_wsinclimit_get_property (GObject * object, guint prop_id,
|
|||||||
static void gst_audio_wsinclimit_finalize (GObject * object);
|
static void gst_audio_wsinclimit_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_audio_wsinclimit_setup (GstAudioFilter * base,
|
static gboolean gst_audio_wsinclimit_setup (GstAudioFilter * base,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
|
|
||||||
#define POW2(x) (x)*(x)
|
#define POW2(x) (x)*(x)
|
||||||
@ -306,7 +306,7 @@ gst_audio_wsinclimit_build_kernel (GstAudioWSincLimit * self)
|
|||||||
|
|
||||||
/* get notified of caps and plug in the correct process function */
|
/* get notified of caps and plug in the correct process function */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_audio_wsinclimit_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_audio_wsinclimit_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstAudioWSincLimit *self = GST_AUDIO_WSINC_LIMIT (base);
|
GstAudioWSincLimit *self = GST_AUDIO_WSINC_LIMIT (base);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstauparse.la
|
|||||||
|
|
||||||
libgstauparse_la_SOURCES = gstauparse.c
|
libgstauparse_la_SOURCES = gstauparse.c
|
||||||
libgstauparse_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
libgstauparse_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
||||||
libgstauparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS)
|
libgstauparse_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) -lgstaudio-$(GST_MAJORMINOR)
|
||||||
libgstauparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstauparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstauparse_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstauparse_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ static void gst_iir_equalizer_child_proxy_interface_init (gpointer g_iface,
|
|||||||
static void gst_iir_equalizer_finalize (GObject * object);
|
static void gst_iir_equalizer_finalize (GObject * object);
|
||||||
|
|
||||||
static gboolean gst_iir_equalizer_setup (GstAudioFilter * filter,
|
static gboolean gst_iir_equalizer_setup (GstAudioFilter * filter,
|
||||||
GstAudioInfo * info);
|
const GstAudioInfo * info);
|
||||||
static GstFlowReturn gst_iir_equalizer_transform_ip (GstBaseTransform * btrans,
|
static GstFlowReturn gst_iir_equalizer_transform_ip (GstBaseTransform * btrans,
|
||||||
GstBuffer * buf);
|
GstBuffer * buf);
|
||||||
|
|
||||||
@ -848,7 +848,7 @@ gst_iir_equalizer_transform_ip (GstBaseTransform * btrans, GstBuffer * buf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_iir_equalizer_setup (GstAudioFilter * audio, GstAudioInfo * info)
|
gst_iir_equalizer_setup (GstAudioFilter * audio, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstIirEqualizer *equ = GST_IIR_EQUALIZER (audio);
|
GstIirEqualizer *equ = GST_IIR_EQUALIZER (audio);
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include "gstgoom.h"
|
#include "gstgoom.h"
|
||||||
#include <gst/video/video.h>
|
#include <gst/video/video.h>
|
||||||
|
#include <gst/audio/audio.h>
|
||||||
#include "goom.h"
|
#include "goom.h"
|
||||||
|
|
||||||
#if HAVE_ORC
|
#if HAVE_ORC
|
||||||
@ -82,11 +83,8 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
|||||||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", /* the name of the pads */
|
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink", /* the name of the pads */
|
||||||
GST_PAD_SINK, /* type of the pad */
|
GST_PAD_SINK, /* type of the pad */
|
||||||
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
|
GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */
|
||||||
GST_STATIC_CAPS ("audio/x-raw-int, "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"endianness = (int) BYTE_ORDER, "
|
"format = (string) " GST_AUDIO_NE (S16) ", "
|
||||||
"signed = (boolean) TRUE, "
|
|
||||||
"width = (int) 16, "
|
|
||||||
"depth = (int) 16, "
|
|
||||||
"rate = (int) [ 8000, 96000 ], " "channels = (int) { 1, 2 }")
|
"rate = (int) [ 8000, 96000 ], " "channels = (int) { 1, 2 }")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ plugin_LTLIBRARIES = libgstlevel.la
|
|||||||
|
|
||||||
libgstlevel_la_SOURCES = gstlevel.c
|
libgstlevel_la_SOURCES = gstlevel.c
|
||||||
libgstlevel_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
libgstlevel_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
||||||
libgstlevel_la_LIBADD = $(GST_BASE_LIBS) $(LIBM)
|
libgstlevel_la_LIBADD = $(GST_BASE_LIBS) $(LIBM) -lgstaudio-$(GST_MAJORMINOR)
|
||||||
libgstlevel_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstlevel_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstlevel_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstlevel_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ libgstreplaygain_la_SOURCES = \
|
|||||||
libgstreplaygain_la_CFLAGS = \
|
libgstreplaygain_la_CFLAGS = \
|
||||||
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
$(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CFLAGS)
|
||||||
libgstreplaygain_la_LIBADD = \
|
libgstreplaygain_la_LIBADD = \
|
||||||
$(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_MAJORMINOR) \
|
$(GST_PLUGINS_BASE_LIBS) -lgstpbutils-$(GST_MAJORMINOR) -lgstaudio-$(GST_MAJORMINOR)\
|
||||||
$(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
|
$(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
|
||||||
libgstreplaygain_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
libgstreplaygain_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
|
||||||
libgstreplaygain_la_LIBTOOLFLAGS = --tag=disable-static
|
libgstreplaygain_la_LIBTOOLFLAGS = --tag=disable-static
|
||||||
|
@ -79,6 +79,7 @@
|
|||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/gstbasetransform.h>
|
#include <gst/base/gstbasetransform.h>
|
||||||
|
#include <gst/audio/audio.h>
|
||||||
|
|
||||||
#include "gstrganalysis.h"
|
#include "gstrganalysis.h"
|
||||||
#include "replaygain.h"
|
#include "replaygain.h"
|
||||||
@ -103,27 +104,20 @@ enum
|
|||||||
* audio. The used implementation has filter coefficients for the
|
* audio. The used implementation has filter coefficients for the
|
||||||
* "usual" sample rates in the 8000 to 48000 Hz range. */
|
* "usual" sample rates in the 8000 to 48000 Hz range. */
|
||||||
#define REPLAY_GAIN_CAPS \
|
#define REPLAY_GAIN_CAPS \
|
||||||
|
"format = (string) { "GST_AUDIO_NE(F32)","GST_AUDIO_NE(S16)" }, " \
|
||||||
"channels = (int) { 1, 2 }, " \
|
"channels = (int) { 1, 2 }, " \
|
||||||
"rate = (int) { 8000, 11025, 12000, 16000, 22050, 24000, 32000, " \
|
"rate = (int) { 8000, 11025, 12000, 16000, 22050, 24000, 32000, " \
|
||||||
"44100, 48000 }"
|
"44100, 48000 }"
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-float, "
|
GST_PAD_SINK,
|
||||||
"width = (int) 32, " "endianness = (int) BYTE_ORDER, "
|
GST_PAD_ALWAYS,
|
||||||
REPLAY_GAIN_CAPS "; "
|
GST_STATIC_CAPS (REPLAY_GAIN_CAPS));
|
||||||
"audio/x-raw-int, "
|
|
||||||
"width = (int) 16, " "depth = (int) [ 1, 16 ], "
|
|
||||||
"signed = (boolean) true, " "endianness = (int) BYTE_ORDER, "
|
|
||||||
REPLAY_GAIN_CAPS));
|
|
||||||
|
|
||||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-float, "
|
GST_PAD_SRC,
|
||||||
"width = (int) 32, " "endianness = (int) BYTE_ORDER, "
|
GST_PAD_ALWAYS,
|
||||||
REPLAY_GAIN_CAPS "; "
|
GST_STATIC_CAPS (REPLAY_GAIN_CAPS));
|
||||||
"audio/x-raw-int, "
|
|
||||||
"width = (int) 16, " "depth = (int) [ 1, 16 ], "
|
|
||||||
"signed = (boolean) true, " "endianness = (int) BYTE_ORDER, "
|
|
||||||
REPLAY_GAIN_CAPS));
|
|
||||||
|
|
||||||
#define gst_rg_analysis_parent_class parent_class
|
#define gst_rg_analysis_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRgAnalysis, gst_rg_analysis, GST_TYPE_BASE_TRANSFORM);
|
G_DEFINE_TYPE (GstRgAnalysis, gst_rg_analysis, GST_TYPE_BASE_TRANSFORM);
|
||||||
@ -396,9 +390,8 @@ gst_rg_analysis_set_caps (GstBaseTransform * base, GstCaps * in_caps,
|
|||||||
GstCaps * out_caps)
|
GstCaps * out_caps)
|
||||||
{
|
{
|
||||||
GstRgAnalysis *filter = GST_RG_ANALYSIS (base);
|
GstRgAnalysis *filter = GST_RG_ANALYSIS (base);
|
||||||
GstStructure *structure;
|
GstAudioInfo info;
|
||||||
const gchar *name;
|
gint rate, channels;
|
||||||
gint n_channels, sample_rate, sample_bit_size, sample_size;
|
|
||||||
|
|
||||||
g_return_val_if_fail (filter->ctx != NULL, FALSE);
|
g_return_val_if_fail (filter->ctx != NULL, FALSE);
|
||||||
|
|
||||||
@ -406,57 +399,41 @@ gst_rg_analysis_set_caps (GstBaseTransform * base, GstCaps * in_caps,
|
|||||||
"set_caps in %" GST_PTR_FORMAT " out %" GST_PTR_FORMAT,
|
"set_caps in %" GST_PTR_FORMAT " out %" GST_PTR_FORMAT,
|
||||||
in_caps, out_caps);
|
in_caps, out_caps);
|
||||||
|
|
||||||
structure = gst_caps_get_structure (in_caps, 0);
|
if (!gst_audio_info_from_caps (&info, in_caps))
|
||||||
name = gst_structure_get_name (structure);
|
|
||||||
|
|
||||||
if (!gst_structure_get_int (structure, "width", &sample_bit_size)
|
|
||||||
|| !gst_structure_get_int (structure, "channels", &n_channels)
|
|
||||||
|| !gst_structure_get_int (structure, "rate", &sample_rate))
|
|
||||||
goto invalid_format;
|
goto invalid_format;
|
||||||
|
|
||||||
if (!rg_analysis_set_sample_rate (filter->ctx, sample_rate))
|
rate = GST_AUDIO_INFO_RATE (&info);
|
||||||
|
|
||||||
|
if (!rg_analysis_set_sample_rate (filter->ctx, rate))
|
||||||
goto invalid_format;
|
goto invalid_format;
|
||||||
|
|
||||||
if (sample_bit_size % 8 != 0)
|
channels = GST_AUDIO_INFO_CHANNELS (&info);
|
||||||
goto invalid_format;
|
|
||||||
sample_size = sample_bit_size / 8;
|
|
||||||
|
|
||||||
if (g_str_equal (name, "audio/x-raw-float")) {
|
if (channels < 1 || channels > 2)
|
||||||
|
|
||||||
if (sample_size != sizeof (gfloat))
|
|
||||||
goto invalid_format;
|
goto invalid_format;
|
||||||
|
|
||||||
|
switch (GST_AUDIO_INFO_FORMAT (&info)) {
|
||||||
|
case GST_AUDIO_FORMAT_F32:
|
||||||
/* The depth is not variable for float formats of course. It just
|
/* The depth is not variable for float formats of course. It just
|
||||||
* makes the transform function nice and simple if the
|
* makes the transform function nice and simple if the
|
||||||
* rg_analysis_analyze_* functions have a common signature. */
|
* rg_analysis_analyze_* functions have a common signature. */
|
||||||
filter->depth = sizeof (gfloat) * 8;
|
filter->depth = sizeof (gfloat) * 8;
|
||||||
|
|
||||||
if (n_channels == 1)
|
if (channels == 1)
|
||||||
filter->analyze = rg_analysis_analyze_mono_float;
|
filter->analyze = rg_analysis_analyze_mono_float;
|
||||||
else if (n_channels == 2)
|
else
|
||||||
filter->analyze = rg_analysis_analyze_stereo_float;
|
filter->analyze = rg_analysis_analyze_stereo_float;
|
||||||
else
|
|
||||||
goto invalid_format;
|
|
||||||
|
|
||||||
} else if (g_str_equal (name, "audio/x-raw-int")) {
|
break;
|
||||||
|
case GST_AUDIO_FORMAT_S16:
|
||||||
|
filter->depth = sizeof (gint16) * 8;
|
||||||
|
|
||||||
if (sample_size != sizeof (gint16))
|
if (channels == 1)
|
||||||
goto invalid_format;
|
|
||||||
|
|
||||||
if (!gst_structure_get_int (structure, "depth", &filter->depth))
|
|
||||||
goto invalid_format;
|
|
||||||
if (filter->depth < 1 || filter->depth > 16)
|
|
||||||
goto invalid_format;
|
|
||||||
|
|
||||||
if (n_channels == 1)
|
|
||||||
filter->analyze = rg_analysis_analyze_mono_int16;
|
filter->analyze = rg_analysis_analyze_mono_int16;
|
||||||
else if (n_channels == 2)
|
|
||||||
filter->analyze = rg_analysis_analyze_stereo_int16;
|
|
||||||
else
|
else
|
||||||
goto invalid_format;
|
filter->analyze = rg_analysis_analyze_stereo_int16;
|
||||||
|
break;
|
||||||
} else {
|
default:
|
||||||
|
|
||||||
goto invalid_format;
|
goto invalid_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@
|
|||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <gst/audio/audio.h>
|
||||||
|
|
||||||
#include "gstrglimiter.h"
|
#include "gstrglimiter.h"
|
||||||
|
|
||||||
@ -58,14 +59,18 @@ enum
|
|||||||
};
|
};
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_factory = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-float, "
|
GST_PAD_SINK,
|
||||||
"width = (int) 32, channels = (int) [1, MAX], "
|
GST_PAD_ALWAYS,
|
||||||
"rate = (int) [1, MAX], endianness = (int) BYTE_ORDER"));
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
|
"format = (string) " GST_AUDIO_NE (F32) ", "
|
||||||
|
"channels = (int) [1, MAX], " "rate = (int) [1, MAX]"));
|
||||||
|
|
||||||
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-float, "
|
GST_PAD_SRC,
|
||||||
"width = (int) 32, channels = (int) [1, MAX], "
|
GST_PAD_ALWAYS,
|
||||||
"rate = (int) [1, MAX], endianness = (int) BYTE_ORDER"));
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
|
"format = (string) " GST_AUDIO_NE (F32) ", "
|
||||||
|
"channels = (int) [1, MAX], " "rate = (int) [1, MAX]"));
|
||||||
|
|
||||||
#define gst_rg_limiter_parent_class parent_class
|
#define gst_rg_limiter_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRgLimiter, gst_rg_limiter, GST_TYPE_BASE_TRANSFORM);
|
G_DEFINE_TYPE (GstRgLimiter, gst_rg_limiter, GST_TYPE_BASE_TRANSFORM);
|
||||||
|
@ -61,6 +61,7 @@
|
|||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/pbutils/pbutils.h>
|
#include <gst/pbutils/pbutils.h>
|
||||||
|
#include <gst/audio/audio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "gstrgvolume.h"
|
#include "gstrgvolume.h"
|
||||||
@ -96,29 +97,21 @@ enum
|
|||||||
|
|
||||||
/* Same template caps as GstVolume, for I don't like having just ANY caps. */
|
/* Same template caps as GstVolume, for I don't like having just ANY caps. */
|
||||||
|
|
||||||
|
#define FORMAT "{ "GST_AUDIO_NE(F32)","GST_AUDIO_NE(S16)" }"
|
||||||
|
|
||||||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||||
GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-float, "
|
GST_PAD_SINK,
|
||||||
"rate = (int) [ 1, MAX ], "
|
GST_PAD_ALWAYS,
|
||||||
"channels = (int) [ 1, MAX ], "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"endianness = (int) BYTE_ORDER, "
|
"format = (string) " FORMAT ", "
|
||||||
"width = (int) 32; "
|
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]"));
|
||||||
"audio/x-raw-int, "
|
|
||||||
"channels = (int) [ 1, MAX ], "
|
|
||||||
"rate = (int) [ 1, MAX ], "
|
|
||||||
"endianness = (int) BYTE_ORDER, "
|
|
||||||
"width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE"));
|
|
||||||
|
|
||||||
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||||
GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ("audio/x-raw-float, "
|
GST_PAD_SRC,
|
||||||
"rate = (int) [ 1, MAX ], "
|
GST_PAD_ALWAYS,
|
||||||
"channels = (int) [ 1, MAX ], "
|
GST_STATIC_CAPS ("audio/x-raw, "
|
||||||
"endianness = (int) BYTE_ORDER, "
|
"format = (string) " FORMAT ", "
|
||||||
"width = (int) 32; "
|
"rate = (int) [ 1, MAX ], " "channels = (int) [ 1, MAX ]"));
|
||||||
"audio/x-raw-int, "
|
|
||||||
"channels = (int) [ 1, MAX ], "
|
|
||||||
"rate = (int) [ 1, MAX ], "
|
|
||||||
"endianness = (int) BYTE_ORDER, "
|
|
||||||
"width = (int) 16, " "depth = (int) 16, " "signed = (bool) TRUE"));
|
|
||||||
|
|
||||||
#define gst_rg_volume_parent_class parent_class
|
#define gst_rg_volume_parent_class parent_class
|
||||||
G_DEFINE_TYPE (GstRgVolume, gst_rg_volume, GST_TYPE_BIN);
|
G_DEFINE_TYPE (GstRgVolume, gst_rg_volume, GST_TYPE_BIN);
|
||||||
@ -186,7 +179,7 @@ gst_rg_volume_class_init (GstRgVolumeClass * klass)
|
|||||||
* This element internally uses a volume element, which also supports
|
* This element internally uses a volume element, which also supports
|
||||||
* operating on integer audio formats. These formats do not allow exceeding
|
* operating on integer audio formats. These formats do not allow exceeding
|
||||||
* digital full scale. If extra headroom is used, make sure that the raw
|
* digital full scale. If extra headroom is used, make sure that the raw
|
||||||
* audio data format is floating point (audio/x-raw-float). Otherwise,
|
* audio data format is floating point (F32). Otherwise,
|
||||||
* clipping distortion might be introduced as part of the volume adjustment
|
* clipping distortion might be introduced as part of the volume adjustment
|
||||||
* itself.
|
* itself.
|
||||||
*/
|
*/
|
||||||
|
@ -152,7 +152,8 @@ static gboolean gst_spectrum_start (GstBaseTransform * trans);
|
|||||||
static gboolean gst_spectrum_stop (GstBaseTransform * trans);
|
static gboolean gst_spectrum_stop (GstBaseTransform * trans);
|
||||||
static GstFlowReturn gst_spectrum_transform_ip (GstBaseTransform * trans,
|
static GstFlowReturn gst_spectrum_transform_ip (GstBaseTransform * trans,
|
||||||
GstBuffer * in);
|
GstBuffer * in);
|
||||||
static gboolean gst_spectrum_setup (GstAudioFilter * base, GstAudioInfo * info);
|
static gboolean gst_spectrum_setup (GstAudioFilter * base,
|
||||||
|
const GstAudioInfo * info);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_spectrum_class_init (GstSpectrumClass * klass)
|
gst_spectrum_class_init (GstSpectrumClass * klass)
|
||||||
@ -614,7 +615,7 @@ input_data_int16_max (const guint8 * _in, gfloat * out, guint len,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_spectrum_setup (GstAudioFilter * base, GstAudioInfo * info)
|
gst_spectrum_setup (GstAudioFilter * base, const GstAudioInfo * info)
|
||||||
{
|
{
|
||||||
GstSpectrum *spectrum = GST_SPECTRUM (base);
|
GstSpectrum *spectrum = GST_SPECTRUM (base);
|
||||||
gboolean multi_channel = spectrum->multi_channel;
|
gboolean multi_channel = spectrum->multi_channel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user