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