#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;
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;
};
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;
}
}
-/*****************************************************************************
- * 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 );
-}
-
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
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;
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,