1 /* 2 * Copyright 2021 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_COMPAT_H__ 18 #define __MPP_COMPAT_H__ 19 20 #include "rk_type.h" 21 #include "mpp_err.h" 22 23 typedef enum MppCompatId_e { 24 MPP_COMPAT_INC_FBC_BUF_SIZE, 25 MPP_COMPAT_ENC_ASYNC_INPUT, 26 MPP_COMPAT_DEC_FBC_HDR_256_ODD, 27 MPP_COMPAT_BUTT, 28 } MppCompatId; 29 30 typedef enum MppCompatType_e { 31 MPP_COMPAT_BOOL, 32 MPP_COMPAT_S32, 33 MPP_COMPAT_TYPE_BUTT, 34 } MppCompatType; 35 36 typedef struct MppCompat_t MppCompat; 37 38 /* external user can only update value_ext to notify mpp to change its behavior */ 39 struct MppCompat_t { 40 const MppCompatId feature_id; 41 const MppCompatType feature_type; 42 const RK_S32 value_mpp; 43 RK_S32 value_usr; 44 const char *name; 45 MppCompat * const next; 46 }; 47 48 #ifdef __cplusplus 49 extern "C" { 50 #endif 51 52 MppCompat *mpp_compat_query(void); 53 MppCompat *mpp_compat_query_by_id(MppCompatId id); 54 MPP_RET mpp_compat_update(MppCompat *compat, RK_S32 value); 55 56 void mpp_compat_show(void); 57 58 #ifdef __cplusplus 59 } 60 #endif 61 62 #endif /*__MPP_COMPAT_H__*/ 63