Draft: audio: add Symphonia based parsers and decoders
This MR aims at adding Symphonia
based audio parsers and decoders for the containers and codecs with "excellent" support status.
Fixes #156
Progress
-
Implement FLAC & MP3 decoders. -
Fix above decoders with initial feedback. -
Implement a Vorbis decoder. -
Implement a Wave parser? -
Implement an audio converter?
Postponed for another MR
[ ] Get upstream improvements merged.[ ] Take care of release constraints due to a potential breaking change.
Note about decoders src Caps
Symphonia
comes with a built-in mechanism to export the unpadded sample buffers. This mechanism allows selecting the target sample format as well as the channels layout. I thought that was a good opportunity to make the decoders flexible. Caps negotiation with decoders' downstream element starts with the list of possible formats (the input format always appearing first) as well as channels layout variants. Since the initial Caps filter is not fixed, I couldn't rely on gst_audio::AudioDecoder::set_ouput_format
to delegate Caps negotiation, so it's mostly handled manually by the decoders impl. I'm unsure if the way I implemented this is valid and optimal.