• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_BUTT,
27 } MppCompatId;
28 
29 typedef enum MppCompatType_e {
30     MPP_COMPAT_BOOL,
31     MPP_COMPAT_S32,
32     MPP_COMPAT_TYPE_BUTT,
33 } MppCompatType;
34 
35 typedef struct MppCompat_t MppCompat;
36 
37 /* external user can only update value_ext to notify mpp to change its behavior */
38 struct MppCompat_t {
39     const MppCompatId   feature_id;
40     const MppCompatType feature_type;
41     const RK_S32        value_mpp;
42     RK_S32              value_usr;
43     const char          *name;
44     MppCompat * const   next;
45 };
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
51 MppCompat *mpp_compat_query(void);
52 MppCompat *mpp_compat_query_by_id(MppCompatId id);
53 MPP_RET mpp_compat_update(MppCompat *compat, RK_S32 value);
54 
55 void mpp_compat_show(void);
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
61 #endif /*__MPP_COMPAT_H__*/
62