[英]Media Foundation screenshot hook
It is required to take at the right time a screenshot from the application (it can be blocked, collapsed or even in a different session). 需要在适当的时候从应用程序中截取屏幕截图(可以将其截屏,折叠或什至在另一个会话中)。 The application plays a video stream through the Media Foundation:
该应用程序通过Media Foundation播放视频流:
As I understand it is necessary to intercept MFCreateMediaSession
, what to receive IMFMediaSession
, only here what further with this object to do? 据我了解,有必要拦截
MFCreateMediaSession
,接收什么IMFMediaSession
,仅在此对象进一步做什么? And can it be accessed from another thread? 并且可以从另一个线程访问它吗?
I see that you wrote application on base of Media Foundation for playing of video -and you need take video images as a separated decoded frames. 我看到您在Media Foundation的基础上编写了用于播放视频的应用程序-您需要将视频图像作为单独的解码帧进行拍摄。 So, you have two opportunities:
因此,您有两个机会:
IMFVideoDisplayControl
interface - on MSDN IMFVideoDisplayControl - it has command GetCurrentImage
- retrieves a copy of the current image being displayed by the video renderer - on MSDN GetCurrentImage . IMFVideoDisplayControl
接口-在MSDN上IMFVideoDisplayControl-具有命令GetCurrentImage
检索视频渲染器正在显示的当前图像的副本-在MSDN GetCurrentImage上 。 MFCreateSampleGrabberSinkActivate
allows create sink from sample grabber object with IMFSampleGrabberSinkCallback interface - it allows get decoded video images in format of Bitmap images in System Memory. MFCreateSampleGrabberSinkActivate
Foundation函数MFCreateSampleGrabberSinkActivate
允许使用IMFSampleGrabberSinkCallback接口从样本采集器对象创建接收器-它允许以系统内存中位图图像格式获取解码的视频图像。 Using of sample grabber is more difficult, and I can recommend my project Capturing Video from Web-camera on Windows 7 and 8 by using Media Foundation for researching of the such way. Regards. 问候。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.