[MPlayer-dev-eng] [PATCH] mpeg pass-through for hardware audio decoders
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Jan 15 00:13:23 CET 2006
Hi,
On Sat, Jan 14, 2006 at 11:11:42PM +0100, Nico Sabbi wrote:
> +static ad_info_t info =
> +{
> + "MPEG audio pass-through (fake decoder)",
> + "hwmpa",
> + "Nico",
> + "???",
> + ""
> +};
I admit I never looked it up myself before, but this "says" that you are
the maintainer and "???" is the author?
> + while(1)
> + {
> + len = demux_read_data(sh->ds,&sh->a_in_buffer[sh->a_in_buffer_len],sh->a_in_buffer_size-sh->a_in_buffer_len);
> + if(len > 0)
> + sh->a_in_buffer_len += len;
> + while(cnt + 4 < sh->a_in_buffer_len)
> + {
> + x = mp_get_mp3_header(&(sh->a_in_buffer[cnt]), chans, srate, spf, mpa_layer, br);
> + if(x > 0)
> + {
> + *n = x;
> + return cnt;
> + }
> + cnt++;
> + }
> + if(len <= 0)
> + break;
> + }
well, a do { ... } while (len > 0); would make more sense IMHO.
But maybe you could do something like the demux_pattern_3 function in my
es parsing patch (I assume you checked that ds_get_packet doesn't
already return the data correctly frame-by-frame)?.
E.g. introduce a demux_pattern_mask that allows an arbitrary bitmask instead
of only complete 3-byte patterns. I guess speed is not so much of an issue here.
It might also make the skip-one-frame thing easier.
Greetings,
Reimar Döffinger
More information about the MPlayer-dev-eng
mailing list