annotate libmpdemux/ms_hdr.h @ 34808:275c92f137ac

build: Check if SCTP is available Test for SCTP and remove it from the list of libavformat protocols in case the test did not succeed or the feature was explicitly disabled. Unconditionally trying to build it, as it was done before if you had a new enough libavformat version that contains that feature, is obviously not a good idea. This patch is closely based on a patch from Johan Andersson.
author al
date Sun, 13 May 2012 19:55:27 +0000
parents 6ca16928b1cc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29238
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
1 /*
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
2 * This file is part of MPlayer.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
3 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
5 * it under the terms of the GNU General Public License as published by
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
7 * (at your option) any later version.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
8 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
12 * GNU General Public License for more details.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
13 *
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
14 * You should have received a copy of the GNU General Public License along
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
17 */
d643e4643313 Add standard license header to all files in libmpdemux.
diego
parents: 29036
diff changeset
18
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
19 #ifndef MPLAYER_MS_HDR_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
20 #define MPLAYER_MS_HDR_H
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
21
30575
ec7569a7deb1 Add config.h header #include; it is required for the HAVE_BIGENDIAN check.
diego
parents: 29401
diff changeset
22 #include "config.h"
ec7569a7deb1 Add config.h header #include; it is required for the HAVE_BIGENDIAN check.
diego
parents: 29401
diff changeset
23
26109
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
24 #ifndef _WAVEFORMATEX_
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
25 #define _WAVEFORMATEX_
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
26 typedef struct __attribute__((__packed__)) _WAVEFORMATEX {
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
27 unsigned short wFormatTag;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
28 unsigned short nChannels;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
29 unsigned int nSamplesPerSec;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
30 unsigned int nAvgBytesPerSec;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
31 unsigned short nBlockAlign;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
32 unsigned short wBitsPerSample;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
33 unsigned short cbSize;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
34 } WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
26109
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
35 #endif /* _WAVEFORMATEX_ */
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
36
30667
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
37 #ifndef _WAVEFORMATEXTENSIBLE_
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
38 #define _WAVEFORMATEXTENSIBLE_
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
39 typedef struct __attribute__((__packed__)) _WAVEFORMATEXTENSIBLE {
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
40 WAVEFORMATEX wf;
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
41 unsigned short wValidBitsPerSample;
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
42 unsigned int dwChannelMask;
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
43 unsigned int SubFormat; // Only interested in first 32 bits of guid
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
44 unsigned int _guid_remainder[3];
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
45 } WAVEFORMATEXTENSIBLE;
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
46 #endif /* _WAVEFORMATEXTENSIBLE_ */
6ca16928b1cc Get the proper codec id when a WAVE_FORMAT_EXTENSIBLE extension exists in a
tack
parents: 30575
diff changeset
47
26109
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
48 #ifndef _MPEGLAYER3WAVEFORMAT_
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
49 #define _MPEGLAYER3WAVEFORMAT_
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
50 typedef struct __attribute__((__packed__)) mpeglayer3waveformat_tag {
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
51 WAVEFORMATEX wf;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
52 unsigned short wID;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
53 unsigned int fdwFlags;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
54 unsigned short nBlockSize;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
55 unsigned short nFramesPerBlock;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
56 unsigned short nCodecDelay;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
57 } MPEGLAYER3WAVEFORMAT;
26109
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
58 #endif /* _MPEGLAYER3WAVEFORMAT_ */
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
59
24550
7b874518ea41 Add comment that clears up what _WINGDI_H is for.
diego
parents: 24490
diff changeset
60 /* windows.h #includes wingdi.h on MinGW. */
29036
69d26a2ce817 Check for _WINGDI_ instead of _WINGDI_H before defining BITMAPINFOHEADER
reimar
parents: 26109
diff changeset
61 #if !defined(_BITMAPINFOHEADER_) && !defined(_WINGDI_)
26109
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
62 #define _BITMAPINFOHEADER_
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
63 typedef struct __attribute__((__packed__))
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
64 {
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
65 int biSize;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
66 int biWidth;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
67 int biHeight;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
68 short biPlanes;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
69 short biBitCount;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
70 int biCompression;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
71 int biSizeImage;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
72 int biXPelsPerMeter;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
73 int biYPelsPerMeter;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
74 int biClrUsed;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
75 int biClrImportant;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
76 } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
77 typedef struct {
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
78 BITMAPINFOHEADER bmiHeader;
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
79 int bmiColors[1];
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
80 } BITMAPINFO, *LPBITMAPINFO;
26109
e53dac3c60ee Revert fixing illegal identifiers to fix compilation on MinGW. Unfortunately
diego
parents: 26106
diff changeset
81 #endif
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
82
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
83 #ifndef le2me_BITMAPINFOHEADER
29401
f01023c524c3 Replace WORDS_BIGENDIAN by HAVE_BIGENDIAN in all internal code.
diego
parents: 29238
diff changeset
84 #if HAVE_BIGENDIAN
12341
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
85 #define le2me_BITMAPINFOHEADER(h) { \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
86 (h)->biSize = le2me_32((h)->biSize); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
87 (h)->biWidth = le2me_32((h)->biWidth); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
88 (h)->biHeight = le2me_32((h)->biHeight); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
89 (h)->biPlanes = le2me_16((h)->biPlanes); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
90 (h)->biBitCount = le2me_16((h)->biBitCount); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
91 (h)->biCompression = le2me_32((h)->biCompression); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
92 (h)->biSizeImage = le2me_32((h)->biSizeImage); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
93 (h)->biXPelsPerMeter = le2me_32((h)->biXPelsPerMeter); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
94 (h)->biYPelsPerMeter = le2me_32((h)->biYPelsPerMeter); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
95 (h)->biClrUsed = le2me_32((h)->biClrUsed); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
96 (h)->biClrImportant = le2me_32((h)->biClrImportant); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
97 }
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
98 #define le2me_WAVEFORMATEX(h) { \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
99 (h)->wFormatTag = le2me_16((h)->wFormatTag); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
100 (h)->nChannels = le2me_16((h)->nChannels); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
101 (h)->nSamplesPerSec = le2me_32((h)->nSamplesPerSec); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
102 (h)->nAvgBytesPerSec = le2me_32((h)->nAvgBytesPerSec); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
103 (h)->nBlockAlign = le2me_16((h)->nBlockAlign); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
104 (h)->wBitsPerSample = le2me_16((h)->wBitsPerSample); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
105 (h)->cbSize = le2me_16((h)->cbSize); \
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
106 }
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
107 #else
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
108 #define le2me_BITMAPINFOHEADER(h) /**/
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
109 #define le2me_WAVEFORMATEX(h) /**/
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
110 #endif
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
111 #endif
0db4a3a5b01d removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
alex
parents:
diff changeset
112
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
113 #endif /* MPLAYER_MS_HDR_H */