关于DirectShow中的Sample Grabber的范围 [英] Regarding the scope of Sample Grabber in DirectShow

查看:95
本文介绍了关于DirectShow中的Sample Grabber的范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网络摄像头实时捕获应用程序有2个相关问题。

I have 2 related questions for my web cam live capture application.


  1. 网络摄像头捕获各种格式的数据,例如YUY2,RGB24,I420,MJPG等。我需要转换捕获的数据不论输入格式如何,都应更改为I420。因此,我需要了解Direct Show内置Transform过滤器(例如Sample Grabber)的当前范围/功能。 Sample Grabber至少会支持这些许多转换吗?还是我必须编写自己的自定义过滤器?

  1. The webcams capture data in varying formats such as YUY2, RGB24, I420, MJPG etc. I need to convert the captured data to I420 irrespective of the input format. Hence I need to know the current scope/capability of the Direct Show inbuilt Transform filter such as Sample Grabber. Will the Sample Grabber support at least these many transformations? Or will I have to write my own custom filters?

许多网络摄像头似乎都具有多种格式输出。当我连接其媒体类型设置为I420的Sample Grabber时,Sample Grabber过滤器将与网络摄像头驱动程序对话,以确保从网络摄像头输出的数据将为I420(如果网络摄像头支持)。

Many of the webcams seem to have multiple format output. When I connect Sample Grabber whose media type is Set to I420, will the Sample Grabber filter talk to the Web camera driver to make sure that the data output from Webcam will be I420 ( if the Web cam has support).

我已经发布了与上述内容有关的问题,但无法完全回答。请帮忙。

I had already posted questions related to the above, but couldn't get them fully answered. Please help.

推荐答案

Sample Grabber不会更改数据的媒体类型,但是如果您在连接之前设置了首选的媒体类型,则它将要求输入流具有该媒体类型。只需使用RenderStream(智能连接,而不是直接连接),DirectShow将插入所需的解码器或转换器(如果存在)。

Sample Grabber does not change media type of the data, but if you set a preferred media type before connecting then it will require the input stream to be of that mediatype. Just use RenderStream (intelligent connect, not direct one) and DirectShow will insert required decoders or transformers, if they are present.

这篇关于关于DirectShow中的Sample Grabber的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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