如何在Microsoft Media Foundation中完成视频播放后自动关闭窗口? [英] How to close the window automatically after the video playback finishes in Microsoft Media Foundation?

查看:145
本文介绍了如何在Microsoft Media Foundation中完成视频播放后自动关闭窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用IMFAsyncCallback的Invoke()拦截MEEndOfPresentation事件,但我在互联网上读到我不能从另一个线程停止一个窗口消息抽取循环,而AFAIK IMFAsyncCallback正在另一个线程中运行。我可以从
里面的PostMessage()调用Invoke()方法吗?如何在播放结束后关闭窗口(销毁它)?

I use Invoke() of IMFAsyncCallback to intercept MEEndOfPresentation event but I read on internet that I cant stop a window message pumping loop from another thread and AFAIK IMFAsyncCallback is running in another thread. Can I just PostMessage() from inside the Invoke() method? How I do it to close the window(destroy it) after the playback has ended?

推荐答案

我认为它适用于
i think it works with
PostMessage(hWnd, WM_CLOSE, 0,0);


这篇关于如何在Microsoft Media Foundation中完成视频播放后自动关闭窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆