c# - no combination of intermediate filters could be found -


i'm making windows form application using visual studio. application allows enter want photo named, , saves image specific location on network. works great when use on laptop. however, when try run on desktop, not work. instead message:

system.runtime.interopservices.comexception (0x80040217): no combination of intermediate filters found make connection.

at directshowlib.dserror.throwexceptionforhr(int32 hr)

at orderproductcapture.capture.setupgraph(dsdevice dev, int32 iwidth, int32 iheight, int16 ibpp, control hcontrol)

at orderproductcapture.capture.ctor(int32 idevicenum, int32 iwidth, int32 iheight, int16 ibpp, control hcontrol)

at orderproductcapture.frmmain.ctor()

the call stack says:

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 

i have googled many times, , i've looked @ of similar questions on so. both computers using windows 7 professional. fantastic.

this code code catches exception. not think code wrong, because works fine on laptop.

public capture(int idevicenum, int iwidth, int iheight, short ibpp, control hcontrol)     {         dsdevice [] capdevices;          // collection of video devices         capdevices = dsdevice.getdevicesofcat(filtercategory.videoinputdevice);          if (idevicenum + 1 > capdevices.length)         {             throw new exception("no video capture devices found @ index!");         }          try         {             // set capture graph             setupgraph( capdevices[idevicenum], iwidth, iheight, ibpp, hcontrol);              // tell callback ignore new images             m_pictureready = new manualresetevent(false);         }         catch         {             dispose();             throw;         }     } 

when having convert between media formats, can programmatically force use specific filter chain , configure tightly needs, directshow has ability of "guessing" right tools use. knows tiny media handlers oficially installed in os, , tries match them final required "conversion" built.

however, directshow still needs tiny converters installed. ds able analyze , connect them, not provide support exotic media types. often, non-exotic can problematic if os "fresh-n-clean".

if remember correctly, error means (on problematic machine) "codecs" missing.

these things come any:

  • drivers webcams/microphones/soundcards
  • audio-processing software (sound editors, media recorders, media players, ..)
  • "codec packs" cccp (really, don't confused logo)
  • specific codec/filter packages
  • (...)

first thing i'd be:

  • recall tried convert
  • try read error messages , logs , find out if there's faulty filter mentioned, maybe needs reinstalling
  • compare audio-related software installed on machines program works versus problematic machine
  • basing on above, try deduce codec missing
  • find it, download, install

also, may read code of setupgraph() function. bet there's clear reference format being used, , may point out codec missing.

codecs damaged (actually not themselves, configuration , registration entries may damaged). if sure correct codecs available on machine, reinstalling or "repairing" (if have such option) them can help.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -