扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:唐芸 王煜坚 吴镇扬 来源:ahcit 2007年10月19日
关键字:
// DirectShow interfaces IGraphBuilder *pGB = NULL; IMediaControl *pMC = NULL; IMediaEventEx *pME = NULL; IVideoWindow *pVW = NULL; IBasicAudio *pBA = NULL; IBasicVideo *pBV = NULL; IMediaSeeking *pMS = NULL; IMediaPosition *pMP = NULL; IVideoFrameStep *pFS = NULL; 然后实例化一个过滤器图表管理器,并查询各接口: // Get the interface for DirectShow's GraphBuilder CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pGB); // QueryInterface for DirectShow interfaces pGB->QueryInterface(IID_IMediaControl, (void **)&pMC); pGB->QueryInterface(IID_IMediaEventEx, (void **)&pME); pGB->QueryInterface(IID_IMediaSeeking, (void **)&pMS); pGB->QueryInterface(IID_IMediaPosition, (void **)&pMP); // Query for video interfaces, which may not be relevant for audio files pGB->QueryInterface(IID_IVideoWindow, (void **)&pVW); pGB->QueryInterface(IID_IBasicVideo, (void **)&pBV); // Query for audio interfaces, which may not be relevant for video-only files pGB->QueryInterface(IID_IBasicAudio, (void **)&pBA); |
// Have the graph builder construct its the appropriate graph automatically pGB->RenderFile(wFile, NULL); |
// Run the graph to play the media file pMC->Run(); |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者