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
378 const char *
id,
const char *
name)
423 uint32_t mask, uint8_t *table );
437 const uint8_t *chans_table,
465VLC_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 );
468 unsigned samples,
unsigned channels,
487#define aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f)
493#define AOUT_VOLUME_DEFAULT 256
494#define AOUT_VOLUME_MAX 512
596#define AOUT_CHAN_REMAP_INIT { \
598 AOUT_CHANIDX_RIGHT, \
599 AOUT_CHANIDX_MIDDLELEFT, \
600 AOUT_CHANIDX_MIDDLERIGHT, \
601 AOUT_CHANIDX_REARLEFT, \
602 AOUT_CHANIDX_REARRIGHT, \
603 AOUT_CHANIDX_REARCENTER, \
604 AOUT_CHANIDX_CENTER, \
622#define AOUT_FILTERS_CFG_INIT (aout_filters_cfg_t) \
623 { .remap = AOUT_CHAN_REMAP_INIT, \
624 .headphones = false, \
633#define aout_FiltersNew(o,inf,outf,remap) \
634 aout_FiltersNew(VLC_OBJECT(o),inf,outf,remap)
636#define aout_FiltersDelete(o,f) \
637 aout_FiltersDelete(VLC_OBJECT(o),f)
740#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:412
block_t * aout_FiltersPlay(aout_filters_t *, block_t *, float rate)
Definition filters.c:787
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:581
bool aout_FiltersAdjustResampling(aout_filters_t *, int)
Definition filters.c:775
#define aout_FiltersDelete(o, f)
Definition vlc_aout.h:637
block_t * aout_FiltersDrain(aout_filters_t *)
Definition filters.c:824
#define aout_FiltersNew(o, inf, outf, remap)
Definition vlc_aout.h:634
void aout_FiltersChangeViewpoint(aout_filters_t *, const vlc_viewpoint_t *vp)
Definition filters.c:864
void aout_FiltersFlush(aout_filters_t *)
Definition filters.c:856
@ AOUT_CHANIDX_MAX
Definition vlc_aout.h:592
@ AOUT_CHANIDX_CENTER
Definition vlc_aout.h:590
@ AOUT_CHANIDX_MIDDLELEFT
Definition vlc_aout.h:585
@ AOUT_CHANIDX_DISABLE
Definition vlc_aout.h:582
@ AOUT_CHANIDX_MIDDLERIGHT
Definition vlc_aout.h:586
@ AOUT_CHANIDX_RIGHT
Definition vlc_aout.h:584
@ AOUT_CHANIDX_LFE
Definition vlc_aout.h:591
@ AOUT_CHANIDX_LEFT
Definition vlc_aout.h:583
@ AOUT_CHANIDX_REARLEFT
Definition vlc_aout.h:587
@ AOUT_CHANIDX_REARRIGHT
Definition vlc_aout.h:588
@ AOUT_CHANIDX_REARCENTER
Definition vlc_aout.h:589
void vlc_audio_meter_Process(struct vlc_audio_meter *meter, block_t *block, vlc_tick_t date)
Process an audio block.
Definition meter.c:189
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:153
void vlc_audio_meter_RemovePlugin(struct vlc_audio_meter *meter, vlc_audio_meter_plugin *plugin)
Remove an "audio meter" plugin.
Definition meter.c:133
#define vlc_audio_meter_Init(a, b)
Definition vlc_aout.h:741
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:88
void vlc_audio_meter_Flush(struct vlc_audio_meter *meter)
Flush all "audio meter" plugins.
Definition meter.c:211
void vlc_audio_meter_Destroy(struct vlc_audio_meter *meter)
Free allocated resource from the audio meter structure.
Definition meter.c:54
static void aout_RestartRequest(audio_output_t *aout, bool restart_dec)
Definition vlc_aout.h:395
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:333
static void aout_TimingReport(audio_output_t *aout, vlc_tick_t system_ts, vlc_tick_t audio_pts)
Report a new timing point.
Definition vlc_aout.h:324
static void aout_MuteReport(audio_output_t *aout, bool mute)
Report change of muted flag to the core and UI.
Definition vlc_aout.h:349
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:341
static void aout_HotplugReport(audio_output_t *aout, const char *id, const char *name)
Report a device hot-plug event.
Definition vlc_aout.h:378
static int aout_GainRequest(audio_output_t *aout, float gain)
Request a change of software audio amplification.
Definition vlc_aout.h:390
static void aout_DeviceReport(audio_output_t *aout, const char *id)
Report change of output device.
Definition vlc_aout.h:367
static void aout_PolicyReport(audio_output_t *aout, bool cork)
Report audio policy status.
Definition vlc_aout.h:359
int aout_VolumeUpdate(audio_output_t *aout, int value, float *volp)
Adjusts the volume.
Definition output.c:847
int aout_DeviceSet(audio_output_t *aout, const char *id)
Selects an audio output device.
Definition output.c:887
int aout_VolumeSet(audio_output_t *, float)
Sets the volume of the audio output stream.
Definition output.c:836
int aout_MuteGet(audio_output_t *)
Gets the audio output stream mute flag.
Definition output.c:866
float aout_VolumeGet(audio_output_t *)
Gets the volume of the audio output stream (independent of mute).
Definition output.c:831
int aout_DevicesList(audio_output_t *aout, char ***ids, char ***names)
Enumerates possible audio output devices.
Definition output.c:898
int aout_MuteSet(audio_output_t *, bool)
Sets the audio output stream mute flag.
Definition output.c:871
char * aout_DeviceGet(audio_output_t *)
Gets the currently selected device.
Definition output.c:882
#define vlc_popcount(x)
Bit weight / population count.
Definition vlc_common.h:674
const char name[16]
Definition httpd.c:1298
Definition vlc_aout.h:610
bool headphones
If true, a filter will be inserted to add a headphones effect (like a binauralizer audio filter).
Definition vlc_aout.h:620
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:245
bool headphones
Default to false, set it to true if the current sink is using headphones.
Definition vlc_aout.h:296
int(* volume_set)(audio_output_t *, float volume)
Changes playback volume (optional, may be NULL).
Definition vlc_aout.h:265
void(* pause)(audio_output_t *, bool pause, vlc_tick_t date)
Pauses or resumes playback (can 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:286
int(* mute_set)(audio_output_t *, bool mute)
Changes muting (optional, may be NULL).
Definition vlc_aout.h:279
struct vlc_object_t obj
Definition vlc_aout.h:156
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:251
const struct vlc_audio_output_events * events
Definition vlc_aout.h:301
struct audio_output::@191 current_sink_info
Current sink information set by the module from the start() function.
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:213
Audio loudness measurement.
Definition vlc_aout.h:667
double loudness_shortterm
Short term loudness (last 3seconds), in LUFS.
Definition vlc_aout.h:671
double loudness_momentary
Momentary loudness (last 400 ms), in LUFS.
Definition vlc_aout.h:669
double truepeak
True Peak, in dBTP.
Definition vlc_aout.h:677
double loudness_integrated
Integrated loudness (global), in LUFS.
Definition vlc_aout.h:673
double loudness_range
Loudness range, in LU.
Definition vlc_aout.h:675
Audio meter callback.
Definition vlc_aout.h:686
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:694
Audio meter plugin owner structure.
Definition vlc_aout.h:712
const struct vlc_audio_meter_cbs * cbs
Definition vlc_aout.h:713
void * sys
Definition vlc_aout.h:714
Audio meter structure.
Definition vlc_aout.h:725
vlc_object_t * parent
Definition vlc_aout.h:727
const audio_sample_format_t * fmt
Definition vlc_aout.h:728
struct vlc_list plugins
Definition vlc_aout.h:730
vlc_mutex_t lock
Definition vlc_aout.h:726
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(* restart_request)(audio_output_t *, bool)
Definition vlc_aout.h:137
void(* hotplug_report)(audio_output_t *, const char *, const char *)
Definition vlc_aout.h:136
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:143
VLC object common members.
Definition vlc_objects.h:53
Viewpoints.
Definition vlc_viewpoint.h:41
Video output thread descriptor.
Definition vlc_vout.h:54
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:126
#define AOUT_CHAN_REARCENTER
Definition vlc_es.h:121
#define AOUT_CHAN_REARLEFT
Definition vlc_es.h:122
#define AOUT_CHAN_MIDDLELEFT
Definition vlc_es.h:124
#define AOUT_CHAN_MIDDLERIGHT
Definition vlc_es.h:125
#define AOUT_CHAN_REARRIGHT
Definition vlc_es.h:123
#define AOUT_CHAN_MAX
Definition vlc_es.h:154
#define AOUT_CHAN_RIGHT
Definition vlc_es.h:120
#define AOUT_CHAN_CENTER
Definition vlc_es.h:118
#define AOUT_CHAN_LEFT
Definition vlc_es.h:119
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:48