Thread: DirectShow code - long night of coding

  1. #1
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001

    DirectShow code - long night of coding

    After a long night of coding I finally have DirectShow working inside of my engine for fullscreen and/or windowed videos.

    I tried using the new IVMRWindowlessControl interface to no avail. However, the older IVideoWindow interface works like a charm.

    Once the intro videos play for the engine, company, and game if needed - a variable is incremented denoting completion of each step. After all videos are shown, the title screen is rendered. Once a selection is made, then the variable is set to in game status and the renderer switches modes.

    This was NOT easy to do. DirectShow is a frieking mess of interfaces that all do very different things. But the class can also be used to play MP3's while in-game which is quite nice. I could even create a custom MP3 player so players could play their own songs during gameplay. In fact, I just might do that.

    Also found a way to have class-based WndProc's instead of non-member WndProc's. Got the idea from the net and had to re-work it a bit, but it works very well. I'll not explain it here but I can say that now I can define the base helper WndProc's for game and video's that call the class based versions. The class-based versions are implemented by user classes that are derived from CD3DApp and CDXShowWnd.

    Here is a frame grab re-sampled to 800x600 from 1024x768. It's a sample video created in ULead Cool 3D Studio and it's just something to show off the engine running the game. It's a 3D engine but this version is only doing 2D stuff.

  2. #2

    Join Date
    May 2005
    Looking good, what types of videos can it play? e.g. wmv, avi etc

    MFC still?
    I'm not immature, I'm refined in the opposite direction.

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Göteborg, Sweden
    Quote Originally Posted by BobMcGee123
    Looking good, what types of videos can it play? e.g. wmv, avi etc
    It should be able to play anything that WMP can play.

    I never had any problems with DirectShow. I thought it was very nice, taking care of everything (loading different file formats etc.) for me. That was a few years ago though.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Values changing without reason?
    By subtled in forum C Programming
    Replies: 2
    Last Post: 04-19-2007, 10:20 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. late night coding
    By caroundw5h in forum C Programming
    Replies: 18
    Last Post: 09-05-2004, 07:37 AM
  4. need help
    By emperor in forum C Programming
    Replies: 1
    Last Post: 03-04-2002, 12:26 PM
  5. Help a vb Programmer with some directshow code?
    By CliffRichard in forum C++ Programming
    Replies: 4
    Last Post: 12-05-2001, 07:34 PM