summaryrefslogtreecommitdiff
path: root/apps/codecs/libasf/asf.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libasf/asf.h')
-rw-r--r--apps/codecs/libasf/asf.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/apps/codecs/libasf/asf.h b/apps/codecs/libasf/asf.h
new file mode 100644
index 0000000000..03af2b0de1
--- /dev/null
+++ b/apps/codecs/libasf/asf.h
@@ -0,0 +1,42 @@
1#ifndef _ASF_H
2#define _ASF_H
3
4#include <inttypes.h>
5
6/* ASF codec IDs */
7#define ASF_CODEC_ID_WMAV1 0x160
8#define ASF_CODEC_ID_WMAV2 0x161
9
10enum asf_error_e {
11 ASF_ERROR_INTERNAL = -1, /* incorrect input to API calls */
12 ASF_ERROR_OUTOFMEM = -2, /* some malloc inside program failed */
13 ASF_ERROR_EOF = -3, /* unexpected end of file */
14 ASF_ERROR_IO = -4, /* error reading or writing to file */
15 ASF_ERROR_INVALID_LENGTH = -5, /* length value conflict in input data */
16 ASF_ERROR_INVALID_VALUE = -6, /* other value conflict in input data */
17 ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */
18 ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
19 ASF_ERROR_SEEKABLE = -9, /* file not seekable */
20 ASF_ERROR_SEEK = -10 /* file is seekable but seeking failed */
21};
22
23struct asf_waveformatex_s {
24 uint32_t packet_size;
25 int audiostream;
26 uint16_t codec_id;
27 uint16_t channels;
28 uint32_t rate;
29 uint32_t bitrate;
30 uint16_t blockalign;
31 uint16_t bitspersample;
32 uint16_t datalen;
33 uint8_t data[6];
34};
35typedef struct asf_waveformatex_s asf_waveformatex_t;
36
37int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
38 asf_waveformatex_t* wfx, struct codec_api* ci);
39
40int asf_get_timestamp(int *duration, struct codec_api* ci);
41
42#endif