mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
global: place object.serial in object info
Make a method to return or allocate the serial for a global. When the global is unregistered, a new serial is calculated. Place the serial in the object info and the global info.
This commit is contained in:
parent
53548aee75
commit
e7f9046bb8
15 changed files with 51 additions and 6 deletions
|
|
@ -305,6 +305,7 @@ int endpoint_init(struct endpoint *this,
|
|||
struct pw_properties *properties)
|
||||
{
|
||||
static const char * const keys[] = {
|
||||
PW_KEY_OBJECT_SERIAL,
|
||||
PW_KEY_FACTORY_ID,
|
||||
PW_KEY_CLIENT_ID,
|
||||
PW_KEY_DEVICE_ID,
|
||||
|
|
@ -333,6 +334,8 @@ int endpoint_init(struct endpoint *this,
|
|||
|
||||
pw_properties_setf(this->props, PW_KEY_OBJECT_ID, "%u",
|
||||
pw_global_get_id(this->global));
|
||||
pw_properties_setf(this->props, PW_KEY_OBJECT_SERIAL, "%"PRIu64,
|
||||
pw_global_get_serial(this->global));
|
||||
|
||||
this->info.version = PW_VERSION_ENDPOINT_INFO;
|
||||
this->info.id = pw_global_get_id(this->global);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue