On 24/11/15 01:00, Vittorio Giovara wrote:
> From: Paul B Mahol <[email protected]>
>
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
> Changelog | 1 +
> libavformat/Makefile | 1 +
> libavformat/allformats.c | 1 +
> libavformat/genh.c | 219
> +++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 222 insertions(+)
> create mode 100644 libavformat/genh.c
>
> diff --git a/Changelog b/Changelog
> index 26e27b9..54957f9 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -51,6 +51,7 @@ version <next>:
> - G.723.1 muxer
> - G.729 demuxer
> - GIF demuxer
> +- GENH demuxer
>
>
> version 11:
> diff --git a/libavformat/Makefile b/libavformat/Makefile
> index 2d2cb51..a0111a7 100644
> --- a/libavformat/Makefile
> +++ b/libavformat/Makefile
> @@ -141,6 +141,7 @@ OBJS-$(CONFIG_G722_MUXER) += rawenc.o
> OBJS-$(CONFIG_G723_1_DEMUXER) += g723_1.o
> OBJS-$(CONFIG_G723_1_MUXER) += rawenc.o
> OBJS-$(CONFIG_G729_DEMUXER) += g729dec.o
> +OBJS-$(CONFIG_GENH_DEMUXER) += genh.o
> OBJS-$(CONFIG_H261_DEMUXER) += h261dec.o rawdec.o
> OBJS-$(CONFIG_H261_MUXER) += rawenc.o
> OBJS-$(CONFIG_H263_DEMUXER) += h263dec.o rawdec.o
> diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> index aec72ad..7c49d4a 100644
> --- a/libavformat/allformats.c
> +++ b/libavformat/allformats.c
> @@ -113,6 +113,7 @@ void av_register_all(void)
> REGISTER_MUXDEMUX(G722, g722);
> REGISTER_MUXDEMUX(G723_1, g723_1);
> REGISTER_DEMUXER (G729, g729);
> + REGISTER_DEMUXER (GENH, genh);
> REGISTER_MUXDEMUX(GIF, gif);
> REGISTER_DEMUXER (GSM, gsm);
> REGISTER_MUXDEMUX(GXF, gxf);
> diff --git a/libavformat/genh.c b/libavformat/genh.c
> new file mode 100644
> index 0000000..9196a96
> --- /dev/null
> +++ b/libavformat/genh.c
> @@ -0,0 +1,219 @@
> +/*
> + * GENH demuxer
> + * Copyright (c) 2015 Paul B Mahol
> + *
> + * This file is part of Libav.
> + *
> + * Libav is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * Libav is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with Libav; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
> USA
> + */
> +
> +// TODO: cherry
> +#define AV_CODEC_ID_ADPCM_PSX 0
> +#define AV_CODEC_ID_ADPCM_DTK 1
> +
> +#include "libavutil/channel_layout.h"
> +#include "libavutil/intreadwrite.h"
> +
> +#include "avformat.h"
> +#include "internal.h"
> +
> +typedef struct GENHDemuxContext {
> + unsigned dsp_int_type;
It has a single value of 1 meaning interleaved data in some way...
> + unsigned interleave_size;
> +} GENHDemuxContext;
> +
> +static int genh_probe(AVProbeData *p)
> +{
What if buf is smaller than 4 ?
Please feed it to uncrustify.
Beside that seems ok.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel