PipeWire 1.6.8

Loading...
Searching...
No Matches
Dictionary
SPA » Utilities

Dictionary data structure. More...

## Files
file | dict.h
| spa/utils/dict.h

## Data Structures
struct | spa_dict_item
struct | spa_dict

## Macros
#define | SPA_DICT_ITEM(key, value)
#define | SPA_DICT_ITEM_INIT(key, value)
#define | SPA_DICT_FLAG_SORTED (1<<0)
| items are sorted
#define | SPA_DICT(items, n_items)
#define | SPA_DICT_ARRAY(items)
#define | SPA_DICT_ITEMS(...)
#define | SPA_DICT_INIT(items, n_items)
#define | SPA_DICT_INIT_ARRAY(items)
#define | spa_dict_for_each(item, dict)

## Functions
SPA_API_DICT int | spa_dict_item_compare (const void *i1, const void *i2)
SPA_API_DICT void | spa_dict_qsort (struct spa_dict *dict)
SPA_API_DICT const struct spa_dict_item * | spa_dict_lookup_item (const struct spa_dict *dict, const char *key)
SPA_API_DICT const char * | spa_dict_lookup (const struct spa_dict *dict, const char *key)

## Detailed Description

Dictionary data structure.

## Macro Definition Documentation

## ◆ SPA_DICT_ITEM

#define SPA_DICT_ITEM | ( |  | key,
|  |  | value )

Value:
((struct spa_dict_item) { (key), (value) })
spa_dict_item
Definition dict.h:41

Examples
  video-play-fixate.c, video-src-fixate.c, video-src-sync.c, and video-src.c.

## ◆ SPA_DICT_ITEM_INIT

#define SPA_DICT_ITEM_INIT | ( |  | key,
|  |  | value )

Value:
SPA_DICT_ITEM(key,value)
SPA_DICT_ITEM
#define SPA_DICT_ITEM(key, value)
Definition dict.h:47

Examples
  export-source.c, spa/examples/adapter-control.c, video-dsp-src.c, and video-play.c.

## ◆ SPA_DICT_FLAG_SORTED

#define SPA_DICT_FLAG_SORTED (1<<0)

items are sorted

## ◆ SPA_DICT

#define SPA_DICT | ( |  | items,
|  |  | n_items )

Value:
((struct spa_dict) { 0, (n_items), (items) })
spa_dict
Definition dict.h:51

Examples
  video-src-sync.c.

## ◆ SPA_DICT_ARRAY

#define SPA_DICT_ARRAY | ( |  | items | ) |

Value:
SPA_DICT((items),SPA_N_ELEMENTS(items))
SPA_DICT
#define SPA_DICT(items, n_items)
Definition dict.h:60
SPA_N_ELEMENTS
#define SPA_N_ELEMENTS(arr)
Definition defs.h:143

## ◆ SPA_DICT_ITEMS

#define SPA_DICT_ITEMS | ( |  | ... | ) |

Value:
SPA_DICT_ARRAY(((struct spa_dict_item[]) { __VA_ARGS__}))
SPA_DICT_ARRAY
#define SPA_DICT_ARRAY(items)
Definition dict.h:62

Examples
  video-play-fixate.c, video-src-fixate.c, and video-src.c.

## ◆ SPA_DICT_INIT

#define SPA_DICT_INIT | ( |  | items,
|  |  | n_items )

Value:
SPA_DICT(items,n_items)

Examples
  spa/examples/adapter-control.c, video-dsp-src.c, and video-play.c.

## ◆ SPA_DICT_INIT_ARRAY

#define SPA_DICT_INIT_ARRAY | ( |  | items | ) |

Value:
SPA_DICT_ARRAY(items)

Examples
  export-source.c, and spa/examples/local-libcamera.c.

## ◆ spa_dict_for_each

#define spa_dict_for_each | ( |  | item,
|  |  | dict )

Examples
  tutorial6.c, video-play-fixate.c, video-play.c, and video-src-fixate.c.

## Function Documentation

## ◆ spa_dict_item_compare()

SPA_API_DICT int spa_dict_item_compare | ( | const void * | i1,
|  | const void * | i2 )

## ◆ spa_dict_qsort()

SPA_API_DICT void spa_dict_qsort | ( | struct spa_dict * | dict | ) |

## ◆ spa_dict_lookup_item()

SPA_API_DICT const struct spa_dict_item * spa_dict_lookup_item | ( | const struct spa_dict * | dict,
|  | const char * | key )

## ◆ spa_dict_lookup()

SPA_API_DICT const char * spa_dict_lookup | ( | const struct spa_dict * | dict,
|  | const char * | key )