如何在WinCE 6下为DShow VideoRenderer设置特定分辨率. [英] How to set speicifc resolution for DShow VideoRenderer under WinCE 6.

查看:105
本文介绍了如何在WinCE 6下为DShow VideoRenderer设置特定分辨率.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好.

我有一个带有摄像头的Windows CE 6供电设备.
Microsoft CameraDShowApp.exe的一个测试应用程序部分起作用,它确实从相机捕获了视频和图片,但是无法正确显示实时视频.

我尝试使用SampleGrabber实现(从本网站的一篇文章下载),并向我展示了可以更改摄像机输出流的分辨率-在SampleGrabber中注册的回调函数接收到的字节数在与所选分辨率相对应的数据数组中.

因此,我怀疑我需要为视频捕获滤镜和视频渲染滤镜设置相同的分辨率.

问题是-最后一个怎么做?
Windows CE的标准视频渲染器不支持IAMStreamConfig接口,并且没有支持它的引脚.

有人可以帮我提建议吗?

预先感谢,
Alex

Hi everybody.

I have a Windows CE 6 powered device with a camera.
A test application from Microsoft CameraDShowApp.exe works partly, it does capture the video and pictures from the camera but doesn''t display live video correctly.

I''ve tried to use a SampleGrabber implementation (downloaded from one article on this site) and it has shown to me that it is possible to change resolution of the output stream from the camera - a callback function registered in SampleGrabber received amount of bytes in the data array corresponding to the selected resolution.

So I have a suspicion that I need to set the same resolution for both video capturing filter and video rendering filter.

The question is - how to do it for the last one ?
The standard video renderer for Windows CE doesn''t support IAMStreamConfig interface and has no pins supporting it.

Can anybody help me with an advice ?

Thanks in advance,
Alex

推荐答案

无需为VideoRenderer设置分辨率.

使用IAMStreamconfig接口配置捕获设备就足够了.

1.首先将您的过滤器添加到过滤器"图,然后使用capturegraphbuilder对象来查询接口IAMStreamconfig.

2.使用IAMStreamconfig中的GetFormat(AM_MEDIA_TYPE)可以接收摄像机MediaType

3.将获得的媒体类型分配给VideoInfoheader并将其bmiheader.biwidth和bmiHeader.biHeight设置为您的愿望..

4.然后将渲染器添加到过滤器图形,并同时连接capturefilter和渲染器并运行图形..
No need to set resolution for VideoRenderer.

Configure your capture device using IAMStreamconfig interface is enough.

1.First add your filter to the Filter graph and then using capturegraphbuilder object to query interface IAMStreamconfig.

2.using GetFormat(AM_MEDIA_TYPE ) from IAMStreamconfig u can receive camera MediaType

3.Assign obtained mediatype to VideoInfoheader and set its bmiheader.biwidth and bmiHeader.biHeight to ur wish..

4. Then add your renderer to filter graph and connect both capturefilter and renderer and run the graph..


aasikRAja,

你能给我们一个示例项目吗?我已经尝试了上面列出的步骤,但是失败了.
Hi aasikRAja,

Can u please give us a sample project for this. I have tried the above listed steps but failed.


这篇关于如何在WinCE 6下为DShow VideoRenderer设置特定分辨率.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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