[wdmaudiodev] Re: How does a filter become part of standard graphs

  • From: "Olivier Roblin" <oroblin@xxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Tue, 8 Apr 2003 15:05:21 +0200

Walter,
A friend has just give me information about this. Maybe it can help you.
Olivier Roblin

In the registration code you must have this kind of structure :

const AMOVIESETUP_FILTER sudMyFilterax =

{

&CLSID_MYFILTER, // Filter CLSID

MYFILTERNAME, // String name

MERIT_PREFERRED, // Filter merit

1, // Number pins

&sudOpPin // Pin details

};

CFactoryTemplate g_Templates[] = {

{MYFILTERNAME

, &CLSID_MYFILTER

, CMyFilter::CreateInstance

, NULL

, &sudMyFilterax }

};

int g_cTemplates = sizeof(g_Templates) / sizeof(g_Templates[0]);



If the merit is MERIT_PREFERRED, normally, MyFilter will be inserted
automaticly in the graph after each filters that has a mediatype on its
output pin that can be accepted by the input pin of the MyFilter.

However it is dangerous to give this merit to a transform filter, you may
not want it to get inserted every time it can. Make sure to have something
that will make succeed the Media Type negociation (CheckMediaType) only when
you want it to be present. Also the connection should fail when it tries to
connect to itself.

Also if there is another filter that can accept the same MediaType and has
the same merit, you may have conflicts.

(Check "How Filters Connect" in the DirectX help)

The normal way is to insert the filter by hand in the graph each time you
need it but in this case you can't use it for all applications that use
DirectShow, only with your own applications where you create the graph
yourself...

I don't know about AVStream filters and WDM filters.

Also, do all applications like CoolEdit always use DirectShow?

Take care,
Joël


----- Original Message -----
From: "Walter Oney" <waltoney@xxxxxxxxxxxx>
To: "wdmaudio" <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Tuesday, April 08, 2003 12:18 PM
Subject: [wdmaudiodev] How does a filter become part of standard graphs


>
> How do I package a data transform filter so that it becomes part of the
> graphs that get built for people doing audio recording types of
> application?
>
> Here's a bit of background. I have a data transform algorithm that I
> want to interpose into the realtime capture stream from whatever sound
> card happens to be installed. I initially built this as a DirectShow
> filter, and I'm able to test this quite easily using GraphEdt. Now it's
> time to package it for the real world, where people just hit the record
> button in applications like CoolEdit. I can't figure out how to get this
> filter installed into the graph that gets used for the realtime data
> stream.
>
> Should I even be using a DirectShow filter in the first place? Should
> this instead be an AVStream filter? Or should it be a regular WDM filter
> driver that sits in some device driver stack modifying some IRPs? If so,
> *which* device driver stack is the right one?
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.de/
>

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: