mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
indent
This commit is contained in:
parent
d1a06ae247
commit
5b037661d9
154 changed files with 21017 additions and 23044 deletions
|
|
@ -28,34 +28,34 @@
|
|||
#include <lib/mapper.h>
|
||||
|
||||
int
|
||||
spa_format_filter (const struct spa_format *format,
|
||||
const struct spa_format *filter,
|
||||
struct spa_pod_builder *result)
|
||||
spa_format_filter(const struct spa_format *format,
|
||||
const struct spa_format *filter,
|
||||
struct spa_pod_builder *result)
|
||||
{
|
||||
struct spa_pod_frame f;
|
||||
int res;
|
||||
struct spa_pod_frame f;
|
||||
int res;
|
||||
|
||||
if (format == NULL || result == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
if (format == NULL || result == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
||||
if (filter == NULL) {
|
||||
spa_pod_builder_raw_padded (result, format, SPA_POD_SIZE (format));
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
if (filter == NULL) {
|
||||
spa_pod_builder_raw_padded(result, format, SPA_POD_SIZE(format));
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
||||
if (SPA_FORMAT_MEDIA_TYPE (filter) != SPA_FORMAT_MEDIA_TYPE (format) ||
|
||||
SPA_FORMAT_MEDIA_SUBTYPE (filter) != SPA_FORMAT_MEDIA_SUBTYPE (format))
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
if (SPA_FORMAT_MEDIA_TYPE(filter) != SPA_FORMAT_MEDIA_TYPE(format) ||
|
||||
SPA_FORMAT_MEDIA_SUBTYPE(filter) != SPA_FORMAT_MEDIA_SUBTYPE(format))
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
|
||||
spa_pod_builder_push_format (result, &f, filter->body.obj_body.type,
|
||||
SPA_FORMAT_MEDIA_TYPE (filter),
|
||||
SPA_FORMAT_MEDIA_SUBTYPE (filter));
|
||||
res = spa_props_filter (result,
|
||||
SPA_POD_CONTENTS (struct spa_format, format),
|
||||
SPA_POD_CONTENTS_SIZE (struct spa_format, format),
|
||||
SPA_POD_CONTENTS (struct spa_format, filter),
|
||||
SPA_POD_CONTENTS_SIZE (struct spa_format, filter));
|
||||
spa_pod_builder_pop (result, &f);
|
||||
spa_pod_builder_push_format(result, &f, filter->body.obj_body.type,
|
||||
SPA_FORMAT_MEDIA_TYPE(filter),
|
||||
SPA_FORMAT_MEDIA_SUBTYPE(filter));
|
||||
res = spa_props_filter(result,
|
||||
SPA_POD_CONTENTS(struct spa_format, format),
|
||||
SPA_POD_CONTENTS_SIZE(struct spa_format, format),
|
||||
SPA_POD_CONTENTS(struct spa_format, filter),
|
||||
SPA_POD_CONTENTS_SIZE(struct spa_format, filter));
|
||||
spa_pod_builder_pop(result, &f);
|
||||
|
||||
return res;
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue