UltraAnimo
v1.5.0.0
Description
With this dll, you can (re)play any type of media (as long as the right codec is installed). By playback, I mean you can:
--Play Pause Resume/Stop
--Set or get playback position
--Set or get volume
--Set or get video size and where it is played
--Set or get fullscreen mode
--Get video information (real size, length, quality)
Downloads
Dll, gml and small gm6 demo
--Location on Website (with more details)
--Code Preview (gml code only)
--Direct Download (whole package)
Demo Media Player (pretty cool!)
--Media Player (a media player by snabelost)
Dll size is only 377Kb but the download file is 2Mb (contains demo source[gm6] and demo executable).
Screen shots
...
Quick Example
// CREATE EVENT
ua_Init();
ua_LoadFile("Intro.mpg",window_handle());
ua_ShowsFullScreen(true);
showing_video=false;// STEP EVENT
if (showing_video) { // if still showing video
if (ua_Status()!=global.UAS_PLAYING) { // if not playing anymore
showing_video=false; // not showing
ua_Fini(); // remove control, dll and cleanup.
}
}
Notices
--The video is played asynchronously, meaning, your game keeps running while the video is showing. So you have to keep checking the video's status until it is finished. In the future, I may add a feature to play in synchronous mode (game stops while video runs).
--The mouse cursor is not hidden over the video control (except when fullscreen), I intend to fix this in a later version.
--Messages sent to video control are relayed back to GM (eg GM can detect clicking (and even pressing keys) over the video control). This is not really a bug, in fact it may even be an advantage.
--Misshandling the dll calls my cause some serious errors (not serious as in damaging, but they end up crashing your game). Unfortunately, I can't handle this correctly. So, if for example you try to play a file without loading it first, the dll doesn't babysit your faulty code, you get a game crash (with a load of error messages). Please make sure you code this correctly by not asuming error handling on the dll part.
--To know if a format is supported, run it first through Windows Media Player.
--To know if a format is supported programmatically, use ua_LoadFile() and check for it's resulting value. If it starts with "Error loading file" and the file does exist and is not damaged then it's a codec problem. Of course, this message does not raise any errors in your game, nor does it crash the game.
--Proprietary formats such as MOV files cannot be played by default codecs (thanks to Caniac for finding this out). Since I do not want to force any format restrictions, I'll attempt to fix problems like these by hinting at how they can be tackled (links to codecs, etc).
Codecs
CCCP codec pack, supports a lot of codecs. (recommended pack).
3ivx codec supports MOV files.
Xvid open source codecs for MPEG support.
K-Lite Different K-Lite comparisons.
Credits
It is mandatory (in force) that you give credit to both creators of the dll and player:
-dll and enhancements: Christian Sciberras / Covac Software
-the actual media player control: Lord Dr. Andrei J. Sagura II von Orechov
Also, thanks to Mordi's great menu system, which I borrowed to make the demo program.
Lastly, a person worth mentioning is Sindarin, which gave the idea for this dll, and helped in forming its final shape at various stages.
Have fun with it!
Best regards,
Christian Sciberras
Edited by uuf6429, 10 April 2009 - 11:01 AM.











