[FFmpeg-devel] [PATCH] [2/2] add the id3v2 parsing for adts aac, take 4
Michael Niedermayer
michaelni
Wed Jun 17 21:38:45 CEST 2009
On Wed, Jun 17, 2009 at 09:29:04AM +0200, Patrick Dehne wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
>
> > On Fri, Jun 12, 2009 at 11:02:56PM +0200, Patrick Dehne wrote:
> >> Michael Niedermayer <michaelni at gmx.at> writes:
> >>
> >> > On Fri, Jun 12, 2009 at 10:32:50AM +0200, Patrick Dehne wrote:
> >> >
> >> > [...]
> >> >> +/* 'buf' must be ID3v1_TAG_SIZE byte long */
> >> >> +static int parse_tag(AVFormatContext *s, const uint8_t *buf)
> >> >
> >> > comment is not doxygen compatible
> >>
> >> fixed
> > [...]
> >> Index: libavformat/raw.c
> >> ===================================================================
> >> --- libavformat/raw.c (revision 19171)
> >> +++ libavformat/raw.c (working copy)
> >> @@ -27,6 +27,7 @@
> >> #include "avformat.h"
> >> #include "raw.h"
> >> #include "id3v2.h"
> >> +#include "id3v1.h"
> >>
> >> /* simple formats */
> >>
> >> @@ -625,6 +626,26 @@
> >> else if(max_frames>=1) return 1;
> >> else return 0;
> >> }
> >> +
> >> +static int adts_aac_read_header(AVFormatContext *s,
> >> + AVFormatParameters *ap)
> >> +{
> >> + AVStream *st;
> >> +
> >> + st = av_new_stream(s, 0);
> >> + if (!st)
> >> + return AVERROR(ENOMEM);
> >> +
> >> + st->codec->codec_type = CODEC_TYPE_AUDIO;
> >> + st->codec->codec_id = s->iformat->value;
> >> + st->need_parsing = AVSTREAM_PARSE_FULL;
> >> +
> >> + ff_id3v1_read(s);
> >> + ff_id3v2_read(s);
> >> +
> >> + return 0;
> >> +}
> >> +
> >> #endif
> >>
> >> /* Note: Do not forget to add new entries to the Makefile as well. */
> >> @@ -635,7 +656,7 @@
> >> NULL_IF_CONFIG_SMALL("raw ADTS AAC"),
> >> 0,
> >> adts_aac_probe,
> >> - audio_read_header,
> >> + adts_aac_read_header,
> >> ff_raw_read_partial_packet,
> >> .flags= AVFMT_GENERIC_INDEX,
> >> .extensions = "aac",
> >
> > moving code and functional changes must be in seperate patches
> >
> > [...]
>
> The attached patches split the previous patch into moving id3 reading
> and adding id3 reading to the adts aac demuxer.
>
> Patrick
>
> id3v1.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
> id3v1.h | 7 +++++
> id3v2.c | 20 ++++++++++++++++
> id3v2.h | 5 ++++
> mp3.c | 78 +---------------------------------------------------------------
> 5 files changed, 104 insertions(+), 76 deletions(-)
> 58c9a2292b9af5c85b0c78b7f06b7922270a724c move_id3_reading.patch
ok
[...]
> raw.c | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
> 596c5a2aba1d68e1addca9f0d7f3dcf589b8a3dc 2_adtsaac_parse_id3v2.patch
left for aac maintainer
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- 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/20090617/643f99f7/attachment.pgp>
More information about the ffmpeg-devel
mailing list