用驱动程序mft更改分辨率 [英] Change resolution with driver mft

查看:110
本文介绍了用驱动程序mft更改分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对驱动程序mft和分辨率有疑问。  我已成功构建并运行mft0示例以及用于相机示例的Metro风格设备应用程序。  我可以通过设备应用控制停电效果。  我想要
现在要做的就是控制视频流的分辨率。 



所以我使用捕获设备样本构建了媒体捕获并添加了调用SetMediaStreamPropertiesAsync的代码来更改分辨率。  我通过调用GetMediaStreamProperties来检查是否成功。



我发现如果启用了mft,我无法更改分辨率 - 它总是固定为640x480。  但是,如果我禁用mft(在Control\DeviceClasses下修改注册表),那么在我的捕获应用程序中,我可以成功地将分辨率
更改为任何可用格式。  但如果我重新启用mft,我不能。  它总是在640x480。



我也在检查mft的ProcessOutput函数中的分辨率(启用时),它总是固定在640x480。



我找到了这个帖子:http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/142d66a0-1ef6-453b-a939-aaba7c31287f 。$


但我没有取得同样的成功。  有什么想法吗?  如果mft中有代码正在执行此操作,我找不到它。

I have a question regarding driver mft and resolution.  I have the successfully built and run the mft0 sample along with the Metro style device app for camera sample.  I can control the blackout-effect from the device app.  What I want to do now is to control the resolution of the video stream. 

So I built the Media capture using capture device sample and added code to call SetMediaStreamPropertiesAsync to change the resolution.  I check for success by calling GetMediaStreamProperties.

What I found is that if the mft is enabled, I can not change resolution - it is always fixed at 640x480.  However, if I disable the mft (modifying the registry under Control\DeviceClasses), then in my capture app, I can successfully change the resolution to any of the available formats.  But if I re-enable the mft, I can't.  It's always at 640x480.

I am also checking the resolution in the ProcessOutput function of the mft (when enabled) and it always fixed at 640x480.

I did find this thread: http://social.msdn.microsoft.com/Forums/en-US/winappswithnativecode/thread/142d66a0-1ef6-453b-a939-aaba7c31287f.

But I am not having the same success.  Any ideas?  If there is code in the mft which is doing this I cannot find it.

 (我已尝试使用多个不同的相机。)

 (I have tried this with several different cameras.)

推荐答案

BTW ,使用媒体扩展名mft时,我没有这个问题,如灰度样本。
BTW, I do not have this problem when using the media extension mft like the grayscale sample.


这篇关于用驱动程序mft更改分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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