QVisu
Qt-based visualization for smart homes
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vlc_aout.h File Reference
#include "vlc_es.h"
#include <vlc_block.h>

Go to the source code of this file.

Classes

struct  audio_output
 

Macros

#define AOUT_MAX_ADVANCE_TIME   (AOUT_MAX_PREPARE_TIME + CLOCK_FREQ)
 
#define AOUT_MAX_PREPARE_TIME   (2 * CLOCK_FREQ)
 
#define AOUT_MIN_PREPARE_TIME   AOUT_MAX_PTS_ADVANCE
 
#define AOUT_MAX_PTS_ADVANCE   (CLOCK_FREQ / 25)
 
#define AOUT_MAX_PTS_DELAY   (3 * CLOCK_FREQ / 50)
 
#define AOUT_MAX_RESAMPLING   10
 
#define AOUT_FMTS_IDENTICAL(p_first, p_second)
 
#define AOUT_FMTS_SIMILAR(p_first, p_second)
 
#define AOUT_FMT_LINEAR(p_format)   (aout_BitsPerSample((p_format)->i_format) != 0)
 
#define VLC_CODEC_SPDIFL   VLC_FOURCC('s','p','d','i')
 
#define VLC_CODEC_SPDIFB   VLC_FOURCC('s','p','d','b')
 
#define AOUT_FMT_SPDIF(p_format)
 
#define AOUT_VAR_CHAN_UNSET   0 /* must be zero */
 
#define AOUT_VAR_CHAN_STEREO   1
 
#define AOUT_VAR_CHAN_RSTEREO   2
 
#define AOUT_VAR_CHAN_LEFT   3
 
#define AOUT_VAR_CHAN_RIGHT   4
 
#define AOUT_VAR_CHAN_DOLBYS   5
 
#define AOUT_SPDIF_SIZE   6144
 
#define A52_FRAME_NB   1536
 
#define AOUT_RESTART_FILTERS   1
 
#define AOUT_RESTART_OUTPUT   2
 
#define AOUT_RESTART_DECODER   4
 
#define aout_FormatPrint(o, t, f)   aout_FormatPrint(VLC_OBJECT(o), t, f)
 
#define aout_FiltersNew(o, inf, outf, rv)   aout_FiltersNew(VLC_OBJECT(o),inf,outf,rv)
 
#define aout_FiltersDelete(o, f)   aout_FiltersDelete(VLC_OBJECT(o),f)
 

Typedefs

typedef struct aout_filters aout_filters_t
 
typedef struct aout_request_vout aout_request_vout_t
 

Functions

VLC_API unsigned aout_CheckChannelReorder (const uint32_t *, const uint32_t *, uint32_t mask, uint8_t *table)
 
VLC_API void aout_ChannelReorder (void *, size_t, unsigned, const uint8_t *, vlc_fourcc_t)
 
VLC_API void aout_Interleave (void *dst, const void *const *planes, unsigned samples, unsigned channels, vlc_fourcc_t fourcc)
 
VLC_API void aout_Deinterleave (void *dst, const void *src, unsigned samples, unsigned channels, vlc_fourcc_t fourcc)
 
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)
 
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)
 
VLC_API unsigned int aout_BitsPerSample (vlc_fourcc_t i_format) VLC_USED
 
VLC_API void aout_FormatPrepare (audio_sample_format_t *p_format)
 
VLC_API void aout_FormatPrint (vlc_object_t *, const char *, const audio_sample_format_t *)
 
VLC_API const char * aout_FormatPrintChannels (const audio_sample_format_t *) VLC_USED
 
VLC_API float aout_VolumeGet (audio_output_t *)
 
VLC_API int aout_VolumeSet (audio_output_t *, float)
 
VLC_API int aout_MuteGet (audio_output_t *)
 
VLC_API int aout_MuteSet (audio_output_t *, bool)
 
VLC_API char * aout_DeviceGet (audio_output_t *)
 
VLC_API int aout_DeviceSet (audio_output_t *, const char *)
 
VLC_API int aout_DevicesList (audio_output_t *, char ***, char ***)
 
VLC_API aout_filters_t * aout_FiltersNew (vlc_object_t *, const audio_sample_format_t *, const audio_sample_format_t *, const aout_request_vout_t *) VLC_USED
 
VLC_API void aout_FiltersDelete (vlc_object_t *, aout_filters_t *)
 
VLC_API bool aout_FiltersAdjustResampling (aout_filters_t *, int)
 
VLC_API block_taout_FiltersPlay (aout_filters_t *, block_t *, int rate)
 
VLC_API vout_thread_taout_filter_RequestVout (filter_t *, vout_thread_t *p_vout, video_format_t *p_fmt)
 

Detailed Description

This file defines functions, structures and macros for audio output object

Macro Definition Documentation

#define AOUT_FMT_SPDIF (   p_format)
Value:
( ((p_format)->i_format == VLC_CODEC_SPDIFL) \
|| ((p_format)->i_format == VLC_CODEC_SPDIFB) \
|| ((p_format)->i_format == VLC_CODEC_A52) \
|| ((p_format)->i_format == VLC_CODEC_DTS) )
#define AOUT_FMTS_IDENTICAL (   p_first,
  p_second 
)
Value:
( \
((p_first)->i_format == (p_second)->i_format) \
&& AOUT_FMTS_SIMILAR(p_first, p_second) )
#define AOUT_FMTS_SIMILAR (   p_first,
  p_second 
)
Value:
( \
((p_first)->i_rate == (p_second)->i_rate) \
&& ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
&& ((p_first)->i_original_channels == (p_second)->i_original_channels) )
#define AOUT_MAX_PTS_ADVANCE   (CLOCK_FREQ / 25)

Maximum advance of actual audio playback time to coded PTS, above which downsampling will be performed

#define AOUT_MAX_PTS_DELAY   (3 * CLOCK_FREQ / 50)

Maximum delay of actual audio playback time from coded PTS, above which upsampling will be performed

Function Documentation

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 
)

Do the actual channels extraction using the parameters created by aout_CheckChannelExtraction.

XXX this function does not work in place (p_dst and p_src must not overlap). XXX Only 8, 16, 24, 32, 64 bits per sample are supported.

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 
)

This function will compute the extraction parameter into pi_selection to go from i_channels with their type given by pi_order_src[] into the order describe by pi_order_dst. It will also set :

  • *pi_channels as the number of channels that will be extracted which is lower (in case of non understood channels type) or equal to i_channels.
  • the layout of the channels (*pi_layout).

It will return true if channel extraction is really needed, in which case aout_ChannelExtract must be used

XXX It must be used when the source may have channel type not understood by VLC. In this case the channel type pi_order_src[] must be set to 0. XXX It must also be used if multiple channels have the same type.

VLC_API unsigned aout_CheckChannelReorder ( const uint32_t *  ,
const uint32_t *  ,
uint32_t  mask,
uint8_t *  table 
)

This function computes the reordering needed to go from pi_chan_order_in to pi_chan_order_out. If pi_chan_order_in or pi_chan_order_out is NULL, it will assume that vlc internal (WG4) order is requested.