2
0

mpp_compat.h 1.6 KB

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