--- illiminable K <[EMAIL PROTECTED]> wrote:
> In directshow everything is pushed into the decoder it can't ask for
> data
> when it wants... i'm just wondering if there is an alternate way to
> do
> this... is there support for this style of decoding in the underlying
> C
> library ?
> 
> Does anyone have any ideas about how i can go about doing a decode
> with only
> the output callback and no input callback ?

if it's single threaded:

I think you will have to have an intermediate buffer that is
filled by the push, and read by the read callback.  then you
have to make sure you don't call FLAC__*_process_single()
unless you know there is enough data in the buffer to make a
frame, else it will block.  you can estimate what a maximum
frame size will be using blocksize*bytes_per_sample*channels
plus a little overhead (maybe 100 bytes).

if it's multithreaded, you should be able to just block in
the FLAC read callback for more data to be pushed in.  then
you don't have to worry about having enough data before calling
FLAC__*_process_single().

Josh


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Flac-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/flac-dev

Reply via email to