• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *
3  * Copyright 2015 Rockchip Electronics Co., LTD.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __MPP_META_IMPL_H__
19 #define __MPP_META_IMPL_H__
20 
21 #include "mpp_common.h"
22 
23 #include "mpp_list.h"
24 #include "mpp_meta.h"
25 
26 typedef struct MppMetaDef_t {
27     MppMetaKey          key;
28     MppMetaType         type;
29 } MppMetaDef;
30 
31 typedef struct MppMetaVal_t {
32     RK_U32              state;
33     union {
34         RK_S32          val_s32;
35         RK_S64          val_s64;
36         void            *val_ptr;
37         MppFrame        frame;
38         MppPacket       packet;
39         MppBuffer       buffer;
40     };
41 } MppMetaVal;
42 
43 typedef struct MppMetaImpl_t {
44     char                tag[MPP_TAG_SIZE];
45     const char          *caller;
46     RK_S32              meta_id;
47     RK_S32              ref_count;
48 
49     struct list_head    list_meta;
50     RK_S32              node_count;
51     MppMetaVal          vals[];
52 } MppMetaImpl;
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 RK_S32 mpp_meta_size(MppMeta meta);
59 MPP_RET mpp_meta_dump(MppMeta meta);
60 MPP_RET mpp_meta_inc_ref(MppMeta meta);
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* __MPP_META_IMPL_H__ */
67