comparison libmpdemux/ms_hdr.h @ 12341:0db4a3a5b01d

removed loader/ dependancy, imported some files from g2, also used patches from Dominik Mierzejewski
author alex
date Wed, 28 Apr 2004 10:18:33 +0000
parents
children 6f18105c058a
comparison
equal deleted inserted replaced
12340:6aa3e3d97133 12341:0db4a3a5b01d
1 #ifndef __MS_HEADER_H
2 #define __MS_HEADER_H 1
3
4 #ifndef _WAVEFORMATEX_
5 #define _WAVEFORMATEX_
6 typedef struct __attribute__((__packed__)) _WAVEFORMATEX {
7 unsigned short wFormatTag;
8 unsigned short nChannels;
9 unsigned int nSamplesPerSec;
10 unsigned int nAvgBytesPerSec;
11 unsigned short nBlockAlign;
12 unsigned short wBitsPerSample;
13 unsigned short cbSize;
14 } WAVEFORMATEX, *PWAVEFORMATEX, *NPWAVEFORMATEX, *LPWAVEFORMATEX;
15 #endif /* _WAVEFORMATEX_ */
16
17 typedef struct __attribute__((__packed__)) mpeglayer3waveformat_tag {
18 WAVEFORMATEX wf;
19 unsigned short wID;
20 unsigned int fdwFlags;
21 unsigned short nBlockSize;
22 unsigned short nFramesPerBlock;
23 unsigned short nCodecDelay;
24 } MPEGLAYER3WAVEFORMAT;
25
26 #if !defined(_BITMAPINFOHEADER_) && !defined(_WINGDI_H)
27 #define _BITMAPINFOHEADER_
28 typedef struct __attribute__((__packed__))
29 {
30 int biSize;
31 int biWidth;
32 int biHeight;
33 short biPlanes;
34 short biBitCount;
35 int biCompression;
36 int biSizeImage;
37 int biXPelsPerMeter;
38 int biYPelsPerMeter;
39 int biClrUsed;
40 int biClrImportant;
41 } BITMAPINFOHEADER, *PBITMAPINFOHEADER, *LPBITMAPINFOHEADER;
42 typedef struct {
43 BITMAPINFOHEADER bmiHeader;
44 int bmiColors[1];
45 } BITMAPINFO, *LPBITMAPINFO;
46 #endif
47
48 #ifndef le2me_BITMAPINFOHEADER
49 #ifdef WORDS_BIGENDIAN
50 #define le2me_BITMAPINFOHEADER(h) { \
51 (h)->biSize = le2me_32((h)->biSize); \
52 (h)->biWidth = le2me_32((h)->biWidth); \
53 (h)->biHeight = le2me_32((h)->biHeight); \
54 (h)->biPlanes = le2me_16((h)->biPlanes); \
55 (h)->biBitCount = le2me_16((h)->biBitCount); \
56 (h)->biCompression = le2me_32((h)->biCompression); \
57 (h)->biSizeImage = le2me_32((h)->biSizeImage); \
58 (h)->biXPelsPerMeter = le2me_32((h)->biXPelsPerMeter); \
59 (h)->biYPelsPerMeter = le2me_32((h)->biYPelsPerMeter); \
60 (h)->biClrUsed = le2me_32((h)->biClrUsed); \
61 (h)->biClrImportant = le2me_32((h)->biClrImportant); \
62 }
63 #define le2me_WAVEFORMATEX(h) { \
64 (h)->wFormatTag = le2me_16((h)->wFormatTag); \
65 (h)->nChannels = le2me_16((h)->nChannels); \
66 (h)->nSamplesPerSec = le2me_32((h)->nSamplesPerSec); \
67 (h)->nAvgBytesPerSec = le2me_32((h)->nAvgBytesPerSec); \
68 (h)->nBlockAlign = le2me_16((h)->nBlockAlign); \
69 (h)->wBitsPerSample = le2me_16((h)->wBitsPerSample); \
70 (h)->cbSize = le2me_16((h)->cbSize); \
71 }
72 #else
73 #define le2me_BITMAPINFOHEADER(h) /**/
74 #define le2me_WAVEFORMATEX(h) /**/
75 #endif
76 #endif
77
78 #endif