媒体基金会演讲时钟? [英] Media Foundation Presentation Clock?
问题描述
您好
我正在创建一个媒体基础接收器来处理avi文件。我正在尝试修改本书附带的一些源代码:由Anton Polinger开发Microsoft Media Foundation应用程序。
我是Windows Media的新手基础。
我正在使用继承自以下的CAviSink类:
IMFFinalizableMediaSink,IMFClockStateSink,IMFAsyncCallback
但是,我需要为接收器设置演示时钟。我不知道怎么回事。我试过了
IMFPresentationClock ** ppPresentationClock = NULL;
MFCreatePresentationClock(ppPresentationClock);
mySink.SetPresentationClock(* ppPresentationClock);
但ppPresentationClock为空。
这可能是完全错误的做法。但是,我能找到的只是媒体基础上非常详细的信息,例如什么是演示时钟,但没有指导如何创建一个。
我想知道是否有人可以给我一个指针,以帮助我找到我的方式所有这些令人困惑的文档...
非常感谢...
你需要了解指针用C ++指针。没有看到文档,我怀疑你的代码应该是:
IMFPresentationClock * pPresentationClock = NULL;
MFCreatePresentationClock(& pPresentationClock);
mySink.SetPresentationClock(* pPresentationClock);
// 或者甚至
mySink.SetPresentationClock(pPresentationClock);
Hi there
I''m creating a media foundation sink to process an avi file. I''m trying to modify some source code that comes with the book: Developing Microsoft Media Foundation Applications by Anton Polinger.
I''m am new to windows media foundation.
I''m using a class CAviSink that inherits from :
IMFFinalizableMediaSink, IMFClockStateSink,IMFAsyncCallback
However, I need to set the presentation clock for the sink. I''m not sure how to go about this. I''ve tried
IMFPresentationClock **ppPresentationClock = NULL;
MFCreatePresentationClock(ppPresentationClock);
mySink.SetPresentationClock(*ppPresentationClock);
but ppPresentationClock is null.
This is probably the completely wrong way to do this. However, all I can find is very detailed information on the media foundation e.g. what the presentation clock does but no pointers on the basics of how to create one.
I was wondering if someone could give me a pointer to help me find my way through all this confusing docs...
Many thanks...
You need to understand pointers to pointers in C++. Without seeing the documentation, I suspect your code should read:
IMFPresentationClock *pPresentationClock = NULL; MFCreatePresentationClock(&pPresentationClock); mySink.SetPresentationClock(*pPresentationClock); // or maybe even mySink.SetPresentationClock(pPresentationClock);
这篇关于媒体基金会演讲时钟?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!