Re: IGraphBuilder2::FindInterface( ), what actually it does ??

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Geraint Davies (geraintd_at__NO_THANK_YOU_REALLY_gdcl.co.uk)
Date: 10/08/04


Date: Fri, 8 Oct 2004 10:36:48 +0100

FindInterface builds the upstream part of the graph as a side effect before
searching for the interface (ugly or what?). This is also done at the end of
a successful RenderStream.

It will only do this if you specify the category argument in the
FindInterface call. It will build upstream, starting at the input pins of
the pF filter you specify. It will only look at input pins that have 1
necessary instance, and only if none of the input pins are already
connected.

For each of these inputs which have a custom medium guid, it searches the
medium cache in HKLM\System\CurrentControlSet\Control\MediumCache (should be
built automatically by KS). Under there, you should find a key whose name is
your medium (including the id and flags fields that distinguish instances).
Under the key, there should be a named value, where the value name is a
symbolic link to your device and the value is 1 for output. You can check
that this part of the search is ok by calling
IFilterMapper2:EnumMatchingFilters and searching for just your medium
output.

G

"Jayaprakash N" <JayaprakashN@discussions.microsoft.com> wrote in message
news:6E3AE3B8-6791-45BC-91E1-BAC26AE9C86C@microsoft.com...
> In AVStreams arch, wanted to have a kernel video capture filter, with
> analog
> crossbar interface. So, created a filter with Crossbar property
> (PROPSETID_VIDCAP_CROSSBAR) and all necessary IN & OUT pins. Registered
> the
> crossbar using KsRegisterFilterWithNoKsPins( ). Able to insert capture
> filters and crossbar filter from GraphEdit application and can perform
> capture.
>
> In GraphEdit, capture filter under "WDM Streaming Capture Devices" will
> expose all kernel streaming pins and crossbar filter under "WDM Streaming
> Crossbar Devices" will expose all non-streaming pins by querying the PIN
> INFO
> from minidriver.
>
> But...
> Using DirectShow APIs, wanted to build a graph, so seeking for my capture
> device filter. I found that and added to a graph & added that graph to
> ICaptureGraphBuilder2 object and trying to find IAMCrossbar interface in
> the
> graph builder (as described in DirectX SDK) using
> IGraphBuilder2::FindInterface( ), This Fails.....
>
> Wonder, same code is working for a similar Streambased class minidriver
> but
> not for this AVStream based minidriver.
>
> Please note, we could enumerate our crossbar filter using DirectX
> ICreateDevEnum interface.
>
> While calling ICaptureGraphBuilder2::FindInterface( ), no request comes in
> to the minidriver. No idea where it fails (Ksproxy.ax or AVStream class
> driver ???). the results are :
> 1. E_FAIL if search is from LOOK_UP_STREAM and
> 2. E_NOINTERFACE, if search is from capture filter's analog input pin
> (which
> has the medium defined as same as of analog video out pin of crossbar
> filter)
>
> Where it's getting wrong ?? internals of
> ICaptureGraphBuilder2::FindInterface( ) would be more helpful..
>
> Thanks,
> Jayaprakash N
>
>



Relevant Pages

  • WMV file is not being closed properly after being read
    ... The source file is a wmv file in the user's temp ... I am not using my own custom filter in this graph. ... but the WMAsfReader filter does not appear to implement this interface. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: How to add Crossbar ?
    ... The crossbar will be added automatically to the graph. ... "If a video capture card has more than one physical input, ... Analog Video Crossbar Filter. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: upper filter driver over usbvideo.sys
    ... What confuse me is that I dont know the interface I can use from ... proxy interface support in my upper filter driver? ... An easier solution would be to modify the filter ... control of the graph. ...
    (microsoft.public.windowsxp.device_driver.dev)
  • Re: Need to recompile the program when pluging in custom filters?
    ... its position within the final graph. ... My program can then build the filter ... custom interface, and within the custom interface a function needs to be ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Managing Filter Chains
    ... the "IFilterChain" interface I figured that this was how you managed ... -> then search for an output pin on the filter object returned by ... to get the rest of the graph built ... talks about managing sub-graphs in DirectShow. ...
    (microsoft.public.win32.programmer.directx.video)