VLC 4.0.0-dev
Loading...
Searching...
No Matches
Collaboration diagram for Audio formats:

Macros

#define aout_FormatPrint(o, t, f)

Functions

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.
void aout_ChannelReorder (void *ptr, size_t bytes, uint8_t channels, const uint8_t *chans_table, vlc_fourcc_t fourcc)
 Reorders audio samples within a block of linear audio interleaved samples.
bool aout_CheckChannelExtraction (int *pi_selection, uint32_t *pi_layout, int *pi_channels, const uint32_t pi_order_dst[9], 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.
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.
void aout_Interleave (void *dst, const void *const *planes, unsigned samples, unsigned channels, vlc_fourcc_t fourcc)
void aout_Deinterleave (void *dst, const void *src, unsigned samples, unsigned channels, vlc_fourcc_t fourcc)
static unsigned aout_FormatNbChannels (const audio_sample_format_t *fmt)
unsigned int aout_BitsPerSample (vlc_fourcc_t i_format)
void aout_FormatPrepare (audio_sample_format_t *p_format)
void aout_FormatPrint (vlc_object_t *, const char *, const audio_sample_format_t *)
 Prints an audio sample format in a human-readable form.
const char * aout_FormatPrintChannels (const audio_sample_format_t *)

Variables

static const uint32_t pi_vlc_chan_order_wg4 []
 It describes the audio channel order VLC expect.

Detailed Description

Macro Definition Documentation

◆ aout_FormatPrint

#define aout_FormatPrint ( o,
t,
f )
Value:
#define aout_FormatPrint(o, t, f)
Definition vlc_aout.h:488
#define VLC_OBJECT(x)
Type-safe vlc_object_t cast.
Definition vlc_objects.h:83

Referenced by aout_FiltersNewWithClock(), and aout_OutputNew().

Function Documentation

◆ aout_BitsPerSample()

◆ aout_ChannelExtract()

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, 32, 64 bits per sample are supported.

References ExtractChannel().

◆ aout_ChannelReorder()

void aout_ChannelReorder ( void * ptr,
size_t bytes,
uint8_t channels,
const uint8_t * chans_table,
vlc_fourcc_t fourcc )

Reorders audio samples within a block of linear audio interleaved samples.

Parameters
ptrstart address of the block of samples
bytessize of the block in bytes (must be a multiple of the product of the channels count and the sample size)
channelschannels count (also length of the chans_table table)
chans_tablepermutation table to reorder the channels (usually computed by aout_CheckChannelReorder())
fourccsample format (must be a linear sample format)
Note
The samples must be naturally aligned in memory.

References AOUT_CHAN_MAX, and VLC_API.

◆ aout_CheckChannelExtraction()

bool aout_CheckChannelExtraction ( int * pi_selection,
uint32_t * pi_layout,
int * pi_channels,
const uint32_t pi_order_dst[9],
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.

References AOUT_CHAN_MAX, and pi_vlc_chan_order_wg4.

◆ aout_CheckChannelReorder()

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.

References VLC_API.

◆ aout_Deinterleave()

void aout_Deinterleave ( void * dst,
const void * src,
unsigned samples,
unsigned channels,
vlc_fourcc_t fourcc )

References VLC_API.

◆ aout_FormatNbChannels()

◆ aout_FormatPrepare()

◆ aout_FormatPrint()

void aout_FormatPrint ( vlc_object_t * obj,
const char * psz_text,
const audio_sample_format_t * p_format )

◆ aout_FormatPrintChannels()

◆ aout_Interleave()

void aout_Interleave ( void * dst,
const void *const * planes,
unsigned samples,
unsigned channels,
vlc_fourcc_t fourcc )

References VLC_API.

Variable Documentation

◆ pi_vlc_chan_order_wg4

const uint32_t pi_vlc_chan_order_wg4[]
static
Initial value:
=
{
0x2 , 0x4 ,
0x100 , 0x200 ,
0x20 , 0x40 , 0x10 ,
0x1 , 0x1000 , 0
}

It describes the audio channel order VLC expect.

Referenced by aout_CheckChannelExtraction(), and aout_CheckChannelReorder().