mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
spa: make a function to make a channel short name
Make a function that can generate and parse a short name for the positions that are not in the type list, like the AUX channels.
This commit is contained in:
parent
7177f8269d
commit
11f1298f53
16 changed files with 74 additions and 38 deletions
|
|
@ -514,6 +514,7 @@ static void make_stream_ports(struct stream *s)
|
|||
for (i = 0; i < s->n_ports; i++) {
|
||||
struct port *port = s->ports[i];
|
||||
char *link_port = NULL;
|
||||
char pos[8];
|
||||
|
||||
if (port != NULL) {
|
||||
s->ports[i] = NULL;
|
||||
|
|
@ -523,8 +524,9 @@ static void make_stream_ports(struct stream *s)
|
|||
}
|
||||
|
||||
if (i < s->info.channels) {
|
||||
str = spa_debug_type_find_short_name(spa_type_audio_channel,
|
||||
spa_format_audio_raw_get_position(&s->info, i));
|
||||
str = spa_type_audio_channel_make_short_name(
|
||||
spa_format_audio_raw_get_position(&s->info, i),
|
||||
pos, sizeof(pos), NULL);
|
||||
if (str)
|
||||
snprintf(name, sizeof(name), "%s_%s", prefix, str);
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue