[FFmpeg-devel] [PATCH] aea demuxer
Michael Niedermayer
michaelni
Tue Aug 11 14:58:42 CEST 2009
On Mon, Aug 10, 2009 at 11:15:05PM +0200, Benjamin Larsson wrote:
> Michael Niedermayer wrote:
> > On Mon, Jun 08, 2009 at 09:32:43PM +0200, Benjamin Larsson wrote:
> >> Simple demuxer for a simple format. Header parsing will be added when I
> >> get the specification. For now it will only be able to decode stereo
> >> streams.
> >>
> >> MvH
> >> Benjamin Larsson
> >
> >> Makefile | 1
> >> aea.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >> allformats.c | 1
> >> 3 files changed, 91 insertions(+)
> >> c331cf1a63bfa21d8ed7ba6cea5d474a12ed48d2 aea_demuxer.diff
> >> Index: libavformat/Makefile
> >> ===================================================================
> >> --- libavformat/Makefile (revision 18866)
> >> +++ libavformat/Makefile (working copy)
> >> @@ -12,6 +12,7 @@
> >> OBJS-$(CONFIG_AC3_DEMUXER) += raw.o
> >> OBJS-$(CONFIG_AC3_MUXER) += raw.o
> >> OBJS-$(CONFIG_ADTS_MUXER) += adtsenc.o
> >> +OBJS-$(CONFIG_AEA_DEMUXER) += aea.o
> >> OBJS-$(CONFIG_AIFF_DEMUXER) += aiff.o riff.o raw.o
> >> OBJS-$(CONFIG_AIFF_MUXER) += aiff.o riff.o
> >> OBJS-$(CONFIG_AMR_DEMUXER) += amr.o
> >> Index: libavformat/allformats.c
> >> ===================================================================
> >> --- libavformat/allformats.c (revision 18866)
> >> +++ libavformat/allformats.c (working copy)
> >> @@ -50,6 +50,7 @@
> >> REGISTER_DEMUXER (AAC, aac);
> >> REGISTER_MUXDEMUX (AC3, ac3);
> >> REGISTER_MUXER (ADTS, adts);
> >> + REGISTER_DEMUXER (AEA, aea);
> >> REGISTER_MUXDEMUX (AIFF, aiff);
> >> REGISTER_MUXDEMUX (AMR, amr);
> >> REGISTER_DEMUXER (APC, apc);
> >> Index: libavformat/aea.c
> >> ===================================================================
> >> --- libavformat/aea.c (revision 0)
> >> +++ libavformat/aea.c (revision 0)
> >> @@ -0,0 +1,89 @@
> >> +/*
> >> + * MD STUDIO audio demuxer
> >> + *
> >> + * Copyright (c) 2009 Benjamin Larsson
> >> + *
> >> + * This file is part of FFmpeg.
> >> + *
> >> + * FFmpeg 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.
> >> + *
> >> + * FFmpeg 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 FFmpeg; if not, write to the Free Software
> >> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> >> + */
> >> +
> >> +/**
> >> + * @file libavformat/aea.c
> >> + */
> >> +
> >> +#include "avformat.h"
> >> +#include "raw.h"
> >> +
> >> +#define AT1_SU_SIZE 212
> >> +
> >
> >> +static int aea_read_probe(AVProbeData *p)
> >
> > you dont need the aea prefixes
> >
> >
> >> +{
> >> + /* Magic is '00 08 00 00' */
> >> + if(*(p->buf) != 0 || *(p->buf+1) != 8 || *(p->buf+2) != 0 || *(p->buf+3) != 0)
> >> + return 0;
> >
> > AV_RB32() != ...
> >
> > and testing more is a good idea if possible
> >
>
> Attached is the latest version of the demuxer. It works with the latest
> version of the atrac decoder patch. To do a better match I would need to
> look at 2048+212 bytes before I would be quite sure. Is it ok to use
> that much to identify a file ?
yes
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090811/da550770/attachment.pgp>
More information about the ffmpeg-devel
mailing list