Mercurial > audlegacy-plugins
annotate src/alac/demux.h @ 751:3c1e835ebd68 trunk
[svn] - only claim URLs that actually belong to us. Closes #783.
author | nenolod |
---|---|
date | Wed, 28 Feb 2007 07:29:57 -0800 |
parents | 74df3bd6f472 |
children |
rev | line source |
---|---|
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
1 #ifndef DEMUX_H |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
2 #define DEMUX_H |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
3 |
330 | 4 #include "config.h" |
5 | |
6 #if HAVE_STDINT_H | |
7 # include <stdint.h> | |
8 #else | |
9 # if HAVE_INTTYPES_H | |
10 # include <inttypes.h> | |
11 # endif | |
12 #endif | |
13 | |
77 | 14 #include "decomp.h" |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
15 #include "stream.h" |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
16 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
17 typedef uint32_t fourcc_t; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
18 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
19 typedef struct |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
20 { |
78 | 21 stream_t *stream; |
22 alac_file *alac; | |
23 | |
85 | 24 int format_read; |
25 | |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
26 uint16_t num_channels; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
27 uint16_t sample_size; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
28 uint32_t sample_rate; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
29 fourcc_t format; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
30 void *buf; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
31 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
32 struct { |
79
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
33 char *art; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
34 char *nam; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
35 char *alb; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
36 char *day; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
37 char *cmt; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
38 char *des; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
39 char *gen; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
40 } tuple; |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
41 |
722fd456ae1a
[svn] - parse metadata on ALAC files... seems to work, but the method is inefficient
nenolod
parents:
78
diff
changeset
|
42 struct { |
56
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
43 uint32_t sample_count; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
44 uint32_t sample_duration; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
45 } *time_to_sample; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
46 uint32_t num_time_to_samples; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
47 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
48 uint32_t *sample_byte_size; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
49 uint32_t num_sample_byte_sizes; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
50 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
51 uint32_t codecdata_len; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
52 void *codecdata; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
53 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
54 uint32_t mdat_len; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
55 #if 0 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
56 void *mdat; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
57 #endif |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
58 } demux_res_t; |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
59 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
60 int qtmovie_read(stream_t *stream, demux_res_t *demux_res); |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
61 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
62 #ifndef MAKEFOURCC |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
63 #define MAKEFOURCC(ch0, ch1, ch2, ch3) ( \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
64 ( (int32_t)(char)(ch0) << 24 ) | \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
65 ( (int32_t)(char)(ch1) << 16 ) | \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
66 ( (int32_t)(char)(ch2) << 8 ) | \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
67 ( (int32_t)(char)(ch3) ) ) |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
68 #endif |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
69 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
70 #ifndef SLPITFOURCC |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
71 /* splits it into ch0, ch1, ch2, ch3 - use for printf's */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
72 #define SPLITFOURCC(code) \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
73 (char)((int32_t)code >> 24), \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
74 (char)((int32_t)code >> 16), \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
75 (char)((int32_t)code >> 8), \ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
76 (char)code |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
77 #endif |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
78 |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
79 #endif /* DEMUX_H */ |
56c88eee9802
[svn] - experimental ALAC plugin -- don't use this, it crashes
nenolod
parents:
diff
changeset
|
80 |