mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-05 13:30:02 -05:00
stream: only set portconfig on audio formats
This commit is contained in:
parent
e9b62c0ce6
commit
cc0be0d606
1 changed files with 25 additions and 13 deletions
|
|
@ -136,6 +136,11 @@ static int stream_set_active(struct stream *stream, bool active)
|
|||
|
||||
if (active) {
|
||||
stream->format = node->format;
|
||||
|
||||
switch (stream->format.media_type) {
|
||||
case SPA_MEDIA_TYPE_audio:
|
||||
switch (stream->format.media_subtype) {
|
||||
case SPA_MEDIA_SUBTYPE_raw:
|
||||
stream->format.info.raw.rate = 48000;
|
||||
|
||||
spa_pod_builder_init(&b, buf, sizeof(buf));
|
||||
|
|
@ -152,6 +157,13 @@ static int stream_set_active(struct stream *stream, bool active)
|
|||
|
||||
pw_node_set_param((struct pw_node*)node->obj->obj.proxy,
|
||||
SPA_PARAM_PortConfig, 0, param);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
stream->active = active;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue