From 4ef27eb0f9fbd6134acca46c1bb93a5e76e83a30 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Sun, 9 Jun 2013 20:29:09 +0200 Subject: [PATCH] audiopanorama: move the enum to the header and use instead of gint Move the enum for the processing method to the header so that we can use the type for the instance struct. --- gst/audiofx/audiopanorama.c | 16 ---------------- gst/audiofx/audiopanorama.h | 10 ++++++++-- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/gst/audiofx/audiopanorama.c b/gst/audiofx/audiopanorama.c index 1eb7c3fdea..72e09bf8c8 100644 --- a/gst/audiofx/audiopanorama.c +++ b/gst/audiofx/audiopanorama.c @@ -51,12 +51,6 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT); /* Filter signals and args */ -enum -{ - /* FILL ME */ - LAST_SIGNAL -}; - enum { PROP_0, @@ -64,13 +58,6 @@ enum PROP_METHOD }; -enum -{ - METHOD_PSYCHOACOUSTIC = 0, - METHOD_SIMPLE, - NUM_METHODS -}; - #define GST_TYPE_AUDIO_PANORAMA_METHOD (gst_audio_panorama_method_get_type ()) static GType gst_audio_panorama_method_get_type (void) @@ -249,10 +236,7 @@ gst_audio_panorama_set_process_function (GstAudioPanorama * filter, } format_index = GST_AUDIO_FORMAT_INFO_IS_FLOAT (finfo) ? 1 : 0; - method_index = filter->method; - if (method_index >= NUM_METHODS || method_index < 0) - method_index = METHOD_PSYCHOACOUSTIC; filter->process = panorama_process_functions[channel_index][format_index][method_index]; diff --git a/gst/audiofx/audiopanorama.h b/gst/audiofx/audiopanorama.h index 93f48805d6..9e73d788fa 100644 --- a/gst/audiofx/audiopanorama.h +++ b/gst/audiofx/audiopanorama.h @@ -39,16 +39,22 @@ typedef struct _GstAudioPanoramaClass GstAudioPanoramaClass; typedef void (*GstAudioPanoramaProcessFunc)(GstAudioPanorama*, guint8*, guint8*, guint); +typedef enum +{ + METHOD_PSYCHOACOUSTIC = 0, + METHOD_SIMPLE +} GstAudioPanoramaMethod; + struct _GstAudioPanorama { GstBaseTransform element; + /* properties */ gfloat panorama; + GstAudioPanoramaMethod method; /* < private > */ GstAudioPanoramaProcessFunc process; - GstAudioInfo info; - gint method; }; struct _GstAudioPanoramaClass {