[FFmpeg-devel] [PATCH 3/8] sbc: add raw demuxer for SBC
Carl Eugen Hoyos
ceffmpeg at gmail.com
Mon Dec 18 01:19:06 EET 2017
2017-12-17 22:47 GMT+01:00 Aurelien Jacobs <aurel at gnuage.org>:
> +#if CONFIG_SBC_DEMUXER
> +AVInputFormat ff_sbc_demuxer = {
> + .name = "sbc",
> + .long_name = NULL_IF_CONFIG_SMALL("raw SBC (low-complexity subband codec)"),
> + .extensions = "sbc",
> + .raw_codec_id = AV_CODEC_ID_SBC,
> + .read_header = ff_raw_audio_read_header,
> + .read_packet = ff_raw_read_partial_packet,
> + .flags = AVFMT_GENERIC_INDEX,
> +};
> +#endif
> +
> +#if CONFIG_MSBC_DEMUXER
> +AVInputFormat ff_msbc_demuxer = {
> + .name = "msbc",
> + .long_name = NULL_IF_CONFIG_SMALL("raw mSBC (wideband speech mono SBC)"),
> + .extensions = "msbc",
> + .raw_codec_id = AV_CODEC_ID_MSBC,
> + .read_header = ff_raw_audio_read_header,
> + .read_packet = ff_raw_read_partial_packet,
> + .flags = AVFMT_GENERIC_INDEX,
> +};
If auto-detection is impossible, this could be moved into
libavformat/rawdec.c.
> +#endif
> diff --git a/libavformat/utils.c b/libavformat/utils.c
> index 84e49208b8..860fbc30c9 100644
> --- a/libavformat/utils.c
> +++ b/libavformat/utils.c
> @@ -336,6 +336,7 @@ static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st,
> { "mjpeg_2000",AV_CODEC_ID_JPEG2000, AVMEDIA_TYPE_VIDEO },
> { "mp3", AV_CODEC_ID_MP3, AVMEDIA_TYPE_AUDIO },
> { "mpegvideo", AV_CODEC_ID_MPEG2VIDEO, AVMEDIA_TYPE_VIDEO },
> + { "sbc", AV_CODEC_ID_SBC, AVMEDIA_TYPE_AUDIO },
I believe this line should not be added.
Carl Eugen
More information about the ffmpeg-devel
mailing list