xref: /rockchip-linux_mpp/mpp/vproc/inc/mpp_dec_vproc.h (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2  * Copyright 2018 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef __MPP_DEC_VPROC_H__
18 #define __MPP_DEC_VPROC_H__
19 
20 #include "mpp_dec_cfg.h"
21 #include "hal_dec_task.h"
22 
23 typedef struct MppDecVprocCfg_t {
24     void            *mpp;
25     HalTaskGroup    task_group;
26 } MppDecVprocCfg;
27 
28 typedef void* MppDecVprocCtx;
29 
30 #ifdef __cplusplus
31 
32 extern "C" {
33 #endif
34 
35 /*
36  * Functions usage:
37  * dec_vproc_init   - get context with cfg
38  * dec_vproc_deinit - stop thread and destory context
39  * dec_vproc_start  - start thread processing
40  * dec_vproc_signal - signal thread that one frame has be pushed for process
41  * dec_vproc_reset  - reset process thread and discard all input
42  */
43 
44 MPP_RET dec_vproc_init(MppDecVprocCtx *ctx, MppDecVprocCfg *cfg);
45 MPP_RET dec_vproc_deinit(MppDecVprocCtx ctx);
46 
47 MPP_RET dec_vproc_start(MppDecVprocCtx ctx);
48 MPP_RET dec_vproc_stop(MppDecVprocCtx ctx);
49 MPP_RET dec_vproc_signal(MppDecVprocCtx ctx);
50 MPP_RET dec_vproc_reset(MppDecVprocCtx ctx);
51 RK_U32 dec_vproc_get_version(MppDecVprocCtx ctx);
52 MPP_RET dec_vproc_set_mode(MppDecVprocCtx ctx, MppVprocMode mode);
53 
54 #ifdef __cplusplus
55 }
56 #endif
57 
58 #endif /* __MPP_DEC_VPROC_H__ */
59