[Flac-dev] FLAC frame length (Was: FLAC as part of the Ogg project?)

Josh Coalson xflac at yahoo.com
Wed Feb 6 00:00:08 PST 2002


--- Christer Palm <palm at nogui.se> wrote:
> Well, what is happening is that I get a call from a framework
> whenever 
> there is data available to decode. Inside that function, I imagine
> two 
> choices - put the data on hold (if I don't have enough data for a
> full 
> frame), or call FLAC__stream_decoder_process_one_frame() (if I *do*
> have 
> enough data for a full frame). Obviously, I can't do that currently.
> 
> Right now, I kick off a separate decoding thread and have the 
> flac_read() callback block on a condition variable whenever there's
> no 
> data available to return to FLAC. It works, but it's extremely ugly
> :-)

ok, I get it.  I think other people have run into this too.
you are in a 'push' situation and the decoder is more of
a 'pull' design.

this is actually caused by the bitbuffer design and not
easy to get around.  I thought about adding something like
flac__stream_decoder_process_wad() to do what you need,
but it would require saving state all the way down into
the depths of the bitbuffer code in the Rice decoder.

Josh


__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com




More information about the Flac-dev mailing list