mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
filter: add pf_audio_flush and pf_audio_drain
pf_audio_flush will flush/reset the state of an audio filter. pf_audio_drain will drain an audio filter, it'll returns a block_t containing the drained output.
This commit is contained in:
parent
51ca639648
commit
9dc41985c9
@ -107,8 +107,12 @@ struct filter_t
|
||||
struct
|
||||
{
|
||||
block_t * (*pf_filter) ( filter_t *, block_t * );
|
||||
void (*pf_flush) ( filter_t * );
|
||||
block_t * (*pf_drain) ( filter_t * );
|
||||
} audio;
|
||||
#define pf_audio_filter u.audio.pf_filter
|
||||
#define pf_audio_flush u.audio.pf_flush
|
||||
#define pf_audio_drain u.audio.pf_drain
|
||||
|
||||
struct
|
||||
{
|
||||
@ -178,6 +182,26 @@ static inline void filter_FlushPictures( filter_t *p_filter )
|
||||
p_filter->pf_video_flush( p_filter );
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will flush the state of an audio filter.
|
||||
*/
|
||||
static inline void filter_FlushAudio( filter_t *p_filter )
|
||||
{
|
||||
if( p_filter->pf_audio_flush )
|
||||
p_filter->pf_audio_flush( p_filter );
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will drain, then flush an audio filter.
|
||||
*/
|
||||
static inline block_t *filter_DrainAudio( filter_t *p_filter )
|
||||
{
|
||||
if( p_filter->pf_audio_drain )
|
||||
return p_filter->pf_audio_drain( p_filter );
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function will return a new subpicture usable by p_filter as an output
|
||||
* buffer. You have to release it using subpicture_Delete or by returning it to
|
||||
|
Loading…
Reference in New Issue
Block a user