How to run/start a thread at a given time using Media Foundation?

孤街浪徒 提交于 2019-12-04 22:54:44

Neither DirectShow or Media Foundation have functionality that matches the question description.

Both APIs have methods to start activity immediately following the request.

DirectShow's IMediaFilter.Run does not start thread in first place. Then the method is a trick rather than intended use:

... When an application calls the IMediaControl::Run method, the Filter Graph Manager calls IMediaFilter::Run on each filter. It sets the value of tStart slightly in the future, to account for graph latency.

Note that there is no word on you calling IMediaFilter::Run, the method is supposed to be called internally.

Media Foundation's internal design is different. You cannot schedule startup and you have no effect on internal working threads either. It is suppose that you start media session activity and it gets started as soon as possible.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!