Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
450
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
37f7d8b3
Commit
37f7d8b3
authored
2 years ago
by
Steve Lhomme
Browse files
Options
Downloads
Patches
Plain Diff
vlc_codecs: assert that our WAVE_FORMAT values match the SDK ones
parent
cc3a2e81
No related branches found
Branches containing commit
No related tags found
1 merge request
!3341
vlc_codecs: assert that our WAVE_FORMAT values don't match the SDK ones
Pipeline
#318220
passed with stage
Stage:
in 17 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/vlc_codecs.h
+18
-3
18 additions, 3 deletions
include/vlc_codecs.h
with
18 additions
and
3 deletions
include/vlc_codecs.h
+
18
−
3
View file @
37f7d8b3
...
...
@@ -153,21 +153,32 @@ ATTR_PACKED
# pragma pack(pop)
#endif
/* disable Windws ones, keep consistency throughout our source code */
#undef WAVE_FORMAT_PCM
#undef WAVE_FORMAT_IMA_ADPCM
#if defined(static_assert) || defined(__cpp_static_assert)
#define VLC_CHECK_WAV_FORMAT(name, val) \
static_assert(name == val, "unpexpected definition of " #name);
#else
#define VLC_CHECK_WAV_FORMAT(name, val)
#endif
/* WAVE format wFormatTag IDs */
/* See http://msdn.microsoft.com/en-us/library/aa904731%28v=vs.80%29.aspx */
#define WAVE_FORMAT_UNKNOWN 0x0000
/* Microsoft Corporation */
#ifndef WAVE_FORMAT_PCM
#define WAVE_FORMAT_PCM 0x0001
/* Microsoft Corporation */
#else
VLC_CHECK_WAV_FORMAT
(
WAVE_FORMAT_PCM
,
0x0001
)
#endif
#define WAVE_FORMAT_ADPCM 0x0002
/* Microsoft Corporation */
#define WAVE_FORMAT_IEEE_FLOAT 0x0003
/* Microsoft Corporation */
#define WAVE_FORMAT_ALAW 0x0006
/* Microsoft Corporation */
#define WAVE_FORMAT_MULAW 0x0007
/* Microsoft Corporation */
#define WAVE_FORMAT_DTS 0x0008
/* Microsoft Corporation */
#define WAVE_FORMAT_WMAS 0x000a
/* WMA 9 Speech */
#ifndef WAVE_FORMAT_IMA_ADPCM
#define WAVE_FORMAT_IMA_ADPCM 0x0011
/* Intel Corporation */
#else
VLC_CHECK_WAV_FORMAT
(
WAVE_FORMAT_IMA_ADPCM
,
0x0011
)
#endif
#define WAVE_FORMAT_YAMAHA_ADPCM 0x0020
/* Yamaha */
#define WAVE_FORMAT_TRUESPEECH 0x0022
/* TrueSpeech */
#define WAVE_FORMAT_GSM610 0x0031
/* Microsoft Corporation */
...
...
@@ -217,9 +228,13 @@ ATTR_PACKED
#define WAVE_FORMAT_DTSINC_DTS 0x2001
/* DTS */
#ifndef WAVE_FORMAT_ALAC
#define WAVE_FORMAT_ALAC 0x6c61
#else
VLC_CHECK_WAV_FORMAT
(
WAVE_FORMAT_ALAC
,
0x6c61
)
#endif
#ifndef WAVE_FORMAT_OPUS
#define WAVE_FORMAT_OPUS 0x704f
#else
VLC_CHECK_WAV_FORMAT
(
WAVE_FORMAT_OPUS
,
0x704f
)
#endif
#define WAVE_FORMAT_AVCODEC_AAC 0x706D
#define WAVE_FORMAT_DIVIO_AAC 0x4143
/* Divio's AAC */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment