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 "hal_dec_task.h" 21 22 typedef struct MppDecVprocCfg_t { 23 void *mpp; 24 HalTaskGroup task_group; 25 } MppDecVprocCfg; 26 27 typedef void* MppDecVprocCtx; 28 29 #ifdef __cplusplus 30 31 extern "C" { 32 #endif 33 34 /* 35 * Functions usage: 36 * dec_vproc_init - get context with cfg 37 * dec_vproc_deinit - stop thread and destory context 38 * dec_vproc_start - start thread processing 39 * dec_vproc_signal - signal thread that one frame has be pushed for process 40 * dec_vproc_reset - reset process thread and discard all input 41 */ 42 43 MPP_RET dec_vproc_init(MppDecVprocCtx *ctx, MppDecVprocCfg *cfg); 44 MPP_RET dec_vproc_deinit(MppDecVprocCtx ctx); 45 46 MPP_RET dec_vproc_start(MppDecVprocCtx ctx); 47 MPP_RET dec_vproc_stop(MppDecVprocCtx ctx); 48 MPP_RET dec_vproc_signal(MppDecVprocCtx ctx); 49 MPP_RET dec_vproc_reset(MppDecVprocCtx ctx); 50 RK_U32 dec_vproc_get_version(MppDecVprocCtx ctx); 51 void dec_vproc_enable_detect(MppDecVprocCtx ctx); 52 53 #ifdef __cplusplus 54 } 55 #endif 56 57 #endif /* __MPP_DEC_VPROC_H__ */ 58