-
Notifications
You must be signed in to change notification settings - Fork 0
/
ds1_decoderthread.h
55 lines (47 loc) · 1.4 KB
/
ds1_decoderthread.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//---------------------------------------------------------------------------
#ifndef ds1_decoderthreadH
#define ds1_decoderthreadH
//---------------------------------------------------------------------------
#include <windows.h>
#include <classes.hpp>
#include "stdio.h"
#include "circbuffer.h"
#include "frame.h"
#include "faad.h"
#ifndef ENCODERENUM_DEFINED
#define ENCODERENUM_DEFINED
typedef enum { ENCODER_RAW, ENCODER_AAC, ENCODER_MP3 } tEncoderEnum;
#endif
typedef struct
{
faacDecHandle hDecoder;
faacDecConfiguration *Config;
faacDecFrameInfo FrameInfo;
bool firsttime;
} tAACDecParams;
typedef struct
{
tEncoderEnum decodingengine;
} tDecoderParams;
class tDecoderThread : public TThread
{
private:
tAACDecParams AACParams;
tDecoderParams DecoderParams;
HANDLE inbuffer_event;
HANDLE outbuffer_event;
public:
bool eof;
tCircularBuffer *pcmBuffer;
tCircularBuffer *bitBuffer;
__fastcall tDecoderThread(tCircularBuffer *pbuffer);
void __fastcall Execute();
void __fastcall DecodeAAC();
bool __fastcall InitAAC();
bool __fastcall DeInitAAC();
void __fastcall DecodeRAW();
bool __fastcall InitRAW();
bool __fastcall DeInitRAW();
bool __fastcall initDecoder(tEncoderEnum enctype);
};
#endif