找不到中间过滤器的组合 [英] no combination of intermediate filters could be found

查看:95
本文介绍了找不到中间过滤器的组合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio制作Windows窗体应用程序.该应用程序允许您输入想要给照片命名的名称,然后将该图像保存到网络上的特定位置.当我在笔记本电脑上使用它时,效果很好.但是,当我尝试在桌面上运行它时,它不起作用.相反,我收到消息:

I'm making a windows form application using Visual Studio. The application allows you to enter the what you want the photo to be named, and then saves that image to a specific location on the network. It works great when I use it on my laptop. However, when I try to run it on the a desktop, it does not work. Instead I get the message:

System.Runtime.InteropServices.COMException(0x80040217):否中间过滤器的组合可以发现使连接.

System.Runtime.InteropServices.COMException (0x80040217): No combination of intermediate filters could be found to make the connection.

在DirectShowLib.DsError.ThrowExceptionForHR(Int32 hr)

at DirectShowLib.DsError.ThrowExceptionForHR(Int32 hr)

在OrderProductCapture.Capture.SetupGraph(DsDevice dev,Int32 iWidth,Int32 iHeight,Int16 iBPP,Control hControl)

at OrderProductCapture.Capture.SetupGraph(DsDevice dev, Int32 iWidth, Int32 iHeight, Int16 iBPP, Control hControl)

在OrderProductCapture.Capture.ctor(Int32 iDeviceNum,Int32 iWidth,Int32 iHeight,Int16 iBPP,Control hControl)

at OrderProductCapture.Capture.ctor(Int32 iDeviceNum, Int32 iWidth, Int32 iHeight, Int16 iBPP, Control hControl)

在OrderProductCapture.frmMain.ctor()

at OrderProductCapture.frmMain.ctor()

呼叫堆栈说:

OrderProductCapture.exe!OrderProductCapture.Capture(int iDeviceNum, int iWidth, int iHeight, short iBPP, System.Windows.Forms.Control hControl) Line 82
OrderProductCapture.exe!OrderProductCapture.frmMain.frmMain() Line 50
OrderProductCapture.exe!OrderProductCapture.Program.Main() Line 19

我已经在Google上搜索过很多次了,因此我研究了大多数类似的问题.两台计算机都使用Windows 7专业版.任何帮助都很棒.

I have already googled this many times, and I've looked at most of the similar questions on SO. Both computers are using Windows 7 professional. Any help would be fantastic.

这是我的代码捕获异常的代码.我认为代码没有错,因为它可以在笔记本电脑上正常工作.

This is the code where my code catches the exception. I do not think the code is wrong, because it works fine on my laptop.

public Capture(int iDeviceNum, int iWidth, int iHeight, short iBPP, Control hControl)
    {
        DsDevice [] capDevices;

        // Get the collection of video devices
        capDevices = DsDevice.GetDevicesOfCat(FilterCategory.VideoInputDevice);

        if (iDeviceNum + 1 > capDevices.Length)
        {
            throw new Exception("No video capture devices found at that index!");
        }

        try
        {
            // Set up the capture graph
            SetupGraph( capDevices[iDeviceNum], iWidth, iHeight, iBPP, hControl);

            // tell the callback to ignore new images
            m_PictureReady = new ManualResetEvent(false);
        }
        catch
        {
            Dispose();
            throw;
        }
    }

推荐答案

当必须在媒体格式之间进行转换时,可以以编程方式强制它使用某些特定的筛选器链,并根据需要对其进行严格配置,但是DirectSHOW也具有此功能猜测"正确的工具来使用.它知道操作系统中正式安装的所有微型媒体处理程序,并尝试匹配它们,以便构建最终所需的转换".

When having to convert between media formats, you can programmatically force it to use some specific filter chain and configure it tightly to your needs, but DirectSHOW also has the ability of "guessing" the right tools to use. It knows all the tiny media handlers that are oficially installed in the OS, and tries to match them so that final required "conversion" is built.

但是,DirectShow仍然需要要安装的微型转换器.DS能够分析和连接它们,但不会为您提供对异类媒体类型的任何支持.如果操作系统新鲜干净",那么即使是非异国情调的人也常常会遇到问题.

However, DirectShow still needs those tiny converters to be installed. DS is able to analyze and connect them, but will not provide you any support for exotic media types. Often, even non-exotic can be problematic if the OS is "fresh-n-clean".

如果我没记错的话,该错误基本上意味着(在这台有问题的计算机上)缺少一些编解码器".

If I remember correctly, that error basically means that (on this problematic machine) some "codecs" are missing.

这些东西通常随以下物品一起出现:

These things often come with any:

  • 网络摄像头/麦克风/声卡的驱动程序
  • 音频处理软件(声音编辑器,媒体记录器,媒体播放器等)
  • 编解码器包",例如 CCCP (确实,不要被其徽标混淆)
  • 特定的编解码器/过滤器包
  • (...)
  • drivers for webcams/microphones/soundcards
  • audio-processing software (sound editors, media recorders, media players, ..)
  • "codec packs" like CCCP (really, don't get confused by their logo)
  • specific codec/filter packages
  • (...)

我现在要做的第一件事是:

First thing I'd now do would be:

  • 回想一下我尝试转换的内容
  • 尝试读取所有错误消息和日志,并找出是否提到了一些错误的过滤器,也许它需要重新安装
  • 比较在工作程序与有问题的机器上安装了哪些与音频相关的软件
  • 基于上述内容,尝试推断缺少哪些编解码器
  • 找到它,下载并安装

此外,您还可以阅读 SetupGraph()函数的代码.我敢打赌,目前使用的格式有明确的参考,这可能会指出缺少哪些编解码器.

Also, you may read the code of SetupGraph() function. I bet there's a clear reference to the format that is being used, and this may point out what codec is missing.

编解码器有时也会损坏(实际上不是它们本身,但是它们的配置和注册条目可能会损坏).如果您确定机器上提供了正确的编解码器,则重新安装或修复"(如果它们具有此类选项)可以为您提供帮助.

Codecs also sometimes get damaged (actually not themselves, but their configuration and registration entries may get damaged). If you are sure that the correct codecs are available on the machine, reinstalling or "repairing" (if they have such option) them can help.

这篇关于找不到中间过滤器的组合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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