mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
Add flags to set_format
Use flags to control the behaviour of set_format Move poll into separate file
This commit is contained in:
parent
b9320c67c2
commit
96df59274c
11 changed files with 146 additions and 97 deletions
|
|
@ -331,10 +331,10 @@ spa_v4l2_source_node_port_enum_formats (SpaHandle *handle,
|
|||
}
|
||||
|
||||
static SpaResult
|
||||
spa_v4l2_source_node_port_set_format (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
bool test_only,
|
||||
const SpaFormat *format)
|
||||
spa_v4l2_source_node_port_set_format (SpaHandle *handle,
|
||||
uint32_t port_id,
|
||||
SpaPortFormatFlags flags,
|
||||
const SpaFormat *format)
|
||||
{
|
||||
SpaV4l2Source *this = (SpaV4l2Source *) handle;
|
||||
SpaV4l2State *state;
|
||||
|
|
@ -368,10 +368,10 @@ spa_v4l2_source_node_port_set_format (SpaHandle *handle,
|
|||
} else
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
|
||||
if (spa_v4l2_set_format (this, f, test_only) < 0)
|
||||
if (spa_v4l2_set_format (this, f, flags & SPA_PORT_FORMAT_FLAG_TEST_ONLY) < 0)
|
||||
return SPA_RESULT_INVALID_MEDIA_TYPE;
|
||||
|
||||
if (!test_only) {
|
||||
if (!(flags & SPA_PORT_FORMAT_FLAG_TEST_ONLY)) {
|
||||
memcpy (tf, f, fs);
|
||||
state->current_format = tf;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue