PlayMovie

From ZDoom Wiki
Jump to navigation Jump to search

int PlayMovie (str moviename)


Nuvolabomb.png Warning: The feature described on this page has been deprecated, and will no longer be supported or updated by the GZDoom developers. While some functionality may be retained for the purposes of backwards-compatibility, authors are strongly discouraged from utilizing this feature in future projects. Compatibility with future GZDoom versions is not guaranteed.

This command is disabled in current ZDoom version. It is very unlikely that it ever gets re-enabled. The function will just fail and return MOVIE_Failed.

The description below only applies to old ZDoom versions which still had this command working:

Usage

Plays a video file. This function uses DirectShow (the same media library that Windows Media Player uses), so it only works in Windows and it can play any files that WMP has the codecs for.

  • moviename is the filesystem address of the file, so if you have, say, blah.avi in the same directory as zdoom.exe you can do PlayMovie("blah.avi"), but you can also play any movie on the filesystem, so PlayMovie("c:\doom2\zdoom\blah.avi") would work as well.

Depending on how playback proceeds, one of the following values will be returned:

MOVIE_Played
The movie was played through completely without problems.
MOVIE_Played_NoVideo
The movie played, but the proper video codec was not installed, so it was audio-only.
MOVIE_Played_Aborted
The user quit movie playback by pressing the escape key before it could finish.
MOVIE_Failed
The movie could not play at all, either because no audio or video codec was available, or because the operating system is not Windows.

This is no longer available as a console command with the same name in the current version either.