forked from len0rd/rockbox
- Modify metadata/asf.c to use libasf.
- Modify the files in libwma to use libasf. - Remove apps/codecs/libwma/asf.h since it's not used now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25783 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
2ab15d959c
commit
7aaae54afc
5 changed files with 9 additions and 43 deletions
|
|
@ -17,7 +17,8 @@ enum asf_error_e {
|
|||
ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */
|
||||
ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
|
||||
ASF_ERROR_SEEKABLE = -9, /* file not seekable */
|
||||
ASF_ERROR_SEEK = -10 /* file is seekable but seeking failed */
|
||||
ASF_ERROR_SEEK = -10, /* file is seekable but seeking failed */
|
||||
ASF_ERROR_ENCRYPTED = -11 /* file is encrypted */
|
||||
};
|
||||
|
||||
struct asf_waveformatex_s {
|
||||
|
|
@ -34,9 +35,12 @@ struct asf_waveformatex_s {
|
|||
};
|
||||
typedef struct asf_waveformatex_s asf_waveformatex_t;
|
||||
|
||||
/* Define the packet-specific functions only for codecs not for metadata parsers */
|
||||
#ifdef __CODECLIB_H__
|
||||
int asf_read_packet(uint8_t** audiobuf, int* audiobufsize, int* packetlength,
|
||||
asf_waveformatex_t* wfx, struct codec_api* ci);
|
||||
|
||||
int asf_get_timestamp(int *duration, struct codec_api* ci);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _ASF_H */
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef _ASF_H
|
||||
#define _ASF_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
/* ASF codec IDs */
|
||||
#define ASF_CODEC_ID_WMAV1 0x160
|
||||
#define ASF_CODEC_ID_WMAV2 0x161
|
||||
|
||||
struct asf_waveformatex_s {
|
||||
uint32_t packet_size;
|
||||
int audiostream;
|
||||
uint16_t codec_id;
|
||||
uint16_t channels;
|
||||
uint32_t rate;
|
||||
uint32_t bitrate;
|
||||
uint16_t blockalign;
|
||||
uint16_t bitspersample;
|
||||
uint16_t datalen;
|
||||
uint8_t data[6];
|
||||
};
|
||||
typedef struct asf_waveformatex_s asf_waveformatex_t;
|
||||
|
||||
#endif
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef _WMADEC_H
|
||||
#define _WMADEC_H
|
||||
|
||||
#include "asf.h"
|
||||
#include <codecs/libasf/asf.h>
|
||||
#include "bitstream.h" /* For GetBitContext */
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
#include <codecs.h>
|
||||
#include <codecs/lib/codeclib.h>
|
||||
#include "asf.h"
|
||||
#include <codecs/libasf/asf.h>
|
||||
#include "wmadec.h"
|
||||
#include "wmafixed.h"
|
||||
#include "wmadata.h"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
#include "metadata_common.h"
|
||||
#include "metadata_parsers.h"
|
||||
#include "system.h"
|
||||
#include <codecs/libwma/asf.h>
|
||||
#include <codecs/libasf/asf.h>
|
||||
|
||||
/* TODO: Just read the GUIDs into a 16-byte array, and use memcmp to compare */
|
||||
struct guid_s {
|
||||
|
|
@ -50,20 +50,6 @@ struct asf_object_s {
|
|||
};
|
||||
typedef struct asf_object_s asf_object_t;
|
||||
|
||||
enum asf_error_e {
|
||||
ASF_ERROR_INTERNAL = -1, /* incorrect input to API calls */
|
||||
ASF_ERROR_OUTOFMEM = -2, /* some malloc inside program failed */
|
||||
ASF_ERROR_EOF = -3, /* unexpected end of file */
|
||||
ASF_ERROR_IO = -4, /* error reading or writing to file */
|
||||
ASF_ERROR_INVALID_LENGTH = -5, /* length value conflict in input data */
|
||||
ASF_ERROR_INVALID_VALUE = -6, /* other value conflict in input data */
|
||||
ASF_ERROR_INVALID_OBJECT = -7, /* ASF object missing or in wrong place */
|
||||
ASF_ERROR_OBJECT_SIZE = -8, /* invalid ASF object size (too small) */
|
||||
ASF_ERROR_SEEKABLE = -9, /* file not seekable */
|
||||
ASF_ERROR_SEEK = -10, /* file is seekable but seeking failed */
|
||||
ASF_ERROR_ENCRYPTED = -11 /* file is encrypted */
|
||||
};
|
||||
|
||||
static const guid_t asf_guid_null =
|
||||
{0x00000000, 0x0000, 0x0000, {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue