FS#11968 by Peter Lecky - Slovak language update
[maemo-rb.git] / apps / codecs / libasf / asf.h
bloba7d384cf3df6516c9fa09adfdaa4af89e265335c
1 #ifndef _ASF_H
2 #define _ASF_H
4 #include <inttypes.h>
6 /* ASF codec IDs */
7 #define ASF_CODEC_ID_WMAV1 0x160
8 #define ASF_CODEC_ID_WMAV2 0x161
9 #define ASF_CODEC_ID_WMAPRO 0x162
10 #define ASF_CODEC_ID_WMAVOICE 0x00A
12 enum asf_error_e {
13 ASF_ERROR_INTERNAL = -1, /* incorrect input to API calls */
14 ASF_ERROR_OUTOFMEM = -2, /* some malloc inside program failed */
15 ASF_ERROR_EOF = -3, /* unexpected end of file */
16 ASF_ERROR_IO = -4, /* error reading or writing to file */
17 ASF_ERROR_INVALID_LENGTH = -5, /* length value conflict in input data */
18 ASF_ERROR_INVALID_VALUE = -6, /* other value conflict in input data */
19 ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */
20 ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
21 ASF_ERROR_SEEKABLE = -9, /* file not seekable */
22 ASF_ERROR_SEEK = -10, /* file is seekable but seeking failed */
23 ASF_ERROR_ENCRYPTED = -11 /* file is encrypted */
26 struct asf_waveformatex_s {
27 uint32_t packet_size;
28 int audiostream;
29 uint16_t codec_id;
30 uint16_t channels;
31 uint32_t rate;
32 uint32_t bitrate;
33 uint16_t blockalign;
34 uint16_t bitspersample;
35 uint16_t datalen;
36 uint16_t numpackets;
37 uint8_t data[46];
39 typedef struct asf_waveformatex_s asf_waveformatex_t;
41 int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
42 asf_waveformatex_t* wfx);
44 int asf_get_timestamp(int *duration);
46 int asf_seek(int ms, asf_waveformatex_t* wfx);
49 #endif /* _ASF_H */