1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 #ifndef FRAME_RESIZE_H
5 #define FRAME_RESIZE_H
6 
7 #include "stdint.h"
8 
9 struct FrameResizeState_;
10 
11 typedef struct FrameResizeState_ FrameResizeState;
12 
13 typedef int32_t(*CAPTURE_HANDLER_T)(void *, void *, int32_t *);
14 
15 typedef int32_t(*PLAYBACK_HANDLER_T)(void *, int32_t *);
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 FrameResizeState *frame_resize_create(int codec_frame_size,
22                                     int codec_capture_channel,
23                                     int vqe_frame_size,
24                                     int capture_sample_size,
25                                     int playback_sample_size,
26                                     int aec_enable,
27                                     const CAPTURE_HANDLER_T capture_handler,
28                                     const PLAYBACK_HANDLER_T playback_handler);
29 
30 void frame_resize_destroy(FrameResizeState *st);
31 
32 void frame_resize_process_capture(FrameResizeState *st, void *pcm_buf, void *ref_buf, int32_t *pcm_len);
33 
34 void frame_resize_process_playback(FrameResizeState *st, void *pcm_buf, int32_t *pcm_len);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif