forked from hd-zero/hdzero-goggle
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadec2ao.h
73 lines (59 loc) · 1.44 KB
/
adec2ao.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#pragma once
#ifdef __cplusplus
extern "C" {
#endif
#ifndef EMULATOR_BUILD
#include <ClockCompPortIndex.h>
#endif
#include <mm_comm_adec.h>
#include <mm_comm_aio.h>
#include <mm_common.h>
#include <mpi_adec.h>
#include <mpi_ao.h>
#include <mpi_clock.h>
#include <mpi_sys.h>
#include <plat_type.h>
#include <pthread.h>
#include <stdbool.h>
#ifndef BIT
#define BIT(x) (1 << (x))
#endif
#define ADEC2AO_adecEOF BIT(2)
#define ADEC2AO_aoEOF BIT(3)
#define ADEC2AO_adecEOF_N BIT(18)
#define ADEC2AO_aoEOF_N BIT(19)
typedef struct pcmFrameNode {
AUDIO_FRAME_S frame;
struct list_head mList;
} pcmFrameNode;
typedef struct
{
PAYLOAD_TYPE_E codecType;
int sampleRate;
int channels;
int bitsPerSample;
DEMUX_CHN dmxChn;
CLOCK_CHN clkChn;
} AdecParams_t;
typedef struct
{
DEMUX_CHN dmxChn;
ADEC_CHN adecChn;
int aoDev;
AO_CHN aoChn;
CLOCK_CHN clkChn;
uint32_t flagEOF;
} Adec2AoContext_t;
Adec2AoContext_t *adec2ao_initSys(void);
void adec2ao_deinitSys(Adec2AoContext_t *aa);
ERRORTYPE adec2ao_prepare(Adec2AoContext_t *aa, AdecParams_t *params);
ERRORTYPE adec2ao_start(Adec2AoContext_t *aa);
ERRORTYPE adec2ao_stop(Adec2AoContext_t *aa);
ERRORTYPE adec2ao_seekTo(Adec2AoContext_t *aa);
ERRORTYPE adec2ao_pause(Adec2AoContext_t *aa);
ERRORTYPE adec2ao_checkEof(Adec2AoContext_t *aa);
ERRORTYPE adec2ao_setAdecEof(Adec2AoContext_t *aa);
bool adec2ao_isEOF(Adec2AoContext_t *aa);
#ifdef __cplusplus
}
#endif