Re: Source is finished, but I need to push more samples downstream

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Wed, 7 Jan 2009 03:58:07 -0800 (PST), acolor0429@xxxxxxxxx wrote:

My transform filter has its own buffer which keeps several samples.
Once the source filter is finished(no more input data for
tranformfilter), how to send all my buffer to downstream to complete
this stream?
I read document and find a way is in BeginFlush() and call Receive(),
force to push data to downstream, is it correct?

Your input pin will get notified of end of stream, you need to queue this
and not forward the end of stream notification until you flush all the
samples that you are holding. Because the call to IPin::EndOfStream() is
serialized with Receive(), you should be able to deliver the remainder of
your samples in the caller context using the output pin allocator. Create
an override implementation of CTransformFilter::EndOfStream() and put your
code there. After delivering your samples call
CTransformFilter::EndOfStream() to send the end of stream message down.

--
http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]
.



Relevant Pages

  • Re: Another Dumb Idea for Debunking...
    ... Therefore using a block cypher to do a stream cypher's job is wasteful. ... but independent of the input data. ... One has to be able to reverse the procedure in order ...
    (sci.crypt)
  • gathering audio stream data
    ... I would like to use stream generated by playing audio files, ... to use as input data for an OpenGL program. ... So how do I get the frequency data into my program? ...
    (alt.linux)
  • Re: Reading Large Files
    ... Reads some number of bytes from the input stream and stores them into ... This method blocks until input data is available, ... If b is null, a NullPointerException is thrown. ...
    (comp.lang.java.programmer)
  • Re: 256-byte lookup or four comparisons
    ... > SDI stream can be destroyed and I have to resync myself. ... > can align the input data. ... Have you tried one of the FastCode CharPos functions instead of Guido's ... (I have not seen ScanStrForChar, ...
    (borland.public.delphi.language.basm)
  • Re: A question about outpin delivering sample
    ... The input data is a network stream, ... received and put into my buffer. ... Then, downstream filter will call ... DoBufferProcessingLoopand FillBuffer() on my OutPin to get the ...
    (microsoft.public.win32.programmer.directx.video)