Some help for beginner filter developers

Some help for beginner filter developers

Post by Chris Rand » Mon, 28 Feb 2000 04:00:00



I've just started looking into DirectShow filter development using
VC++ 6 and the DShow SDK. Looking at past posts in this group it seems
that several people have had the same problem I had when trying to
build the sample filters, namely the error messages about IBasicVideo2
and IAMClockAdjust being undefined. Sifting through previous posts I
found the solution to the problem (and to other problems that then
materialised) but I think it would be a good idea for an experienced
filter developer to write a step by step method for setting up VC++ 6
for filter development, something like the vc5kit supplied with the
SDK.

A previous post by Sylvain Bertrand says:

...You have to wrap the DllEntryPoint of the DirectShow C/C++
framework in the new standard function for dll entry point, namely
DllMain...

It would be helpful if the tutorial included the basic code needed for
any filter implementation (such as the dll routines) incorporating any
changes required.

Any volunteers to write this checklist/tutorial?

Also I'm toying with the idea of setting up a website for DirectShow
developers. As I'm sure you have already realised there are
practically no resources out there for us. If I do set up a website
would any of you be willing to contribute tutorials, sample code or
sample filters and apps?

Chris Rands

 
 
 

Some help for beginner filter developers

Post by Sylvain Bertran » Tue, 29 Feb 2000 04:00:00


I agree with you.
But, we have to keep in mind that directshow is COM. The C++ directshow
framework is here to help us, and if you really want be serious in
directshow programming the only way to go is MIDL. To implement the
interfaces, I reckon one of the best solutions is ATL (fast, small, and with
WFC seems it will replace MFC). Ok you have to code plenty of things by
yourshelf, but the programming model of directshow is entirely yours, in
other words it's not hidden deeply in some dark C++ classes. I consider the
C++ framework as a "starter", as soon as I have my directshow graph ready,
coded with the class libary, I will take MIDL, ATL and recode it
properly.The trap is to think that the C++ classes library programming model
is the programming model of directshow... No. You have to go down to the COM
level to understand the real stuff.
Anyway, the documentation about how to setup the C++ framework is useless
now, and yes the directshow community should do something.

--

Sylvain Bertrand
Thomson Marconi Sonar PTY LTD
Australia



Quote:> I've just started looking into DirectShow filter development using
> VC++ 6 and the DShow SDK. Looking at past posts in this group it seems
> that several people have had the same problem I had when trying to
> build the sample filters, namely the error messages about IBasicVideo2
> and IAMClockAdjust being undefined. Sifting through previous posts I
> found the solution to the problem (and to other problems that then
> materialised) but I think it would be a good idea for an experienced
> filter developer to write a step by step method for setting up VC++ 6
> for filter development, something like the vc5kit supplied with the
> SDK.

> A previous post by Sylvain Bertrand says:

> ...You have to wrap the DllEntryPoint of the DirectShow C/C++
> framework in the new standard function for dll entry point, namely
> DllMain...

> It would be helpful if the tutorial included the basic code needed for
> any filter implementation (such as the dll routines) incorporating any
> changes required.

> Any volunteers to write this checklist/tutorial?

> Also I'm toying with the idea of setting up a website for DirectShow
> developers. As I'm sure you have already realised there are
> practically no resources out there for us. If I do set up a website
> would any of you be willing to contribute tutorials, sample code or
> sample filters and apps?

> Chris Rands


 
 
 

Some help for beginner filter developers

Post by Sylvain Bertran » Fri, 03 Mar 2000 04:00:00


WTL and not WFC...

--

Sylvain Bertrand
Thomson Marconi Sonar PTY LTD
Australia



> I agree with you.
> But, we have to keep in mind that directshow is COM. The C++ directshow
> framework is here to help us, and if you really want be serious in
> directshow programming the only way to go is MIDL. To implement the
> interfaces, I reckon one of the best solutions is ATL (fast, small, and
with
> WFC seems it will replace MFC). Ok you have to code plenty of things by
> yourshelf, but the programming model of directshow is entirely yours, in
> other words it's not hidden deeply in some dark C++ classes. I consider
the
> C++ framework as a "starter", as soon as I have my directshow graph ready,
> coded with the class libary, I will take MIDL, ATL and recode it
> properly.The trap is to think that the C++ classes library programming
model
> is the programming model of directshow... No. You have to go down to the
COM
> level to understand the real stuff.
> Anyway, the documentation about how to setup the C++ framework is useless
> now, and yes the directshow community should do something.

> --

> Sylvain Bertrand
> Thomson Marconi Sonar PTY LTD
> Australia




> > I've just started looking into DirectShow filter development using
> > VC++ 6 and the DShow SDK. Looking at past posts in this group it seems
> > that several people have had the same problem I had when trying to
> > build the sample filters, namely the error messages about IBasicVideo2
> > and IAMClockAdjust being undefined. Sifting through previous posts I
> > found the solution to the problem (and to other problems that then
> > materialised) but I think it would be a good idea for an experienced
> > filter developer to write a step by step method for setting up VC++ 6
> > for filter development, something like the vc5kit supplied with the
> > SDK.

> > A previous post by Sylvain Bertrand says:

> > ...You have to wrap the DllEntryPoint of the DirectShow C/C++
> > framework in the new standard function for dll entry point, namely
> > DllMain...

> > It would be helpful if the tutorial included the basic code needed for
> > any filter implementation (such as the dll routines) incorporating any
> > changes required.

> > Any volunteers to write this checklist/tutorial?

> > Also I'm toying with the idea of setting up a website for DirectShow
> > developers. As I'm sure you have already realised there are
> > practically no resources out there for us. If I do set up a website
> > would any of you be willing to contribute tutorials, sample code or
> > sample filters and apps?

> > Chris Rands

 
 
 

Some help for beginner filter developers

Post by Chris Rand » Fri, 03 Mar 2000 04:00:00


Thanks for the reply, Sylvain. I must say I am a little disappointed
in the general lack of response to my post. I would have thought the
group would have jumped at the chance of a DirectShow web resource, if
only to limit the number of posts from people who have run into
problems building the samples. Ah well.

Quote:>I agree with you.
>But, we have to keep in mind that directshow is COM. The C++ directshow
>framework is here to help us, and if you really want be serious in
>directshow programming the only way to go is MIDL. To implement the
>interfaces, I reckon one of the best solutions is ATL (fast, small, and with
>WFC seems it will replace MFC). Ok you have to code plenty of things by
>yourshelf, but the programming model of directshow is entirely yours, in
>other words it's not hidden deeply in some dark C++ classes.

Pesonally I'm quite happy to use the base classes, it seems like a
waste to spend my time implementing behaviour that Microsoft
programmers have already implemented. I'd rather spend my time higher
up the ladder, working on features that are unique to my object.

Quote:> I consider the
>C++ framework as a "starter", as soon as I have my directshow graph ready,
>coded with the class libary, I will take MIDL, ATL and recode it
>properly.

Why would you spend your time coding something (eliminating bugs,
testing etc) only to re-code it using a different model once you are
finished? Unless of course the code using the C++ base classes ran too
slowly to be useful, if this is the case anyone using the base classes
is in trouble!

Quote:>The trap is to think that the C++ classes library programming model
>is the programming model of directshow... No. You have to go down to the COM
>level to understand the real stuff.

I agree. It's important to remember you can implement this stuff using
any programming model (or language for that matter), as long as you
support the required interfaces.

Quote:>Anyway, the documentation about how to setup the C++ framework is useless
>now, and yes the directshow community should do something.

Would you consider re-writing it? It seems like you know how to work
with the SDK samples, reading some of your replies to previous posts
helped me solve the problems I was having.

It doesn't have to be anything fancy, just a list of the steps
required to set up the VC++ 6 environment for building the samples and
details of any changes that need to be made to the samples themselves
(I'm thinking of the DllMain wrapper that you mentioned in one of your
posts).

I'll convert this list into a HTML page and put it on the web, that
way when someone has a problem with the samples they can search the
web for the solution, or if they post a question here the group can
point them to the page.

Chris Rands

 
 
 

Some help for beginner filter developers

Post by steph.rodrigue » Fri, 03 Mar 2000 04:00:00


I have to disagree with you Sylvain. DirectShow is a thin layer, not a big
thing as what you're saying suggests. Whatever the framework you use
(MFC,ATL,WFC,...) or when you start to third parties lib such like G2 or
Quicktime, it's possible to compile and link. That's just a matter of #ifdef
in worst cases.
The only trouble with DirectShow is the documentation. It was made without a
big thought in mind, but that's all.

SR-

Sylvain Bertrand a crit dans le message ...

>WTL and not WFC...

>--

>Sylvain Bertrand
>Thomson Marconi Sonar PTY LTD
>Australia




>> I agree with you.
>> But, we have to keep in mind that directshow is COM. The C++ directshow
>> framework is here to help us, and if you really want be serious in
>> directshow programming the only way to go is MIDL. To implement the
>> interfaces, I reckon one of the best solutions is ATL (fast, small, and
>with
>> WFC seems it will replace MFC). Ok you have to code plenty of things by
>> yourshelf, but the programming model of directshow is entirely yours, in
>> other words it's not hidden deeply in some dark C++ classes. I consider
>the
>> C++ framework as a "starter", as soon as I have my directshow graph
ready,
>> coded with the class libary, I will take MIDL, ATL and recode it
>> properly.The trap is to think that the C++ classes library programming
>model
>> is the programming model of directshow... No. You have to go down to the
>COM
>> level to understand the real stuff.
>> Anyway, the documentation about how to setup the C++ framework is useless
>> now, and yes the directshow community should do something.

>> --

>> Sylvain Bertrand
>> Thomson Marconi Sonar PTY LTD
>> Australia




>> > I've just started looking into DirectShow filter development using
>> > VC++ 6 and the DShow SDK. Looking at past posts in this group it seems
>> > that several people have had the same problem I had when trying to
>> > build the sample filters, namely the error messages about IBasicVideo2
>> > and IAMClockAdjust being undefined. Sifting through previous posts I
>> > found the solution to the problem (and to other problems that then
>> > materialised) but I think it would be a good idea for an experienced
>> > filter developer to write a step by step method for setting up VC++ 6
>> > for filter development, something like the vc5kit supplied with the
>> > SDK.

>> > A previous post by Sylvain Bertrand says:

>> > ...You have to wrap the DllEntryPoint of the DirectShow C/C++
>> > framework in the new standard function for dll entry point, namely
>> > DllMain...

>> > It would be helpful if the tutorial included the basic code needed for
>> > any filter implementation (such as the dll routines) incorporating any
>> > changes required.

>> > Any volunteers to write this checklist/tutorial?

>> > Also I'm toying with the idea of setting up a website for DirectShow
>> > developers. As I'm sure you have already realised there are
>> > practically no resources out there for us. If I do set up a website
>> > would any of you be willing to contribute tutorials, sample code or
>> > sample filters and apps?

>> > Chris Rands