VLC 4.0.0-dev
filters.c File Reference
Include dependency graph for filters.c:

Data Structures

struct  aout_filter
 
struct  aout_filters
 
struct  filter_owner_sys
 

Macros

#define AOUT_MAX_FILTERS   10
 

Functions

static void aout_filter_Init (struct aout_filter *tab, filter_t *f)
 
filter_taout_filter_Create (vlc_object_t *obj, const filter_owner_t *restrict owner, const char *type, const char *name, const audio_sample_format_t *infmt, const audio_sample_format_t *outfmt, config_chain_t *cfg, bool const_fmt)
 
static filter_tFindConverter (vlc_object_t *obj, const audio_sample_format_t *infmt, const audio_sample_format_t *outfmt)
 
static filter_tFindResampler (vlc_object_t *obj, const audio_sample_format_t *infmt, const audio_sample_format_t *outfmt)
 
static void aout_FilterDestroy (filter_t *filter)
 
static void aout_FiltersPipelineDestroy (struct aout_filter *tab, unsigned n)
 Destroys a chain of audio filters. More...
 
static filter_tTryFormat (vlc_object_t *obj, vlc_fourcc_t codec, audio_sample_format_t *restrict fmt)
 
static int aout_FiltersPipelineCreate (vlc_object_t *obj, struct aout_filter *tab, unsigned *count, unsigned max, const audio_sample_format_t *restrict infmt, const audio_sample_format_t *restrict outfmt)
 Allocates audio format conversion filters. More...
 
static block_taout_FiltersPipelinePlay (const struct aout_filter *tab, unsigned count, block_t *block)
 Filters an audio buffer through a chain of filters. More...
 
static block_taout_FiltersPipelineDrain (const struct aout_filter *tab, unsigned count)
 Drain the chain of filters. More...
 
static void aout_FiltersPipelineFlush (const struct aout_filter *tab, unsigned count)
 Flush the chain of filters. More...
 
static void aout_FiltersPipelineChangeViewpoint (const struct aout_filter *tab, unsigned count, const vlc_viewpoint_t *vp)
 
static int VisualizationCallback (vlc_object_t *obj, const char *var, vlc_value_t oldval, vlc_value_t newval, void *data)
 Callback for visualization selection. More...
 
vout_thread_taout_filter_GetVout (filter_t *filter, const video_format_t *fmt)
 Create a vout from an "visualization" audio filter. More...
 
static int AppendFilter (vlc_object_t *obj, const char *type, const char *name, aout_filters_t *restrict filters, audio_sample_format_t *restrict infmt, const audio_sample_format_t *restrict outfmt, config_chain_t *cfg)
 
static int AppendRemapFilter (vlc_object_t *obj, aout_filters_t *restrict filters, audio_sample_format_t *restrict infmt, const audio_sample_format_t *restrict outfmt, const int *wg4_remap)
 
aout_filters_taout_FiltersNewWithClock (vlc_object_t *obj, const vlc_clock_t *clock, const audio_sample_format_t *restrict infmt, const audio_sample_format_t *restrict outfmt, const aout_filters_cfg_t *cfg)
 
static void aout_FiltersPipelineResetClock (const struct aout_filter *tab, unsigned count)
 
void aout_FiltersResetClock (aout_filters_t *filters)
 
static void aout_FiltersPipelineSetClockDelay (const struct aout_filter *tab, unsigned count, vlc_tick_t delay)
 
void aout_FiltersSetClockDelay (aout_filters_t *filters, vlc_tick_t delay)
 
aout_filters_taout_FiltersNew (vlc_object_t *obj, const audio_sample_format_t *restrict infmt, const audio_sample_format_t *restrict outfmt, const aout_filters_cfg_t *cfg)
 Sets a chain of audio filters up. More...
 
void aout_FiltersDelete (vlc_object_t *obj, aout_filters_t *filters)
 Destroys a chain of audio filters. More...
 
bool aout_FiltersCanResample (aout_filters_t *filters)
 
bool aout_FiltersAdjustResampling (aout_filters_t *filters, int adjust)
 
block_taout_FiltersPlay (aout_filters_t *filters, block_t *block, float rate)
 
block_taout_FiltersDrain (aout_filters_t *filters)
 
void aout_FiltersFlush (aout_filters_t *filters)
 
void aout_FiltersChangeViewpoint (aout_filters_t *filters, const vlc_viewpoint_t *vp)
 

Macro Definition Documentation

◆ AOUT_MAX_FILTERS

#define AOUT_MAX_FILTERS   10

Function Documentation

◆ aout_filter_Create()

◆ aout_filter_Init()

static void aout_filter_Init ( struct aout_filter tab,
filter_t f 
)
inlinestatic

◆ aout_FilterDestroy()

static void aout_FilterDestroy ( filter_t filter)
static

◆ aout_FiltersCanResample()

bool aout_FiltersCanResample ( aout_filters_t filters)

◆ aout_FiltersNew()

aout_filters_t * aout_FiltersNew ( vlc_object_t obj,
const audio_sample_format_t *restrict  infmt,
const audio_sample_format_t *restrict  outfmt,
const aout_filters_cfg_t cfg 
)

Sets a chain of audio filters up.

Parameters
objparent object for the filters
infmtchain input format [IN]
outfmtchain output format [IN]
cfga valid aout_filters_cfg_t struct or NULL.
Returns
a filters chain or NULL on failure

References aout_FiltersNewWithClock().

◆ aout_FiltersNewWithClock()

◆ aout_FiltersPipelineChangeViewpoint()

static void aout_FiltersPipelineChangeViewpoint ( const struct aout_filter tab,
unsigned  count,
const vlc_viewpoint_t vp 
)
static

◆ aout_FiltersPipelineCreate()

static int aout_FiltersPipelineCreate ( vlc_object_t obj,
struct aout_filter tab,
unsigned *  count,
unsigned  max,
const audio_sample_format_t *restrict  infmt,
const audio_sample_format_t *restrict  outfmt 
)
static

Allocates audio format conversion filters.

Parameters
objparent VLC object for new filters
filterstable of filters [IN/OUT]
countpointer to the number of filters in the table [IN/OUT]
maxsize of filters table [IN]
infmtinput audio format
outfmtoutput audio format
Returns
0 on success, -1 on failure

References _, aout_filter_Create(), aout_filter_Init(), aout_FiltersPipelineDestroy(), AOUT_FMT_LINEAR, aout_FormatPrepare(), aout_FormatsPrint, audio_format_t::channel_type, count, FindConverter(), audio_format_t::i_chan_mode, audio_format_t::i_format, audio_format_t::i_physical_channels, audio_format_t::i_rate, msg_Dbg, msg_Err, TryFormat(), VLC_CODEC_FL32, and vlc_dialog_display_error.

Referenced by aout_FiltersNewWithClock(), and AppendFilter().

◆ aout_FiltersPipelineDestroy()

static void aout_FiltersPipelineDestroy ( struct aout_filter tab,
unsigned  n 
)
static

◆ aout_FiltersPipelineDrain()

static block_t * aout_FiltersPipelineDrain ( const struct aout_filter tab,
unsigned  count 
)
static

◆ aout_FiltersPipelineFlush()

static void aout_FiltersPipelineFlush ( const struct aout_filter tab,
unsigned  count 
)
static

Flush the chain of filters.

References count, and filter_Flush().

Referenced by aout_FiltersFlush().

◆ aout_FiltersPipelinePlay()

static block_t * aout_FiltersPipelinePlay ( const struct aout_filter tab,
unsigned  count,
block_t block 
)
static

Filters an audio buffer through a chain of filters.

References count, aout_filter::f, vlc_filter_operations::filter_audio, and filter_t::ops.

Referenced by aout_FiltersDrain(), aout_FiltersPipelineDrain(), and aout_FiltersPlay().

◆ aout_FiltersPipelineResetClock()

static void aout_FiltersPipelineResetClock ( const struct aout_filter tab,
unsigned  count 
)
static

◆ aout_FiltersPipelineSetClockDelay()

static void aout_FiltersPipelineSetClockDelay ( const struct aout_filter tab,
unsigned  count,
vlc_tick_t  delay 
)
static

◆ aout_FiltersResetClock()

void aout_FiltersResetClock ( aout_filters_t filters)

◆ aout_FiltersSetClockDelay()

◆ AppendFilter()

◆ AppendRemapFilter()

static int AppendRemapFilter ( vlc_object_t obj,
aout_filters_t *restrict  filters,
audio_sample_format_t *restrict  infmt,
const audio_sample_format_t *restrict  outfmt,
const int *  wg4_remap 
)
static

◆ FindConverter()

static filter_t * FindConverter ( vlc_object_t obj,
const audio_sample_format_t infmt,
const audio_sample_format_t outfmt 
)
static

◆ FindResampler()

static filter_t * FindResampler ( vlc_object_t obj,
const audio_sample_format_t infmt,
const audio_sample_format_t outfmt 
)
static

◆ TryFormat()

static filter_t * TryFormat ( vlc_object_t obj,
vlc_fourcc_t  codec,
audio_sample_format_t *restrict  fmt 
)
static

◆ VisualizationCallback()

static int VisualizationCallback ( vlc_object_t obj,
const char *  var,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  data 
)
static