[FFmpeg-devel] [PATCH] ACT demuxer
Vladimir Voroshilov
voroshil
Mon Feb 25 08:16:48 CET 2008
Hi, Michael
On Mon, Feb 25, 2008 at 12:36 AM, Michael Niedermayer <michaelni at gmx.at> wrote:
> [...]
> > +{
> > + int score=0;
>
> > +
> > + if ((AV_RL32(&p->buf[0]) != RIFF_TAG) ||
> > + (AV_RL32(&p->buf[8]) != WAVE_TAG) ||
> > + (AV_RL32(&p->buf[16]) != 16))
> > + return 0;
> > +
>
> > + if(match_ext(p->filename, "act"))
> > + score=AVPROBE_SCORE_MAX/4;
>
> iam against this, if detection is done based on the filename
> then theres no need for act_probe()
>
>
> > +
> > + if(p->buf_size>256 && p->buf[256]==0x84)
> > + score=AVPROBE_SCORE_MAX;
>
> Please use more than 1 byte + the 1 byte fmt size to detect act
> this seperates it from riff wave only by <16bit.
>
>
Well.
What do i know about ACT ?
1. it usually has .ACT extension (not reliable)
2. First 44 bytes are regular WAV header with 0x01 PCM tag (not reliable)
3. bytes 44-256 and 264-511 are filled by zero (not reliable too)
4. the rest are 512 bytes long chunks with 2 of 6 zero-filled padding
data at the end (unable to differ from WAV data).
So there is no reliable method for format detection.
We always can create correct WAV file which will look like ACT
According to above what will your suggestion about probing?
Looks like only extension check can be used.
> > + pkt->data[0]=pkt->data[5];
> > + pkt->data[5]=pkt->data[2];
> > + pkt->data[2]=pkt->data[6];
> > + pkt->data[6]=pkt->data[8];
> > + pkt->data[8]=pkt->data[9];
> > + pkt->data[9]=pkt->data[4];
> > + pkt->data[4]=pkt->data[7];
> > + pkt->data[7]=pkt->data[3];
> > + pkt->data[3]=pkt->data[1];
> > + pkt->data[1]=tmp;
>
> werent there 10 and 11 byte packets, does this work wirth both?
No, only with 8000hz.
There is no sample yet for 4400 to check bytes order (i'll try to see asm code).
I'll disable 4400 support for a while.
--
Regards,
Vladimir Voroshilov mailto:voroshil at gmail.com
JID: voroshil at gmail.com, voroshil at jabber.ru
ICQ: 95587719
More information about the ffmpeg-devel
mailing list