2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_MS_HDR_H
20 #define MPLAYER_MS_HDR_H
22 #ifndef _WAVEFORMATEX_
23 #define _WAVEFORMATEX_
24 typedef struct __attribute__((__packed__
)) _WAVEFORMATEX
{
25 unsigned short wFormatTag
;
26 unsigned short nChannels
;
27 unsigned int nSamplesPerSec
;
28 unsigned int nAvgBytesPerSec
;
29 unsigned short nBlockAlign
;
30 unsigned short wBitsPerSample
;
31 unsigned short cbSize
;
32 } WAVEFORMATEX
, *PWAVEFORMATEX
, *NPWAVEFORMATEX
, *LPWAVEFORMATEX
;
33 #endif /* _WAVEFORMATEX_ */
35 #ifndef _MPEGLAYER3WAVEFORMAT_
36 #define _MPEGLAYER3WAVEFORMAT_
37 typedef struct __attribute__((__packed__
)) mpeglayer3waveformat_tag
{
40 unsigned int fdwFlags
;
41 unsigned short nBlockSize
;
42 unsigned short nFramesPerBlock
;
43 unsigned short nCodecDelay
;
44 } MPEGLAYER3WAVEFORMAT
;
45 #endif /* _MPEGLAYER3WAVEFORMAT_ */
47 /* windows.h #includes wingdi.h on MinGW. */
48 #if !defined(_BITMAPINFOHEADER_) && !defined(_WINGDI_)
49 #define _BITMAPINFOHEADER_
50 typedef struct __attribute__((__packed__
))
63 } BITMAPINFOHEADER
, *PBITMAPINFOHEADER
, *LPBITMAPINFOHEADER
;
65 BITMAPINFOHEADER bmiHeader
;
67 } BITMAPINFO
, *LPBITMAPINFO
;
70 #ifndef le2me_BITMAPINFOHEADER
72 #define le2me_BITMAPINFOHEADER(h) { \
73 (h)->biSize = le2me_32((h)->biSize); \
74 (h)->biWidth = le2me_32((h)->biWidth); \
75 (h)->biHeight = le2me_32((h)->biHeight); \
76 (h)->biPlanes = le2me_16((h)->biPlanes); \
77 (h)->biBitCount = le2me_16((h)->biBitCount); \
78 (h)->biCompression = le2me_32((h)->biCompression); \
79 (h)->biSizeImage = le2me_32((h)->biSizeImage); \
80 (h)->biXPelsPerMeter = le2me_32((h)->biXPelsPerMeter); \
81 (h)->biYPelsPerMeter = le2me_32((h)->biYPelsPerMeter); \
82 (h)->biClrUsed = le2me_32((h)->biClrUsed); \
83 (h)->biClrImportant = le2me_32((h)->biClrImportant); \
85 #define le2me_WAVEFORMATEX(h) { \
86 (h)->wFormatTag = le2me_16((h)->wFormatTag); \
87 (h)->nChannels = le2me_16((h)->nChannels); \
88 (h)->nSamplesPerSec = le2me_32((h)->nSamplesPerSec); \
89 (h)->nAvgBytesPerSec = le2me_32((h)->nAvgBytesPerSec); \
90 (h)->nBlockAlign = le2me_16((h)->nBlockAlign); \
91 (h)->wBitsPerSample = le2me_16((h)->wBitsPerSample); \
92 (h)->cbSize = le2me_16((h)->cbSize); \
95 #define le2me_BITMAPINFOHEADER(h) /**/
96 #define le2me_WAVEFORMATEX(h) /**/
100 #endif /* MPLAYER_MS_HDR_H */