Re: Custom filter gets "These filters cannot agree on a connection error" (Return code: 0x80040207)

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Mathew (mathew.manu_at_gmail.com)
Date: 12/16/04


Date: Thu, 16 Dec 2004 14:59:22 +0900

I am assuming that you are trying to make a Transform filter.

I suggest you use a good filter wizard to generate the framework.
You can use the Alparysoft FilterWizard :
http://www.alparysoft.com/products.php?cid=5

You may have to modify the functions CheckInputType, CheckTransform and
Transform
and the mediatype used for registration.
regards,
MM

"MFicco" <mficco(no-spam)@hns.com> wrote in message
news:%23Mw7p8r4EHA.524@TK2MSFTNGP09.phx.gbl...
>I am writing my own DIRECTSHOW filter and am having trouble connecting
>pins.
> I've tracked down the following sequence:
>
> If the connection attempt starts out with the output pin of a Microsoft
> provided filter calling GetMediaType() on my input pin, everything works.
> Calls to GetMediaType() are followed by a call to CheckMediaType(const
> CMediaType* pmt) with pmt->majortype and pmt->minor type non-null. I
> return(S_OK), the output pin calls NotifyAllocator() and bingo we have a
> connection.
>
> HOWEVER
> If the connection attempt starts with the output pin of a Microsoft
> provided
> filter calling CheckMediaType() with (pmt->majortype == GUID_NULL) and
> (pmt->minortype == GUID_NULL), it appears to ignore my return(S_OK). The
> output pin then repeatedly calls my input pin's GetMediaType() function
> until it sees an acceptable type. It then calls CheckMediaType() with
> GUID_NULL pmt->majortype and pmt->minortype and still doesn't like my
> return(S_OK). The output pin again calls GetMediaType() until all types
> are
> enumerated, then it gives up and fails the connection.
>
> ***>> It seems that when the output pin calls CheckMediaType(const
> CMediaType* pmt) with NULL pmt->majortype and pmt->minortype, it wants the
> input pin to establish the media type. However, I can't set the values in
> pmt because it is "const" and the output pin doesn't take the hint from
> GetMediaType(). I don't think this is an allocator failure or any other
> problem because I've tried trapping on every function I can think of. The
> output pin seems to never get past GetMediaType() and CheckMediaType().
>
>
> I've been beating my head against this for days and have read all the
> documentation I can find.
> Any suggestions?
>
>



Relevant Pages

  • Re: Custom filter gets "These filters cannot agree on a connection error" (Return code: 0x
    ... > If the connection attempt starts out with the output pin of a Microsoft ... > provided filter calling GetMediaType() on my input pin, ... I would expect a filter which called first with a CheckMediaType of NULL ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Tranform filter connected to a Default DirectSound Device
    ... your filter is not accepting a connection with the upstream filter ... standard audio stream then it should be: ... InputPin::CheckMediaTypeso you can better control the connection. ... You can do the same with the output pin. ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: Simple Sample Filter...
    ... >create a valve-like filter that I can use to stop data flow to a renderer. ... >into a graph and connected to the output pin ... >on a connection). ... > \ CCustomInputPin ...
    (microsoft.public.win32.programmer.directx.video)
  • Problem connecting mp3 source filter
    ... WAVEFORMATEX waveFormat; ... If I open my filter in graphedit and manually add "MPEG Layer3 ... Decoder" to the graph my output pin renders. ... How can I modify my GetMediaType so that it will render without the ...
    (microsoft.public.win32.programmer.directx.audio)
  • Custom filter gets "These filters cannot agree on a connection error" (Return code: 0x8004
    ... If the connection attempt starts out with the output pin of a Microsoft ... Calls to GetMediaType() are followed by a call to CheckMediaType(const ...
    (microsoft.public.win32.programmer.directx.video)