BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Getting DirectShow streams.h working in borland builder...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder
View previous topic :: View next topic  
Author Message
craig reay
Guest





PostPosted: Wed Dec 21, 2005 12:57 am    Post subject: Getting DirectShow streams.h working in borland builder... Reply with quote



Hi All,

After 5 hours of prodding and poking I have finally managed to get
streams.h working in Borland c++ builder 6. I have found that a lot of
people have the same problems so I thought it would be nice to post the
answers!

First download and installed the dxsdk then get the latest direct x
libraries from http://www.clootie.ru/cbuilder/index.html and extract
them into your c:\dxsdk\lib\borland.

To use dxsdk do the following:
Options/Project/Directories - Include file directories - add
c:\dxsdk\include and c:\dxsdk\samples\c++\directshow\baseclasses (or
what ever your equivalents are) just on general principles.
Options/Project/Directories - library path directories - add
c:\dxsdk\lib\borland

!!!note that when you add these directories that they have to be before
the $(BCB)\include; ect ect. Do not ask me why I do not know.

Now when you use #include <stream.h> it should be able to find it. You
will more than likely receive the error: "undefined AM_NOVTABLE in
wxutil.h and in a couple of other header files. To fix this problem
alter c:\dxsdk\samples\c++\directshow\baseclasses\stream.h and replace
the following

#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif // MSC_VER

with

#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#else //new line
#define AM_NOVTABLE //new line
#endif // MSC_VER

the reason behind this is because AM_NOVTABLE will only be defined if
_MSC_VER is defined which is a VC++ compiler specific thing (well done
Microsoft).

Ok now we have fixed this we will get yet another error message!
"Inline assembly not allowed" in the file wxutil.h.

In wxutil.h, line 381:
change #ifdef _X86_ to #if defined(_X86_) && !defined(__BORLANDC__)
Reason: BCB doesn't support __asm in inline functions. Instead of
removing the inline keyword, the new #if statement compiles a straight
C++ inline function (well done microsoft x2).

Hopefully by now you would expect everything to be working however!!! I
installed dx9sdk and found another error in
c:\dxsdk\samples\c++\directshow\baseclasses\ctlutil.h at line 578. The
error is "declaration does not specify a tag or an identifier". To fix
this problem look at line 577 and replace DECLARE_IUNKNOWN; with
DECLARE_IUNKNOWN. Once again well done microsoft x3.

Conclusion: you might think that this is a lot of work just to use
DirectShow and I would agree! so who do we have to blame for all of
this? well I would personally say that its mostly down to Microsoft and
its monopolising ways!

Hope this helps a few people

Thanks,
Craig

ps. if you know of any more solutions to dxsdk problems please post
them and let me know if this post has helped.
Back to top
russio
Guest





PostPosted: Tue Jan 17, 2006 9:15 pm    Post subject: Re: Getting DirectShow streams.h working in borland builder. Reply with quote



craig reay wrote:
Quote:
Hi All,

After 5 hours of prodding and poking I have finally managed to get
streams.h working in Borland c++ builder 6. I have found that a lot of
people have the same problems so I thought it would be nice to post the
answers!

First download and installed the dxsdk then get the latest direct x
libraries from http://www.clootie.ru/cbuilder/index.html and extract
them into your c:\dxsdk\lib\borland.

To use dxsdk do the following:
Options/Project/Directories - Include file directories - add
c:\dxsdk\include and c:\dxsdk\samples\c++\directshow\baseclasses (or
what ever your equivalents are) just on general principles.
Options/Project/Directories - library path directories - add
c:\dxsdk\lib\borland

!!!note that when you add these directories that they have to be before
the $(BCB)\include; ect ect. Do not ask me why I do not know.

Now when you use #include <stream.h> it should be able to find it. You
will more than likely receive the error: "undefined AM_NOVTABLE in
wxutil.h and in a couple of other header files. To fix this problem
alter c:\dxsdk\samples\c++\directshow\baseclasses\stream.h and replace
the following

#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#endif // MSC_VER

with

#if _MSC_VER>=1100
#define AM_NOVTABLE __declspec(novtable)
#else
#define AM_NOVTABLE
#endif
#else //new line
#define AM_NOVTABLE //new line
#endif // MSC_VER

the reason behind this is because AM_NOVTABLE will only be defined if
_MSC_VER is defined which is a VC++ compiler specific thing (well done
Microsoft).

Ok now we have fixed this we will get yet another error message!
"Inline assembly not allowed" in the file wxutil.h.

In wxutil.h, line 381:
change #ifdef _X86_ to #if defined(_X86_) && !defined(__BORLANDC__)
Reason: BCB doesn't support __asm in inline functions. Instead of
removing the inline keyword, the new #if statement compiles a straight
C++ inline function (well done microsoft x2).

Hopefully by now you would expect everything to be working however!!! I
installed dx9sdk and found another error in
c:\dxsdk\samples\c++\directshow\baseclasses\ctlutil.h at line 578. The
error is "declaration does not specify a tag or an identifier". To fix
this problem look at line 577 and replace DECLARE_IUNKNOWN; with
DECLARE_IUNKNOWN. Once again well done microsoft x3.

Conclusion: you might think that this is a lot of work just to use
DirectShow and I would agree! so who do we have to blame for all of
this? well I would personally say that its mostly down to Microsoft and
its monopolising ways!

Hope this helps a few people

Thanks,
Craig

ps. if you know of any more solutions to dxsdk problems please post
them and let me know if this post has helped.
Back to top
russio
Guest





PostPosted: Tue Jan 17, 2006 10:43 pm    Post subject: Re: Getting DirectShow streams.h working in borland builder. Reply with quote



Hi,

i continue trying to include the directx, but i have found an error I
don't know how to solve.
The error is in: amfilrer.h


(c++ error) amfilter.h type name expected
(c++ error) amfilter.h expected
(c++ error) amfilter.h type name expected
(c++ error) amfilter.h type Declaration missing

it shows the error in

class CDynamicOutputPin : public CBaseOutputPin,
public IPinFlowControl
{

i'm using directx 9, anyone knows how to solve this?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.