]> git.sesse.net Git - vlc/commitdiff
Privatize aout_request_vout_t
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 27 Sep 2009 13:07:10 +0000 (16:07 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 27 Sep 2009 13:07:10 +0000 (16:07 +0300)
include/vlc_aout.h
src/audio_output/aout_internal.h
src/audio_output/filters.c
src/audio_output/input.c

index 39b38d1d38f9add12e60e62f2c7431a79deeaa1c..8660c718f9be0f876e190a8c7728245f50ec9c9d 100644 (file)
@@ -155,14 +155,6 @@ struct aout_fifo_t
 #include <vlc_aout_mixer.h>
 #include <vlc_block.h>
 
-/* */
-typedef struct
-{
-    vout_thread_t  *(*pf_request_vout)( void *,
-                                        vout_thread_t *, video_format_t *, bool b_recycle );
-    void *p_private;
-} aout_request_vout_t;
-
 /** audio output filter */
 typedef struct aout_filter_owner_sys_t aout_filter_owner_sys_t;
 typedef struct aout_filter_sys_t aout_filter_sys_t;
@@ -183,13 +175,6 @@ struct aout_filter_t
     void                    (*pf_do_work)( aout_instance_t *, aout_filter_t *,
                                            aout_buffer_t *, aout_buffer_t * );
 
-    /* Owner fieldS
-     * XXX You MUST not use them directly */
-
-    /* Vout callback
-     * XXX use aout_filter_RequestVout */
-    aout_request_vout_t request_vout;
-
     /* Private structure for the owner of the filter */
     aout_filter_owner_sys_t *p_owner;
 };
index 80a96401ce0d3941829a2e263b2d8e1dda06e10b..1e18c0564134b73e2cce5a3492abeeb90ab78c2b 100644 (file)
 aout_buffer_t *aout_BufferAlloc(aout_alloc_t *allocation, mtime_t microseconds,
         aout_buffer_t *old_buffer);
 
+typedef struct
+{
+    struct vout_thread_t  *(*pf_request_vout)( void *, struct vout_thread_t *,
+                                               video_format_t *, bool );
+    void *p_private;
+} aout_request_vout_t;
+
 struct aout_filter_owner_sys_t
 {
     aout_instance_t *p_aout;
index 7553c145f46453cbc63bc4802e41b1cf853aee39..b2f1bf66d630e52ac61d6d8032bddb1705ea1063 100644 (file)
@@ -373,15 +373,3 @@ void aout_FiltersPlay( aout_instance_t * p_aout,
     }
 }
 
-/*****************************************************************************
- * aout_filter_RequestVout
- *****************************************************************************/
-vout_thread_t *aout_filter_RequestVout( aout_filter_t *p_filter,
-                                        vout_thread_t *p_vout, video_format_t *p_fmt )
-{
-    if( !p_filter->request_vout.pf_request_vout )
-        return NULL;
-    return p_filter->request_vout.pf_request_vout( p_filter->request_vout.p_private,
-                                                   p_vout, p_fmt, true );
-}
-
index 4180e43aa1bc238d95131661673bfd2468e3512d..79916b574269739477eeb6677050793250d76c22 100644 (file)
@@ -63,8 +63,6 @@ static void ReplayGainSelect( aout_instance_t *, aout_input_t * );
 
 static vout_thread_t *RequestVout( void *,
                                    vout_thread_t *, video_format_t *, bool );
-static vout_thread_t *RequestVoutFromFilter( void *,
-                                             vout_thread_t *, video_format_t *, bool  );
 
 /*****************************************************************************
  * aout_InputNew : allocate a new input and rework the filter pipeline
@@ -285,9 +283,6 @@ int aout_InputNew( aout_instance_t * p_aout, aout_input_t * p_input, const aout_
 
             vlc_object_attach( p_filter , p_aout );
 
-            p_filter->request_vout.pf_request_vout = RequestVoutFromFilter;
-            p_filter->request_vout.p_private = p_input;
-
             p_filter->p_owner = malloc( sizeof(*p_filter->p_owner) );
             p_filter->p_owner->p_aout  = p_aout;
             p_filter->p_owner->p_input = p_input;
@@ -810,14 +805,14 @@ static vout_thread_t *RequestVout( void *p_private,
     return vout_Request( p_aout, p_vout, p_fmt );
 }
 
-static vout_thread_t *RequestVoutFromFilter( void *p_private,
-                                            vout_thread_t *p_vout, video_format_t *p_fmt, bool b_recycle )
+vout_thread_t *aout_filter_RequestVout( aout_filter_t *p_filter,
+                                        vout_thread_t *p_vout, video_format_t *p_fmt )
 {
-    aout_input_t *p_input = p_private;
+    aout_input_t *p_input = p_filter->p_owner->p_input;
     aout_request_vout_t *p_request = &p_input->request_vout;
 
     return p_request->pf_request_vout( p_request->p_private,
-                                       p_vout, p_fmt, p_input->b_recycle_vout && b_recycle );
+                                       p_vout, p_fmt, p_input->b_recycle_vout );
 }
 
 static int ChangeFiltersString( aout_instance_t * p_aout, const char* psz_variable,