[FFmpeg-devel] [PATCH] Core Audio Format demuxer (v5)

Diego Biurrun diego
Sun Sep 6 14:54:19 CEST 2009


On Sun, Sep 06, 2009 at 08:57:43PM +1000, Peter Ross wrote:
> 
> --- a/Changelog
> +++ b/Changelog
> @@ -37,6 +37,7 @@ version <next>:
>  - Wmapro decoder
> +- Core Audio Format demuxer
>  
> --- a/doc/general.texi
> +++ b/doc/general.texi
> @@ -63,6 +63,8 @@ library:
> + at item Core Audio Format         @tab   @tab X
> +    @tab Apple Core Audio Format
>  
> --- /dev/null
> +++ b/libavformat/cafdec.c
> @@ -0,0 +1,376 @@
> +AVInputFormat caf_demuxer = {
> +    "caf",
> +    NULL_IF_CONFIG_SMALL("Core Audio Format"),


Settle for a consistent long name, possibly "Apple Core Audio Format".

> --- /dev/null
> +++ b/libavformat/cafdec.c
> @@ -0,0 +1,376 @@
> +    if (st->codec->codec_id == CODEC_ID_AAC) {
> +        /* The magic cookie format for AAC is an mp4 esds atom.
> +           The lavc aac decoder requires the data from the codec specific

AAC

> +        tag = get_be32(pb);
> +        size = get_be64(pb);

align

> +#define MAX_SIZE 4096

That's a very generic name that could appear in some other header..

> +            pkt_size   = st->index_entries[caf->packet_cnt + 1].pos - st->index_entries[caf->packet_cnt].pos;
> +            pkt_frames = st->index_entries[caf->packet_cnt + 1].timestamp - st->index_entries[caf->packet_cnt].timestamp;

> +            pkt_size   = caf->num_bytes - st->index_entries[caf->packet_cnt].pos;
> +            pkt_frames = st->duration - st->index_entries[caf->packet_cnt].timestamp;

This could be aligned at the '-' as well :)

Diego



More information about the ffmpeg-devel mailing list