C#DirectShow.net Tee过滤器渲染失败 [英] c# directshow.net tee filter render fails

查看:84
本文介绍了C#DirectShow.net Tee过滤器渲染失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将






I'm trying to connect an Alax.Info IP camera source filter to a capture and a preview renderer.

I add the source filter to a graph, and render the pin. This produces a direct connection to a VMR, and it works. GraphEdit shows the camera filter's output pin type is RGB32.

When I connect the output of the camera source filter to a tee (either a Smart Tee filter, or an Infinite Tee filter), rendering the output from the tee causes an AVI Decompressor filter to be inserted between the tee and the VMR. In the MS GraphEdit application, I get one frame of video, nothing more. In GraphEditPlus, I just get a black render window.

I've tried connecting a Null Renderer to the preview pin of the Smart Tee, and to a second pin of the Infinite Tee, this made no difference.

When the camera filter is connected to a tee, GraphEdit reports its output pin type has been changed to YUY2, 16 bits. I strongly suspect this is the root of the problem.

Are there logs I can look at to figure out what's going on?

Is there a way to control the camera's output pin type in these "tool" applications, and thereby the selection of downstream filters?

Should I be using a different type of tee filter that expects RGB32 video?

解决方案

The likely problem is that attempts to connect to video renderer involve re-negotiations of media type suitable for video renderer. As tee filter is unable to arrange such media type, it attempts to re-negotiate upstream connection and/or supply a conversion filter, which eventually results in pipeline which is built, as it seems, but once real video starts going through there is a mismatch in certain formats or resolutions and real video frames are dropped on the way.

The problem might be specific to this IP source filter because by design it is limited to specific decoder and it is also taking initialization without knowing actual M-JPEG feed expecting to resolve the formats while streaming.

When building filter graph interactively, make sure to review media types and check that resolutions and pixel formats make sense. When building graph programmatically, also make sure you build the pipeline sequentially knowing connection media types (in GraphStudioNext you can Ctrl+Shift+M so that each connection prompts you for a specific media type to use), and you also want to add adapter filters explicitly when necessary (tee output won't connect to video renderer, so insert Color Space Converter or similar yourself without expecting Intelligent Connect do it for you).

When pin connection properties match, video goes through, for example:

or

这篇关于C#DirectShow.net Tee过滤器渲染失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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