Commit 9b4469b2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Privatize aout_request_vout_t

parent e44eb2ad
......@@ -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;
};
......
......@@ -31,6 +31,13 @@
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;
......
......@@ -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 );
}
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment