summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libasf/asf.h8
-rw-r--r--apps/codecs/libwma/asf.h24
-rw-r--r--apps/codecs/libwma/wmadec.h2
-rw-r--r--apps/codecs/libwma/wmadeci.c2
-rw-r--r--apps/metadata/asf.c16
5 files changed, 9 insertions, 43 deletions
diff --git a/apps/codecs/libasf/asf.h b/apps/codecs/libasf/asf.h
index 03af2b0de1..2007e08e86 100644
--- a/apps/codecs/libasf/asf.h
+++ b/apps/codecs/libasf/asf.h
@@ -17,7 +17,8 @@ enum asf_error_e {
17 ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */ 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) */ 18 ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
19 ASF_ERROR_SEEKABLE = -9, /* file not seekable */ 19 ASF_ERROR_SEEKABLE = -9, /* file not seekable */
20 ASF_ERROR_SEEK = -10 /* file is seekable but seeking failed */ 20 ASF_ERROR_SEEK = -10, /* file is seekable but seeking failed */
21 ASF_ERROR_ENCRYPTED = -11 /* file is encrypted */
21}; 22};
22 23
23struct asf_waveformatex_s { 24struct asf_waveformatex_s {
@@ -34,9 +35,12 @@ struct asf_waveformatex_s {
34}; 35};
35typedef struct asf_waveformatex_s asf_waveformatex_t; 36typedef struct asf_waveformatex_s asf_waveformatex_t;
36 37
38/* Define the packet-specific functions only for codecs not for metadata parsers */
39#ifdef __CODECLIB_H__
37int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength, 40int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
38 asf_waveformatex_t* wfx, struct codec_api* ci); 41 asf_waveformatex_t* wfx, struct codec_api* ci);
39 42
40int asf_get_timestamp(int *duration, struct codec_api* ci); 43int asf_get_timestamp(int *duration, struct codec_api* ci);
41
42#endif 44#endif
45
46#endif /* _ASF_H */
diff --git a/apps/codecs/libwma/asf.h b/apps/codecs/libwma/asf.h
deleted file mode 100644
index 550e44ddb6..0000000000
--- a/apps/codecs/libwma/asf.h
+++ /dev/null
@@ -1,24 +0,0 @@
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
10struct asf_waveformatex_s {
11 uint32_t packet_size;
12 int audiostream;
13 uint16_t codec_id;
14 uint16_t channels;
15 uint32_t rate;
16 uint32_t bitrate;
17 uint16_t blockalign;
18 uint16_t bitspersample;
19 uint16_t datalen;
20 uint8_t data[6];
21};
22typedef struct asf_waveformatex_s asf_waveformatex_t;
23
24#endif
diff --git a/apps/codecs/libwma/wmadec.h b/apps/codecs/libwma/wmadec.h
index 8af76ae180..5672bfe063 100644
--- a/apps/codecs/libwma/wmadec.h
+++ b/apps/codecs/libwma/wmadec.h
@@ -20,7 +20,7 @@
20#ifndef _WMADEC_H 20#ifndef _WMADEC_H
21#define _WMADEC_H 21#define _WMADEC_H
22 22
23#include "asf.h" 23#include <codecs/libasf/asf.h>
24#include "bitstream.h" /* For GetBitContext */ 24#include "bitstream.h" /* For GetBitContext */
25#include "types.h" 25#include "types.h"
26 26
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index 6ff6a176ee..6837456af1 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -24,7 +24,7 @@
24 24
25#include <codecs.h> 25#include <codecs.h>
26#include <codecs/lib/codeclib.h> 26#include <codecs/lib/codeclib.h>
27#include "asf.h" 27#include <codecs/libasf/asf.h>
28#include "wmadec.h" 28#include "wmadec.h"
29#include "wmafixed.h" 29#include "wmafixed.h"
30#include "wmadata.h" 30#include "wmadata.h"
diff --git a/apps/metadata/asf.c b/apps/metadata/asf.c
index 9362485eb7..fac4092256 100644
--- a/apps/metadata/asf.c
+++ b/apps/metadata/asf.c
@@ -32,7 +32,7 @@
32#include "metadata_common.h" 32#include "metadata_common.h"
33#include "metadata_parsers.h" 33#include "metadata_parsers.h"
34#include "system.h" 34#include "system.h"
35#include <codecs/libwma/asf.h> 35#include <codecs/libasf/asf.h>
36 36
37/* TODO: Just read the GUIDs into a 16-byte array, and use memcmp to compare */ 37/* TODO: Just read the GUIDs into a 16-byte array, and use memcmp to compare */
38struct guid_s { 38struct guid_s {
@@ -50,20 +50,6 @@ struct asf_object_s {
50}; 50};
51typedef struct asf_object_s asf_object_t; 51typedef struct asf_object_s asf_object_t;
52 52
53enum asf_error_e {
54 ASF_ERROR_INTERNAL = -1, /* incorrect input to API calls */
55 ASF_ERROR_OUTOFMEM = -2, /* some malloc inside program failed */
56 ASF_ERROR_EOF = -3, /* unexpected end of file */
57 ASF_ERROR_IO = -4, /* error reading or writing to file */
58 ASF_ERROR_INVALID_LENGTH = -5, /* length value conflict in input data */
59 ASF_ERROR_INVALID_VALUE = -6, /* other value conflict in input data */
60 ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */
61 ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
62 ASF_ERROR_SEEKABLE = -9, /* file not seekable */
63 ASF_ERROR_SEEK = -10, /* file is seekable but seeking failed */
64 ASF_ERROR_ENCRYPTED = -11 /* file is encrypted */
65};
66
67static const guid_t asf_guid_null = 53static const guid_t asf_guid_null =
68{0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}; 54{0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
69 55