mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-26 07:58:03 -04:00
pipewire: device: Add a send_command method
For now, useful for sending custom commands to devices. Using this from
the command line might look something like:
```sh
$ pw-cli send-command <device-id> VolumeControl '{"volumeUp": <route-id>}'
```
This commit is contained in:
parent
0294e06a80
commit
00bdbed780
6 changed files with 115 additions and 7 deletions
|
|
@ -153,6 +153,7 @@ static void test_device_abi(void)
|
|||
const struct spa_pod *filter);
|
||||
int (*set_param) (void *object, uint32_t id, uint32_t flags,
|
||||
const struct spa_pod *param);
|
||||
int (*send_command) (void *object, const struct spa_command *command);
|
||||
} methods = { PW_VERSION_DEVICE_METHODS, };
|
||||
struct {
|
||||
uint32_t version;
|
||||
|
|
@ -167,7 +168,8 @@ static void test_device_abi(void)
|
|||
TEST_FUNC(m, methods, subscribe_params);
|
||||
TEST_FUNC(m, methods, enum_params);
|
||||
TEST_FUNC(m, methods, set_param);
|
||||
spa_assert_se(PW_VERSION_DEVICE_METHODS == 0);
|
||||
TEST_FUNC(m, methods, send_command);
|
||||
spa_assert_se(PW_VERSION_DEVICE_METHODS == 1);
|
||||
spa_assert_se(sizeof(m) == sizeof(methods));
|
||||
|
||||
TEST_FUNC(e, events, version);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue