context: improve introspection

When subscribing, always bind to all objects we are interested in.
Wait until all info is collected and then reply to introspection
requests.
This commit is contained in:
Wim Taymans 2019-03-15 20:31:20 +01:00
parent 49c99f8dee
commit 571cb214d5
6 changed files with 492 additions and 446 deletions

View file

@ -203,6 +203,13 @@ struct pa_mainloop {
int n_events;
};
struct param {
struct spa_list link;
uint32_t id;
int seq;
void *param;
};
#define PA_SUBSCRIPTION_MASK_DSP_SINK 0x1000U
#define PA_SUBSCRIPTION_MASK_DSP_SOURCE 0x2000U
#define PA_SUBSCRIPTION_MASK_DSP (PA_SUBSCRIPTION_MASK_DSP_SINK | PA_SUBSCRIPTION_MASK_DSP_SOURCE)
@ -212,12 +219,14 @@ struct global {
uint32_t id;
uint32_t parent_id;
uint32_t type;
int init:1;
struct pw_properties *props;
pa_context *context;
pa_subscription_mask_t mask;
pa_subscription_event_type_t event;
struct spa_list operations;
int pending_seq;
void *info;
pw_destroy_t destroy;
@ -239,10 +248,13 @@ struct global {
/* for sink/source */
struct {
uint32_t monitor;
float volume;
bool mute;
} node_info;
/* for devices */
struct {
struct pw_array profiles;
struct spa_list profiles;
uint32_t n_profiles;
uint32_t active_profile;
pa_card_info info;
} card_info;
@ -392,9 +404,6 @@ struct pa_operation
pa_context *context;
pa_stream *stream;
struct spa_list owner_link;
struct global *owner;
int seq;
pa_operation_state_t state;