mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
Remove port
Remove the port object. We don't use it as a dbus object and we don't need it, we can use the link and node object directy. Move poll code and event handler to the node.
This commit is contained in:
parent
463954a299
commit
7d3e46e7f9
22 changed files with 689 additions and 1848 deletions
|
|
@ -958,6 +958,10 @@ write_format (void *p, const SpaFormat *format)
|
|||
tf = p;
|
||||
tf->media_type = format->media_type;
|
||||
tf->media_subtype = format->media_subtype;
|
||||
tf->mem.mem.pool_id = SPA_ID_INVALID;
|
||||
tf->mem.mem.id = SPA_ID_INVALID;
|
||||
tf->mem.offset = 0;
|
||||
tf->mem.size = 0;
|
||||
|
||||
p = SPA_MEMBER (tf, offsetof (SpaFormat, props), void);
|
||||
return write_props (p, &format->props, sizeof (SpaFormat));
|
||||
|
|
@ -971,6 +975,9 @@ write_port_info (void *p, const SpaPortInfo *info)
|
|||
int i;
|
||||
size_t len;
|
||||
|
||||
if (info == NULL)
|
||||
return 0;
|
||||
|
||||
tp = p;
|
||||
memcpy (tp, info, sizeof (SpaPortInfo));
|
||||
|
||||
|
|
@ -1086,8 +1093,11 @@ builder_add_set_format (struct stack_builder *sb, SpaControlCmdSetFormat *sf)
|
|||
sf = p;
|
||||
|
||||
p = SPA_MEMBER (sf, sizeof (SpaControlCmdSetFormat), void);
|
||||
len = write_format (p, sf->format);
|
||||
sf->format = SPA_INT_TO_PTR (SPA_PTRDIFF (p, sf));
|
||||
if (sf->format) {
|
||||
len = write_format (p, sf->format);
|
||||
sf->format = SPA_INT_TO_PTR (SPA_PTRDIFF (p, sf));
|
||||
} else
|
||||
sf->format = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -159,6 +159,8 @@ spa_debug_dump_mem (const void *mem, size_t size)
|
|||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
if (i % 16 == 0)
|
||||
printf ("%p: ", &t[i]);
|
||||
printf ("%02x ", t[i]);
|
||||
if (i % 16 == 15 || i == size - 1)
|
||||
printf ("\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue