s
Hi. I'm sending "dummy sample" when there are no data to send from source. butRequestSample() come buck so quickly and keeps spining until data are ready.
It's really waste of CPU power.
What should I do to stop this?
I'm trying to build something like a LiveTV player.
Thanks.
Kasumi.
[342 byte] By [
kasumi] at [2007-12-25]
I'm guessing that you have an MFT downstream of the Media Source that interprets these dummy samples as "no data".
If you give this "no data" sample a duration, then your MFT can just produce that duration's worth of silence (audio) or repeated frames (video) and return MF_E_TRANSFORM_NEED_MORE_INPUT from ProcessOutput only when those have been exhausted. This will keep MF from requesting samples in a tight loop, since MF requests a sample from the Media Source only when the downstream MFT requests more input.