Coverage Report

Created: 2025-07-11 07:16

/src/vlc/include/vlc_aout.h
Line
Count
Source (jump to first uncovered line)
1
/*****************************************************************************
2
 * vlc_aout.h : audio output interface
3
 *****************************************************************************
4
 * Copyright (C) 2002-2011 VLC authors and VideoLAN
5
 *
6
 * Authors: Christophe Massiot <massiot@via.ecp.fr>
7
 *
8
 * This program is free software; you can redistribute it and/or modify it
9
 * under the terms of the GNU Lesser General Public License as published by
10
 * the Free Software Foundation; either version 2.1 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU Lesser General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU Lesser General Public License
19
 * along with this program; if not, write to the Free Software Foundation,
20
 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21
 *****************************************************************************/
22
23
#ifndef VLC_AOUT_H
24
#define VLC_AOUT_H 1
25
26
#include <assert.h>
27
#include <vlc_list.h>
28
#include <vlc_es.h>
29
#include <vlc_threads.h>
30
31
/* FIXME to remove once aout.h is cleaned a bit more */
32
#include <vlc_block.h>
33
34
/**
35
 * \defgroup audio_output Audio output
36
 * \ingroup output
37
 * @{
38
 * \file
39
 * Audio output modules interface
40
 */
41
42
/* Buffers which arrive in advance of more than AOUT_MAX_ADVANCE_TIME
43
 * will be considered as bogus and be trashed */
44
#define AOUT_MAX_ADVANCE_TIME           (AOUT_MAX_PREPARE_TIME + VLC_TICK_FROM_SEC(1))
45
46
/* Buffers which arrive in advance of more than AOUT_MAX_PREPARE_TIME
47
 * will cause the calling thread to sleep */
48
#define AOUT_MAX_PREPARE_TIME           VLC_TICK_FROM_SEC(2)
49
50
/* Buffers which arrive after pts - AOUT_MIN_PREPARE_TIME will be trashed
51
 * to avoid too heavy resampling */
52
#define AOUT_MIN_PREPARE_TIME           AOUT_MAX_PTS_ADVANCE
53
54
/* Tolerance values from EBU Recommendation 37 */
55
/** Maximum advance of actual audio playback time to coded PTS,
56
 * above which downsampling will be performed */
57
0
#define AOUT_MAX_PTS_ADVANCE            VLC_TICK_FROM_MS(40)
58
59
/** Maximum delay of actual audio playback time from coded PTS,
60
 * above which upsampling will be performed */
61
0
#define AOUT_MAX_PTS_DELAY              VLC_TICK_FROM_MS(60)
62
63
/* Max acceptable resampling (in %) */
64
#define AOUT_MAX_RESAMPLING             10
65
66
0
#define AOUT_FMTS_IDENTICAL( p_first, p_second ) (                          \
67
0
    ((p_first)->i_format == (p_second)->i_format)                           \
68
0
      && AOUT_FMTS_SIMILAR(p_first, p_second) )
69
70
/* Check if i_rate == i_rate and i_channels == i_channels */
71
0
#define AOUT_FMTS_SIMILAR( p_first, p_second ) (                            \
72
0
    ((p_first)->i_rate == (p_second)->i_rate)                               \
73
0
      && ((p_first)->channel_type == (p_second)->channel_type)            \
74
0
      && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
75
0
      && ((p_first)->i_chan_mode == (p_second)->i_chan_mode) )
76
77
#define AOUT_FMT_LINEAR( p_format ) \
78
0
    (aout_BitsPerSample((p_format)->i_format) != 0)
79
80
#define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i')
81
#define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b')
82
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) )
88
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         \
94
    )
95
96
/* Values used for the audio-channels object variable */
97
0
#define AOUT_VAR_CHAN_UNSET         0 /* must be zero */
98
0
#define AOUT_VAR_CHAN_STEREO        1
99
0
#define AOUT_VAR_CHAN_RSTEREO       2
100
0
#define AOUT_VAR_CHAN_LEFT          3
101
0
#define AOUT_VAR_CHAN_RIGHT         4
102
0
#define AOUT_VAR_CHAN_DOLBYS        5
103
/* deprecated: AOUT_VAR_CHAN_HEADPHONES 6, use AOUT_MIX_MODE_BINAURAL */
104
0
#define AOUT_VAR_CHAN_MONO          7
105
106
0
#define AOUT_MIX_MODE_UNSET         0
107
0
#define AOUT_MIX_MODE_STEREO        1
108
0
#define AOUT_MIX_MODE_BINAURAL      2
109
0
#define AOUT_MIX_MODE_4_0           3
110
0
#define AOUT_MIX_MODE_5_1           4
111
0
#define AOUT_MIX_MODE_7_1           5
112
113
/*****************************************************************************
114
 * Main audio output structures
115
 *****************************************************************************/
116
117
/* Size of a frame for S/PDIF output. */
118
#define AOUT_SPDIF_SIZE 6144
119
120
/* Number of samples in an A/52 frame. */
121
#define A52_FRAME_NB 1536
122
123
/**
124
 * \defgroup audio_output_module Audio output modules
125
 * @{
126
 */
127
128
struct vlc_audio_output_events {
129
    void (*timing_report)(audio_output_t *, vlc_tick_t system_ts, vlc_tick_t audio_ts);
130
    void (*drained_report)(audio_output_t *);
131
    void (*volume_report)(audio_output_t *, float);
132
    void (*mute_report)(audio_output_t *, bool);
133
    void (*policy_report)(audio_output_t *, bool);
134
    void (*device_report)(audio_output_t *, const char *);
135
    void (*hotplug_report)(audio_output_t *, const char *, const char *);
136
    void (*restart_request)(audio_output_t *, bool);
137
    int (*gain_request)(audio_output_t *, float);
138
};
139
140
/** Audio output object
141
 *
142
 * The audio output object is the abstraction for rendering decoded
143
 * (or pass-through) audio samples. In addition to playing samples,
144
 * the abstraction exposes controls for pause/resume, flush/drain,
145
 * changing the volume or mut flag, and listing and changing output device.
146
 *
147
 * An audio output can be in one of three different states:
148
 * stopped, playing or paused.
149
 * The audio output is always created in stopped state and is always destroyed
150
 * in that state also. It is moved from stopped to playing state by start(),
151
 * and from playing or paused states back to stopped state by stop().
152
 **/
153
struct audio_output
154
{
155
    struct vlc_object_t obj;
156
157
    void *sys; /**< Private data for callbacks */
158
159
    int (*start)(audio_output_t *, audio_sample_format_t * restrict fmt);
160
    /**< Starts a new stream (mandatory, cannot be NULL).
161
      *
162
      * This callback changes the audio output from stopped to playing state
163
      * (if successful). After the callback returns, time_get(), play(),
164
      * pause(), flush() and eventually stop() callbacks may be called.
165
      *
166
      * \param fmt input stream sample format upon entry,
167
      *            output stream sample format upon return [IN/OUT]
168
      * \return VLC_SUCCESS on success, non-zero on failure
169
      *
170
      * \note This callback can only be called while the audio output is in
171
      * stopped state. There can be only one stream per audio output at a time.
172
      *
173
      * \note This callbacks needs not be reentrant.
174
      */
175
176
    void (*stop)(audio_output_t *);
177
    /**< Stops the existing stream (mandatory, cannot be NULL).
178
      *
179
      * This callback terminates the current audio stream,
180
      * and returns the audio output to stopped state.
181
      *
182
      * \note This callback needs not be reentrant.
183
      */
184
185
    int (*time_get)(audio_output_t *, vlc_tick_t * restrict delay);
186
    /**< Estimates playback buffer latency (can be NULL).
187
      *
188
      * This callback computes an estimation of the delay until the current
189
      * tail of the audio output buffer would be rendered. This is essential
190
      * for (lip) synchronization and long term drift between the audio output
191
      * clock and the media upstream clock (if any).
192
      *
193
      * If the audio output clock is exactly synchronized with the system
194
      * monotonic clock (i.e. vlc_tick_now()), then this callback is not
195
      * mandatory.  In that case, drain must be implemented (since the default
196
      * implementation uses the delay to wait for the end of the stream).
197
      *
198
      * This callback is called before the first play() in order to get the
199
      * initial delay (the hw latency). Most modules won't be able to know this
200
      * latency before the first play. In that case, they should return -1 and
201
      * handle the first play() date, cf. play() documentation.
202
      *
203
      * \warning It is recommended to report the audio delay via
204
      * aout_TimingReport(). In that case, time_get should not be implemented.
205
      *
206
      * \param delay pointer to the delay until the next sample to be written
207
      *              to the playback buffer is rendered [OUT]
208
      * \return 0 on success, non-zero on failure or lack of data
209
      *
210
      * \note This callback cannot be called in stopped state.
211
      */
212
213
    void (*play)(audio_output_t *, block_t *block, vlc_tick_t date);
214
    /**< Queues a block of samples for playback (mandatory, cannot be NULL).
215
      *
216
      * The first play() date (after a flush()/start()) will be most likely in
217
      * the future. Modules that don't know the hw latency before a first play
218
      * (when they return -1 from the first time_get()) will need to handle
219
      * this. They can play a silence buffer with 'length = date - now()', or
220
      * configure their render callback to start at the given date.
221
      *
222
      * \param block block of audio samples
223
      * \param date intended system time to render the first sample
224
      *
225
      * \note This callback cannot be called in stopped state.
226
      */
227
228
    void (*pause)( audio_output_t *, bool pause, vlc_tick_t date);
229
    /**< Pauses or resumes playback (can be NULL).
230
      *
231
      * This callback pauses or resumes audio playback as quickly as possible.
232
      * When pausing, it is desirable to stop producing sound immediately, but
233
      * retain already queued audio samples in the buffer to play when later
234
      * when resuming.
235
      *
236
      * If pausing is impossible, the core will flush the module.
237
      *
238
      * \param pause pause if true, resume from pause if false
239
      * \param date timestamp when the pause or resume was requested
240
      *
241
      * \note This callback cannot be called in stopped state.
242
      */
243
244
    void (*flush)( audio_output_t *);
245
    /**< Flushes the playback buffers (mandatory, cannot be NULL).
246
      *
247
      * \note This callback cannot be called in stopped state.
248
      */
249
250
    void (*drain)(audio_output_t *);
251
    /**< Drain the playback buffers asynchronously (can be NULL).
252
      *
253
      * A drain operation can be cancelled by aout->flush() or aout->stop().
254
      *
255
      * It is legal to continue playback after a drain_async, if flush() is
256
      * called before the next play().
257
      *
258
      * Call aout_DrainedReport() to notify that the stream is drained.
259
      *
260
      * If NULL, the caller will wait for the delay returned by time_get before
261
      * calling stop().
262
      */
263
264
    int (*volume_set)(audio_output_t *, float volume);
265
    /**< Changes playback volume (optional, may be NULL).
266
      *
267
      * \param volume requested volume (0. = mute, 1. = nominal)
268
      *
269
      * \note The volume is always a positive number.
270
      *
271
      * \warning A stream may or may not have been started when called.
272
      * \warning This callback may be called concurrently with
273
      * time_get(), play(), pause() or flush().
274
      * It will however be protected against concurrent calls to
275
      * start(), stop(), volume_set(), mute_set() or device_select().
276
      */
277
278
    int (*mute_set)(audio_output_t *, bool mute);
279
    /**< Changes muting (optional, may be NULL).
280
      *
281
      * \param mute true to mute, false to unmute
282
      * \warning The same constraints apply as with volume_set().
283
      */
284
285
    int (*device_select)(audio_output_t *, const char *id);
286
    /**< Selects an audio output device (optional, may be NULL).
287
      *
288
      * \param id nul-terminated device unique identifier.
289
      * \return 0 on success, non-zero on failure.
290
      *
291
      * \warning The same constraints apply as with volume_set().
292
      */
293
294
    struct {
295
        bool headphones; /**< Default to false, set it to true if the current
296
                              sink is using headphones */
297
    } current_sink_info;
298
    /**< Current sink information set by the module from the start() function */
299
300
    const struct vlc_audio_output_events *events;
301
};
302
303
/**
304
 * Report a new timing point
305
 *
306
 * It is important to report the first point as soon as possible (and the
307
 * following points if the audio delay take some time to be stabilized). Once
308
 * the audio is stabilized, it is recommended to report timing points every
309
 * seconds.
310
 *
311
 * This function can be called from the play() callback or from any threads
312
 * after the first play(). This should not be called after a flush(), a stop(),
313
 * a drain() or while paused. After a flush(), play() need to be called again
314
 * before reporting a new timing. In that case, audio_ts should start again at
315
 * 0 (for the first sample played).
316
 *
317
 * \param aout the audio output instance
318
 * \param system_ts system timestamp when audio_ts is played, based on
319
 * vlc_tick_now(), can be now, in the past or in the future.
320
 * \param audio_pts audio timestamp played at system_ts, starts at block->i_pts
321
 * for the first sample played.
322
 */
323
static inline void aout_TimingReport(audio_output_t *aout, vlc_tick_t system_ts,
324
                                     vlc_tick_t audio_pts)
325
0
{
326
0
    aout->events->timing_report(aout, system_ts, audio_pts);
327
0
}
Unexecuted instantiation: aiff.c:aout_TimingReport
Unexecuted instantiation: avi.c:aout_TimingReport
Unexecuted instantiation: dts_header.c:aout_TimingReport
Unexecuted instantiation: mp4.c:aout_TimingReport
Unexecuted instantiation: fragments.c:aout_TimingReport
Unexecuted instantiation: attachments.c:aout_TimingReport
Unexecuted instantiation: heif.c:aout_TimingReport
Unexecuted instantiation: essetup.c:aout_TimingReport
Unexecuted instantiation: meta.c:aout_TimingReport
Unexecuted instantiation: libmp4.c:aout_TimingReport
Unexecuted instantiation: wav.c:aout_TimingReport
Unexecuted instantiation: mpegaudio.c:aout_TimingReport
Unexecuted instantiation: mkv.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: util.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: virtual_segment.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: matroska_segment.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: demux.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: events.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: Ebml_parser.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: chapters.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: chapter_command.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: chapter_command_script.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_TimingReport(audio_output*, long, long)
Unexecuted instantiation: araw.c:aout_TimingReport
Unexecuted instantiation: g711.c:aout_TimingReport
Unexecuted instantiation: lpcm.c:aout_TimingReport
Unexecuted instantiation: libvlc.c:aout_TimingReport
Unexecuted instantiation: content.c:aout_TimingReport
Unexecuted instantiation: control.c:aout_TimingReport
Unexecuted instantiation: notify.c:aout_TimingReport
Unexecuted instantiation: player.c:aout_TimingReport
Unexecuted instantiation: playlist.c:aout_TimingReport
Unexecuted instantiation: preparse.c:aout_TimingReport
Unexecuted instantiation: decoder.c:aout_TimingReport
Unexecuted instantiation: input.c:aout_TimingReport
Unexecuted instantiation: timer.c:aout_TimingReport
Unexecuted instantiation: track.c:aout_TimingReport
Unexecuted instantiation: title.c:aout_TimingReport
Unexecuted instantiation: aout.c:aout_TimingReport
Unexecuted instantiation: vout.c:aout_TimingReport
Unexecuted instantiation: osd.c:aout_TimingReport
Unexecuted instantiation: medialib.c:aout_TimingReport
Unexecuted instantiation: resource.c:aout_TimingReport
Unexecuted instantiation: common.c:aout_TimingReport
Unexecuted instantiation: dec.c:aout_TimingReport
Unexecuted instantiation: filters.c:aout_TimingReport
Unexecuted instantiation: meter.c:aout_TimingReport
Unexecuted instantiation: output.c:aout_TimingReport
Unexecuted instantiation: volume.c:aout_TimingReport
Unexecuted instantiation: strings.c:aout_TimingReport
Unexecuted instantiation: objects.c:aout_TimingReport
Unexecuted instantiation: vlm.c:aout_TimingReport
Unexecuted instantiation: vlm_event.c:aout_TimingReport
Unexecuted instantiation: vlmshell.c:aout_TimingReport
Unexecuted instantiation: libvlc-module.c:aout_TimingReport
Unexecuted instantiation: clock.c:aout_TimingReport
Unexecuted instantiation: es_out.c:aout_TimingReport
328
329
/**
330
 * Report than the stream is drained (after a call to aout->drain_async)
331
 */
332
static inline void aout_DrainedReport(audio_output_t *aout)
333
0
{
334
0
    aout->events->drained_report(aout);
335
0
}
Unexecuted instantiation: aiff.c:aout_DrainedReport
Unexecuted instantiation: avi.c:aout_DrainedReport
Unexecuted instantiation: dts_header.c:aout_DrainedReport
Unexecuted instantiation: mp4.c:aout_DrainedReport
Unexecuted instantiation: fragments.c:aout_DrainedReport
Unexecuted instantiation: attachments.c:aout_DrainedReport
Unexecuted instantiation: heif.c:aout_DrainedReport
Unexecuted instantiation: essetup.c:aout_DrainedReport
Unexecuted instantiation: meta.c:aout_DrainedReport
Unexecuted instantiation: libmp4.c:aout_DrainedReport
Unexecuted instantiation: wav.c:aout_DrainedReport
Unexecuted instantiation: mpegaudio.c:aout_DrainedReport
Unexecuted instantiation: mkv.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: util.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: virtual_segment.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: matroska_segment.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: demux.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: events.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: Ebml_parser.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: chapters.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: chapter_command.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: chapter_command_script.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_DrainedReport(audio_output*)
Unexecuted instantiation: araw.c:aout_DrainedReport
Unexecuted instantiation: g711.c:aout_DrainedReport
Unexecuted instantiation: lpcm.c:aout_DrainedReport
Unexecuted instantiation: libvlc.c:aout_DrainedReport
Unexecuted instantiation: content.c:aout_DrainedReport
Unexecuted instantiation: control.c:aout_DrainedReport
Unexecuted instantiation: notify.c:aout_DrainedReport
Unexecuted instantiation: player.c:aout_DrainedReport
Unexecuted instantiation: playlist.c:aout_DrainedReport
Unexecuted instantiation: preparse.c:aout_DrainedReport
Unexecuted instantiation: decoder.c:aout_DrainedReport
Unexecuted instantiation: input.c:aout_DrainedReport
Unexecuted instantiation: timer.c:aout_DrainedReport
Unexecuted instantiation: track.c:aout_DrainedReport
Unexecuted instantiation: title.c:aout_DrainedReport
Unexecuted instantiation: aout.c:aout_DrainedReport
Unexecuted instantiation: vout.c:aout_DrainedReport
Unexecuted instantiation: osd.c:aout_DrainedReport
Unexecuted instantiation: medialib.c:aout_DrainedReport
Unexecuted instantiation: resource.c:aout_DrainedReport
Unexecuted instantiation: common.c:aout_DrainedReport
Unexecuted instantiation: dec.c:aout_DrainedReport
Unexecuted instantiation: filters.c:aout_DrainedReport
Unexecuted instantiation: meter.c:aout_DrainedReport
Unexecuted instantiation: output.c:aout_DrainedReport
Unexecuted instantiation: volume.c:aout_DrainedReport
Unexecuted instantiation: strings.c:aout_DrainedReport
Unexecuted instantiation: objects.c:aout_DrainedReport
Unexecuted instantiation: vlm.c:aout_DrainedReport
Unexecuted instantiation: vlm_event.c:aout_DrainedReport
Unexecuted instantiation: vlmshell.c:aout_DrainedReport
Unexecuted instantiation: libvlc-module.c:aout_DrainedReport
Unexecuted instantiation: clock.c:aout_DrainedReport
Unexecuted instantiation: es_out.c:aout_DrainedReport
336
337
/**
338
 * Report change of configured audio volume to the core and UI.
339
 */
340
static inline void aout_VolumeReport(audio_output_t *aout, float volume)
341
0
{
342
0
    aout->events->volume_report(aout, volume);
343
0
}
Unexecuted instantiation: aiff.c:aout_VolumeReport
Unexecuted instantiation: avi.c:aout_VolumeReport
Unexecuted instantiation: dts_header.c:aout_VolumeReport
Unexecuted instantiation: mp4.c:aout_VolumeReport
Unexecuted instantiation: fragments.c:aout_VolumeReport
Unexecuted instantiation: attachments.c:aout_VolumeReport
Unexecuted instantiation: heif.c:aout_VolumeReport
Unexecuted instantiation: essetup.c:aout_VolumeReport
Unexecuted instantiation: meta.c:aout_VolumeReport
Unexecuted instantiation: libmp4.c:aout_VolumeReport
Unexecuted instantiation: wav.c:aout_VolumeReport
Unexecuted instantiation: mpegaudio.c:aout_VolumeReport
Unexecuted instantiation: mkv.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: util.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: virtual_segment.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: matroska_segment.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: demux.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: events.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: Ebml_parser.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: chapters.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: chapter_command.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: chapter_command_script.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_VolumeReport(audio_output*, float)
Unexecuted instantiation: araw.c:aout_VolumeReport
Unexecuted instantiation: g711.c:aout_VolumeReport
Unexecuted instantiation: lpcm.c:aout_VolumeReport
Unexecuted instantiation: libvlc.c:aout_VolumeReport
Unexecuted instantiation: content.c:aout_VolumeReport
Unexecuted instantiation: control.c:aout_VolumeReport
Unexecuted instantiation: notify.c:aout_VolumeReport
Unexecuted instantiation: player.c:aout_VolumeReport
Unexecuted instantiation: playlist.c:aout_VolumeReport
Unexecuted instantiation: preparse.c:aout_VolumeReport
Unexecuted instantiation: decoder.c:aout_VolumeReport
Unexecuted instantiation: input.c:aout_VolumeReport
Unexecuted instantiation: timer.c:aout_VolumeReport
Unexecuted instantiation: track.c:aout_VolumeReport
Unexecuted instantiation: title.c:aout_VolumeReport
Unexecuted instantiation: aout.c:aout_VolumeReport
Unexecuted instantiation: vout.c:aout_VolumeReport
Unexecuted instantiation: osd.c:aout_VolumeReport
Unexecuted instantiation: medialib.c:aout_VolumeReport
Unexecuted instantiation: resource.c:aout_VolumeReport
Unexecuted instantiation: common.c:aout_VolumeReport
Unexecuted instantiation: dec.c:aout_VolumeReport
Unexecuted instantiation: filters.c:aout_VolumeReport
Unexecuted instantiation: meter.c:aout_VolumeReport
Unexecuted instantiation: output.c:aout_VolumeReport
Unexecuted instantiation: volume.c:aout_VolumeReport
Unexecuted instantiation: strings.c:aout_VolumeReport
Unexecuted instantiation: objects.c:aout_VolumeReport
Unexecuted instantiation: vlm.c:aout_VolumeReport
Unexecuted instantiation: vlm_event.c:aout_VolumeReport
Unexecuted instantiation: vlmshell.c:aout_VolumeReport
Unexecuted instantiation: libvlc-module.c:aout_VolumeReport
Unexecuted instantiation: clock.c:aout_VolumeReport
Unexecuted instantiation: es_out.c:aout_VolumeReport
344
345
/**
346
 * Report change of muted flag to the core and UI.
347
 */
348
static inline void aout_MuteReport(audio_output_t *aout, bool mute)
349
0
{
350
0
    aout->events->mute_report(aout, mute);
351
0
}
Unexecuted instantiation: aiff.c:aout_MuteReport
Unexecuted instantiation: avi.c:aout_MuteReport
Unexecuted instantiation: dts_header.c:aout_MuteReport
Unexecuted instantiation: mp4.c:aout_MuteReport
Unexecuted instantiation: fragments.c:aout_MuteReport
Unexecuted instantiation: attachments.c:aout_MuteReport
Unexecuted instantiation: heif.c:aout_MuteReport
Unexecuted instantiation: essetup.c:aout_MuteReport
Unexecuted instantiation: meta.c:aout_MuteReport
Unexecuted instantiation: libmp4.c:aout_MuteReport
Unexecuted instantiation: wav.c:aout_MuteReport
Unexecuted instantiation: mpegaudio.c:aout_MuteReport
Unexecuted instantiation: mkv.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: util.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: virtual_segment.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: matroska_segment.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: demux.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: events.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: Ebml_parser.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: chapters.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: chapter_command.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: chapter_command_script.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_MuteReport(audio_output*, bool)
Unexecuted instantiation: araw.c:aout_MuteReport
Unexecuted instantiation: g711.c:aout_MuteReport
Unexecuted instantiation: lpcm.c:aout_MuteReport
Unexecuted instantiation: libvlc.c:aout_MuteReport
Unexecuted instantiation: content.c:aout_MuteReport
Unexecuted instantiation: control.c:aout_MuteReport
Unexecuted instantiation: notify.c:aout_MuteReport
Unexecuted instantiation: player.c:aout_MuteReport
Unexecuted instantiation: playlist.c:aout_MuteReport
Unexecuted instantiation: preparse.c:aout_MuteReport
Unexecuted instantiation: decoder.c:aout_MuteReport
Unexecuted instantiation: input.c:aout_MuteReport
Unexecuted instantiation: timer.c:aout_MuteReport
Unexecuted instantiation: track.c:aout_MuteReport
Unexecuted instantiation: title.c:aout_MuteReport
Unexecuted instantiation: aout.c:aout_MuteReport
Unexecuted instantiation: vout.c:aout_MuteReport
Unexecuted instantiation: osd.c:aout_MuteReport
Unexecuted instantiation: medialib.c:aout_MuteReport
Unexecuted instantiation: resource.c:aout_MuteReport
Unexecuted instantiation: common.c:aout_MuteReport
Unexecuted instantiation: dec.c:aout_MuteReport
Unexecuted instantiation: filters.c:aout_MuteReport
Unexecuted instantiation: meter.c:aout_MuteReport
Unexecuted instantiation: output.c:aout_MuteReport
Unexecuted instantiation: volume.c:aout_MuteReport
Unexecuted instantiation: strings.c:aout_MuteReport
Unexecuted instantiation: objects.c:aout_MuteReport
Unexecuted instantiation: vlm.c:aout_MuteReport
Unexecuted instantiation: vlm_event.c:aout_MuteReport
Unexecuted instantiation: vlmshell.c:aout_MuteReport
Unexecuted instantiation: libvlc-module.c:aout_MuteReport
Unexecuted instantiation: clock.c:aout_MuteReport
Unexecuted instantiation: es_out.c:aout_MuteReport
352
353
/**
354
 * Report audio policy status.
355
 * \param aout the audio output instance reporting the cork policy
356
 * \param cork true to request a cork, false to undo any pending cork.
357
 */
358
static inline void aout_PolicyReport(audio_output_t *aout, bool cork)
359
0
{
360
0
    aout->events->policy_report(aout, cork);
361
0
}
Unexecuted instantiation: aiff.c:aout_PolicyReport
Unexecuted instantiation: avi.c:aout_PolicyReport
Unexecuted instantiation: dts_header.c:aout_PolicyReport
Unexecuted instantiation: mp4.c:aout_PolicyReport
Unexecuted instantiation: fragments.c:aout_PolicyReport
Unexecuted instantiation: attachments.c:aout_PolicyReport
Unexecuted instantiation: heif.c:aout_PolicyReport
Unexecuted instantiation: essetup.c:aout_PolicyReport
Unexecuted instantiation: meta.c:aout_PolicyReport
Unexecuted instantiation: libmp4.c:aout_PolicyReport
Unexecuted instantiation: wav.c:aout_PolicyReport
Unexecuted instantiation: mpegaudio.c:aout_PolicyReport
Unexecuted instantiation: mkv.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: util.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: virtual_segment.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: matroska_segment.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: demux.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: events.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: Ebml_parser.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: chapters.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: chapter_command.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: chapter_command_script.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_PolicyReport(audio_output*, bool)
Unexecuted instantiation: araw.c:aout_PolicyReport
Unexecuted instantiation: g711.c:aout_PolicyReport
Unexecuted instantiation: lpcm.c:aout_PolicyReport
Unexecuted instantiation: libvlc.c:aout_PolicyReport
Unexecuted instantiation: content.c:aout_PolicyReport
Unexecuted instantiation: control.c:aout_PolicyReport
Unexecuted instantiation: notify.c:aout_PolicyReport
Unexecuted instantiation: player.c:aout_PolicyReport
Unexecuted instantiation: playlist.c:aout_PolicyReport
Unexecuted instantiation: preparse.c:aout_PolicyReport
Unexecuted instantiation: decoder.c:aout_PolicyReport
Unexecuted instantiation: input.c:aout_PolicyReport
Unexecuted instantiation: timer.c:aout_PolicyReport
Unexecuted instantiation: track.c:aout_PolicyReport
Unexecuted instantiation: title.c:aout_PolicyReport
Unexecuted instantiation: aout.c:aout_PolicyReport
Unexecuted instantiation: vout.c:aout_PolicyReport
Unexecuted instantiation: osd.c:aout_PolicyReport
Unexecuted instantiation: medialib.c:aout_PolicyReport
Unexecuted instantiation: resource.c:aout_PolicyReport
Unexecuted instantiation: common.c:aout_PolicyReport
Unexecuted instantiation: dec.c:aout_PolicyReport
Unexecuted instantiation: filters.c:aout_PolicyReport
Unexecuted instantiation: meter.c:aout_PolicyReport
Unexecuted instantiation: output.c:aout_PolicyReport
Unexecuted instantiation: volume.c:aout_PolicyReport
Unexecuted instantiation: strings.c:aout_PolicyReport
Unexecuted instantiation: objects.c:aout_PolicyReport
Unexecuted instantiation: vlm.c:aout_PolicyReport
Unexecuted instantiation: vlm_event.c:aout_PolicyReport
Unexecuted instantiation: vlmshell.c:aout_PolicyReport
Unexecuted instantiation: libvlc-module.c:aout_PolicyReport
Unexecuted instantiation: clock.c:aout_PolicyReport
Unexecuted instantiation: es_out.c:aout_PolicyReport
362
363
/**
364
 * Report change of output device.
365
 */
366
static inline void aout_DeviceReport(audio_output_t *aout, const char *id)
367
0
{
368
0
    aout->events->device_report(aout, id);
369
0
}
Unexecuted instantiation: aiff.c:aout_DeviceReport
Unexecuted instantiation: avi.c:aout_DeviceReport
Unexecuted instantiation: dts_header.c:aout_DeviceReport
Unexecuted instantiation: mp4.c:aout_DeviceReport
Unexecuted instantiation: fragments.c:aout_DeviceReport
Unexecuted instantiation: attachments.c:aout_DeviceReport
Unexecuted instantiation: heif.c:aout_DeviceReport
Unexecuted instantiation: essetup.c:aout_DeviceReport
Unexecuted instantiation: meta.c:aout_DeviceReport
Unexecuted instantiation: libmp4.c:aout_DeviceReport
Unexecuted instantiation: wav.c:aout_DeviceReport
Unexecuted instantiation: mpegaudio.c:aout_DeviceReport
Unexecuted instantiation: mkv.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: util.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: virtual_segment.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: matroska_segment.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: demux.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: events.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: Ebml_parser.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: chapters.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: chapter_command.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: chapter_command_script.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_DeviceReport(audio_output*, char const*)
Unexecuted instantiation: araw.c:aout_DeviceReport
Unexecuted instantiation: g711.c:aout_DeviceReport
Unexecuted instantiation: lpcm.c:aout_DeviceReport
Unexecuted instantiation: libvlc.c:aout_DeviceReport
Unexecuted instantiation: content.c:aout_DeviceReport
Unexecuted instantiation: control.c:aout_DeviceReport
Unexecuted instantiation: notify.c:aout_DeviceReport
Unexecuted instantiation: player.c:aout_DeviceReport
Unexecuted instantiation: playlist.c:aout_DeviceReport
Unexecuted instantiation: preparse.c:aout_DeviceReport
Unexecuted instantiation: decoder.c:aout_DeviceReport
Unexecuted instantiation: input.c:aout_DeviceReport
Unexecuted instantiation: timer.c:aout_DeviceReport
Unexecuted instantiation: track.c:aout_DeviceReport
Unexecuted instantiation: title.c:aout_DeviceReport
Unexecuted instantiation: aout.c:aout_DeviceReport
Unexecuted instantiation: vout.c:aout_DeviceReport
Unexecuted instantiation: osd.c:aout_DeviceReport
Unexecuted instantiation: medialib.c:aout_DeviceReport
Unexecuted instantiation: resource.c:aout_DeviceReport
Unexecuted instantiation: common.c:aout_DeviceReport
Unexecuted instantiation: dec.c:aout_DeviceReport
Unexecuted instantiation: filters.c:aout_DeviceReport
Unexecuted instantiation: meter.c:aout_DeviceReport
Unexecuted instantiation: output.c:aout_DeviceReport
Unexecuted instantiation: volume.c:aout_DeviceReport
Unexecuted instantiation: strings.c:aout_DeviceReport
Unexecuted instantiation: objects.c:aout_DeviceReport
Unexecuted instantiation: vlm.c:aout_DeviceReport
Unexecuted instantiation: vlm_event.c:aout_DeviceReport
Unexecuted instantiation: vlmshell.c:aout_DeviceReport
Unexecuted instantiation: libvlc-module.c:aout_DeviceReport
Unexecuted instantiation: clock.c:aout_DeviceReport
Unexecuted instantiation: es_out.c:aout_DeviceReport
370
371
/**
372
 * Report a device hot-plug event.
373
 * @param aout the audio output instance reporting the new device
374
 * @param id device ID
375
 * @param name human-readable device name (NULL for hot unplug)
376
 */
377
static inline void aout_HotplugReport(audio_output_t *aout,
378
                                      const char *id, const char *name)
379
0
{
380
0
    aout->events->hotplug_report(aout, id, name);
381
0
}
Unexecuted instantiation: aiff.c:aout_HotplugReport
Unexecuted instantiation: avi.c:aout_HotplugReport
Unexecuted instantiation: dts_header.c:aout_HotplugReport
Unexecuted instantiation: mp4.c:aout_HotplugReport
Unexecuted instantiation: fragments.c:aout_HotplugReport
Unexecuted instantiation: attachments.c:aout_HotplugReport
Unexecuted instantiation: heif.c:aout_HotplugReport
Unexecuted instantiation: essetup.c:aout_HotplugReport
Unexecuted instantiation: meta.c:aout_HotplugReport
Unexecuted instantiation: libmp4.c:aout_HotplugReport
Unexecuted instantiation: wav.c:aout_HotplugReport
Unexecuted instantiation: mpegaudio.c:aout_HotplugReport
Unexecuted instantiation: mkv.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: util.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: virtual_segment.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: matroska_segment.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: demux.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: events.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: Ebml_parser.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: chapters.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: chapter_command.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: chapter_command_script.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_HotplugReport(audio_output*, char const*, char const*)
Unexecuted instantiation: araw.c:aout_HotplugReport
Unexecuted instantiation: g711.c:aout_HotplugReport
Unexecuted instantiation: lpcm.c:aout_HotplugReport
Unexecuted instantiation: libvlc.c:aout_HotplugReport
Unexecuted instantiation: content.c:aout_HotplugReport
Unexecuted instantiation: control.c:aout_HotplugReport
Unexecuted instantiation: notify.c:aout_HotplugReport
Unexecuted instantiation: player.c:aout_HotplugReport
Unexecuted instantiation: playlist.c:aout_HotplugReport
Unexecuted instantiation: preparse.c:aout_HotplugReport
Unexecuted instantiation: decoder.c:aout_HotplugReport
Unexecuted instantiation: input.c:aout_HotplugReport
Unexecuted instantiation: timer.c:aout_HotplugReport
Unexecuted instantiation: track.c:aout_HotplugReport
Unexecuted instantiation: title.c:aout_HotplugReport
Unexecuted instantiation: aout.c:aout_HotplugReport
Unexecuted instantiation: vout.c:aout_HotplugReport
Unexecuted instantiation: osd.c:aout_HotplugReport
Unexecuted instantiation: medialib.c:aout_HotplugReport
Unexecuted instantiation: resource.c:aout_HotplugReport
Unexecuted instantiation: common.c:aout_HotplugReport
Unexecuted instantiation: dec.c:aout_HotplugReport
Unexecuted instantiation: filters.c:aout_HotplugReport
Unexecuted instantiation: meter.c:aout_HotplugReport
Unexecuted instantiation: output.c:aout_HotplugReport
Unexecuted instantiation: volume.c:aout_HotplugReport
Unexecuted instantiation: strings.c:aout_HotplugReport
Unexecuted instantiation: objects.c:aout_HotplugReport
Unexecuted instantiation: vlm.c:aout_HotplugReport
Unexecuted instantiation: vlm_event.c:aout_HotplugReport
Unexecuted instantiation: vlmshell.c:aout_HotplugReport
Unexecuted instantiation: libvlc-module.c:aout_HotplugReport
Unexecuted instantiation: clock.c:aout_HotplugReport
Unexecuted instantiation: es_out.c:aout_HotplugReport
382
383
/**
384
 * Request a change of software audio amplification.
385
 * \param aout the audio output instance requesting software gain
386
 * \param gain linear amplitude gain (must be positive)
387
 * \warning Values in excess 1.0 may cause overflow and distortion.
388
 */
389
static inline int aout_GainRequest(audio_output_t *aout, float gain)
390
0
{
391
0
    return aout->events->gain_request(aout, gain);
392
0
}
Unexecuted instantiation: aiff.c:aout_GainRequest
Unexecuted instantiation: avi.c:aout_GainRequest
Unexecuted instantiation: dts_header.c:aout_GainRequest
Unexecuted instantiation: mp4.c:aout_GainRequest
Unexecuted instantiation: fragments.c:aout_GainRequest
Unexecuted instantiation: attachments.c:aout_GainRequest
Unexecuted instantiation: heif.c:aout_GainRequest
Unexecuted instantiation: essetup.c:aout_GainRequest
Unexecuted instantiation: meta.c:aout_GainRequest
Unexecuted instantiation: libmp4.c:aout_GainRequest
Unexecuted instantiation: wav.c:aout_GainRequest
Unexecuted instantiation: mpegaudio.c:aout_GainRequest
Unexecuted instantiation: mkv.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: util.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: virtual_segment.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: matroska_segment.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: demux.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: events.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: Ebml_parser.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: chapters.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: chapter_command.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: chapter_command_script.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_GainRequest(audio_output*, float)
Unexecuted instantiation: araw.c:aout_GainRequest
Unexecuted instantiation: g711.c:aout_GainRequest
Unexecuted instantiation: lpcm.c:aout_GainRequest
Unexecuted instantiation: libvlc.c:aout_GainRequest
Unexecuted instantiation: content.c:aout_GainRequest
Unexecuted instantiation: control.c:aout_GainRequest
Unexecuted instantiation: notify.c:aout_GainRequest
Unexecuted instantiation: player.c:aout_GainRequest
Unexecuted instantiation: playlist.c:aout_GainRequest
Unexecuted instantiation: preparse.c:aout_GainRequest
Unexecuted instantiation: decoder.c:aout_GainRequest
Unexecuted instantiation: input.c:aout_GainRequest
Unexecuted instantiation: timer.c:aout_GainRequest
Unexecuted instantiation: track.c:aout_GainRequest
Unexecuted instantiation: title.c:aout_GainRequest
Unexecuted instantiation: aout.c:aout_GainRequest
Unexecuted instantiation: vout.c:aout_GainRequest
Unexecuted instantiation: osd.c:aout_GainRequest
Unexecuted instantiation: medialib.c:aout_GainRequest
Unexecuted instantiation: resource.c:aout_GainRequest
Unexecuted instantiation: common.c:aout_GainRequest
Unexecuted instantiation: dec.c:aout_GainRequest
Unexecuted instantiation: filters.c:aout_GainRequest
Unexecuted instantiation: meter.c:aout_GainRequest
Unexecuted instantiation: output.c:aout_GainRequest
Unexecuted instantiation: volume.c:aout_GainRequest
Unexecuted instantiation: strings.c:aout_GainRequest
Unexecuted instantiation: objects.c:aout_GainRequest
Unexecuted instantiation: vlm.c:aout_GainRequest
Unexecuted instantiation: vlm_event.c:aout_GainRequest
Unexecuted instantiation: vlmshell.c:aout_GainRequest
Unexecuted instantiation: libvlc-module.c:aout_GainRequest
Unexecuted instantiation: clock.c:aout_GainRequest
Unexecuted instantiation: es_out.c:aout_GainRequest
393
394
static inline void aout_RestartRequest(audio_output_t *aout, bool restart_dec)
395
0
{
396
0
    aout->events->restart_request(aout, restart_dec);
397
0
}
Unexecuted instantiation: aiff.c:aout_RestartRequest
Unexecuted instantiation: avi.c:aout_RestartRequest
Unexecuted instantiation: dts_header.c:aout_RestartRequest
Unexecuted instantiation: mp4.c:aout_RestartRequest
Unexecuted instantiation: fragments.c:aout_RestartRequest
Unexecuted instantiation: attachments.c:aout_RestartRequest
Unexecuted instantiation: heif.c:aout_RestartRequest
Unexecuted instantiation: essetup.c:aout_RestartRequest
Unexecuted instantiation: meta.c:aout_RestartRequest
Unexecuted instantiation: libmp4.c:aout_RestartRequest
Unexecuted instantiation: wav.c:aout_RestartRequest
Unexecuted instantiation: mpegaudio.c:aout_RestartRequest
Unexecuted instantiation: mkv.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: util.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: virtual_segment.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: matroska_segment.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: demux.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: events.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: Ebml_parser.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: chapters.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: chapter_command.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: chapter_command_script.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_RestartRequest(audio_output*, bool)
Unexecuted instantiation: araw.c:aout_RestartRequest
Unexecuted instantiation: g711.c:aout_RestartRequest
Unexecuted instantiation: lpcm.c:aout_RestartRequest
Unexecuted instantiation: libvlc.c:aout_RestartRequest
Unexecuted instantiation: content.c:aout_RestartRequest
Unexecuted instantiation: control.c:aout_RestartRequest
Unexecuted instantiation: notify.c:aout_RestartRequest
Unexecuted instantiation: player.c:aout_RestartRequest
Unexecuted instantiation: playlist.c:aout_RestartRequest
Unexecuted instantiation: preparse.c:aout_RestartRequest
Unexecuted instantiation: decoder.c:aout_RestartRequest
Unexecuted instantiation: input.c:aout_RestartRequest
Unexecuted instantiation: timer.c:aout_RestartRequest
Unexecuted instantiation: track.c:aout_RestartRequest
Unexecuted instantiation: title.c:aout_RestartRequest
Unexecuted instantiation: aout.c:aout_RestartRequest
Unexecuted instantiation: vout.c:aout_RestartRequest
Unexecuted instantiation: osd.c:aout_RestartRequest
Unexecuted instantiation: medialib.c:aout_RestartRequest
Unexecuted instantiation: resource.c:aout_RestartRequest
Unexecuted instantiation: common.c:aout_RestartRequest
Unexecuted instantiation: dec.c:aout_RestartRequest
Unexecuted instantiation: filters.c:aout_RestartRequest
Unexecuted instantiation: meter.c:aout_RestartRequest
Unexecuted instantiation: output.c:aout_RestartRequest
Unexecuted instantiation: volume.c:aout_RestartRequest
Unexecuted instantiation: strings.c:aout_RestartRequest
Unexecuted instantiation: objects.c:aout_RestartRequest
Unexecuted instantiation: vlm.c:aout_RestartRequest
Unexecuted instantiation: vlm_event.c:aout_RestartRequest
Unexecuted instantiation: vlmshell.c:aout_RestartRequest
Unexecuted instantiation: libvlc-module.c:aout_RestartRequest
Unexecuted instantiation: clock.c:aout_RestartRequest
Unexecuted instantiation: es_out.c:aout_RestartRequest
398
399
/** @} */
400
401
/**
402
 * \defgroup audio_format Audio formats
403
 * @{
404
 */
405
/**
406
 * It describes the audio channel order VLC expect.
407
 */
408
static const uint32_t pi_vlc_chan_order_wg4[] =
409
{
410
    AOUT_CHAN_LEFT, AOUT_CHAN_RIGHT,
411
    AOUT_CHAN_MIDDLELEFT, AOUT_CHAN_MIDDLERIGHT,
412
    AOUT_CHAN_REARLEFT, AOUT_CHAN_REARRIGHT, AOUT_CHAN_REARCENTER,
413
    AOUT_CHAN_CENTER, AOUT_CHAN_LFE, 0
414
};
415
416
/**
417
 * This function computes the reordering needed to go from pi_chan_order_in to
418
 * pi_chan_order_out.
419
 * If pi_chan_order_in or pi_chan_order_out is NULL, it will assume that vlc
420
 * internal (WG4) order is requested.
421
 */
422
VLC_API unsigned aout_CheckChannelReorder( const uint32_t *, const uint32_t *,
423
                                           uint32_t mask, uint8_t *table );
424
425
/**
426
 * Reorders audio samples within a block of linear audio interleaved samples.
427
 * \param ptr start address of the block of samples
428
 * \param bytes size of the block in bytes (must be a multiple of the product
429
 *              of the channels count and the sample size)
430
 * \param channels channels count (also length of the chans_table table)
431
 * \param chans_table permutation table to reorder the channels
432
 *                    (usually computed by aout_CheckChannelReorder())
433
 * \param fourcc sample format (must be a linear sample format)
434
 * \note The samples must be naturally aligned in memory.
435
 */
436
VLC_API void aout_ChannelReorder(void *ptr, size_t bytes, uint8_t channels,
437
                                 const uint8_t *chans_table,
438
                                 vlc_fourcc_t fourcc);
439
440
/**
441
 * This function will compute the extraction parameter into pi_selection to go
442
 * from i_channels with their type given by pi_order_src[] into the order
443
 * describe by pi_order_dst.
444
 * It will also set :
445
 * - *pi_channels as the number of channels that will be extracted which is
446
 * lower (in case of non understood channels type) or equal to i_channels.
447
 * - the layout of the channels (*pi_layout).
448
 *
449
 * It will return true if channel extraction is really needed, in which case
450
 * aout_ChannelExtract must be used
451
 *
452
 * XXX It must be used when the source may have channel type not understood
453
 * by VLC. In this case the channel type pi_order_src[] must be set to 0.
454
 * XXX It must also be used if multiple channels have the same type.
455
 */
456
VLC_API bool aout_CheckChannelExtraction( int *pi_selection, uint32_t *pi_layout, int *pi_channels, const uint32_t pi_order_dst[AOUT_CHAN_MAX], const uint32_t *pi_order_src, int i_channels );
457
458
/**
459
 * Do the actual channels extraction using the parameters created by
460
 * aout_CheckChannelExtraction.
461
 *
462
 * XXX this function does not work in place (p_dst and p_src must not overlap).
463
 * XXX Only 8, 16, 32, 64 bits per sample are supported.
464
 */
465
VLC_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 );
466
467
VLC_API void aout_Interleave(void *dst, const void *const *planes,
468
                             unsigned samples, unsigned channels,
469
                             vlc_fourcc_t fourcc);
470
VLC_API void aout_Deinterleave(void *dst, const void *src, unsigned samples,
471
                             unsigned channels, vlc_fourcc_t fourcc);
472
473
/* */
474
static inline unsigned aout_FormatNbChannels(const audio_sample_format_t *fmt)
475
2.68M
{
476
2.68M
    return vlc_popcount(fmt->i_physical_channels);
477
2.68M
}
Unexecuted instantiation: aiff.c:aout_FormatNbChannels
Unexecuted instantiation: avi.c:aout_FormatNbChannels
Unexecuted instantiation: dts_header.c:aout_FormatNbChannels
Unexecuted instantiation: mp4.c:aout_FormatNbChannels
Unexecuted instantiation: fragments.c:aout_FormatNbChannels
Unexecuted instantiation: attachments.c:aout_FormatNbChannels
Unexecuted instantiation: heif.c:aout_FormatNbChannels
Unexecuted instantiation: essetup.c:aout_FormatNbChannels
Unexecuted instantiation: meta.c:aout_FormatNbChannels
Unexecuted instantiation: libmp4.c:aout_FormatNbChannels
Unexecuted instantiation: wav.c:aout_FormatNbChannels
Unexecuted instantiation: mpegaudio.c:aout_FormatNbChannels
Unexecuted instantiation: mkv.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: util.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: virtual_segment.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: matroska_segment.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: matroska_segment_parse.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: matroska_segment_seeker.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: demux.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: events.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: Ebml_parser.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: chapters.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: chapter_command.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: chapter_command_dvd.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: chapter_command_script.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: chapter_command_script_common.cpp:aout_FormatNbChannels(audio_format_t const*)
Unexecuted instantiation: araw.c:aout_FormatNbChannels
Unexecuted instantiation: g711.c:aout_FormatNbChannels
Unexecuted instantiation: lpcm.c:aout_FormatNbChannels
Unexecuted instantiation: libvlc.c:aout_FormatNbChannels
Unexecuted instantiation: content.c:aout_FormatNbChannels
Unexecuted instantiation: control.c:aout_FormatNbChannels
Unexecuted instantiation: notify.c:aout_FormatNbChannels
Unexecuted instantiation: player.c:aout_FormatNbChannels
Unexecuted instantiation: playlist.c:aout_FormatNbChannels
Unexecuted instantiation: preparse.c:aout_FormatNbChannels
Unexecuted instantiation: decoder.c:aout_FormatNbChannels
Unexecuted instantiation: input.c:aout_FormatNbChannels
Unexecuted instantiation: timer.c:aout_FormatNbChannels
Unexecuted instantiation: track.c:aout_FormatNbChannels
Unexecuted instantiation: title.c:aout_FormatNbChannels
Unexecuted instantiation: aout.c:aout_FormatNbChannels
Unexecuted instantiation: vout.c:aout_FormatNbChannels
Unexecuted instantiation: osd.c:aout_FormatNbChannels
Unexecuted instantiation: medialib.c:aout_FormatNbChannels
Unexecuted instantiation: resource.c:aout_FormatNbChannels
common.c:aout_FormatNbChannels
Line
Count
Source
475
2.68M
{
476
2.68M
    return vlc_popcount(fmt->i_physical_channels);
477
2.68M
}
Unexecuted instantiation: dec.c:aout_FormatNbChannels
Unexecuted instantiation: filters.c:aout_FormatNbChannels
Unexecuted instantiation: meter.c:aout_FormatNbChannels
Unexecuted instantiation: output.c:aout_FormatNbChannels
Unexecuted instantiation: volume.c:aout_FormatNbChannels
Unexecuted instantiation: strings.c:aout_FormatNbChannels
Unexecuted instantiation: objects.c:aout_FormatNbChannels
Unexecuted instantiation: vlm.c:aout_FormatNbChannels
Unexecuted instantiation: vlm_event.c:aout_FormatNbChannels
Unexecuted instantiation: vlmshell.c:aout_FormatNbChannels
Unexecuted instantiation: libvlc-module.c:aout_FormatNbChannels
Unexecuted instantiation: clock.c:aout_FormatNbChannels
Unexecuted instantiation: es_out.c:aout_FormatNbChannels
478
479
VLC_API unsigned int aout_BitsPerSample( vlc_fourcc_t i_format ) VLC_USED;
480
VLC_API void aout_FormatPrepare( audio_sample_format_t * p_format );
481
482
/**
483
 * Prints an audio sample format in a human-readable form.
484
 */
485
VLC_API void aout_FormatPrint(vlc_object_t *, const char *,
486
                              const audio_sample_format_t *);
487
0
#define aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f)
488
489
VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED;
490
491
/** @} */
492
493
0
#define AOUT_VOLUME_DEFAULT             256
494
0
#define AOUT_VOLUME_MAX                 512
495
496
/**
497
 * Gets the volume of the audio output stream (independent of mute).
498
 * \return Current audio volume (0. = silent, 1. = nominal),
499
 * or a strictly negative value if undefined.
500
 */
501
VLC_API float aout_VolumeGet (audio_output_t *);
502
503
/**
504
 * Sets the volume of the audio output stream.
505
 * \note The mute status is not changed.
506
 * \return 0 on success, -1 on failure.
507
 */
508
VLC_API int aout_VolumeSet (audio_output_t *, float);
509
510
/**
511
 * Adjusts the volume.
512
 * \param aout the audio output to update the volume for
513
 * \param value how much to increase (> 0) or decrease (< 0) the volume
514
 * \param volp if non-NULL, will contain contain the resulting volume
515
 */
516
VLC_API int aout_VolumeUpdate (audio_output_t *aout, int value,
517
                               float *volp);
518
519
/**
520
 * Gets the audio output stream mute flag.
521
 * \return 0 if not muted, 1 if muted, -1 if undefined.
522
 */
523
VLC_API int aout_MuteGet (audio_output_t *);
524
525
/**
526
 * Sets the audio output stream mute flag.
527
 * \return 0 on success, -1 on failure.
528
 */
529
VLC_API int aout_MuteSet (audio_output_t *, bool);
530
531
/**
532
 * Gets the currently selected device.
533
 * \return the selected device ID (caller must free() it)
534
 *         NULL if no device is selected or in case of error.
535
 */
536
VLC_API char *aout_DeviceGet (audio_output_t *);
537
538
/**
539
 * Selects an audio output device.
540
 * \param aout the audio output to set the device for
541
 * \param id device ID to select, or NULL for the default device
542
 * \return zero on success, non-zero on error.
543
 */
544
VLC_API int aout_DeviceSet (audio_output_t *aout, const char *id);
545
546
/**
547
 * Enumerates possible audio output devices.
548
 *
549
 * The function will heap-allocate two tables of heap-allocated strings;
550
 * the caller is responsible for freeing all strings and both tables.
551
 *
552
 * \param aout the audio output to get the device list from
553
 * \param ids pointer to a table of device identifiers [OUT]
554
 * \param names pointer to a table of device human-readable descriptions [OUT]
555
 * \return the number of devices, or negative on error.
556
 * \note In case of error, *ids and *names are undefined.
557
 */
558
VLC_API int aout_DevicesList (audio_output_t *aout, char ***ids,
559
                              char ***names);
560
561
/** @} */
562
563
/**
564
 * \defgroup audio_filters Audio filters
565
 * \ingroup filters
566
 * @{
567
 */
568
569
/**
570
 * Enable or disable an audio filter ("audio-filter")
571
 *
572
 * \param aout a valid audio output
573
 * \param name a valid filter name
574
 * \param add true to add the filter, false to remove it
575
 * \return 0 on success, non-zero on failure.
576
 */
577
VLC_API int aout_EnableFilter(audio_output_t *aout, const char *name, bool add);
578
579
typedef enum
580
{
581
    AOUT_CHANIDX_DISABLE = -1,
582
    AOUT_CHANIDX_LEFT,
583
    AOUT_CHANIDX_RIGHT,
584
    AOUT_CHANIDX_MIDDLELEFT,
585
    AOUT_CHANIDX_MIDDLERIGHT,
586
    AOUT_CHANIDX_REARLEFT,
587
    AOUT_CHANIDX_REARRIGHT,
588
    AOUT_CHANIDX_REARCENTER,
589
    AOUT_CHANIDX_CENTER,
590
    AOUT_CHANIDX_LFE,
591
    AOUT_CHANIDX_MAX
592
} vlc_chan_order_idx_t;
593
594
static_assert(AOUT_CHANIDX_MAX == AOUT_CHAN_MAX, "channel count mismatch");
595
596
0
#define AOUT_CHAN_REMAP_INIT { \
597
0
    AOUT_CHANIDX_LEFT,  \
598
0
    AOUT_CHANIDX_RIGHT, \
599
0
    AOUT_CHANIDX_MIDDLELEFT, \
600
0
    AOUT_CHANIDX_MIDDLERIGHT, \
601
0
    AOUT_CHANIDX_REARLEFT, \
602
0
    AOUT_CHANIDX_REARRIGHT, \
603
0
    AOUT_CHANIDX_REARCENTER, \
604
0
    AOUT_CHANIDX_CENTER, \
605
0
    AOUT_CHANIDX_LFE, \
606
0
}
607
608
typedef struct
609
{
610
    /**
611
     * If the remap order differs from the WG4 order, a remap audio filter will
612
     * be inserted to remap channels according to this array.
613
     */
614
    int remap[AOUT_CHANIDX_MAX];
615
    /**
616
     * If true, a filter will be inserted to add a headphones effect (like a
617
     * binauralizer audio filter).
618
     */
619
    bool headphones;
620
} aout_filters_cfg_t;
621
622
0
#define AOUT_FILTERS_CFG_INIT (aout_filters_cfg_t) \
623
0
    { .remap = AOUT_CHAN_REMAP_INIT, \
624
0
      .headphones = false, \
625
0
    };
626
627
typedef struct aout_filters aout_filters_t;
628
629
VLC_API aout_filters_t *aout_FiltersNew(vlc_object_t *,
630
                                        const audio_sample_format_t *,
631
                                        const audio_sample_format_t *,
632
                                        const aout_filters_cfg_t *cfg) VLC_USED;
633
#define aout_FiltersNew(o,inf,outf,remap) \
634
        aout_FiltersNew(VLC_OBJECT(o),inf,outf,remap)
635
VLC_API void aout_FiltersDelete(vlc_object_t *, aout_filters_t *);
636
#define aout_FiltersDelete(o,f) \
637
0
        aout_FiltersDelete(VLC_OBJECT(o),f)
638
VLC_API bool aout_FiltersAdjustResampling(aout_filters_t *, int);
639
VLC_API block_t *aout_FiltersPlay(aout_filters_t *, block_t *, float rate);
640
VLC_API block_t *aout_FiltersDrain(aout_filters_t *);
641
VLC_API void     aout_FiltersFlush(aout_filters_t *);
642
VLC_API void     aout_FiltersChangeViewpoint(aout_filters_t *, const vlc_viewpoint_t *vp);
643
644
/**
645
 * Create a vout from an "visualization" audio filter.
646
 *
647
 * @warning Can only be called once, from the probe function (Open).
648
 *
649
 * @return a valid vout or NULL in case of error, the returned vout should not
650
 * be freed via vout_Close().
651
 */
652
VLC_API vout_thread_t *aout_filter_GetVout(filter_t *, const video_format_t *);
653
654
/** @} */
655
656
/**
657
 * @defgroup audio_output_meter Audio meter API
658
 * \ingroup audio_output
659
 * @{
660
 */
661
662
/**
663
 * Audio loudness measurement
664
 */
665
struct vlc_audio_loudness
666
{
667
    /** Momentary loudness (last 400 ms), in LUFS */
668
    double loudness_momentary;
669
    /** Short term loudness (last 3seconds), in LUFS */
670
    double loudness_shortterm;
671
    /** Integrated loudness (global), in LUFS */
672
    double loudness_integrated;
673
    /** Loudness range, in LU */
674
    double loudness_range;
675
    /** True Peak, in dBTP */
676
    double truepeak;
677
};
678
679
/**
680
 * Audio meter callback
681
 *
682
 * Triggered from vlc_audio_meter_Process() and vlc_audio_meter_Flush().
683
 */
684
struct vlc_audio_meter_cbs
685
{
686
    /**
687
     * Called when new loudness measurements are available
688
     *
689
     * @param date absolute date (likely in the future) of this measurement
690
     * @param loudness pointer to the loudness measurement
691
     * @param opaque pointer set by vlc_audio_meter_AddPlugin().
692
     */
693
    void (*on_loudness)(vlc_tick_t date, const struct vlc_audio_loudness *loudness, void *data);
694
};
695
696
/**
697
 * Audio meter plugin opaque structure
698
 *
699
 * This opaque structure is returned by vlc_audio_meter_AddPlugin().
700
 */
701
typedef struct vlc_audio_meter_plugin vlc_audio_meter_plugin;
702
703
/**
704
 * Audio meter plugin owner structure
705
 *
706
 * Used to setup callbacks and private data
707
 *
708
 * Can be registered with vlc_audio_meter_AddPlugin().
709
 */
710
struct vlc_audio_meter_plugin_owner
711
{
712
    const struct vlc_audio_meter_cbs *cbs;
713
    void *sys;
714
};
715
716
/**
717
 * Audio meter structure
718
 *
719
 * Initialise with vlc_audio_meter_Init()
720
 *
721
 * @warning variables of this struct should not be used directly
722
 */
723
struct vlc_audio_meter
724
{
725
    vlc_mutex_t lock;
726
    vlc_object_t *parent;
727
    const audio_sample_format_t *fmt;
728
729
    struct vlc_list plugins;
730
};
731
732
/**
733
 * Initialize the audio meter structure
734
 *
735
 * @param meter allocated audio meter structure
736
 * @param parent object that will be used to create audio filters
737
 */
738
VLC_API void
739
vlc_audio_meter_Init(struct vlc_audio_meter *meter, vlc_object_t *parent);
740
0
#define vlc_audio_meter_Init(a,b) vlc_audio_meter_Init(a, VLC_OBJECT(b))
741
742
/**
743
 * Free allocated resource from the audio meter structure
744
 *
745
 * @param meter allocated audio meter structure
746
 */
747
VLC_API void
748
vlc_audio_meter_Destroy(struct vlc_audio_meter *meter);
749
750
/**
751
 * Set or reset the audio format
752
 *
753
 * This will reload all plugins added with vlc_audio_meter_AddPlugin()
754
 *
755
 * @param meter audio meter structure
756
 * @param fmt NULL to unload all plugins or a valid pointer to an audio format,
757
 * must stay valid during the lifetime of the audio meter (until
758
 * vlc_audio_meter_Reset() or vlc_audio_meter_Destroy() are called)
759
 *
760
 * @return VLC_SUCCESS on success, VLC_EGENERIC if a plugin failed to load
761
 */
762
VLC_API int
763
vlc_audio_meter_Reset(struct vlc_audio_meter *meter, const audio_sample_format_t *fmt);
764
765
/**
766
 * Add an "audio meter" plugin
767
 *
768
 * The module to be loaded if meter->fmt is valid, otherwise, the module
769
 * will be loaded from a next call to vlc_audio_meter_Reset()
770
 *
771
 * @param meter audio meter structure
772
 * @param chain name of the module, can contain specific module options using
773
 * the following chain convention:"name{option1=a,option2=b}"
774
 * @param owner pointer to a vlc_audio_meter_plugin_owner  structure, the
775
 * structure must stay valid during the lifetime of the plugin
776
 * @return a valid audio meter plugin, or NULL in case of error
777
 */
778
VLC_API vlc_audio_meter_plugin *
779
vlc_audio_meter_AddPlugin(struct vlc_audio_meter *meter, const char *chain,
780
                          const struct vlc_audio_meter_plugin_owner *owner);
781
782
/**
783
 * Remove an "audio meter" plugin
784
 *
785
 * @param meter audio meter structure
786
 * @param plugin plugin returned by vlc_audio_meter_AddPlugin()
787
 */
788
VLC_API void
789
vlc_audio_meter_RemovePlugin(struct vlc_audio_meter *meter, vlc_audio_meter_plugin *plugin);
790
791
/**
792
 * Process an audio block
793
 *
794
 * vlc_audio_meter_events callbacks can be triggered from this function.
795
 *
796
 * @param meter audio meter structure
797
 * @param block pointer to a block, this block won't be released of modified
798
 * from this function
799
 * @param date absolute date (likely in the future) when this block should be rendered
800
 */
801
VLC_API void
802
vlc_audio_meter_Process(struct vlc_audio_meter *meter, block_t *block, vlc_tick_t date);
803
804
/**
805
 * Flush all "audio meter" plugins
806
 *
807
 * vlc_audio_meter_events callbacks can be triggered from this function.
808
 *
809
 * @param meter audio meter structure
810
 */
811
VLC_API void
812
vlc_audio_meter_Flush(struct vlc_audio_meter *meter);
813
814
/** @} */
815
816
#endif /* VLC_AOUT_H */