34#if !(defined _GUID_DEFINED || defined GUID_DEFINED)
47#ifdef HAVE_ATTRIBUTE_PACKED
48# define ATTR_PACKED __attribute__((__packed__))
49#elif defined(__SUNPRO_C)
52#elif defined(_MSC_VER)
55#elif defined(__APPLE__)
69 uint32_t nSamplesPerSec;
70 uint32_t nAvgBytesPerSec;
72 uint16_t wBitsPerSample;
77#ifndef _WAVEFORMATEXTENSIBLE_
78#define _WAVEFORMATEXTENSIBLE_
84 uint16_t wValidBitsPerSample;
85 uint16_t wSamplesPerBlock;
89 uint32_t dwChannelMask;
95#ifndef _WAVEFORMATEXTENSIBLE_IEC61937_
96#define _WAVEFORMATEXTENSIBLE_IEC61937_
101 uint32_t dwEncodedSamplesPerSec;
102 uint32_t dwEncodedChannelCount;
103 uint32_t dwAverageBytesPerSec;
112 uint32_t MainChunkID;
114 uint32_t ChunkTypeID;
116 uint32_t SubChunkLength;
120 uint32_t BytesPerSec;
121 uint16_t BytesPerSample;
122 uint16_t BitsPerSample;
123 uint32_t DataChunkID;
128#ifndef _VLC_BITMAPINFOHEADER_
129#define _VLC_BITMAPINFOHEADER_
139 uint32_t biCompression;
140 uint32_t biSizeImage;
141 uint32_t biXPelsPerMeter;
142 uint32_t biYPelsPerMeter;
144 uint32_t biClrImportant;
148#if defined(__SUNPRO_C)
150#elif defined(_MSC_VER)
152#elif defined(__APPLE__) && !defined(HAVE_ATTRIBUTE_PACKED)
156#if defined(static_assert) || defined(__cpp_static_assert)
157#define VLC_CHECK_WAV_FORMAT(name, val) \
158 static_assert(name == val, "unpexpected definition of " #name);
160#define VLC_CHECK_WAV_FORMAT(name, val)
165#define WAVE_FORMAT_UNKNOWN 0x0000
166#ifndef WAVE_FORMAT_PCM
167#define WAVE_FORMAT_PCM 0x0001
171#define WAVE_FORMAT_ADPCM 0x0002
172#define WAVE_FORMAT_IEEE_FLOAT 0x0003
173#define WAVE_FORMAT_ALAW 0x0006
174#define WAVE_FORMAT_MULAW 0x0007
175#define WAVE_FORMAT_DTS 0x0008
176#define WAVE_FORMAT_WMAS 0x000a
177#ifndef WAVE_FORMAT_IMA_ADPCM
178#define WAVE_FORMAT_IMA_ADPCM 0x0011
182#define WAVE_FORMAT_YAMAHA_ADPCM 0x0020
183#define WAVE_FORMAT_TRUESPEECH 0x0022
184#define WAVE_FORMAT_GSM610 0x0031
185#define WAVE_FORMAT_MSNAUDIO 0x0032
186#define WAVE_FORMAT_AMR_NB_2 0x0038
187#define WAVE_FORMAT_MSG723 0x0042
188#define WAVE_FORMAT_SHARP_G726 0x0045
189#define WAVE_FORMAT_MPEG 0x0050
190#define WAVE_FORMAT_MPEGLAYER3 0x0055
191#define WAVE_FORMAT_AMR_NARROWBAND 0x0057
192#define WAVE_FORMAT_AMR_WIDEBAND 0x0058
193#define WAVE_FORMAT_G726_ADPCM 0x0064
194#define WAVE_FORMAT_VOXWARE_RT29 0x0075
195#define WAVE_FORMAT_DOLBY_AC3_SPDIF 0x0092
196#define WAVE_FORMAT_VIVOG723 0x0111
198#define WAVE_FORMAT_AAC 0x00FF
199#define WAVE_FORMAT_AAC_MS 0xa106
200#define WAVE_FORMAT_SIPRO 0x0130
202#define WAVE_FORMAT_WMA1 0x0160
203#define WAVE_FORMAT_WMA2 0x0161
204#define WAVE_FORMAT_WMAP 0x0162
205#define WAVE_FORMAT_WMAL 0x0163
207#define WAVE_FORMAT_CREATIVE_ADPCM 0x0200
209#define WAVE_FORMAT_ULEAD_DV_AUDIO_NTSC 0x0215
210#define WAVE_FORMAT_ULEAD_DV_AUDIO_PAL 0x0216
212#define WAVE_FORMAT_ATRAC3 0x0270
213#define WAVE_FORMAT_SONY_ATRAC3 0x0272
215#define WAVE_FORMAT_IMC 0x0401
216#define WAVE_FORMAT_INDEO_AUDIO 0x0402
218#define WAVE_FORMAT_ON2_AVC 0x0500
219#define WAVE_FORMAT_ON2_AVC_2 0x0501
221#define WAVE_FORMAT_QNAP_ADTS 0x0AAC
222#define WAVE_FORMAT_AAC_ADTS 0x1600
223#define WAVE_FORMAT_AAC_2 0x1601
224#define WAVE_FORMAT_AAC_LATM 0x1602
225#define WAVE_FORMAT_HEAAC 0x1610
227#define WAVE_FORMAT_A52 0x2000
228#define WAVE_FORMAT_DTSINC_DTS 0x2001
229#ifndef WAVE_FORMAT_ALAC
230#define WAVE_FORMAT_ALAC 0x6c61
234#ifndef WAVE_FORMAT_OPUS
235#define WAVE_FORMAT_OPUS 0x704f
239#define WAVE_FORMAT_AVCODEC_AAC 0x706D
240#define WAVE_FORMAT_DIVIO_AAC 0x4143
242#define WAVE_FORMAT_AMR_NB 0x7361
243#define WAVE_FORMAT_AMR_WB 0x7362
244#define WAVE_FORMAT_AMR_WP 0x7363
246#define WAVE_FORMAT_GSM_AMR_FIXED 0x7A21
247#define WAVE_FORMAT_GSM_AMR 0x7A22
249#define WAVE_FORMAT_DK3 0x0062
250#define WAVE_FORMAT_DK4 0x0061
255#define WAVE_FORMAT_VORBIS 0x566f
263#define WAVE_FORMAT_VORB_1 0x674f
264#define WAVE_FORMAT_VORB_2 0x6750
265#define WAVE_FORMAT_VORB_3 0x6751
266#define WAVE_FORMAT_VORB_1PLUS 0x676f
267#define WAVE_FORMAT_VORB_2PLUS 0x6770
268#define WAVE_FORMAT_VORB_3PLUS 0x6771
270#define WAVE_FORMAT_G723_1 0xa100
271#define WAVE_FORMAT_AAC_3 0xa106
272#define WAVE_FORMAT_SPEEX 0xa109
273#ifndef WAVE_FORMAT_FLAC
274#define WAVE_FORMAT_FLAC 0xf1ac
277#if !defined(WAVE_FORMAT_EXTENSIBLE)
278 #define WAVE_FORMAT_EXTENSIBLE 0xFFFE
282#define VLC_KSDATAFORMAT_SUBTYPE_ATRAC3P {0xE923AABF, 0xCB58, 0x4471, {0xA1, 0x19, 0xFF, 0xFA, 0x01, 0xE4, 0xCE, 0x62}}
283#define VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN {0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}
284#define VLC_WAVEFORMATEX_GUIDBASE {0x00000000, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}}
285#define VLC_AMBISONIC_SUBTYPE_PCM {0x00000001, 0x0721, 0x11D3, {0x86, 0x44, 0xC8, 0xC1, 0xCA, 0x00, 0x00, 0x00}}
286#define VLC_AMBISONIC_SUBTYPE_IEEE_FLOAT {0x00000003, 0x0721, 0x11D3, {0x86, 0x44, 0xC8, 0xC1, 0xCA, 0x00, 0x00, 0x00}}
289#define WAVE_SPEAKER_FRONT_LEFT 0x1
290#define WAVE_SPEAKER_FRONT_RIGHT 0x2
291#define WAVE_SPEAKER_FRONT_CENTER 0x4
292#define WAVE_SPEAKER_LOW_FREQUENCY 0x8
293#define WAVE_SPEAKER_BACK_LEFT 0x10
294#define WAVE_SPEAKER_BACK_RIGHT 0x20
295#define WAVE_SPEAKER_FRONT_LEFT_OF_CENTER 0x40
296#define WAVE_SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
297#define WAVE_SPEAKER_BACK_CENTER 0x100
298#define WAVE_SPEAKER_SIDE_LEFT 0x200
299#define WAVE_SPEAKER_SIDE_RIGHT 0x400
300#define WAVE_SPEAKER_TOP_CENTER 0x800
301#define WAVE_SPEAKER_TOP_FRONT_LEFT 0x1000
302#define WAVE_SPEAKER_TOP_FRONT_CENTER 0x2000
303#define WAVE_SPEAKER_TOP_FRONT_RIGHT 0x4000
304#define WAVE_SPEAKER_TOP_BACK_LEFT 0x8000
305#define WAVE_SPEAKER_TOP_BACK_CENTER 0x10000
306#define WAVE_SPEAKER_TOP_BACK_RIGHT 0x20000
307#define WAVE_SPEAKER_RESERVED 0x80000000
394 const char **ppsz_name )
445#define GUID_FMT "0x%8.8x-0x%4.4x-0x%4.4x-0x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x%2.2x"
446#define GUID_PRINT( guid ) \
447 (unsigned)(guid).Data1, \
450 (guid).Data4[0],(guid).Data4[1],(guid).Data4[2],(guid).Data4[3], \
451 (guid).Data4[4],(guid).Data4[5],(guid).Data4[6],(guid).Data4[7]
458 bool b_found =
false;
#define VLC_FOURCC(a, b, c, d)
Definition fourcc_gen.c:37
uint32_t vlc_fourcc_t
Definition fourcc_gen.c:33
Definition vlc_codecs.h:134
uint16_t biPlanes
Definition vlc_codecs.h:138
uint32_t biYPelsPerMeter
Definition vlc_codecs.h:143
uint32_t biSizeImage
Definition vlc_codecs.h:141
uint32_t biWidth
Definition vlc_codecs.h:136
uint32_t biHeight
Definition vlc_codecs.h:137
uint32_t biClrUsed
Definition vlc_codecs.h:144
uint32_t biSize
Definition vlc_codecs.h:135
uint32_t biXPelsPerMeter
Definition vlc_codecs.h:142
uint16_t biBitCount
Definition vlc_codecs.h:139
uint32_t biClrImportant
Definition vlc_codecs.h:145
uint32_t biCompression
Definition vlc_codecs.h:140
Definition vlc_codecs.h:38
uint16_t Data2
Definition vlc_codecs.h:40
uint32_t Data1
Definition vlc_codecs.h:39
uint16_t Data3
Definition vlc_codecs.h:41
uint8_t Data4[8]
Definition vlc_codecs.h:42
Definition vlc_codecs.h:100
WAVEFORMATEXTENSIBLE FormatExt
Definition vlc_codecs.h:101
uint32_t dwEncodedSamplesPerSec
Definition vlc_codecs.h:102
uint32_t dwAverageBytesPerSec
Definition vlc_codecs.h:104
uint32_t dwEncodedChannelCount
Definition vlc_codecs.h:103
Definition vlc_codecs.h:82
uint16_t wValidBitsPerSample
Definition vlc_codecs.h:85
uint16_t wReserved
Definition vlc_codecs.h:87
WAVEFORMATEX Format
Definition vlc_codecs.h:83
GUID SubFormat
Definition vlc_codecs.h:92
uint32_t dwChannelMask
Definition vlc_codecs.h:90
uint16_t wSamplesPerBlock
Definition vlc_codecs.h:86
#define WAVE_FORMAT_HEAAC
Definition vlc_codecs.h:226
#define WAVE_FORMAT_OPUS
Definition vlc_codecs.h:236
static const struct @202 wave_format_tag_to_fourcc[]
struct ATTR_PACKED _WAVEFORMATEX * NPWAVEFORMATEX
struct ATTR_PACKED _WAVEFORMATEXTENSIBLE * PWAVEFORMATEXTENSIBLE
#define WAVE_FORMAT_VORB_1PLUS
Definition vlc_codecs.h:267
#define WAVE_FORMAT_WMAS
Definition vlc_codecs.h:177
#define WAVE_FORMAT_DK3
Definition vlc_codecs.h:250
#define WAVE_FORMAT_YAMAHA_ADPCM
Definition vlc_codecs.h:183
#define WAVE_FORMAT_UNKNOWN
Definition vlc_codecs.h:166
#define WAVE_FORMAT_AMR_NARROWBAND
Definition vlc_codecs.h:192
#define WAVE_FORMAT_AAC
Definition vlc_codecs.h:199
#define WAVE_FORMAT_GSM_AMR_FIXED
Definition vlc_codecs.h:247
#define WAVE_FORMAT_VORB_1
Definition vlc_codecs.h:264
#define WAVE_FORMAT_A52
Definition vlc_codecs.h:228
#define WAVE_FORMAT_VORB_2
Definition vlc_codecs.h:265
uint16_t i_tag
Definition vlc_codecs.h:312
GUID vlc_guid_t
Definition vlc_codecs.h:46
#define WAVE_FORMAT_G726_ADPCM
Definition vlc_codecs.h:194
#define WAVE_FORMAT_WMA1
Definition vlc_codecs.h:203
#define VLC_AMBISONIC_SUBTYPE_IEEE_FLOAT
Definition vlc_codecs.h:287
struct ATTR_PACKED * VLC_LPBITMAPINFOHEADER
#define WAVE_FORMAT_IMA_ADPCM
Definition vlc_codecs.h:179
#define WAVE_FORMAT_IEEE_FLOAT
Definition vlc_codecs.h:173
static void sf_tag_to_fourcc(const GUID *guid_tag, vlc_fourcc_t *fcc, const char **ppsz_name)
Definition vlc_codecs.h:455
struct ATTR_PACKED _WAVEHEADER WAVEHEADER
#define WAVE_FORMAT_VORB_3PLUS
Definition vlc_codecs.h:269
#define WAVE_FORMAT_WMA2
Definition vlc_codecs.h:204
#define WAVE_FORMAT_AMR_WIDEBAND
Definition vlc_codecs.h:193
#define WAVE_FORMAT_ATRAC3
Definition vlc_codecs.h:213
#define WAVE_FORMAT_MULAW
Definition vlc_codecs.h:175
#define VLC_AMBISONIC_SUBTYPE_PCM
Definition vlc_codecs.h:286
#define WAVE_FORMAT_GSM_AMR
Definition vlc_codecs.h:248
#define WAVE_FORMAT_AAC_2
Definition vlc_codecs.h:224
#define WAVE_FORMAT_SHARP_G726
Definition vlc_codecs.h:189
#define WAVE_FORMAT_SPEEX
Definition vlc_codecs.h:273
static const struct @203 sub_format_tag_to_fourcc[]
struct ATTR_PACKED VLC_BITMAPINFOHEADER
#define WAVE_FORMAT_SIPRO
Definition vlc_codecs.h:201
#define WAVE_FORMAT_MSG723
Definition vlc_codecs.h:188
#define WAVE_FORMAT_SONY_ATRAC3
Definition vlc_codecs.h:214
#define WAVE_FORMAT_VOXWARE_RT29
Definition vlc_codecs.h:195
struct ATTR_PACKED _WAVEFORMATEX * LPWAVEFORMATEX
#define WAVE_FORMAT_ADPCM
Definition vlc_codecs.h:172
static void fourcc_to_wf_tag(vlc_fourcc_t fcc, uint16_t *pi_tag)
Definition vlc_codecs.h:406
struct ATTR_PACKED _WAVEFORMATEX * PWAVEFORMATEX
#define WAVE_FORMAT_GSM610
Definition vlc_codecs.h:185
#define VLC_KSDATAFORMAT_SUBTYPE_UNKNOWN
Definition vlc_codecs.h:284
#define WAVE_FORMAT_AAC_ADTS
Definition vlc_codecs.h:223
#define WAVE_FORMAT_QNAP_ADTS
Definition vlc_codecs.h:222
#define VLC_KSDATAFORMAT_SUBTYPE_ATRAC3P
Definition vlc_codecs.h:283
#define WAVE_FORMAT_VORBIS
Definition vlc_codecs.h:256
struct ATTR_PACKED _WAVEFORMATEXTENSIBLE WAVEFORMATEXTENSIBLE
#define WAVE_FORMAT_AAC_LATM
Definition vlc_codecs.h:225
#define WAVE_FORMAT_MPEG
Definition vlc_codecs.h:190
struct ATTR_PACKED * VLC_PBITMAPINFOHEADER
const GUID guid_tag
Definition vlc_codecs.h:422
#define WAVE_FORMAT_FLAC
Definition vlc_codecs.h:275
#define WAVE_FORMAT_AMR_WB
Definition vlc_codecs.h:244
#define VLC_WAVEFORMATEX_GUIDBASE
Definition vlc_codecs.h:285
#define WAVE_FORMAT_ALAC
Definition vlc_codecs.h:231
static int guidcmpbase(const GUID *s1, const GUID *s2)
Definition vlc_codecs.h:434
#define WAVE_FORMAT_VORB_3
Definition vlc_codecs.h:266
#define WAVE_FORMAT_DIVIO_AAC
Definition vlc_codecs.h:241
#define WAVE_FORMAT_MSNAUDIO
Definition vlc_codecs.h:186
static void wf_tag_to_fourcc(uint16_t i_tag, vlc_fourcc_t *fcc, const char **ppsz_name)
Definition vlc_codecs.h:394
#define WAVE_FORMAT_AAC_3
Definition vlc_codecs.h:272
#define WAVE_FORMAT_DK4
Definition vlc_codecs.h:251
#define WAVE_FORMAT_ALAW
Definition vlc_codecs.h:174
#define WAVE_FORMAT_MPEGLAYER3
Definition vlc_codecs.h:191
const char * psz_name
Definition vlc_codecs.h:314
#define WAVE_FORMAT_VIVOG723
Definition vlc_codecs.h:197
#define WAVE_FORMAT_DTS
Definition vlc_codecs.h:176
vlc_fourcc_t i_fourcc
Definition vlc_codecs.h:313
#define WAVE_FORMAT_ULEAD_DV_AUDIO_PAL
Definition vlc_codecs.h:211
struct ATTR_PACKED _WAVEFORMATEXTENSIBLE_IEC61937 * PWAVEFORMATEXTENSIBLE_IEC61937
#define WAVE_FORMAT_AVCODEC_AAC
Definition vlc_codecs.h:240
#define WAVE_FORMAT_ULEAD_DV_AUDIO_NTSC
Definition vlc_codecs.h:210
#define WAVE_FORMAT_INDEO_AUDIO
Definition vlc_codecs.h:217
struct ATTR_PACKED _WAVEFORMATEXTENSIBLE_IEC61937 WAVEFORMATEXTENSIBLE_IEC61937
#define WAVE_FORMAT_DTSINC_DTS
Definition vlc_codecs.h:229
#define WAVE_FORMAT_WMAL
Definition vlc_codecs.h:206
#define WAVE_FORMAT_ON2_AVC
Definition vlc_codecs.h:219
#define WAVE_FORMAT_PCM
Definition vlc_codecs.h:168
#define WAVE_FORMAT_AMR_NB_2
Definition vlc_codecs.h:187
#define WAVE_FORMAT_G723_1
Definition vlc_codecs.h:271
#define WAVE_FORMAT_WMAP
Definition vlc_codecs.h:205
#define WAVE_FORMAT_CREATIVE_ADPCM
Definition vlc_codecs.h:208
#define WAVE_FORMAT_AMR_NB
Definition vlc_codecs.h:243
#define WAVE_FORMAT_VORB_2PLUS
Definition vlc_codecs.h:268
#define WAVE_FORMAT_IMC
Definition vlc_codecs.h:216
#define WAVE_FORMAT_TRUESPEECH
Definition vlc_codecs.h:184
#define WAVE_FORMAT_ON2_AVC_2
Definition vlc_codecs.h:220
struct ATTR_PACKED _WAVEFORMATEX WAVEFORMATEX
#define VLC_CHECK_WAV_FORMAT(name, val)
Definition vlc_codecs.h:161
static int guidcmp(const GUID *s1, const GUID *s2)
Definition vlc_codecs.h:441
#define WAVE_FORMAT_AAC_MS
Definition vlc_codecs.h:200
This file is a collection of common definitions and types.
#define VLC_CODEC_ADPCM_DK3
Definition vlc_fourcc.h:562
#define VLC_CODEC_UNKNOWN
Definition vlc_fourcc.h:27
#define VLC_CODEC_ADPCM_CREATIVE
Definition vlc_fourcc.h:564
#define VLC_CODEC_WMAS
Definition vlc_fourcc.h:530
#define VLC_CODEC_INDEO_AUDIO
Definition vlc_fourcc.h:633
#define VLC_CODEC_F64L
Definition vlc_fourcc.h:622
#define VLC_CODEC_GSM_MS
Definition vlc_fourcc.h:584
#define VLC_CODEC_SPEEX
Definition vlc_fourcc.h:535
#define VLC_CODEC_MPGA
Definition vlc_fourcc.h:516
#define VLC_CODEC_WMA1
Definition vlc_fourcc.h:526
#define VLC_CODEC_METASOUND
Definition vlc_fourcc.h:634
#define VLC_CODEC_IMC
Definition vlc_fourcc.h:588
#define VLC_CODEC_ADPCM_MS
Definition vlc_fourcc.h:557
#define VLC_CODEC_A52
Definition vlc_fourcc.h:520
#define VLC_CODEC_ULEAD_DV_AUDIO_PAL
Definition vlc_fourcc.h:632
#define VLC_CODEC_G723_1
Definition vlc_fourcc.h:570
#define VLC_CODEC_FLAC
Definition vlc_fourcc.h:531
#define VLC_CODEC_MP4A
Definition vlc_fourcc.h:517
#define VLC_CODEC_VORBIS
Definition vlc_fourcc.h:538
#define VLC_CODEC_S24L
Definition vlc_fourcc.h:610
#define VLC_CODEC_ATRAC3P
Definition vlc_fourcc.h:587
#define VLC_CODEC_WMAP
Definition vlc_fourcc.h:528
#define VLC_CODEC_DTS
Definition vlc_fourcc.h:523
#define VLC_CODEC_S32L
Definition vlc_fourcc.h:616
#define VLC_CODEC_SIPR
Definition vlc_fourcc.h:579
#define VLC_CODEC_WMAL
Definition vlc_fourcc.h:529
#define VLC_CODEC_MULAW
Definition vlc_fourcc.h:626
#define VLC_CODEC_ADPCM_G726
Definition vlc_fourcc.h:554
#define VLC_CODEC_ON2AVC
Definition vlc_fourcc.h:635
#define VLC_CODEC_AMR_WB
Definition vlc_fourcc.h:574
#define VLC_CODEC_ADPCM_DK4
Definition vlc_fourcc.h:563
#define VLC_CODEC_AMR_NB
Definition vlc_fourcc.h:573
#define VLC_CODEC_TRUESPEECH
Definition vlc_fourcc.h:589
#define VLC_CODEC_OPUS
Definition vlc_fourcc.h:537
#define VLC_CODEC_MP3
Definition vlc_fourcc.h:730
#define VLC_CODEC_ADPCM_YAMAHA
Definition vlc_fourcc.h:561
#define VLC_CODEC_S8
Definition vlc_fourcc.h:602
#define VLC_CODEC_ALAC
Definition vlc_fourcc.h:575
#define VLC_CODEC_S16L
Definition vlc_fourcc.h:604
#define VLC_CODEC_ADPCM_IMA_WAV
Definition vlc_fourcc.h:558
#define VLC_CODEC_F32L
Definition vlc_fourcc.h:620
#define VLC_CODEC_ATRAC3
Definition vlc_fourcc.h:586
#define VLC_CODEC_WMA2
Definition vlc_fourcc.h:527
#define VLC_CODEC_ULEAD_DV_AUDIO_NTSC
Definition vlc_fourcc.h:631
#define VLC_CODEC_ALAW
Definition vlc_fourcc.h:625