VLC  4.0.0-dev
Data Structures | Macros | Functions
filters.c File Reference
Include dependency graph for filters.c:

Data Structures

struct  aout_filters
 

Macros

#define AOUT_MAX_FILTERS   10
 

Functions

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_FiltersPipelineDestroy (filter_t *const *filters, 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, filter_t **filters, 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 (filter_t *const *filters, unsigned count, block_t *block)
 Filters an audio buffer through a chain of filters. More...
 
static block_taout_FiltersPipelineDrain (filter_t *const *filters, unsigned count)
 Drain the chain of filters. More...
 
static void aout_FiltersPipelineFlush (filter_t *const *filters, unsigned count)
 Flush the chain of filters. More...
 
static void aout_FiltersPipelineChangeViewpoint (filter_t *const *filters, 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)
 
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)
 
void aout_FiltersResetClock (aout_filters_t *filters)
 
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()

filter_t* aout_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 
)

◆ aout_FiltersCanResample()

bool aout_FiltersCanResample ( aout_filters_t filters)

References aout_filters::resampler.

Referenced by aout_RequestRetiming().

◆ 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_filters_t* aout_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 
)

◆ aout_FiltersPipelineChangeViewpoint()

static void aout_FiltersPipelineChangeViewpoint ( filter_t *const *  filters,
unsigned  count,
const vlc_viewpoint_t vp 
)
static

◆ aout_FiltersPipelineCreate()

static int aout_FiltersPipelineCreate ( vlc_object_t obj,
filter_t **  filters,
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_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 ( filter_t *const *  filters,
unsigned  n 
)
static

◆ aout_FiltersPipelineDrain()

static block_t* aout_FiltersPipelineDrain ( filter_t *const *  filters,
unsigned  count 
)
static

◆ aout_FiltersPipelineFlush()

static void aout_FiltersPipelineFlush ( filter_t *const *  filters,
unsigned  count 
)
static

Flush the chain of filters.

References count, and filter_Flush().

Referenced by aout_FiltersFlush().

◆ aout_FiltersPipelinePlay()

static block_t* aout_FiltersPipelinePlay ( filter_t *const *  filters,
unsigned  count,
block_t block 
)
static

Filters an audio buffer through a chain of filters.

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

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

◆ aout_FiltersResetClock()

void aout_FiltersResetClock ( aout_filters_t filters)

◆ aout_FiltersSetClockDelay()

void aout_FiltersSetClockDelay ( aout_filters_t filters,
vlc_tick_t  delay 
)

◆ AppendFilter()

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

◆ 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