Skip to content

gst-libav: Add G.723.1 decoding support

Currently, there is a G.723.1 decoder made available by gst-libav, but the decoder has its CAPS set to "unknown/unknown". In addition, the decoder does not properly parse subframes; if a chunk of data is fed to the decoder that doesn't end with a complete G.723.1 frame, the incomplete frame will be silently discarded by the decoder.

This merge request rectifies the problem by:

  • ... correcting the CAPS emitted by the G.723.1 decoder.
  • ... introducing infrastructure to allow ffmpeg codec parsers to be used in gstreamer.
  • ... adding a G.723.1 codec parser using the aforementioned infrastructure.

One interesting side point is that the new parsers emit source pad CAPS with a framed attribute set to TRUE. While the ffmpeg decoders included in gstreamer don't have a framed attribute set to TRUE in their sink CAPS, they almost certainly should, as most ffmpeg decoders expect that the AVFrame instances they receive will each contain a complete frame. There is a mechanism wherein ffmpeg decoders can indicate that they can parse subframes (by adding AV_CODEC_CAP_SUBFRAMES to their capabilities field), but even those decoders seem to expect that the data contained by any AVFrame instance they receive will end on a frame boundary.

Merge request reports