Programmer questions: Plugin development. C# et al.

RichMacDonald wrote on 2/15/2005, 9:40 AM
I'm having a slow day at work so I started investigating Vegas plugin development options.

My background is ignorant but experienced programmer. Specially I do Java development. Years ago I did a little COM but in Smalltalk! I'm a newbie to all the latest Microsoft tools. I'm willing to spend $0, since this is for fun and anything I produce is for free.

What got me started is that Microsoft has some trial versions and/or some free Express Betas, so I wanted to find out if these betas could be used.

I'm making (very) slow progress, so I figured I'd post some questions/issues in case anyone can speed me up.

My first big issue is whether or not I have to use C++ or can I use C# or J# instead? I'd like to use J#, C# or C++ in that order. I've seen some previous posts in the forums, but no definitive answers and nothing since Feb 2003.

I downloaded the C++, C#, and J# apps from Microsoft. Could not open the Vegas SDK samples in C# or J#. Could open the samples in C++, but the app told me I needed to upgrade the project. Did this and saved the project. Tried to reopen the saved project in C# and got an error that "The application for the project "blah.vcproj" is not installed." Well C++ is installed, so I've either mis-installed something or there is some additional cross-platform issues I don't know about.

The Vegas SDK mentions the "DirectX Transform API,", but that is now hopelessly out-of-date. AFAIK, you cannot obtain the "DirectX Transform API" SDK from Microsoft and its been incorporated into more recent DirectX versions. So the existing installation instructions are a battle. However, since I could open the Vegas samples I assume this is not a show-stopper.

What are these "Express Betas"? Can I do useful work with them?

I could install the Express Betas on my work computer but I don't use Vegas at work. I could not install the Express Betas on my home computer (a mystery error with no info after 30+ min installation), so that's another fun hurdle.

BTW, the Vegas programmers have a fine sense of humor. Their document states: "If you are unfamiliar with the DirectX Media SDK, the DirectX Transform API, the Component Object Model (COM), C/C++, or you do not know how to empty the Recycle Bin, then you are not ready for this development kit."

Anyway, as any programmer knows, getting setup and configured is half the battle, and this is where I'm an ignorant and impatient dufus. The coding should be easy in comparison :-) So if any kind experienced soul could give me a few pointers, I'd be much obliged. TIA..

Comments

jetdv wrote on 2/15/2005, 9:52 AM
Not sure about the Express Betas. However, you should be able to use virtually any .NET language. I'm using C# now but started with JScript. VBScript is also allowed.

If you look here and here, you can find a lot of good scripting info - including how to script in C#.

If you're looking for a free development environment, you also might want to look at SharpDevelop which can be used to create C# dll's that can be used in Vegas.
RichMacDonald wrote on 2/15/2005, 10:33 AM
Thanks jetdv. nice to see SharpDevelop coming along. I'm taking a look now.
I see plenty of good scripting advice and maybe scripts are the way to go. But how about plugins? Has anyone setup SharpDevelop to incorporate the Vegas plugin SDK?

Note: My ultimate goal is something like deshaker...yeah, something simple :-)
I have no problems using a script to extract clips, operate on them with a 3rd party app, and add the results back as a take (or replacement). That's my most likely scenario. But the holy grail would be something keyframeable, and that would require a "true" plugin, afaik?

FWIW and more than anyone wants to know, my current work project is taking a bunch of jpegs to create a movie, then getting it to play as a widget inside a java app, including the PocketPC. I can do it now with a sequence of jpegs which I then display one after the other (the nonstandard mjpeg format :-), but a movie format would save 50+% of the file size. Unfortunately the java code world for movies is very limited in this area. Sun has a library that lets me get from jpeg->quicktime, but it cannot do avi or mpeg and there is no quicktime on PocketPC. IBM has a library but a high price tag and no source. There is a sourceforge project called MediaFrame that does mpeg1 and mpeg4, but its an unacceptable GPL license and doesn't support PocketPC. So I'm facing the issue of writing my own codec to do temporal compression, which is awfully close to the tools I'll need for deshaker. So I'm just taking a break to explore some cross-platform issues. Actually, my holy grail would be a simple Vegas plugin that delegates everything to a java backend, which would optimize my toolkit. (And alienate all the Vegas users, I'm sure.) But I'm not kidding myself that it isn't months of work, so today is just exploratory puttering around.
JohnnyRoy wrote on 2/15/2005, 11:02 AM
Rich,

Plug-ins in Vegas are just DirectX Filters. The SDK is a wrapper to help make it easier but you are still writing a DirectX filer and, as you have seen, the SDK is woefully out of date.

If you want to write plug-ins, you need to develop in C or C++. Forget about .Net languages like J# or C#. Trust me, it hurts to say that because I’m an old C/C++ programmer, who programmed in Java for 7 years, and now develop in C# and I DON’T want to go back to C++. It’s like going back to the Stone Age. (BTW, if you develop in Java you’re gonna love C#. It’s everything Java should have been)

Go to directxfiles.com, click on the developer link and follow the tutorials to build your first DirectX filer. I’m about to do the same and it seems like it’s just gonna be a painful experience. Perhaps someone like Mike Crash who has written some Vegas plug-ins can give some guidance on what tools are needed. I believe something like Visual C++ is the best way to go although, I believe, the Microsoft C++ compiler itself is a free download (without the Studio tools)

~jr
rcampbel wrote on 2/15/2005, 1:02 PM
Rich,

Mike Crash does make the source code for the C++ plug-ins available on his site so you can use that as a starting point. Vegas scripts can be written in C#, but not DirectX plug-ins.

I agree with JR, it is too easy to get spoiled with C#.

JR, do you know where the Microsft C++ free compiler download is? I always thought that you had to use Visual Studio or gnu.

Randall
RichMacDonald wrote on 2/15/2005, 1:17 PM
>JR, do you know where the Microsoft C++ free compiler download is?

Here perhaps?

Great info, guys.
JohnnyRoy wrote on 2/15/2005, 1:41 PM
Yea, that’s the place. True, Mike makes his source available but the real problem is getting the development environment set up to compile it. The SDK lists all software that you can’t get anymore. (i.e., DirectX 6!) That’s why I was hoping to follow the tutorials on the Cakewalk site (sorry Sony) so see how it’s done with current tool releases.

~jr
RichMacDonald wrote on 2/15/2005, 7:08 PM
>Vegas scripts can be written in C#, but not DirectX plug-ins.

Just for the record, why can't we write DirectX plugins in C#? I noticed a DirectX9 SDK kit for C# . What are the addtional hurdles?
rcampbel wrote on 2/16/2005, 3:04 AM
Thanks for the link to the C++ compiler.

While there is a managed DirectX 9 SDK, DirectShow is not included. There is only a very, very limited audio/video player. There is not a managed API for writing filters.

While you could perhaps do it via COM Interop, the performance would not likely be acceptable due to the large amount of data that needs to be processed and moved very quickly. There are some COM Inteop DirectShow interfaces available here if you want to look at it in more detail.

Randall