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

Data Structures

struct  aout_dev
 

Typedefs

typedef struct aout_dev aout_dev_t
 

Functions

static int var_Copy (vlc_object_t *src, const char *name, vlc_value_t prev, vlc_value_t value, void *data)
 
static int var_CopyDevice (vlc_object_t *src, const char *name, vlc_value_t prev, vlc_value_t value, void *data)
 
static void aout_TimingNotify (audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t audio_ts)
 
static void aout_DrainedNotify (audio_output_t *aout)
 
static void aout_VolumeNotify (audio_output_t *aout, float volume)
 Supply or update the current custom ("hardware") volume. More...
 
static void aout_MuteNotify (audio_output_t *aout, bool mute)
 
static void aout_PolicyNotify (audio_output_t *aout, bool cork)
 
static void aout_DeviceNotify (audio_output_t *aout, const char *id)
 
static void aout_HotplugNotify (audio_output_t *aout, const char *id, const char *name)
 
static void aout_RestartNotify (audio_output_t *aout, unsigned mode)
 
void aout_InputRequestRestart (audio_output_t *aout)
 
static int aout_GainNotify (audio_output_t *aout, float gain)
 
static int FilterCallback (vlc_object_t *obj, const char *var, vlc_value_t prev, vlc_value_t cur, void *data)
 
static int StereoModeCallback (vlc_object_t *obj, const char *varname, vlc_value_t oldval, vlc_value_t newval, void *data)
 
static int MixModeCallback (vlc_object_t *obj, const char *varname, vlc_value_t oldval, vlc_value_t newval, void *data)
 
static void aout_ChangeViewpoint (audio_output_t *, const vlc_viewpoint_t *)
 
static int ViewpointCallback (vlc_object_t *obj, const char *var, vlc_value_t prev, vlc_value_t cur, void *data)
 
audio_output_taout_New (vlc_object_t *parent)
 Creates an audio output object and initializes an output module. More...
 
audio_output_taout_Hold (audio_output_t *aout)
 
static void aout_Destroy (audio_output_t *aout)
 Deinitializes an audio output module and destroys an audio output object. More...
 
void aout_Release (audio_output_t *aout)
 
static int aout_PrepareStereoMode (audio_output_t *aout, const audio_sample_format_t *restrict fmt)
 
static void aout_UpdateStereoMode (audio_output_t *aout, int mode, audio_sample_format_t *restrict fmt, aout_filters_cfg_t *filters_cfg)
 
static bool aout_HasStereoMode (audio_output_t *aout, int mode)
 
static void aout_AddMixModeChoice (audio_output_t *aout, int mode, const char *suffix, const audio_sample_format_t *restrict fmt)
 
static void aout_SetupMixModeChoices (audio_output_t *aout, const audio_sample_format_t *restrict fmt)
 
static bool aout_HasMixModeChoice (audio_output_t *aout, int mode)
 
static void aout_UpdateMixMode (audio_output_t *aout, int mode, audio_sample_format_t *restrict fmt)
 
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. More...
 
void aout_OutputDelete (audio_output_t *aout)
 Stops the audio output stream (undoes aout_OutputNew()). More...
 
float aout_VolumeGet (audio_output_t *aout)
 Gets the volume of the audio output stream (independent of mute). More...
 
int aout_VolumeSet (audio_output_t *aout, float vol)
 Sets the volume of the audio output stream. More...
 
int aout_VolumeUpdate (audio_output_t *aout, int value, float *volp)
 Raises the volume. More...
 
int aout_MuteGet (audio_output_t *aout)
 Gets the audio output stream mute flag. More...
 
int aout_MuteSet (audio_output_t *aout, bool mute)
 Sets the audio output stream mute flag. More...
 
char * aout_DeviceGet (audio_output_t *aout)
 Gets the currently selected device. More...
 
int aout_DeviceSet (audio_output_t *aout, const char *id)
 Selects an audio output device. More...
 
int aout_DevicesList (audio_output_t *aout, char ***ids, char ***names)
 Enumerates possible audio output devices. More...
 
vlc_audio_meter_pluginaout_AddMeterPlugin (audio_output_t *aout, const char *chain, const struct vlc_audio_meter_plugin_owner *meter_plugin_owner)
 
void aout_RemoveMeterPlugin (audio_output_t *aout, vlc_audio_meter_plugin *plugin)
 

Variables

static const struct vlc_audio_output_events aout_events
 

Typedef Documentation

◆ aout_dev_t

typedef struct aout_dev aout_dev_t

Function Documentation

◆ aout_AddMeterPlugin()

vlc_audio_meter_plugin * aout_AddMeterPlugin ( audio_output_t aout,
const char *  chain,
const struct vlc_audio_meter_plugin_owner meter_plugin_owner 
)

◆ aout_AddMixModeChoice()

static void aout_AddMixModeChoice ( audio_output_t aout,
int  mode,
const char *  suffix,
const audio_sample_format_t *restrict  fmt 
)
static

◆ aout_ChangeViewpoint()

static void aout_ChangeViewpoint ( audio_output_t aout,
const vlc_viewpoint_t p_viewpoint 
)
static

◆ aout_Destroy()

◆ aout_DeviceNotify()

static void aout_DeviceNotify ( audio_output_t aout,
const char *  id 
)
static

References var_SetString().

◆ aout_DrainedNotify()

static void aout_DrainedNotify ( audio_output_t aout)
static

◆ aout_GainNotify()

static int aout_GainNotify ( audio_output_t aout,
float  gain 
)
static

◆ aout_HasMixModeChoice()

static bool aout_HasMixModeChoice ( audio_output_t aout,
int  mode 
)
static

◆ aout_HasStereoMode()

static bool aout_HasStereoMode ( audio_output_t aout,
int  mode 
)
static

References count, var_Change(), and VLC_VAR_GETCHOICES.

Referenced by aout_OutputNew().

◆ aout_HotplugNotify()

◆ aout_InputRequestRestart()

void aout_InputRequestRestart ( audio_output_t aout)

◆ aout_MuteNotify()

static void aout_MuteNotify ( audio_output_t aout,
bool  mute 
)
static

References var_SetBool().

◆ aout_New()

◆ aout_OutputDelete()

void aout_OutputDelete ( audio_output_t aout)

Stops the audio output stream (undoes aout_OutputNew()).

Note
This can only be called after a successful aout_OutputNew().
Warning
The caller must NOT hold the audio output lock.

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().

◆ aout_OutputNew()

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 
)

◆ aout_PolicyNotify()

static void aout_PolicyNotify ( audio_output_t aout,
bool  cork 
)
static

◆ aout_PrepareStereoMode()

◆ aout_RemoveMeterPlugin()

◆ aout_RestartNotify()

static void aout_RestartNotify ( audio_output_t aout,
unsigned  mode 
)
static

◆ aout_SetupMixModeChoices()

◆ aout_TimingNotify()

static void aout_TimingNotify ( audio_output_t aout,
vlc_tick_t  system_ts,
vlc_tick_t  audio_ts 
)
static

◆ aout_UpdateMixMode()

◆ aout_UpdateStereoMode()

◆ aout_VolumeNotify()

static void aout_VolumeNotify ( audio_output_t aout,
float  volume 
)
static

Supply or update the current custom ("hardware") volume.

Parameters
volumecurrent custom volume
Warning
The caller (i.e. the audio output plug-in) is responsible for interlocking and synchronizing call to this function and to the audio_output_t.volume_set callback. This ensures that VLC gets correct volume information (possibly with a latency).

References var_SetFloat().

◆ FilterCallback()

static int FilterCallback ( vlc_object_t obj,
const char *  var,
vlc_value_t  prev,
vlc_value_t  cur,
void *  data 
)
static

◆ MixModeCallback()

static int MixModeCallback ( vlc_object_t obj,
const char *  varname,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  data 
)
static

◆ StereoModeCallback()

static int StereoModeCallback ( vlc_object_t obj,
const char *  varname,
vlc_value_t  oldval,
vlc_value_t  newval,
void *  data 
)
static

◆ var_Copy()

static int var_Copy ( vlc_object_t src,
const char *  name,
vlc_value_t  prev,
vlc_value_t  value,
void *  data 
)
static

References name, vlc_list::prev, and var_Set().

Referenced by aout_Destroy(), and aout_New().

◆ var_CopyDevice()

static int var_CopyDevice ( vlc_object_t src,
const char *  name,
vlc_value_t  prev,
vlc_value_t  value,
void *  data 
)
static

References name, vlc_list::prev, and var_Set().

Referenced by aout_Destroy(), and aout_New().

◆ ViewpointCallback()

static int ViewpointCallback ( vlc_object_t obj,
const char *  var,
vlc_value_t  prev,
vlc_value_t  cur,
void *  data 
)
static

Variable Documentation

◆ aout_events

const struct vlc_audio_output_events aout_events
static
Initial value:
= {
}
static void aout_RestartNotify(audio_output_t *aout, unsigned mode)
Definition: output.c:156
static void aout_TimingNotify(audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t audio_ts)
Definition: output.c:67
static void aout_VolumeNotify(audio_output_t *aout, float volume)
Supply or update the current custom ("hardware") volume.
Definition: output.c:91
static void aout_DeviceNotify(audio_output_t *aout, const char *id)
Definition: output.c:106
static int aout_GainNotify(audio_output_t *aout, float gain)
Definition: output.c:168
static void aout_HotplugNotify(audio_output_t *aout, const char *id, const char *name)
Definition: output.c:111
static void aout_MuteNotify(audio_output_t *aout, bool mute)
Definition: output.c:96
static void aout_DrainedNotify(audio_output_t *aout)
Definition: output.c:75
static void aout_PolicyNotify(audio_output_t *aout, bool cork)
Definition: output.c:101

Referenced by aout_New().