Mercurial > mplayer.hg
annotate libaf/af_format.h @ 26054:d9b11d83367f
Add missing #includes for Mac OS X, fixes the warning
ldt_keeper.c:243: warning: implicit declaration of function i386_set_ldt
patch by Elias Pipping, elias pipping org
author | diego |
---|---|
date | Sun, 24 Feb 2008 12:18:01 +0000 |
parents | 4129c8cfa742 |
children | e173fde700da |
rev | line source |
---|---|
8167 | 1 /* The sample format system used lin libaf is based on bitmasks. The |
2 format definition only refers to the storage format not the | |
3 resolution. */ | |
26029 | 4 |
5 #ifndef MPLAYER_AF_FORMAT_H | |
6 #define MPLAYER_AF_FORMAT_H | |
8167 | 7 |
14479 | 8 #ifndef MPLAYER_CONFIG_H |
9 #error af_format.h needs config.h | |
10 #endif | |
11 | |
24595 | 12 // Endianness |
8167 | 13 #define AF_FORMAT_BE (0<<0) // Big Endian |
14 #define AF_FORMAT_LE (1<<0) // Little Endian | |
15 #define AF_FORMAT_END_MASK (1<<0) | |
16 | |
17 #if WORDS_BIGENDIAN // Native endian of cpu | |
18 #define AF_FORMAT_NE AF_FORMAT_BE | |
19 #else | |
20 #define AF_FORMAT_NE AF_FORMAT_LE | |
21 #endif | |
22 | |
23 // Signed/unsigned | |
14245 | 24 #define AF_FORMAT_SI (0<<1) // Signed |
25 #define AF_FORMAT_US (1<<1) // Unsigned | |
8167 | 26 #define AF_FORMAT_SIGN_MASK (1<<1) |
27 | |
13550
81e62cbe57d9
reimplementation of the pl_extrastereo and pl_volnorm plugins
alex
parents:
8994
diff
changeset
|
28 // Fixed or floating point |
8167 | 29 #define AF_FORMAT_I (0<<2) // Int |
30 #define AF_FORMAT_F (1<<2) // Foating point | |
31 #define AF_FORMAT_POINT_MASK (1<<2) | |
32 | |
14245 | 33 // Bits used |
34 #define AF_FORMAT_8BIT (0<<3) | |
35 #define AF_FORMAT_16BIT (1<<3) | |
36 #define AF_FORMAT_24BIT (2<<3) | |
37 #define AF_FORMAT_32BIT (3<<3) | |
38 #define AF_FORMAT_40BIT (4<<3) | |
39 #define AF_FORMAT_48BIT (5<<3) | |
40 #define AF_FORMAT_BITS_MASK (7<<3) | |
41 | |
8167 | 42 // Special flags refering to non pcm data |
14245 | 43 #define AF_FORMAT_MU_LAW (1<<6) |
44 #define AF_FORMAT_A_LAW (2<<6) | |
45 #define AF_FORMAT_MPEG2 (3<<6) // MPEG(2) audio | |
46 #define AF_FORMAT_AC3 (4<<6) // Dolby Digital AC3 | |
47 #define AF_FORMAT_IMA_ADPCM (5<<6) | |
48 #define AF_FORMAT_SPECIAL_MASK (7<<6) | |
49 | |
50 // PREDEFINED formats | |
51 | |
52 #define AF_FORMAT_U8 (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_8BIT|AF_FORMAT_NE) | |
53 #define AF_FORMAT_S8 (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_8BIT|AF_FORMAT_NE) | |
54 #define AF_FORMAT_U16_LE (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_16BIT|AF_FORMAT_LE) | |
55 #define AF_FORMAT_U16_BE (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_16BIT|AF_FORMAT_BE) | |
56 #define AF_FORMAT_S16_LE (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_16BIT|AF_FORMAT_LE) | |
57 #define AF_FORMAT_S16_BE (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_16BIT|AF_FORMAT_BE) | |
58 #define AF_FORMAT_U24_LE (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_24BIT|AF_FORMAT_LE) | |
59 #define AF_FORMAT_U24_BE (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_24BIT|AF_FORMAT_BE) | |
60 #define AF_FORMAT_S24_LE (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_24BIT|AF_FORMAT_LE) | |
61 #define AF_FORMAT_S24_BE (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_24BIT|AF_FORMAT_BE) | |
62 #define AF_FORMAT_U32_LE (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_32BIT|AF_FORMAT_LE) | |
63 #define AF_FORMAT_U32_BE (AF_FORMAT_I|AF_FORMAT_US|AF_FORMAT_32BIT|AF_FORMAT_BE) | |
64 #define AF_FORMAT_S32_LE (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_32BIT|AF_FORMAT_LE) | |
65 #define AF_FORMAT_S32_BE (AF_FORMAT_I|AF_FORMAT_SI|AF_FORMAT_32BIT|AF_FORMAT_BE) | |
8994 | 66 |
14245 | 67 #define AF_FORMAT_FLOAT_LE (AF_FORMAT_F|AF_FORMAT_32BIT|AF_FORMAT_LE) |
68 #define AF_FORMAT_FLOAT_BE (AF_FORMAT_F|AF_FORMAT_32BIT|AF_FORMAT_BE) | |
8994 | 69 |
14245 | 70 #ifdef WORDS_BIGENDIAN |
71 #define AF_FORMAT_U16_NE AF_FORMAT_U16_BE | |
72 #define AF_FORMAT_S16_NE AF_FORMAT_S16_BE | |
73 #define AF_FORMAT_U24_NE AF_FORMAT_U24_BE | |
74 #define AF_FORMAT_S24_NE AF_FORMAT_S24_BE | |
75 #define AF_FORMAT_U32_NE AF_FORMAT_U32_BE | |
76 #define AF_FORMAT_S32_NE AF_FORMAT_S32_BE | |
77 #define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_BE | |
78 #else | |
79 #define AF_FORMAT_U16_NE AF_FORMAT_U16_LE | |
80 #define AF_FORMAT_S16_NE AF_FORMAT_S16_LE | |
81 #define AF_FORMAT_U24_NE AF_FORMAT_U24_LE | |
82 #define AF_FORMAT_S24_NE AF_FORMAT_S24_LE | |
83 #define AF_FORMAT_U32_NE AF_FORMAT_U32_LE | |
84 #define AF_FORMAT_S32_NE AF_FORMAT_S32_LE | |
85 #define AF_FORMAT_FLOAT_NE AF_FORMAT_FLOAT_LE | |
86 #endif | |
87 | |
20771
1e78e35b6c7b
Change value used to indicate "unknown audio format" from 0 to -1.
uau
parents:
19108
diff
changeset
|
88 #define AF_FORMAT_UNKNOWN (-1) |
1e78e35b6c7b
Change value used to indicate "unknown audio format" from 0 to -1.
uau
parents:
19108
diff
changeset
|
89 |
19108
5e767cabf4cd
marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
reynaldo
parents:
14479
diff
changeset
|
90 extern int af_str2fmt(const char *str); |
5e767cabf4cd
marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
reynaldo
parents:
14479
diff
changeset
|
91 extern int af_str2fmt_short(const char *str); |
14245 | 92 extern int af_fmt2bits(int format); |
14335
8380694ba14f
af_bits2fmt and af_str2fmt_short, also removed the extra FORMAT_BPS control in format.c
alex
parents:
14263
diff
changeset
|
93 extern int af_bits2fmt(int bits); |
14245 | 94 extern char* af_fmt2str(int format, char* str, int size); |
19108
5e767cabf4cd
marks several read-only string parameters and function return-values which can only be used read-only as const. Patch by Stefan Huehner, stefan _AT huener-org
reynaldo
parents:
14479
diff
changeset
|
95 extern const char* af_fmt2str_short(int format); |
14245 | 96 |
26029 | 97 #endif /* MPLAYER_AF_FORMAT_H */ |