[Ffmpeg-devel] [PATCH] ADTS muxer (original) (raw)
Måns Rullgård mru
Fri Feb 10 00:10:41 CET 2006
- Previous message: [Ffmpeg-devel] Re: [PATCH] ADTS muxer
- Next message: [Ffmpeg-devel] Re: [PATCH] ADTS muxer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Baptiste COUDURIER <baptiste.coudurier at smartjog.com> writes:
Hi,
Here is an ADTS muxer. I think it will solve Erik Slagter problem with gpac. Does it worker for you Erik ? +static int adtswriteaacheader(ADTSContext *ctx, int size) +{ + PutBitContext pb; + uint8t buffer[ADTSHEADERSIZE]; + + initputbits(&pb, buffer, ADTSHEADERSIZE); + putbits(&pb, 12, 0xfff); + putbits(&pb, 1, 0); + putbits(&pb, 2, 0); + putbits(&pb, 1, 0); /* protection present ? */ + putbits(&pb, 2, 0); + putbits(&pb, 2, ctx->samplerateindex); + putbits(&pb, 1, 0); + putbits(&pb, 3, ctx->enc->channels); + putbits(&pb, 1, 0); + putbits(&pb, 1, 0); + + + /* adts variable header */ + putbits(&pb, 1, 0); + putbits(&pb, 1, 0); + putbits(&pb, 13, size); /* size */ + putbits(&pb, 11, 0); + putbits(&pb, 2, 0); + flushputbits(&pb); + return 0; +}
This will not create a valid adts frame header. Furthermore, you are never actually writing it to the output.
Annoyingly, documentation for AAC seems notoriously difficult to find. Worse, the various drafts I've managed to come across vary quite considerably.
-- M?ns Rullg?rd mru at inprovide.com
- Previous message: [Ffmpeg-devel] Re: [PATCH] ADTS muxer
- Next message: [Ffmpeg-devel] Re: [PATCH] ADTS muxer
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]