44#define AOUT_MAX_ADVANCE_TIME (AOUT_MAX_PREPARE_TIME + VLC_TICK_FROM_SEC(1))
48#define AOUT_MAX_PREPARE_TIME VLC_TICK_FROM_SEC(2)
52#define AOUT_MIN_PREPARE_TIME AOUT_MAX_PTS_ADVANCE
57#define AOUT_MAX_PTS_ADVANCE VLC_TICK_FROM_MS(40)
61#define AOUT_MAX_PTS_DELAY VLC_TICK_FROM_MS(60)
64#define AOUT_MAX_RESAMPLING 10
66#define AOUT_FMTS_IDENTICAL( p_first, p_second ) ( \
67 ((p_first)->i_format == (p_second)->i_format) \
68 && AOUT_FMTS_SIMILAR(p_first, p_second) )
71#define AOUT_FMTS_SIMILAR( p_first, p_second ) ( \
72 ((p_first)->i_rate == (p_second)->i_rate) \
73 && ((p_first)->channel_type == (p_second)->channel_type) \
74 && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
75 && ((p_first)->i_chan_mode == (p_second)->i_chan_mode) )
77#define AOUT_FMT_LINEAR( p_format ) \
78 (aout_BitsPerSample((p_format)->i_format) != 0)
80#define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i')
81#define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b')
83#define AOUT_FMT_SPDIF( p_format ) \
84 ( ((p_format)->i_format == VLC_CODEC_SPDIFL) \
85 || ((p_format)->i_format == VLC_CODEC_SPDIFB) \
86 || ((p_format)->i_format == VLC_CODEC_A52) \
87 || ((p_format)->i_format == VLC_CODEC_DTS) )
89#define AOUT_FMT_HDMI( p_format ) \
90 ( (p_format)->i_format == VLC_CODEC_EAC3 \
91 ||(p_format)->i_format == VLC_CODEC_DTSHD \
92 ||(p_format)->i_format == VLC_CODEC_TRUEHD \
93 ||(p_format)->i_format == VLC_CODEC_MLP \
97#define AOUT_VAR_CHAN_UNSET 0
98#define AOUT_VAR_CHAN_STEREO 1
99#define AOUT_VAR_CHAN_RSTEREO 2
100#define AOUT_VAR_CHAN_LEFT 3
101#define AOUT_VAR_CHAN_RIGHT 4
102#define AOUT_VAR_CHAN_DOLBYS 5
104#define AOUT_VAR_CHAN_MONO 7
106#define AOUT_MIX_MODE_UNSET 0
107#define AOUT_MIX_MODE_STEREO 1
108#define AOUT_MIX_MODE_BINAURAL 2
109#define AOUT_MIX_MODE_4_0 3
110#define AOUT_MIX_MODE_5_1 4
111#define AOUT_MIX_MODE_7_1 5
118#define AOUT_SPDIF_SIZE 6144
121#define A52_FRAME_NB 1536
370 const char *
id,
const char *
name)
405#define AOUT_RESTART_FILTERS 0x1
406#define AOUT_RESTART_OUTPUT (AOUT_RESTART_FILTERS|0x2)
407#define AOUT_RESTART_STEREOMODE (AOUT_RESTART_OUTPUT|0x4)
433 uint32_t mask, uint8_t *table );
473VLC_API void aout_ChannelExtract(
void *p_dst,
int i_dst_channels,
const void *p_src,
int i_src_channels,
int i_sample_count,
const int *pi_selection,
int i_bits_per_sample );
476 unsigned samples,
unsigned channels,
495#define aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f)
501#define AOUT_VOLUME_DEFAULT 256
502#define AOUT_VOLUME_MAX 512
548#define AOUT_CHAN_REMAP_INIT { \
550 AOUT_CHANIDX_RIGHT, \
551 AOUT_CHANIDX_MIDDLELEFT, \
552 AOUT_CHANIDX_MIDDLERIGHT, \
553 AOUT_CHANIDX_REARLEFT, \
554 AOUT_CHANIDX_REARRIGHT, \
555 AOUT_CHANIDX_REARCENTER, \
556 AOUT_CHANIDX_CENTER, \
574#define AOUT_FILTERS_CFG_INIT (aout_filters_cfg_t) \
575 { .remap = AOUT_CHAN_REMAP_INIT, \
576 .headphones = false, \
585#define aout_FiltersNew(o,inf,outf,remap) \
586 aout_FiltersNew(VLC_OBJECT(o),inf,outf,remap)
588#define aout_FiltersDelete(o,f) \
589 aout_FiltersDelete(VLC_OBJECT(o),f)
692#define vlc_audio_meter_Init(a,b) vlc_audio_meter_Init(a, VLC_OBJECT(b))
#define VLC_USED
Definition: fourcc_gen.c:32
#define VLC_API
Definition: fourcc_gen.c:31
uint32_t vlc_fourcc_t
Definition: fourcc_gen.c:33
vout_thread_t * aout_filter_GetVout(filter_t *, const video_format_t *)
Create a vout from an "visualization" audio filter.
Definition: filters.c:414
block_t * aout_FiltersPlay(aout_filters_t *, block_t *, float rate)
Definition: filters.c:779
int aout_EnableFilter(audio_output_t *aout, const char *name, bool add)
Enable or disable an audio filter ("audio-filter")
Definition: common.c:525
vlc_chan_order_idx_t
Definition: vlc_aout.h:533
bool aout_FiltersAdjustResampling(aout_filters_t *, int)
Definition: filters.c:767
#define aout_FiltersDelete(o, f)
Definition: vlc_aout.h:589
block_t * aout_FiltersDrain(aout_filters_t *)
Definition: filters.c:816
#define aout_FiltersNew(o, inf, outf, remap)
Definition: vlc_aout.h:586
void aout_FiltersChangeViewpoint(aout_filters_t *, const vlc_viewpoint_t *vp)
Definition: filters.c:856
void aout_FiltersFlush(aout_filters_t *)
Definition: filters.c:848
@ AOUT_CHANIDX_MAX
Definition: vlc_aout.h:544
@ AOUT_CHANIDX_CENTER
Definition: vlc_aout.h:542
@ AOUT_CHANIDX_MIDDLELEFT
Definition: vlc_aout.h:537
@ AOUT_CHANIDX_DISABLE
Definition: vlc_aout.h:534
@ AOUT_CHANIDX_MIDDLERIGHT
Definition: vlc_aout.h:538
@ AOUT_CHANIDX_RIGHT
Definition: vlc_aout.h:536
@ AOUT_CHANIDX_LFE
Definition: vlc_aout.h:543
@ AOUT_CHANIDX_LEFT
Definition: vlc_aout.h:535
@ AOUT_CHANIDX_REARLEFT
Definition: vlc_aout.h:539
@ AOUT_CHANIDX_REARRIGHT
Definition: vlc_aout.h:540
@ AOUT_CHANIDX_REARCENTER
Definition: vlc_aout.h:541
void vlc_audio_meter_Process(struct vlc_audio_meter *meter, block_t *block, vlc_tick_t date)
Process an audio block.
Definition: meter.c:194
int vlc_audio_meter_Reset(struct vlc_audio_meter *meter, const audio_sample_format_t *fmt)
Set or reset the audio format.
Definition: meter.c:156
void vlc_audio_meter_RemovePlugin(struct vlc_audio_meter *meter, vlc_audio_meter_plugin *plugin)
Remove an "audio meter" plugin.
Definition: meter.c:134
#define vlc_audio_meter_Init(a, b)
Definition: vlc_aout.h:693
vlc_audio_meter_plugin * vlc_audio_meter_AddPlugin(struct vlc_audio_meter *meter, const char *chain, const struct vlc_audio_meter_plugin_owner *owner)
Add an "audio meter" plugin.
Definition: meter.c:89
void vlc_audio_meter_Flush(struct vlc_audio_meter *meter)
Flush all "audio meter" plugins.
Definition: meter.c:216
void vlc_audio_meter_Destroy(struct vlc_audio_meter *meter)
Free allocated resource from the audio meter structure.
Definition: meter.c:55
static void aout_RestartRequest(audio_output_t *aout, unsigned mode)
Definition: vlc_aout.h:386
static void aout_DrainedReport(audio_output_t *aout)
Report than the stream is drained (after a call to aout->drain_async)
Definition: vlc_aout.h:327
static void aout_PauseDefault(audio_output_t *aout, bool paused, vlc_tick_t date)
Default implementation for audio_output_t.pause.
Definition: vlc_aout.h:398
static void aout_MuteReport(audio_output_t *aout, bool mute)
Report change of muted flag to the core and UI.
Definition: vlc_aout.h:343
static void aout_TimingReport(audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t audio_ts)
Report a new timing point.
Definition: vlc_aout.h:318
static void aout_VolumeReport(audio_output_t *aout, float volume)
Report change of configured audio volume to the core and UI.
Definition: vlc_aout.h:335
static void aout_HotplugReport(audio_output_t *aout, const char *id, const char *name)
Report a device hot-plug event.
Definition: vlc_aout.h:370
static int aout_GainRequest(audio_output_t *aout, float gain)
Request a change of software audio amplification.
Definition: vlc_aout.h:381
static void aout_DeviceReport(audio_output_t *aout, const char *id)
Report change of output device.
Definition: vlc_aout.h:360
static void aout_PolicyReport(audio_output_t *aout, bool cork)
Report audio policy status.
Definition: vlc_aout.h:352
int aout_VolumeSet(audio_output_t *, float)
Sets the volume of the audio output stream.
Definition: output.c:838
int aout_MuteGet(audio_output_t *)
Gets the audio output stream mute flag.
Definition: output.c:880
int aout_DevicesList(audio_output_t *, char ***, char ***)
Enumerates possible audio output devices.
Definition: output.c:937
int aout_DeviceSet(audio_output_t *, const char *)
Selects an audio output device.
Definition: output.c:915
float aout_VolumeGet(audio_output_t *)
Gets the volume of the audio output stream (independent of mute).
Definition: output.c:828
int aout_VolumeUpdate(audio_output_t *, int, float *)
Raises the volume.
Definition: output.c:854
int aout_MuteSet(audio_output_t *, bool)
Sets the audio output stream mute flag.
Definition: output.c:889
char * aout_DeviceGet(audio_output_t *)
Gets the currently selected device.
Definition: output.c:905
#define vlc_popcount(x)
Bit weight / population count.
Definition: vlc_common.h:760
const char name[16]
Definition: httpd.c:1281
Definition: vlc_aout.h:562
bool headphones
If true, a filter will be inserted to add a headphones effect (like a binauralizer audio filter).
Definition: vlc_aout.h:572
Definition: filters.c:368
Audio output object.
Definition: vlc_aout.h:155
void(* flush)(audio_output_t *)
Flushes the playback buffers (mandatory, cannot be NULL).
Definition: vlc_aout.h:246
bool headphones
Default to false, set it to true if the current sink is using headphones.
Definition: vlc_aout.h:297
int(* volume_set)(audio_output_t *, float volume)
Changes playback volume (optional, may be NULL).
Definition: vlc_aout.h:266
void(* pause)(audio_output_t *, bool pause, vlc_tick_t date)
Pauses or resumes playback (mandatory, cannot be NULL).
Definition: vlc_aout.h:229
int(* start)(audio_output_t *, audio_sample_format_t *restrict fmt)
Starts a new stream (mandatory, cannot be NULL).
Definition: vlc_aout.h:160
int(* device_select)(audio_output_t *, const char *id)
Selects an audio output device (optional, may be NULL).
Definition: vlc_aout.h:287
int(* mute_set)(audio_output_t *, bool mute)
Changes muting (optional, may be NULL).
Definition: vlc_aout.h:280
struct vlc_object_t obj
Definition: vlc_aout.h:156
struct audio_output::@188 current_sink_info
Current sink information set by the module from the start() function.
void(* stop)(audio_output_t *)
Stops the existing stream (mandatory, cannot be NULL).
Definition: vlc_aout.h:177
void(* play)(audio_output_t *, block_t *block, vlc_tick_t date)
Queues a block of samples for playback (mandatory, cannot be NULL).
Definition: vlc_aout.h:214
void(* drain)(audio_output_t *)
Drain the playback buffers asynchronously (can be NULL).
Definition: vlc_aout.h:252
const struct vlc_audio_output_events * events
Definition: vlc_aout.h:302
void * sys
Private data for callbacks.
Definition: vlc_aout.h:158
int(* time_get)(audio_output_t *, vlc_tick_t *restrict delay)
Estimates playback buffer latency (can be NULL).
Definition: vlc_aout.h:186
Structure describing a filter.
Definition: vlc_filter.h:216
Audio loudness measurement.
Definition: vlc_aout.h:619
double loudness_shortterm
Short term loudness (last 3seconds), in LUFS.
Definition: vlc_aout.h:623
double loudness_momentary
Momentary loudness (last 400 ms), in LUFS.
Definition: vlc_aout.h:621
double truepeak
True Peak, in dBTP.
Definition: vlc_aout.h:629
double loudness_integrated
Integrated loudness (global), in LUFS.
Definition: vlc_aout.h:625
double loudness_range
Loudness range, in LU.
Definition: vlc_aout.h:627
Audio meter callback.
Definition: vlc_aout.h:638
void(* on_loudness)(vlc_tick_t date, const struct vlc_audio_loudness *loudness, void *data)
Called when new loudness measurements are available.
Definition: vlc_aout.h:646
Audio meter plugin owner structure.
Definition: vlc_aout.h:664
const struct vlc_audio_meter_cbs * cbs
Definition: vlc_aout.h:665
void * sys
Definition: vlc_aout.h:666
Audio meter structure.
Definition: vlc_aout.h:677
vlc_object_t * parent
Definition: vlc_aout.h:679
const audio_sample_format_t * fmt
Definition: vlc_aout.h:680
struct vlc_list plugins
Definition: vlc_aout.h:682
vlc_mutex_t lock
Definition: vlc_aout.h:678
Definition: vlc_aout.h:129
void(* policy_report)(audio_output_t *, bool)
Definition: vlc_aout.h:134
int(* gain_request)(audio_output_t *, float)
Definition: vlc_aout.h:138
void(* drained_report)(audio_output_t *)
Definition: vlc_aout.h:131
void(* mute_report)(audio_output_t *, bool)
Definition: vlc_aout.h:133
void(* device_report)(audio_output_t *, const char *)
Definition: vlc_aout.h:135
void(* timing_report)(audio_output_t *, vlc_tick_t system_ts, vlc_tick_t audio_ts)
Definition: vlc_aout.h:130
void(* hotplug_report)(audio_output_t *, const char *, const char *)
Definition: vlc_aout.h:136
void(* restart_request)(audio_output_t *, unsigned)
Definition: vlc_aout.h:137
void(* volume_report)(audio_output_t *, float)
Definition: vlc_aout.h:132
Definition: vlc_frame.h:123
Doubly-linked list node.
Definition: vlc_list.h:44
Mutex.
Definition: vlc_threads.h:195
VLC object common members.
Definition: vlc_objects.h:45
Viewpoints.
Definition: vlc_viewpoint.h:41
Video output thread descriptor.
Definition: vlc_vout.h:55
This file is a collection of common definitions and types.
This file defines the elementary streams format types.
#define AOUT_CHAN_LFE
Definition: vlc_es.h:125
#define AOUT_CHAN_REARCENTER
Definition: vlc_es.h:120
#define AOUT_CHAN_REARLEFT
Definition: vlc_es.h:121
#define AOUT_CHAN_MIDDLELEFT
Definition: vlc_es.h:123
#define AOUT_CHAN_MIDDLERIGHT
Definition: vlc_es.h:124
#define AOUT_CHAN_REARRIGHT
Definition: vlc_es.h:122
#define AOUT_CHAN_MAX
Definition: vlc_es.h:153
#define AOUT_CHAN_RIGHT
Definition: vlc_es.h:119
#define AOUT_CHAN_CENTER
Definition: vlc_es.h:117
#define AOUT_CHAN_LEFT
Definition: vlc_es.h:118
This provides convenience helpers for linked lists.
Thread primitive declarations.
int64_t vlc_tick_t
High precision date or time interval.
Definition: vlc_tick.h:45