[vlc-commits] aout_FiltersCreatePipeline: use vlc_object rather than audio_output

Rémi Denis-Courmont git at videolan.org
Sat Aug 6 19:41:58 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug  6 20:41:43 2011 +0300| [144ba0d10dbb24bca488eb312b7103b55a6aa7c6] | committer: Rémi Denis-Courmont

aout_FiltersCreatePipeline: use vlc_object rather than audio_output

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=144ba0d10dbb24bca488eb312b7103b55a6aa7c6
---

 src/audio_output/aout_internal.h |    4 +++-
 src/audio_output/filters.c       |    7 ++++---
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 8fe921c..7bd3081 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -135,8 +135,10 @@ block_t *aout_InputPlay( audio_output_t *p_aout, aout_input_t *p_input,
 void aout_InputCheckAndRestart( audio_output_t * p_aout, aout_input_t * p_input );
 
 /* From filters.c : */
-int aout_FiltersCreatePipeline( audio_output_t *, filter_t **, int *,
+int aout_FiltersCreatePipeline( vlc_object_t *, filter_t **, int *,
     const audio_sample_format_t *, const audio_sample_format_t * );
+#define aout_FiltersCreatePipeline(o, pv, pc, inf, outf) \
+        aout_FiltersCreatePipeline(VLC_OBJECT(o), pv, pc, inf, outf)
 void aout_FiltersDestroyPipeline( filter_t *const *, unsigned );
 void aout_FiltersPlay( filter_t *const *, unsigned, aout_buffer_t ** );
 
diff --git a/src/audio_output/filters.c b/src/audio_output/filters.c
index 64e3983..aeb0d4e 100644
--- a/src/audio_output/filters.c
+++ b/src/audio_output/filters.c
@@ -49,14 +49,14 @@ block_t *aout_FilterBufferNew( filter_t *p_filter, int size )
 /*****************************************************************************
  * FindFilter: find an audio filter for a specific transformation
  *****************************************************************************/
-static filter_t * FindFilter( audio_output_t * p_aout,
+static filter_t * FindFilter( vlc_object_t *obj,
                               const audio_sample_format_t * p_input_format,
                               const audio_sample_format_t * p_output_format )
 {
     static const char typename[] = "audio filter";
     filter_t * p_filter;
 
-    p_filter = vlc_custom_create( p_aout, sizeof(*p_filter), typename );
+    p_filter = vlc_custom_create( obj, sizeof(*p_filter), typename );
 
     if ( p_filter == NULL ) return NULL;
 
@@ -120,6 +120,7 @@ static int SplitConversion( const audio_sample_format_t *restrict infmt,
     return AOUT_FMTS_IDENTICAL( infmt, midfmt ) ? -1 : 0;
 }
 
+#undef aout_FiltersCreatePipeline
 /**
  * Allocates audio format conversion filters
  * @param obj parent VLC object for new filters
@@ -129,7 +130,7 @@ static int SplitConversion( const audio_sample_format_t *restrict infmt,
  * @param outfmt output audio format
  * @return 0 on success, -1 on failure
  */
-int aout_FiltersCreatePipeline( audio_output_t *obj,
+int aout_FiltersCreatePipeline( vlc_object_t *obj,
                                 filter_t **filters,
                                 int *nb_filters,
                                 const audio_sample_format_t *restrict infmt,



More information about the vlc-commits mailing list