Mercurial > audlegacy
annotate Plugins/Input/mpg123/dxhead.h @ 1238:dc6f7048a9fa trunk
[svn] - remove metatag entirely
author | nenolod |
---|---|
date | Wed, 14 Jun 2006 22:41:05 -0700 |
parents | b5ae09a6c2f1 |
children |
rev | line source |
---|---|
61 | 1 /* |
2 * A Xing header may be present in the ancillary | |
3 * data field of the first frame of an mp3 bitstream | |
4 * The Xing header (optionally) contains | |
5 * frames total number of audio frames in the bitstream | |
6 * bytes total number of bytes in the bitstream | |
7 * toc table of contents | |
8 * | |
9 * toc (table of contents) gives seek points | |
10 * for random access | |
11 * the ith entry determines the seek point for | |
12 * i-percent duration | |
13 * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes | |
14 * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes | |
15 */ | |
16 | |
17 #define FRAMES_FLAG 0x0001 | |
18 #define BYTES_FLAG 0x0002 | |
19 #define TOC_FLAG 0x0004 | |
20 #define VBR_SCALE_FLAG 0x0008 | |
21 | |
22 /* | |
23 * structure to receive extracted header | |
24 */ | |
25 typedef struct { | |
26 int frames; /* total bit stream frames from Xing header data */ | |
27 int bytes; /* total bit stream bytes from Xing header data */ | |
28 unsigned char toc[100]; /* "table of contents" */ | |
29 } xing_header_t; | |
30 | |
31 /* | |
32 * Returns zero on fail, non-zero on success | |
33 * xing structure to receive header data (output) | |
34 * buf bitstream input | |
35 */ | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
61
diff
changeset
|
36 int mpgdec_get_xing_header(xing_header_t * xing, unsigned char *buf); |
61 | 37 |
38 | |
39 /* | |
40 * Returns seekpoint in bytes (may be at eof if percent=100.0) | |
41 * percent: play time percentage of total playtime. May be fractional. | |
42 */ | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
61
diff
changeset
|
43 int mpgdec_seek_point(xing_header_t * xing, float percent); |