annotate src/alac/demux.h @ 3058:2e649bf16ebc

Robust media change handling written by John Wehle, closes bug #46.
author Tony Vroon <chainsaw@gentoo.org>
date Fri, 24 Apr 2009 09:23:20 +0100
parents 74df3bd6f472
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
4 #include "config.h"
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
5
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
6 #if HAVE_STDINT_H
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
7 # include <stdint.h>
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
8 #else
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
9 # if HAVE_INTTYPES_H
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
10 # include <inttypes.h>
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
11 # endif
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
12 #endif
74df3bd6f472 [svn] - portability fixes:
nenolod
parents: 85
diff changeset
13
77
c2981235af26 [svn] - thread safety
nenolod
parents: 56
diff changeset
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
096db10ce25f [svn] - a few concurrency fixes
nenolod
parents: 77
diff changeset
21 stream_t *stream;
096db10ce25f [svn] - a few concurrency fixes
nenolod
parents: 77
diff changeset
22 alac_file *alac;
096db10ce25f [svn] - a few concurrency fixes
nenolod
parents: 77
diff changeset
23
85
86ce11c6b8c3 [svn] - Imported a few changes from alac decoder 0.1.3
js
parents: 79
diff changeset
24 int format_read;
86ce11c6b8c3 [svn] - Imported a few changes from alac decoder 0.1.3
js
parents: 79
diff changeset
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