mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
prop-builder: add helper to make properties and formats
Use this to make a format filter. Use the filter to negotiate a format automatically.
This commit is contained in:
parent
c433df9d32
commit
808d6b6fca
11 changed files with 590 additions and 13 deletions
|
|
@ -429,6 +429,7 @@ spa_videotestsrc_node_port_enum_formats (SpaNode *node,
|
|||
{
|
||||
SpaVideoTestSrc *this;
|
||||
SpaResult res;
|
||||
SpaFormat *fmt;
|
||||
|
||||
if (node == NULL || format == NULL)
|
||||
return SPA_RESULT_INVALID_ARGUMENTS;
|
||||
|
|
@ -465,10 +466,11 @@ spa_videotestsrc_node_port_enum_formats (SpaNode *node,
|
|||
default:
|
||||
return SPA_RESULT_ENUM_END;
|
||||
}
|
||||
if ((res = spa_format_video_filter (&this->query_format, filter)) != SPA_RESULT_OK)
|
||||
|
||||
if ((res = spa_format_filter (&this->query_format.format, filter, &fmt)) != SPA_RESULT_OK)
|
||||
return res;
|
||||
|
||||
*format = &this->query_format.format;
|
||||
*format = fmt;
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue