Using the Features of Video Files

In the previous example, we used an audio file as our “test” to show how simple it was to load and play the content. What if we wanted to do the same thing with the video file “butterfly.mpg” instead? Simple enough; just use the following:

Video someVideo = new Video("butterfly.mpg", true);

If you ran code similar to this in your application, the very first thing you would notice is that the video plays in an entirely new window. While this may be adequate for you, what if you didn't want that? What if you already had a window where you wanted to display your movie? Of course, this is quite simple to do; however, it requires an extra couple lines. First, you will want to skip the auto play feature. Instead, ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.