5 #ifndef SPA_PARAM_TAG_UTILS_H 6 #define SPA_PARAM_TAG_UTILS_H 24 #ifndef SPA_API_TAG_UTILS 26 #define SPA_API_TAG_UTILS SPA_API_IMPL 28 #define SPA_API_TAG_UTILS static inline 73 const char *key, *value;
87 for (n = 0; n < n_items; n++) {
94 items[n].
value = value;
125 n_items = dict ? dict->
n_items : 0;
130 for (i = 0; i < n_items; i++) {
Struct( Int: n_items (String: key String: value)* )
Definition: tag.h:28
const char * key
Definition: dict.h:42
uint32_t n_items
Definition: dict.h:55
SPA_API_TAG_UTILS void spa_tag_build_add_info(struct spa_pod_builder *builder, const struct spa_pod *info)
Definition: tag-utils.h:119
SPA_API_POD_BUILDER int spa_pod_builder_push_struct(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:466
SPA_API_TAG_UTILS int spa_tag_compare(const struct spa_pod *a, const struct spa_pod *b)
Definition: tag-utils.h:40
SPA_API_TAG_UTILS void spa_tag_build_add_dict(struct spa_pod_builder *builder, const struct spa_dict *dict)
Definition: tag-utils.h:127
SPA_API_POD_BUILDER int spa_pod_builder_int(struct spa_pod_builder *builder, int32_t val)
Definition: builder.h:266
#define SPA_POD_Pod(val)
Definition: vararg.h:128
#define SPA_MIN(a, b)
Definition: defs.h:165
const struct spa_pod * info
Definition: tag.h:38
SPA_API_POD_PARSER int spa_pod_parser_pop(struct spa_pod_parser *parser, struct spa_pod_frame *frame)
Definition: parser.h:132
SPA_API_POD_BUILDER void * spa_pod_builder_pop(struct spa_pod_builder *builder, struct spa_pod_frame *frame)
Definition: builder.h:187
SPA_API_POD_BUILDER int spa_pod_builder_push_object(struct spa_pod_builder *builder, struct spa_pod_frame *frame, uint32_t type, uint32_t id)
Definition: builder.h:479
SPA_API_POD_BUILDER int spa_pod_builder_string(struct spa_pod_builder *builder, const char *str)
Definition: builder.h:324
#define spa_zero(x)
Definition: defs.h:508
SPA_API_POD_BUILDER int spa_pod_builder_prop(struct spa_pod_builder *builder, uint32_t key, uint32_t flags)
Definition: builder.h:494
#define SPA_POD_PROP_FLAG_HINT_DICT
contains a dictionary struct as (Struct( Int : n_items, (String : key, String : value)*)) ...
Definition: pod.h:216
const struct spa_dict_item * items
Definition: dict.h:56
SPA_API_POD_PARSER int spa_pod_parser_get_int(struct spa_pod_parser *parser, int32_t *value)
Definition: parser.h:158
SPA_API_POD_ITER bool spa_pod_prop_is_inside(const struct spa_pod_object_body *body, uint32_t size, const struct spa_pod_prop *iter)
Definition: iter.h:62
struct spa_pod_object_body body
Definition: pod.h:185
SPA_API_TAG_UTILS void spa_tag_build_start(struct spa_pod_builder *builder, struct spa_pod_frame *f, uint32_t id, enum spa_direction direction)
Definition: tag-utils.h:109
enum spa_direction direction
Definition: tag.h:37
SPA_API_TAG_UTILS int spa_tag_parse(const struct spa_pod *tag, struct spa_tag_info *info, void **state)
Definition: tag-utils.h:47
SPA_API_POD_BUILDER int spa_pod_builder_add(struct spa_pod_builder *builder,...)
Definition: builder.h:691
#define spa_pod_parse_object(pod, type, id,...)
Definition: parser.h:586
SPA_API_POD_PARSER int spa_pod_parser_push_struct(struct spa_pod_parser *parser, struct spa_pod_frame *frame)
Definition: parser.h:257
SPA_API_POD_PARSER int spa_pod_parser_get(struct spa_pod_parser *parser,...)
Definition: parser.h:515
direction, input/output (Id enum spa_direction)
Definition: tag.h:27
struct spa_pod pod
Definition: pod.h:184
uint32_t key
key of property, list of valid keys depends on the object type
Definition: pod.h:209
SPA_API_TAG_UTILS int spa_tag_info_parse(const struct spa_tag_info *info, struct spa_dict *dict, struct spa_dict_item *items)
Definition: tag-utils.h:76
uint32_t size
Definition: pod.h:44
#define SPA_API_TAG_UTILS
Definition: tag-utils.h:35
const char * value
Definition: dict.h:43
spa_direction
Definition: defs.h:106
struct spa_pod value
Definition: pod.h:230
#define SPA_POD_Id(val)
Definition: vararg.h:49
uint32_t int int res
Definition: core.h:432
#define SPA_POD_String(val)
Definition: vararg.h:94
#define SPA_POD_SIZE(pod)
Definition: pod.h:30
SPA_API_TAG_UTILS struct spa_pod * spa_tag_build_end(struct spa_pod_builder *builder, struct spa_pod_frame *f)
Definition: tag-utils.h:145
SPA_API_POD_ITER struct spa_pod_prop * spa_pod_prop_next(const struct spa_pod_prop *iter)
Definition: iter.h:71
SPA_API_POD_PARSER void spa_pod_parser_pod(struct spa_pod_parser *parser, const struct spa_pod *pod)
Definition: parser.h:60
SPA_API_POD_ITER struct spa_pod_prop * spa_pod_prop_first(const struct spa_pod_object_body *body)
Definition: iter.h:57
helper structure for managing tag objects
Definition: tag.h:36