Video Player Gui for TGEA
by Gordon Walton · 02/16/2007 (9:20 am) · 15 comments
Download Code File
While adapting Todd D. Degani's great guiAviBitmapCtrl resource for use with TGEA, i found the need to create a video player GUI.
You must replace guiAviBitmapCtrl.h and guiAviBitmapCtrl.cpp in engine/gui/game with the ones in this zip file.
The script is for a video player gui that i use as a third startup gui in my project. Although its easily adaptable to be used where ever you require a video file to play. The Gui is invoked by calling loadMovieOne. Although my project does not use modpaths, this should work fine with a standard TGEA distribution. Just remember to remember to set the right path to the movie you wish to play.
To customise the gui so that you can have multiple video gui's in one project, search and replace MovieOne with a name of your choice and it will rename all the relevant parts to make each gui unique.
Happy video playing!
While adapting Todd D. Degani's great guiAviBitmapCtrl resource for use with TGEA, i found the need to create a video player GUI.
You must replace guiAviBitmapCtrl.h and guiAviBitmapCtrl.cpp in engine/gui/game with the ones in this zip file.
The script is for a video player gui that i use as a third startup gui in my project. Although its easily adaptable to be used where ever you require a video file to play. The Gui is invoked by calling loadMovieOne. Although my project does not use modpaths, this should work fine with a standard TGEA distribution. Just remember to remember to set the right path to the movie you wish to play.
To customise the gui so that you can have multiple video gui's in one project, search and replace MovieOne with a name of your choice and it will rename all the relevant parts to make each gui unique.
Happy video playing!
About the author
#2
04/17/2007 (3:47 am)
i have the same problem.. anyone got an idea?
#3
06/26/2007 (9:49 am)
??? so is this not working???
#4
08/01/2007 (10:11 am)
I tried it, but it ask for olectl.h file in dshow.h, anyone got it working already ?
#5
08/03/2007 (2:26 am)
Sorry for my abscence from the torque game community its been hectic getting a product ready for release. I was using Vista when i compiled so i didn't realise the dependancy this resource has. Microsoft Server 2003 SP1 SDK contains the right files to compile this. I have not played around with MPEG using this resource.
#6
12/27/2007 (8:46 pm)
So did this ever get fixed?
#7
03/31/2008 (9:58 am)
You may need the directX8 and DX9 SDK and need to add the include/lib files to the MS VS in the VC++ Directory, then move to the bottom (include folder/library folder) (DX8 SDK files)
#8
It works.. great..
10/16/2008 (3:10 am)
I can get working guiAviBitmapCtrl only if compile with Microsoft Server 2003 R2 SDK..It works.. great..
#9
01/03/2009 (12:28 pm)
anyone have an missing file audio/audio.h error?
#10
You may ignore the "audio/audio.h" as follows..
// include "audio/audio.h"
and also comment out a couple of member variables..
// AUDIOHANDLE mWavHandle; // music to play along with it
and add following typedef.. in guiAviBitmapCtrl.h
typedef int ALint;
and also comment out the lines in *.cpp
// mWavHandle = NULL_AUDIOHANDLE;
// alxGetContexti(ALC_BUFFER_LATENCY, &mAudioLatency);
I hope this helps..
01/07/2009 (12:14 am)
Hi, Tom..You may ignore the "audio/audio.h" as follows..
// include "audio/audio.h"
and also comment out a couple of member variables..
// AUDIOHANDLE mWavHandle; // music to play along with it
and add following typedef.. in guiAviBitmapCtrl.h
typedef int ALint;
and also comment out the lines in *.cpp
// mWavHandle = NULL_AUDIOHANDLE;
// alxGetContexti(ALC_BUFFER_LATENCY, &mAudioLatency);
I hope this helps..
#11
I implemented SpaceIllusion's changes and finally got my exe to build, but when I call the "loadMovieOne()" function from console, the exe crashes. I've tried this with many video file formats, also leaving the "aviFileName" field empty expecting the console error thrown from source ("Graph creation failed, check filename and path"). But it just crashes with no error thrown. Even looking at the console log I see only the "loadMovieOne()" function call as the last line. Please help.
01/17/2009 (9:54 pm)
Hi I implemented SpaceIllusion's changes and finally got my exe to build, but when I call the "loadMovieOne()" function from console, the exe crashes. I've tried this with many video file formats, also leaving the "aviFileName" field empty expecting the console error thrown from source ("Graph creation failed, check filename and path"). But it just crashes with no error thrown. Even looking at the console log I see only the "loadMovieOne()" function call as the last line. Please help.
#13
02/20/2009 (7:22 am)
so close help, i have running it in Torque 1.5.2, it work in window mode 32 bits color, in fullscreen mode only in 16 bits? why fullscreen dont show the video in 32 bits color??
#14
kudo23@sohu.com
03/04/2009 (7:22 pm)
Hi Mquaker, would you please send me one copy of your 1.8.0 compatible resource, I just can not download it from mediafire.com due to some reason. Thanks a lot.kudo23@sohu.com
#15
where can I download Directx 8 SDK's? I couldnt find this version. i have running in TGEA 1.7.1 and there are bounding black bars and i cant see .avi video at fullscreen but it works fine on windowed mode PLEASE HELP ME
03/08/2009 (7:31 pm)
@Mquakerwhere can I download Directx 8 SDK's? I couldnt find this version. i have running in TGEA 1.7.1 and there are bounding black bars and i cant see .avi video at fullscreen but it works fine on windowed mode PLEASE HELP ME
Torque 3D Owner DALO
Getting an error "fatal error C1083: Cannot open include file: 'dshow.h'" any suggestions?
Thx