mirror of https://code.videolan.org/videolan/vlc
Remove filter_t.pf_audio_buffer_new
This commit is contained in:
parent
6cdef6722f
commit
cece0cc754
|
@ -89,10 +89,8 @@ struct filter_t
|
|||
struct
|
||||
{
|
||||
block_t * (*pf_filter) ( filter_t *, block_t * );
|
||||
block_t * (*pf_buffer_new) ( filter_t *, int );
|
||||
} audio;
|
||||
#define pf_audio_filter u.audio.pf_filter
|
||||
#define pf_audio_buffer_new u.audio.pf_buffer_new
|
||||
|
||||
struct
|
||||
{
|
||||
|
@ -211,23 +209,7 @@ static inline void filter_DeleteSubpicture( filter_t *p_filter, subpicture_t *p_
|
|||
p_filter->pf_sub_buffer_del( p_filter, p_subpicture );
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return a new audio buffer usable by p_filter as an
|
||||
* output buffer. You have to release it using block_Release or by returning
|
||||
* it to the caller as a pf_audio_filter return value.
|
||||
* Provided for convenience.
|
||||
*
|
||||
* \param p_filter filter_t object
|
||||
* \param i_size size of audio buffer requested
|
||||
* \return block to be used as audio output buffer
|
||||
*/
|
||||
static inline block_t *filter_NewAudioBuffer( filter_t *p_filter, int i_size )
|
||||
{
|
||||
block_t *p_block = p_filter->pf_audio_buffer_new( p_filter, i_size );
|
||||
if( !p_block )
|
||||
msg_Warn( p_filter, "can't get output block" );
|
||||
return p_block;
|
||||
}
|
||||
#define filter_NewAudioBuffer block_New
|
||||
|
||||
/**
|
||||
* This function gives all input attachments at once.
|
||||
|
|
|
@ -466,7 +466,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
|
|||
i_out_size = p_block->i_nb_samples * p_filter->p_sys->i_bitspersample/8 *
|
||||
aout_FormatNbChannels( &(p_filter->fmt_out.audio) );
|
||||
|
||||
p_out = p_filter->pf_audio_buffer_new( p_filter, i_out_size );
|
||||
p_out = block_Alloc( i_out_size );
|
||||
if( !p_out )
|
||||
{
|
||||
msg_Warn( p_filter, "can't get output buffer" );
|
||||
|
|
|
@ -369,7 +369,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
|
|||
p_filter->fmt_out.audio.i_bitspersample *
|
||||
p_filter->fmt_out.audio.i_channels / 8;
|
||||
|
||||
block_t *p_out = p_filter->pf_audio_buffer_new( p_filter, i_out_size );
|
||||
block_t *p_out = block_Alloc( i_out_size );
|
||||
if( !p_out )
|
||||
{
|
||||
msg_Warn( p_filter, "can't get output buffer" );
|
||||
|
|
|
@ -236,7 +236,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
|
|||
p_filter->fmt_out.audio.i_bitspersample *
|
||||
p_filter->fmt_out.audio.i_channels / 8;
|
||||
|
||||
block_t *p_out = p_filter->pf_audio_buffer_new( p_filter, i_out_size );
|
||||
block_t *p_out = block_Alloc( i_out_size );
|
||||
if( !p_out )
|
||||
{
|
||||
msg_Warn( p_filter, "can't get output buffer" );
|
||||
|
|
|
@ -62,12 +62,6 @@ static inline void audio_timer_close( encoder_t * p_encoder )
|
|||
stats_TimerClean( p_encoder, STATS_TIMER_AUDIO_FRAME_ENCODING );
|
||||
}
|
||||
|
||||
static block_t *transcode_audio_alloc( filter_t *p_filter, int size )
|
||||
{
|
||||
VLC_UNUSED( p_filter );
|
||||
return block_Alloc( size );
|
||||
}
|
||||
|
||||
static aout_buffer_t *audio_new_buffer( decoder_t *p_dec, int i_samples )
|
||||
{
|
||||
block_t *p_block;
|
||||
|
@ -97,8 +91,8 @@ static aout_buffer_t *audio_new_buffer( decoder_t *p_dec, int i_samples )
|
|||
static int transcode_audio_filter_allocation_init( filter_t *p_filter,
|
||||
void *data )
|
||||
{
|
||||
VLC_UNUSED(p_filter);
|
||||
VLC_UNUSED(data);
|
||||
p_filter->pf_audio_buffer_new = transcode_audio_alloc;
|
||||
return VLC_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,6 @@ struct filter_owner_sys_t
|
|||
aout_input_t *p_input;
|
||||
};
|
||||
|
||||
block_t *aout_FilterBufferNew( filter_t *, int );
|
||||
|
||||
/** an input stream for the audio output */
|
||||
struct aout_input_t
|
||||
{
|
||||
|
|
|
@ -40,12 +40,6 @@
|
|||
#include "aout_internal.h"
|
||||
#include <libvlc.h>
|
||||
|
||||
block_t *aout_FilterBufferNew( filter_t *p_filter, int size )
|
||||
{
|
||||
(void) p_filter;
|
||||
return block_Alloc( size );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* FindFilter: find an audio filter for a specific transformation
|
||||
*****************************************************************************/
|
||||
|
@ -66,7 +60,6 @@ static filter_t * FindFilter( vlc_object_t *obj,
|
|||
memcpy( &p_filter->fmt_out.audio, p_output_format,
|
||||
sizeof(audio_sample_format_t) );
|
||||
p_filter->fmt_out.i_codec = p_output_format->i_format;
|
||||
p_filter->pf_audio_buffer_new = aout_FilterBufferNew;
|
||||
p_filter->p_owner = NULL;
|
||||
|
||||
p_filter->p_module = module_need( p_filter, "audio filter", NULL, false );
|
||||
|
|
|
@ -159,7 +159,6 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
|
|||
memcpy( &p_filter->fmt_out.audio, &chain_output_format,
|
||||
sizeof(audio_sample_format_t) );
|
||||
p_filter->fmt_out.i_codec = chain_output_format.i_format;
|
||||
p_filter->pf_audio_buffer_new = aout_FilterBufferNew;
|
||||
|
||||
/* try to find the requested filter */
|
||||
if( i_visual == 2 ) /* this can only be a visualization module */
|
||||
|
|
Loading…
Reference in New Issue