mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
Add more generic export-spa example
Replace the v4l2 example with a more generic version that can add any spa node to a remote graph Make the dictionary items const Add some info to nodes and factories. Add the node info to the node properties. We can then set the media.class directly on the node, instead of letting the monitor set it. Debug node info in spa-inspect. Do async operation on the audiotestsrc and videotestsrc differently.
This commit is contained in:
parent
21cd5a2918
commit
dc85a79786
19 changed files with 190 additions and 92 deletions
|
|
@ -38,7 +38,7 @@ struct spa_dict_item {
|
|||
|
||||
struct spa_dict {
|
||||
uint32_t n_items;
|
||||
struct spa_dict_item *items;
|
||||
const struct spa_dict_item *items;
|
||||
};
|
||||
|
||||
#define SPA_DICT_INIT(n_items,items) { n_items, items }
|
||||
|
|
@ -48,10 +48,10 @@ struct spa_dict {
|
|||
(item) < &(dict)->items[(dict)->n_items]; \
|
||||
(item)++)
|
||||
|
||||
static inline struct spa_dict_item *spa_dict_lookup_item(const struct spa_dict *dict,
|
||||
const char *key)
|
||||
static inline const struct spa_dict_item *spa_dict_lookup_item(const struct spa_dict *dict,
|
||||
const char *key)
|
||||
{
|
||||
struct spa_dict_item *item;
|
||||
const struct spa_dict_item *item;
|
||||
spa_dict_for_each(item, dict) {
|
||||
if (!strcmp(item->key, key))
|
||||
return item;
|
||||
|
|
@ -61,7 +61,7 @@ static inline struct spa_dict_item *spa_dict_lookup_item(const struct spa_dict *
|
|||
|
||||
static inline const char *spa_dict_lookup(const struct spa_dict *dict, const char *key)
|
||||
{
|
||||
struct spa_dict_item *item = spa_dict_lookup_item(dict, key);
|
||||
const struct spa_dict_item *item = spa_dict_lookup_item(dict, key);
|
||||
return item ? item->value : NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue