mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-12 04:28:02 -05:00
pulse-server: add quirk to block record and playback streams
Add aquirk to block any record or playback stream.
This commit is contained in:
parent
4b9db9492e
commit
ca488a5dcc
4 changed files with 18 additions and 0 deletions
|
|
@ -1726,6 +1726,9 @@ static int do_create_playback_stream(struct client *client, uint32_t command, ui
|
|||
if (n_valid_formats == 0)
|
||||
goto error_no_formats;
|
||||
|
||||
if (client->quirks & QUIRK_BLOCK_PLAYBACK_STREAM)
|
||||
goto error_no_permission;
|
||||
|
||||
stream = stream_new(client, STREAM_TYPE_PLAYBACK, tag, &ss, &map, &attr);
|
||||
if (stream == NULL)
|
||||
goto error_errno;
|
||||
|
|
@ -1798,6 +1801,9 @@ error_protocol:
|
|||
error_no_formats:
|
||||
res = -ENOTSUP;
|
||||
goto error;
|
||||
error_no_permission:
|
||||
res = -EPERM;
|
||||
goto error;
|
||||
error_invalid:
|
||||
res = -EINVAL;
|
||||
goto error;
|
||||
|
|
@ -1992,6 +1998,9 @@ static int do_create_record_stream(struct client *client, uint32_t command, uint
|
|||
if (n_valid_formats == 0)
|
||||
goto error_no_formats;
|
||||
|
||||
if (client->quirks & QUIRK_BLOCK_RECORD_STREAM)
|
||||
goto error_no_permission;
|
||||
|
||||
stream = stream_new(client, STREAM_TYPE_RECORD, tag, &ss, &map, &attr);
|
||||
if (stream == NULL)
|
||||
goto error_errno;
|
||||
|
|
@ -2078,6 +2087,9 @@ error_protocol:
|
|||
error_no_formats:
|
||||
res = -ENOTSUP;
|
||||
goto error;
|
||||
error_no_permission:
|
||||
res = -EPERM;
|
||||
goto error;
|
||||
error_invalid:
|
||||
res = -EINVAL;
|
||||
goto error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue