mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
gst: Accept MP3 and FLAC for compressed sink
This commit is contained in:
parent
6a034cc398
commit
92344bf8ac
2 changed files with 16 additions and 0 deletions
|
|
@ -59,6 +59,8 @@ static const struct media_type media_type_map[] = {
|
|||
{ "video/x-h264", SPA_MEDIA_TYPE_video, SPA_MEDIA_SUBTYPE_h264 },
|
||||
{ "audio/x-mulaw", SPA_MEDIA_TYPE_audio, SPA_MEDIA_SUBTYPE_raw },
|
||||
{ "audio/x-alaw", SPA_MEDIA_TYPE_audio, SPA_MEDIA_SUBTYPE_raw },
|
||||
{ "audio/mpeg", SPA_MEDIA_TYPE_audio, SPA_MEDIA_SUBTYPE_mp3 },
|
||||
{ "audio/x-flac", SPA_MEDIA_TYPE_audio, SPA_MEDIA_SUBTYPE_flac },
|
||||
{ NULL, }
|
||||
};
|
||||
|
||||
|
|
@ -532,6 +534,12 @@ handle_audio_fields (ConvertData *d)
|
|||
} else if (strcmp(d->type->name, "audio/x-alaw") == 0) {
|
||||
spa_pod_builder_prop (&d->b, SPA_FORMAT_AUDIO_format, 0);
|
||||
spa_pod_builder_id (&d->b, SPA_AUDIO_FORMAT_ALAW);
|
||||
} else if (strcmp(d->type->name, "audio/mpeg") == 0) {
|
||||
spa_pod_builder_prop (&d->b, SPA_FORMAT_AUDIO_format, 0);
|
||||
spa_pod_builder_id (&d->b, SPA_AUDIO_FORMAT_ENCODED);
|
||||
} else if (strcmp(d->type->name, "audio/x-flac") == 0) {
|
||||
spa_pod_builder_prop (&d->b, SPA_FORMAT_AUDIO_format, 0);
|
||||
spa_pod_builder_id (&d->b, SPA_AUDIO_FORMAT_ENCODED);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue