summaryrefslogtreecommitdiff
path: root/amadec/adec-armdec-mgt.h (plain)
blob: c7f78a9ecd844ab3be1aa85046ade07f5c0c53a0
1#ifndef ADEC_ARMDEC_MGT_H
2#define ADEC_ARMDEC_MGT_H
3
4
5#include <stdlib.h>
6#include<stdio.h>
7#include <string.h>
8
9//#define AUDIO_ARC_DECODER 0
10//#define AUDIO_ARM_DECODER 1
11//#define AUDIO_FFMPEG_DECODER 2
12
13#define DEFAULT_PCM_BUFFER_SIZE 192000*2//default out buffer size
14
15#define AUDIO_EXTRA_DATA_SIZE (4096)
16typedef struct _audio_info {
17 int bitrate;
18 int samplerate;
19 int channels;
20 int file_profile;
21} AudioInfo;
22
23/* audio decoder operation*/
24typedef struct audio_decoder_operations audio_decoder_operations_t;
25struct audio_decoder_operations {
26 const char * name;
27 int nAudioDecoderType;
28 int nInBufSize;
29 int nOutBufSize;
30 int (*init)(audio_decoder_operations_t *);
31 int (*decode)(audio_decoder_operations_t *, char *outbuf, int *outlen, char *inbuf, int inlen);
32 int (*release)(audio_decoder_operations_t *);
33 int (*getinfo)(audio_decoder_operations_t *, AudioInfo *pAudioInfo);
34 void * priv_data;//point to audec
35 void * priv_dec_data;//decoder private data
36 void *pdecoder; // decoder instance
37 int channels;
38 unsigned long pts;
39 int samplerate;
40 int bps;
41 int extradata_size; ///< extra data size
42 char extradata[AUDIO_EXTRA_DATA_SIZE];
43 int NchOriginal;
44 int lfepresent;
45};
46
47enum AVSampleFormat {
48 AV_SAMPLE_FMT_NONE = -1,
49 AV_SAMPLE_FMT_U8, ///< unsigned 8 bits
50 AV_SAMPLE_FMT_S16, ///< signed 16 bits
51 AV_SAMPLE_FMT_S32, ///< signed 32 bits
52 AV_SAMPLE_FMT_FLT, ///< float
53 AV_SAMPLE_FMT_DBL, ///< double
54 AV_SAMPLE_FMT_NB ///< Number of sample formats. DO NOT USE if linking dynamically
55};
56#define AVCODEC_MAX_AUDIO_FRAME_SIZE 500*1024
57#endif
58