简体   繁体   English

DirectShow SampleGrabber更改图像源的比例

[英]DirectShow SampleGrabber changes the ratio of image source

I built a graph to grab both audio and video from a BDA DVB-T Tuner using DirectShow. 我建立了一个图形,使用DirectShow从BDA DVB-T Tuner捕获音频和视频。

If I build my graph like that : 如果我这样建立图表:

... -> MPEG2 Demux -> BDA MPEG2 Transport Information Filter
                   -> MPEG2 Sections And Tables
                   -> Video Mixing Renderer 9

The output on the renderer will be ok. 渲染器上的输出将正常。

In my case : 就我而言:

... -> MPEG2 Demux -> BDA MPEG2 Transport Information Filter
                   -> MPEG2 Sections And Tables
                   -> SampleGrabber -> Video Mixing Renderer 9

The SampleGrabber changes the image ratio. SampleGrabber更改图像比例。 Both the SampleGrabber and the renderer display some wrong images. SampleGrabber和渲染器都显示一些错误的图像。

I read on several topics that "SampleGrabber" can't handle dynamic formats change sent by previous filters because of the "VideoInfoHeader" structure. 我读了几个主题,因为“ VideoInfoHeader”结构,“ SampleGrabber”无法处理以前的过滤器发送的动态格式更改。

So, If the source changes the ratio, the image will be wrong in the SampleGrabber. 因此,如果源更改比率,则SampleGrabber中的图像将是错误的。

What is the solution to get real images in/out the SampleGrabber without doing my own CustomSampleGrabber based on "DirectX February 2004" samples ? 如何在不基于“ DirectX February 2004”样本执行我自己的CustomSampleGrabber的情况下将真实图像输入/输出SampleGrabber的解决方案?

It is likely that video stream is not compatible with Sample Grabber (interlaced etc.) and then another filter is being inserted into pipeline to resolve the connectivity. 视频流可能与Sample Grabber(隔行扫描等)不兼容,然后在管道中插入了另一个过滤器以解决连接问题。 You should inspect the topologies you create and check media types to get better understanding what is going on and, yes, most likely you will have to implement alternate grabbing method. 您应该检查所创建的拓扑并检查媒体类型,以更好地了解正在发生的事情,是的,很可能您将必须实现替代的捕获方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM