mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: libcamera: encode device ids into a json array
This commit is contained in:
parent
68916e062b
commit
4d3d15aebe
1 changed files with 4 additions and 2 deletions
|
|
@ -155,10 +155,12 @@ static int emit_info(struct impl *impl, bool full)
|
|||
if (!device_numbers.empty()) {
|
||||
spa_strbuf_init(&buf, devices_str, sizeof(devices_str));
|
||||
|
||||
/* created a space separated string of all the device numbers */
|
||||
for (int64_t device_number : device_numbers)
|
||||
/* encode device numbers into a json array */
|
||||
spa_strbuf_append(&buf, "[ ");
|
||||
for(int64_t device_number : device_numbers)
|
||||
spa_strbuf_append(&buf, "%" PRId64 " ", device_number);
|
||||
|
||||
spa_strbuf_append(&buf, "]");
|
||||
ADD_ITEM(SPA_KEY_DEVICE_DEVIDS, devices_str);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue