VLC 4.0.0-dev
|
Go to the source code of this file.
Data Structures | |
struct | aout_owner_t |
struct | aout_instance_t |
struct | vlc_aout_stream_cfg |
Macros | |
#define | AOUT_MAX_INPUT_RATE (4) |
#define | AOUT_RESTART_FILTERS 0x1 |
#define | AOUT_RESTART_OUTPUT (AOUT_RESTART_FILTERS|0x2) |
#define | AOUT_RESTART_OUTPUT_DEC (AOUT_RESTART_OUTPUT|0x4) |
#define | aout_volume_New(o, g) aout_volume_New(VLC_OBJECT(o), g) |
#define | aout_New(a) aout_New(VLC_OBJECT(a)) |
#define | aout_FormatsPrint(o, t, a, b) aout_FormatsPrint(VLC_OBJECT(o), t, a, b) |
#define | AOUT_DEC_SUCCESS 0 |
#define | AOUT_DEC_CHANGED 1 |
#define | AOUT_DEC_FAILED VLC_EGENERIC |
Typedefs | |
typedef struct aout_volume | aout_volume_t |
typedef struct vlc_aout_stream | vlc_aout_stream |
Enumerations | |
enum | { AOUT_RESAMPLING_NONE =0 , AOUT_RESAMPLING_UP , AOUT_RESAMPLING_DOWN } |
#define AOUT_DEC_CHANGED 1 |
#define AOUT_DEC_FAILED VLC_EGENERIC |
#define AOUT_DEC_SUCCESS 0 |
#define aout_FormatsPrint | ( | o, | |
t, | |||
a, | |||
b | |||
) | aout_FormatsPrint(VLC_OBJECT(o), t, a, b) |
#define AOUT_MAX_INPUT_RATE (4) |
#define aout_New | ( | a | ) | aout_New(VLC_OBJECT(a)) |
#define AOUT_RESTART_FILTERS 0x1 |
#define AOUT_RESTART_OUTPUT (AOUT_RESTART_FILTERS|0x2) |
#define AOUT_RESTART_OUTPUT_DEC (AOUT_RESTART_OUTPUT|0x4) |
#define aout_volume_New | ( | o, | |
g | |||
) | aout_volume_New(VLC_OBJECT(o), g) |
typedef struct aout_volume aout_volume_t |
typedef struct vlc_aout_stream vlc_aout_stream |
vlc_audio_meter_plugin * aout_AddMeterPlugin | ( | audio_output_t * | aout, |
const char * | chain, | ||
const struct vlc_audio_meter_plugin_owner * | owner | ||
) |
References aout_owner(), aout_owner_t::meter, and vlc_audio_meter_AddPlugin().
Referenced by vlc_player_AddMetadataLoudnessListener().
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 | ||
) |
References AOUT_FMTS_IDENTICAL, aout_FormatNbChannels(), es_format_t::audio, vlc_filter_operations::filter_audio, filter_t::fmt_in, filter_t::fmt_out, audio_format_t::i_channels, es_format_t::i_codec, audio_format_t::i_format, audio_format_t::i_physical_channels, module_need, name, filter_t::ops, filter_t::owner, filter_t::p_cfg, filter_t::p_module, unlikely, vlc_custom_create, and vlc_object_delete.
Referenced by aout_FiltersPipelineCreate(), AppendFilter(), FindConverter(), FindResampler(), and vlc_audio_meter_CreatePluginFilter().
bool aout_FiltersCanResample | ( | aout_filters_t * | filters | ) |
References aout_filter::f, and aout_filters::resampler.
Referenced by stream_HandleDrift().
aout_filters_t * aout_FiltersNewWithClock | ( | vlc_object_t * | , |
vlc_clock_t * | , | ||
const audio_sample_format_t * | , | ||
const audio_sample_format_t * | , | ||
const aout_filters_cfg_t * | cfg | ||
) |
Referenced by stream_CheckReady(), and vlc_aout_stream_New().
void aout_FiltersResetClock | ( | aout_filters_t * | filters | ) |
References aout_FiltersPipelineResetClock(), aout_filters::clock_source, aout_filters::count, and aout_filters::tab.
Referenced by stream_Reset().
void aout_FiltersSetClockDelay | ( | aout_filters_t * | filters, |
vlc_tick_t | delay | ||
) |
References aout_FiltersPipelineSetClockDelay(), aout_filters::clock_source, aout_filters::count, and aout_filters::tab.
Referenced by stream_CheckReady(), stream_Reset(), and vlc_aout_stream_Play().
void aout_FormatsPrint | ( | vlc_object_t * | obj, |
const char * | psz_text, | ||
const audio_sample_format_t * | p_format1, | ||
const audio_sample_format_t * | p_format2 | ||
) |
Prints two formats in a human-readable form.
References aout_FormatPrintChannels(), audio_format_t::i_format, audio_format_t::i_rate, and msg_Dbg.
void aout_InputRequestRestart | ( | audio_output_t * | aout | ) |
References aout_owner(), AOUT_RESTART_FILTERS, aout_owner_t::main_stream, and vlc_aout_stream_RequestRestart().
Referenced by FilterCallback(), and VisualizationCallback().
|
inlinestatic |
References container_of.
Referenced by aout_owner(), and vlc_aout_stream_New().
audio_output_t * aout_New | ( | vlc_object_t * | parent | ) |
Creates an audio output object and initializes an output module.
References _, aout_events, aout_owner(), aout_owner_t::bitexact, config_FindConfig(), aout_owner_t::dev, audio_output::device_select, audio_output::events, FilterCallback(), likely, module_config_t::list, aout_owner_t::list, module_config_t::list_count, module_config_t::list_text, aout_owner_t::lock, aout_owner_t::main_stream, aout_owner_t::meter, MixModeCallback(), module_exists(), module_need_var, msg_Err, audio_output::mute_set, module_config_t::psz, vlc_value_t::psz_string, aout_owner_t::rc, aout_owner_t::requested_mix_mode, aout_owner_t::requested_stereo_mode, audio_output::start, StereoModeCallback(), audio_output::stop, unlikely, aout_owner_t::update, aout_owner_t::value, var_AddCallback(), var_Change(), var_Copy(), var_CopyDevice(), var_Create(), var_GetInteger(), var_GetNonEmptyString(), var_InheritBool(), var_SetString(), ViewpointCallback(), vlc_atomic_rc_init(), vlc_audio_meter_Init, vlc_custom_create, vlc_gettext(), vlc_list_init(), vlc_mutex_init(), vlc_object_delete, VLC_VAR_ADDCHOICE, VLC_VAR_ADDRESS, VLC_VAR_BOOL, VLC_VAR_DOINHERIT, VLC_VAR_FLOAT, VLC_VAR_INTEGER, VLC_VAR_SETTEXT, VLC_VAR_STRING, vlc_viewpoint_init(), audio_output::volume_set, and aout_owner_t::vp.
void aout_OutputDelete | ( | audio_output_t * | p_aout | ) |
Stops the audio output stream (undoes aout_OutputNew()).
References aout_owner(), aout_owner_t::lock, aout_owner_t::main_stream, audio_output::stop, vlc_mutex_lock(), and vlc_mutex_unlock().
Referenced by stream_CheckReady(), vlc_aout_stream_Delete(), and vlc_aout_stream_New().
int aout_OutputNew | ( | audio_output_t * | aout, |
vlc_aout_stream * | stream, | ||
audio_sample_format_t * | fmt, | ||
int | input_profile, | ||
audio_sample_format_t * | filter_fmt, | ||
aout_filters_cfg_t * | filters_cfg | ||
) |
Starts an audio output stream.
aout | the audio output instance to initialize from |
stream | the audio output stream to initialize from |
fmt | the format to request to the output |
input_profile | the audio profile to request from the audio output |
filter_fmt | the format requested from the filters |
filters_cfg | the configuration to load the audio filters from |
References AOUT_CHANS_7_1, AOUT_CHANS_STEREO, AOUT_FMT_LINEAR, aout_FormatNbChannels(), aout_FormatPrepare(), aout_FormatPrint, aout_HasMixModeChoice(), aout_HasStereoMode(), AOUT_MIX_MODE_BINAURAL, aout_owner(), aout_PrepareStereoMode(), aout_SetupMixModeChoices(), aout_SetWavePhysicalChannels(), aout_UpdateMixMode(), aout_UpdateStereoMode(), AOUT_VAR_CHAN_UNSET, ARRAY_SIZE, AUDIO_CHANNEL_TYPE_AMBISONICS, AUDIO_CHANNEL_TYPE_BITMAP, audio_format_t::channel_type, audio_output::current_sink_info, audio_output::flush, audio_output::headphones, audio_format_t::i_bitspersample, audio_format_t::i_bytes_per_frame, audio_format_t::i_channels, audio_format_t::i_format, audio_format_t::i_frame_length, audio_format_t::i_physical_channels, aout_owner_t::lock, aout_owner_t::main_stream, msg_Err, msg_Warn, audio_output::play, aout_owner_t::requested_mix_mode, audio_output::start, var_Change(), VLC_CODEC_A52, VLC_CODEC_DTS, VLC_CODEC_DTSHD, VLC_CODEC_EAC3, VLC_CODEC_FL32, VLC_CODEC_S16N, VLC_EGENERIC, vlc_mutex_lock(), vlc_mutex_unlock(), VLC_SUCCESS, and VLC_VAR_CLEARCHOICES.
Referenced by stream_CheckReady(), and vlc_aout_stream_New().
|
inlinestatic |
References aout_instance(), and aout_instance_t::owner.
Referenced by aout_AddMeterPlugin(), aout_ChangeViewpoint(), aout_Destroy(), aout_DeviceSet(), aout_DevicesList(), aout_DrainedNotify(), aout_GainNotify(), aout_Hold(), aout_HotplugNotify(), aout_InputRequestRestart(), aout_MuteSet(), aout_New(), aout_OutputDelete(), aout_OutputNew(), aout_PrepareStereoMode(), aout_Release(), aout_RemoveMeterPlugin(), aout_RestartNotify(), aout_TimingNotify(), aout_VolumeSet(), MixModeCallback(), StereoModeCallback(), and vlc_aout_stream_New().
void aout_RemoveMeterPlugin | ( | audio_output_t * | aout, |
vlc_audio_meter_plugin * | plugin | ||
) |
References aout_owner(), aout_owner_t::meter, and vlc_audio_meter_RemovePlugin().
Referenced by vlc_player_AddMetadataLoudnessListener(), and vlc_player_RemoveMetadataLoudnessListener().
|
inlinestatic |
References AOUT_CHAN_CENTER, AOUT_CHAN_LEFT, AOUT_CHAN_LFE, AOUT_CHAN_MAX, AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT, AOUT_CHAN_REARCENTER, AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_RIGHT, aout_FormatPrepare(), audio_format_t::i_channels, and audio_format_t::i_physical_channels.
Referenced by aout_FiltersNewWithClock(), and aout_OutputNew().
int aout_volume_Amplify | ( | aout_volume_t * | vol, |
block_t * | block | ||
) |
Applies replay gain and software volume to an audio buffer.
References audio_volume::amplify, aout_volume::gain_factor, aout_volume::object, and aout_volume::output_factor.
Referenced by vlc_aout_stream_Play().
void aout_volume_Delete | ( | aout_volume_t * | vol | ) |
Destroys a software amplifier.
References module_unneed, aout_volume::object, ReplayGainCallback(), var_DelCallback(), vlc_object_delete, and vlc_object_parent.
Referenced by vlc_aout_stream_Delete(), and vlc_aout_stream_New().
aout_volume_t * aout_volume_New | ( | vlc_object_t * | parent, |
const audio_replay_gain_t * | gain | ||
) |
Creates a software amplifier.
References aout_volume::gain_factor, aout_volume::output_factor, aout_volume::replay_gain, ReplayGainCallback(), unlikely, var_AddCallback(), var_TriggerCallback(), and vlc_custom_create.
int aout_volume_SetFormat | ( | aout_volume_t * | vol, |
vlc_fourcc_t | format | ||
) |
Selects the current sample format for software amplification.
References audio_volume::format, module_need, module_unneed, msg_Dbg, and aout_volume::object.
Referenced by stream_CheckReady(), and vlc_aout_stream_New().
void aout_volume_SetVolume | ( | aout_volume_t * | vol, |
float | factor | ||
) |
References aout_volume::output_factor.
Referenced by vlc_aout_stream_NotifyGain().
void vlc_aout_stream_ChangeDelay | ( | vlc_aout_stream * | stream, |
vlc_tick_t | delay | ||
) |
References vlc_aout_stream::request_delay, and vlc_aout_stream::sync.
Referenced by Decoder_ChangeOutputDelay().
void vlc_aout_stream_ChangePause | ( | vlc_aout_stream * | stream, |
bool | b_paused, | ||
vlc_tick_t | i_date | ||
) |
References aout_stream_aout(), aout_stream_tracer(), vlc_aout_stream::clock, audio_format_t::i_format, vlc_aout_stream::lock, vlc_aout_stream::mixer_format, audio_output::pause, vlc_aout_stream::pause_date, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream::rate_system_ts, vlc_aout_stream::str_id, vlc_aout_stream::sync, vlc_aout_stream::system_ts, audio_output::time_get, vlc_aout_stream::timing, vlc_aout_stream_Flush(), vlc_clock_ConvertToSystem(), vlc_clock_Lock(), vlc_clock_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), VLC_TICK_INVALID, and vlc_tracer_TraceEvent().
Referenced by Decoder_ChangeOutputPause().
void vlc_aout_stream_ChangeRate | ( | vlc_aout_stream * | stream, |
float | rate | ||
) |
References vlc_aout_stream::rate, and vlc_aout_stream::sync.
Referenced by Decoder_ChangeOutputRate().
void vlc_aout_stream_Delete | ( | vlc_aout_stream * | stream | ) |
Stops all plugins involved in the audio output.
References aout_FiltersDelete, aout_OutputDelete(), aout_stream_aout(), aout_stream_owner(), aout_volume_Delete(), vlc_aout_stream::clock, vlc_aout_stream::discontinuity, vlc_aout_stream::draining, vlc_aout_stream::filters, audio_format_t::i_format, aout_owner_t::meter, vlc_aout_stream::mixer_format, stream_ResetDiscontinuity(), vlc_aout_stream::sync, vlc_audio_meter_Reset(), vlc_clock_Lock(), vlc_clock_Reset(), vlc_clock_Unlock(), and vlc_aout_stream::volume.
Referenced by DecoderThread_Reload(), DeleteDecoder(), and ModuleThread_UpdateAudioFormat().
void vlc_aout_stream_Drain | ( | vlc_aout_stream * | stream | ) |
References aout_FiltersDrain(), aout_stream_aout(), aout_stream_tracer(), block_ChainProperties, vlc_aout_stream::discontinuity, audio_output::drain, vlc_aout_stream::drain_deadline, vlc_aout_stream::drained, vlc_aout_stream::draining, vlc_aout_stream::fifo_first, vlc_aout_stream::filters, audio_format_t::i_format, vlc_frame_t::i_pts, vlc_aout_stream::mixer_format, msg_Err, audio_output::play, vlc_aout_stream::str_id, stream_GetDelay(), stream_ResetDiscontinuity(), unlikely, VLC_TICK_INVALID, vlc_tick_now(), and vlc_tracer_TraceEvent().
Referenced by DecoderThread(), and stream_StartDiscontinuity().
void vlc_aout_stream_Flush | ( | vlc_aout_stream * | stream | ) |
References aout_stream_aout(), aout_stream_tracer(), audio_output::flush, audio_format_t::i_format, vlc_aout_stream::mixer_format, vlc_aout_stream::str_id, stream_Reset(), and vlc_tracer_TraceEvent().
Referenced by ModuleThread_PlayAudio(), stream_HandleDiscontinuity(), stream_HandleDrift(), vlc_aout_stream_ChangePause(), and vlc_input_decoder_Flush().
void vlc_aout_stream_GetResetStats | ( | vlc_aout_stream * | stream, |
unsigned * | , | ||
unsigned * | |||
) |
Referenced by ModuleThread_QueueAudio().
bool vlc_aout_stream_IsDrained | ( | vlc_aout_stream * | stream | ) |
References vlc_aout_stream::discontinuity, vlc_aout_stream::draining, and stream_IsDrained().
Referenced by vlc_input_decoder_IsEmpty().
vlc_aout_stream * vlc_aout_stream_New | ( | audio_output_t * | p_aout, |
const struct vlc_aout_stream_cfg * | cfg | ||
) |
Creates an audio output.
References AOUT_CHAN_MAX, AOUT_FILTERS_CFG_INIT, aout_FiltersNewWithClock(), aout_FormatNbChannels(), aout_instance(), aout_OutputDelete(), aout_OutputNew(), aout_owner(), AOUT_RESAMPLING_NONE, aout_volume_Delete(), aout_volume_New, aout_volume_SetFormat(), aout_owner_t::bitexact, vlc_aout_stream::buffers_lost, vlc_aout_stream::buffers_played, vlc_aout_stream_cfg::clock, vlc_aout_stream::clock, vlc_aout_stream::clock_id, vlc_aout_stream::delay, vlc_aout_stream::discontinuity, vlc_aout_stream::drain_deadline, vlc_aout_stream::drained, vlc_aout_stream::draining, vlc_aout_stream::filter_format, vlc_aout_stream::filters, vlc_aout_stream::filters_cfg, vlc_aout_stream_cfg::fmt, audio_format_t::i_bitspersample, audio_format_t::i_channels, audio_format_t::i_format, audio_format_t::i_rate, INPUT_CHAN_MAX, vlc_aout_stream::input_format, vlc_aout_stream::input_profile, vlc_aout_stream::instance, vlc_aout_stream::lock, aout_owner_t::meter, vlc_aout_stream::mixer_format, msg_Err, vlc_aout_stream_cfg::profile, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream_cfg::replay_gain, vlc_aout_stream::request_delay, vlc_aout_stream::resamp_type, vlc_aout_stream::restart, vlc_aout_stream_cfg::str_id, vlc_aout_stream::str_id, stream_ResetTimings(), vlc_aout_stream::sync, vlc_aout_stream::timing, aout_owner_t::update, vlc_audio_meter_Reset(), vlc_mutex_init(), VLC_OBJECT, VLC_TICK_INVALID, vlc_aout_stream::volume, and aout_owner_t::vp.
Referenced by ModuleThread_UpdateAudioFormat().
void vlc_aout_stream_NotifyDrained | ( | vlc_aout_stream * | stream | ) |
References vlc_aout_stream::drained.
Referenced by aout_DrainedNotify().
void vlc_aout_stream_NotifyGain | ( | vlc_aout_stream * | stream, |
float | gain | ||
) |
References aout_volume_SetVolume(), and vlc_aout_stream::volume.
Referenced by aout_GainNotify().
void vlc_aout_stream_NotifyTiming | ( | vlc_aout_stream * | stream, |
vlc_tick_t | system_ts, | ||
vlc_tick_t | audio_ts | ||
) |
References vlc_aout_stream::audio_ts, vlc_aout_stream::clock, vlc_aout_stream::last_drift, vlc_aout_stream::lock, vlc_aout_stream::rate, vlc_aout_stream::rate_audio_ts, vlc_aout_stream::rate_system_ts, vlc_aout_stream::sync, vlc_aout_stream::system_ts, vlc_aout_stream::timing, vlc_clock_Lock(), vlc_clock_Unlock(), vlc_clock_Update(), vlc_mutex_lock(), vlc_mutex_unlock(), and VLC_TICK_INVALID.
Referenced by aout_TimingNotify().
int vlc_aout_stream_Play | ( | vlc_aout_stream * | stream, |
block_t * | block | ||
) |
References AOUT_DEC_FAILED, aout_FiltersChangeViewpoint(), aout_FiltersPlay(), aout_FiltersSetClockDelay(), aout_stream_aout(), aout_stream_owner(), aout_volume_Amplify(), BLOCK_FLAG_CORE_PRIVATE_FILTERED, BLOCK_FLAG_DISCONTINUITY, block_Release, vlc_aout_stream::buffers_lost, vlc_aout_stream::buffers_played, vlc_aout_stream::clock, vlc_aout_stream::delay, vlc_aout_stream::discontinuity, vlc_aout_stream::draining, vlc_aout_stream::filters, vlc_frame_t::i_flags, vlc_frame_t::i_length, vlc_frame_t::i_nb_samples, vlc_frame_t::i_pts, audio_format_t::i_rate, vlc_aout_stream::input_format, aout_owner_t::lock, aout_owner_t::meter, audio_output::play, vlc_aout_stream::played, vlc_aout_stream::played_samples, vlc_aout_stream::rate, vlc_aout_stream::request_delay, stream_CheckReady(), stream_ClockConvert(), stream_HandleDiscontinuity(), stream_ResetTimings(), stream_Silence(), stream_StartDiscontinuity(), stream_Synchronize(), vlc_aout_stream::sync, vlc_aout_stream::timing, unlikely, aout_owner_t::update, aout_owner_t::value, vlc_audio_meter_Process(), vlc_clock_Lock(), vlc_clock_SetDelay(), vlc_clock_Unlock(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_tick_from_samples(), VLC_TICK_INVALID, vlc_tick_now(), vlc_aout_stream::volume, and aout_owner_t::vp.
Referenced by ModuleThread_PlayAudio(), and stream_HandleDiscontinuity().
void vlc_aout_stream_RequestRestart | ( | vlc_aout_stream * | stream, |
unsigned | mode | ||
) |
Marks the audio output for restart, to update any parameter of the output plug-in (e.g.
output device or channel mapping).
References aout_stream_aout(), msg_Dbg, and vlc_aout_stream::restart.
Referenced by aout_InputRequestRestart(), aout_RestartNotify(), MixModeCallback(), and StereoModeCallback().
void vlc_aout_stream_RequestRetiming | ( | vlc_aout_stream * | stream, |
vlc_tick_t | system_ts, | ||
vlc_tick_t | audio_ts | ||
) |