mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-26 01:40:28 -05:00
pulse-server: add stream/device state in dev_info
Also include and update the state of the device/stream in collect_device_info so that we can compare it against the previous value and emit a change event. Fixes #3660
This commit is contained in:
parent
90bd9adb6b
commit
0c857f5455
3 changed files with 19 additions and 28 deletions
|
|
@ -42,6 +42,7 @@ void update_object_info(struct pw_manager *manager, struct pw_manager_object *o,
|
|||
|
||||
struct device_info {
|
||||
uint32_t direction;
|
||||
int state;
|
||||
|
||||
struct sample_spec ss;
|
||||
struct channel_map map;
|
||||
|
|
@ -59,6 +60,7 @@ struct device_info {
|
|||
#define DEVICE_INFO_INIT(_dir) \
|
||||
(struct device_info) { \
|
||||
.direction = _dir, \
|
||||
.state = STATE_INIT, \
|
||||
.ss = SAMPLE_SPEC_INIT, \
|
||||
.map = CHANNEL_MAP_INIT, \
|
||||
.volume_info = VOLUME_INFO_INIT, \
|
||||
|
|
@ -146,6 +148,5 @@ uint32_t find_port_index(struct pw_manager_object *card, uint32_t direction, con
|
|||
struct pw_manager_object *find_peer_for_link(struct pw_manager *m,
|
||||
struct pw_manager_object *o, uint32_t id, enum pw_direction direction);
|
||||
struct pw_manager_object *find_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction);
|
||||
bool collect_is_linked(struct pw_manager *m, uint32_t id, enum pw_direction direction);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue