mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
link: improve renegotiation
Only suspend an idle node when we need to configure a different format.
This commit is contained in:
parent
910318d71f
commit
3b5a308645
20 changed files with 190 additions and 38 deletions
|
|
@ -59,3 +59,20 @@ spa_format_filter(const struct spa_format *format,
|
|||
|
||||
return res;
|
||||
}
|
||||
|
||||
int
|
||||
spa_format_compare(const struct spa_format *format1,
|
||||
const struct spa_format *format2)
|
||||
{
|
||||
if (format1 == NULL || format2 == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
if (SPA_FORMAT_MEDIA_TYPE(format1) != SPA_FORMAT_MEDIA_TYPE(format2) ||
|
||||
SPA_FORMAT_MEDIA_SUBTYPE(format1) != SPA_FORMAT_MEDIA_SUBTYPE(format2))
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
|
||||
return spa_props_compare(SPA_POD_CONTENTS(struct spa_format, format1),
|
||||
SPA_POD_CONTENTS_SIZE(struct spa_format, format1),
|
||||
SPA_POD_CONTENTS(struct spa_format, format2),
|
||||
SPA_POD_CONTENTS_SIZE(struct spa_format, format2));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue