mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-21 08:56:56 -05:00
Add core introspection
Use global ids in info messages to refer to global objects.
This commit is contained in:
parent
0d0385b881
commit
8ce3f949e2
10 changed files with 102 additions and 9 deletions
|
|
@ -103,8 +103,31 @@ core_dispatch_func (void *object,
|
|||
{
|
||||
PinosContextImpl *impl = data;
|
||||
PinosContext *this = &impl->this;
|
||||
PinosProxy *proxy = object;
|
||||
|
||||
switch (type) {
|
||||
case PINOS_MESSAGE_CORE_INFO:
|
||||
{
|
||||
PinosMessageCoreInfo *m = message;
|
||||
PinosSubscriptionEvent event;
|
||||
|
||||
pinos_log_debug ("got core info %d", type);
|
||||
if (proxy->user_data == NULL)
|
||||
event = PINOS_SUBSCRIPTION_EVENT_NEW;
|
||||
else
|
||||
event = PINOS_SUBSCRIPTION_EVENT_CHANGE;
|
||||
|
||||
proxy->user_data = pinos_core_info_update (proxy->user_data, m->info);
|
||||
|
||||
if (impl->subscribe_func) {
|
||||
impl->subscribe_func (this,
|
||||
event,
|
||||
proxy->type,
|
||||
proxy->id,
|
||||
impl->subscribe_data);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case PINOS_MESSAGE_NOTIFY_DONE:
|
||||
{
|
||||
PinosMessageNotifyDone *nd = message;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue