Help with a DirectX 9.0 sample

forum.advanced.programming (1998-2005)
Keith Sandberg

Help with a DirectX 9.0 sample

Post by Keith Sandberg » 07 Feb 2005, 18:27

 Posted by:  Keith Sandberg 

I am trying to implement the sample code shown here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/directshow/htm/howtoplayafile.asp

I have successfully create the supporting APL's and have an app that
compiles. I am using TD 2.1 on XP.

However, I am having trouble "interpreting" the C++ sample into SAL
equivalent. I would do much better if the sample were in VB. :wink:

In particular, I am confused by the C++ example's call to the QueryInterface
method.

The sample shows:
hr = qGraph->QueryInterface(IID_IMediaControl, (void **)&pControl);

However, when I browse the "UDV Functions" window in TD, my qGraph object
has no "QueryInterface" function... but it DOES have a "GetInterface"
function. Is that the same thing? Selecting GetInterface gives me SAL
code:

Call qGraph.GetInterface( object, string )

Can someone help? Thanks!

Keith Sandberg

Re: Help with a DirectX 9.0 sample

Post by Keith Sandberg » 07 Feb 2005, 21:05

 Posted by:  Keith Sandberg 

I realized that my previous post might not be descriptive enough.

Attached are my test APP (CTD 2.1), and the ActiveMovie Type Library.APL
that was created by Centura when I used the ActiveX tool to generate an APL
for the Active Movie Type Library. I was instructed to use the Active
Movie Type library at the Microsoft site, when searching for how to
interface with QUARTZ.DLL.

It should be really simple, but for some reason I can't get it to work. Any
help is appreciated!

Keith
Orlando, FL

You do not have the required permissions to view the files attached to this post.

arvindram11
United States of America
Posts: 555
Joined: 14 Apr 2019, 23:42
Location: Richmond, VA

Re: Help with a DirectX 9.0 sample

Post by arvindram11 » 07 Feb 2005, 22:04

 Posted by:  Aravind Ram 

Hi Keith,

Can you attach an APT file? For some reason, Windows thinks that an .APP
file is a potential virus and refuses to extract the file.

Aravind

Keith Sandberg

Re: Help with a DirectX 9.0 sample

Post by Keith Sandberg » 08 Feb 2005, 14:00

 Posted by:  Keith Sandberg 

Gladly.

You do not have the required permissions to view the files attached to this post.

Marco Villanova

Re: Help with a DirectX 9.0 sample

Post by Marco Villanova » 08 Feb 2005, 18:32

 Posted by:  Marco Villanova 

Hi Keith

I think so

I attached a file that work for me. See Marco: for the comments

Hi Marco

You do not have the required permissions to view the files attached to this post.

Keith Sandberg

Re: Help with a DirectX 9.0 sample

Post by Keith Sandberg » 08 Feb 2005, 18:56

 Posted by:  Keith Sandberg 

ah, thanks. The app plays the video (an MPG1) that I wish to play now.
Now I will see if the video editing functions work as well as Microsoft
advertises.

The new DirectX 9 supposedly has new/better video editing features. My goal
is to write a simple app to use at home for editing my home movies... I'd
like do an unattended vidcap of say, 1 hour, of home movies... then later
split the video up into smaller pieces that I can use to make a Video CD
(VCD) to send to my family members. I have a 3-yr old son... we live in
Florida.. my parents live in Arizona.. they rarely get to see each other. I
send videos to keep them updated.

(Yes, I know about all the software out there that already does this... I
even have a couple different programs already.. but being inquisitive, not
to mention having too much time on my hands, I wanted to see if I could do
it myself... the DirectShow docs from Microsoft make it look very easy to
implement).

arvindram11
United States of America
Posts: 555
Joined: 14 Apr 2019, 23:42
Location: Richmond, VA

Re: Help with a DirectX 9.0 sample

Post by arvindram11 » 08 Feb 2005, 19:12

 Posted by:  Aravind Ram 

Neat. And don't forget to post the completed application in
Forum.sourcecode !! :-)

Aravind

Keith Sandberg

Re: Help with a DirectX 9.0 sample

Post by Keith Sandberg » 09 Feb 2005, 15:55

 Posted by:  Keith Sandberg 

The video editing functions are in the QEDIT.DLL. Team Developer finds the
type library for this DLL, called "Dexter 1.0 Type Library". I imagine
"Dexter" stands for "Directx Editing eXtensions" or something.....

Anyway... I select all the classes/functions in the type library. I used
"Generate Deep" as the APL generation option. Well, the APL that I ended
up with does indeed have all the classes from QEDIT, but none of the class
"properties" or "variables" or "methods".

For instance, the MediaDet object (Media Detector), according to the VB
documentation on MSDN site, has properties MediaDet.Filename...
MediaDet.OutputStream... MediaDet.StreamTypeB, MediaDet.FrameRate,
MediaDet.StreamLength.... etc, etc. It also has methods
MediaDet.WriteBitmapBits(), etc.

Why didn't the Team Developer APL generator pick these up? Is there
something else I have to do? Do I need to involve QEDIT.H (the C++
header file for QEDIT.DLL) somehow? Is there a way I can reference the
properties and methods of a "COM Proxy Class" without them being defined in
an APL?

For reference, I am using the TrimmerVB sample app as my guide. You can
find it on the internet here:
http://safariexamples.informit.com/0672325969/DirectX%20SDK/Extras/DirectShow/VB%20Samples/Editing/TrimmerVB/

As always, thanks for your help.

You do not have the required permissions to view the files attached to this post.

Marco Villanova

Re: Help with a DirectX 9.0 sample

Post by Marco Villanova » 10 Feb 2005, 11:26

 Posted by:  Marco Villanova 

Hi Keith

TD accesses to COM via automation and to do this the COM must satisfy:
"Automation is an industry standard used by applications to provide objects
in a

consistent way to other applications, development tools, and macro
languages. To use

automation, the object must support the IDispatch interface." (from Gupta
Book on line)

The coclass MediaDet has the default interface IMediaDet that derive from
IUnknown and so it does support the

IDispatch interface. You can verify that using the OleView and searching for
the "Dexter 1.0 Type Library"

I think that you must wrap the call of these methods in another module,
for example in a VB COM, that exports the method you need to use. Than
you create an APL from this Module....

Hi Marco

Keith Sandberg

Re: Help with a DirectX 9.0 sample

Post by Keith Sandberg » 10 Feb 2005, 15:44

 Posted by:  Keith Sandberg 

Yes, after doing some research I, too, discovered that the desired functions
I want in QEDIT.DLL are "hidden".

I also found this little article.... there is a code sample on the page for
how to lookup up the "GUID" of a hidden function... all you need to know is
the Class ID of the object. Of course, I don't know C or C++ so it's all
gobbledy-gook to me. Maybe someone can translate this to a SAL equivalent.

http://www.essien.de/rd/docs/guidtostring.txt

http://www.essien.de/rd/docs/secret_filters_dshow.htm

In the meantime, as you mentioned -- my only option is to write a VB
"wrapper DLL" to make the functions available to my Centura app.....
I'm not sure if/when I'll ever get to this, but I'll be sure to post an
update if I do.

Thanks for all your help.

Return to “advanced.programming”

Who is online

Users browsing this forum: [Ccbot] and 1 guest