Re: DirectShow Transcoding Woes



DJW wrote:

However, I'm a bit concerned about handling all
exceptions this way; I don't think it's particularly wise
to assume that the addition of a particular filter
results in the exception being thrown by RenderFile().
Moreover, if it's a processor exception (Unhandled
exception at 0x09d42ae5 in rrtrans.exe: 0xC0000005:
Access violation reading location 0x00000000) and any
number of other things can cause that exception's being
thrown, then there doesn't seem to be a good way to know
whether or not adding the filter to the graph resulted in
the exception. My reading of the documentation didn't
reveal any clues regarding how to narrow down exceptions
thrown by DirectShow methods.

In theory, faults are not supposed to happen and the code
should never crash but just return failure HRESULTs so there
is no system-provided way to handle faults. This is not only
true for DirectShow, but for every other system component,
even though it's particularly annoying in DirectShow where
you use a lot of third-party modules and the entropy is
higher than usual.

I can only think of 2 suggestions:

1) first try to build the graph using filters you know will
work then fall back to your trial-and-error algorithm if the
filters are not available;

2) use the debug help library to walk the call stack of a
fault so that you can discover in what module the fault
occurred, then, if it's not a well-known module, enumerate
the filters in the graph and look up their inproc server in
the registry by CLSID so that you can find out which filter
owns that module, if any.


--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// a dot angeli at psynet dot net


.



Relevant Pages

  • Re: Exception Handling - help!
    ... >> invoked during the user filter would have to be on top of the stack, ... > are you sure these routines have access to the faulting frame? ... >> to treat this as a nested exception. ...
    (microsoft.public.dotnet.framework.clr)
  • Re: Exception Handling - help!
    ... | to also be in Partition I.12.4.2.5, the overview of Exception Handling. ... | filter block - is this true only for inline code, ... | (which it was not when the exception was thrown). ... | nested exception the new exception would have to walk the stack anyway ...
    (microsoft.public.dotnet.framework.clr)
  • ISA2004 Firewall fails to start & event id 14057
    ... a 3rd party filter installed and occasionally I am ... When attempting to start the firewall in the ISA server manager I sometimes ... again saw exception 6D9 messages during module loading as follows: ...
    (microsoft.public.isa.configuration)
  • Re: Exception Handling - help!
    ... Can the nesting be of ... can an exception filter throw an ... | which itself causes another filter to execute, ...
    (microsoft.public.dotnet.framework.clr)
  • Re: VB.NET 2003 FileSystemWatcher Problem - Too many changes?
    ... FileSystemWatcher.IncludeSubDirectories properties to filter out unwanted ... The exception being thrown is the ... > I have created a windows service which runs the FileSystemWatcher ...
    (microsoft.public.dotnet.general)

Loading