Hi, all:
In DShow, there are some allocators in input pins to control the buffer management, frame queue, and memory re-use. But in MF, I don't know how to control the details about frame re-use.
For example, a MFT can create and output DXVA buffers by itself. But, the MFT does not know when the buffer can be reused. That makes me very confuse. Always to re-create DXVA buffers is not efficiency.
Is there any more detail information about that Else, I don't know how to playback video smoothly.
Thanks

How to control frame buffer mechanism
Kurt Jaegers
I found I have meet many parts that MF does not implemet or publish yet.
I am very interesting that what is MF's schedule.
When will MF be stable
D.A.V.E.
Hi Fei-tian,
I assume you've implemented IMFVideoSampleAllocator and want to know when the IMFSamples you allocate are done being used so that you can reuse the buffer.
A way to do this is to provide a custom IMFSample implementation that watches AddRef/Release calls; when the refcount goes to 0, then everyone in the pipeline is done with this IMFSample and you can reuse it. Your implementation can just wrap the standard MF implementation for the rest of the IMFSample functionality, if you want.
Hope that helps...
Becky
Al Stark
What is IMFVideoSampleAllocator, I cannot look up it on my sdk. Is it a new interface
And how to wrap the standard MF implementation easily Use COM agregation
Thanks
PeterVrenken
Ah... It seems that we hadn't yet published that interface as of Beta2, which would explain why you don't see it yet. But anyways, when we ship, IMFVideoSampleAllocator will be in mfidl.idl(mfidl.h), and it's the interface through which your MFT would allocate its own buffers (in IMFSamples).
Wrapping MF's IMFSample implementation should be pretty easy through simple containment (i.e. create your own class that inherits from IMFSample that maintains an internal pointer to an MF-provided IMFSample and for most calls just forwards the call to that object.
Becky