uvoice_recorder.h
浏览该文件的文档.
1
/*
2
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
3
*
4
*/
5
6
#ifndef __UVOICE_RECORDER_H__
7
#define __UVOICE_RECORDER_H__
8
9
#include "
uvoice_types.h
"
10
17
typedef
enum
{
18
RECORDER_STAT_IDLE
= 0,
19
RECORDER_STAT_READY
,
20
RECORDER_STAT_RUNNING
,
21
RECORDER_STAT_STOP
,
22
RECORDER_STAT_ERROR
,
23
}
recorder_state_t
;
24
26
typedef
struct
{
28
int (*set_sink)(
media_format_t
format,
int
rate,
int
channels,
int
bits,
int
frames,
int
bitrate,
char
*sink);
29
int (*clr_sink)(void);
30
int (*start)(void);
31
int (*stop)(void);
32
int (*get_stream)(uint8_t *buffer,
int
nbytes);
33
int (*get_state)(
recorder_state_t
*state);
34
int (*get_position)(
int
*position);
35
int (*ns_enable)(
int
enable);
36
int (*ec_enable)(
int
enable);
37
int (*agc_enable)(
int
enable);
38
int (*vad_enable)(
int
enable);
39
int (*format_support)(
media_format_t
format);
40
void
*
priv
;
41
}
uvoice_recorder_t
;
42
48
uvoice_recorder_t
*
uvoice_recorder_create
(
void
);
49
57
int
uvoice_recorder_release
(
uvoice_recorder_t
*mrecorder);
58
63
#endif
/* __UVOICE_RECORDER_H__ */
64
recorder_state_t
recorder_state_t
录音状态
Definition:
uvoice_recorder.h:17
uvoice_recorder_create
uvoice_recorder_t * uvoice_recorder_create(void)
uvoice_recorder_release
int uvoice_recorder_release(uvoice_recorder_t *mrecorder)
RECORDER_STAT_IDLE
@ RECORDER_STAT_IDLE
Definition:
uvoice_recorder.h:18
RECORDER_STAT_STOP
@ RECORDER_STAT_STOP
Definition:
uvoice_recorder.h:21
RECORDER_STAT_RUNNING
@ RECORDER_STAT_RUNNING
Definition:
uvoice_recorder.h:20
RECORDER_STAT_READY
@ RECORDER_STAT_READY
Definition:
uvoice_recorder.h:19
RECORDER_STAT_ERROR
@ RECORDER_STAT_ERROR
Definition:
uvoice_recorder.h:22
media_format_t
media_format_t
Definition:
uvoice_types.h:22
uvoice_recorder_t
录音接口
Definition:
uvoice_recorder.h:26
uvoice_recorder_t::priv
void * priv
Definition:
uvoice_recorder.h:40
uvoice_types.h