Getting Information on a Movie File

The Movie Player provides two functions that return information about a movie file on disk and in memory. The mmpGetFileInfo function fills an MMPMOVIEINFO movie-information structure for a movie file on disk, and the mmpGetMovieInfo function fills the structure for the currently loaded movie. The MMPMOVIEINFO structure has the following fields:

Field Description

dwFileVersion Version of the authoring system used to create the movie.
dwTotalFrames Number of movie frames.
dwInitialFramesPerSecond Tempo value of the first frame (expressed as a frames-per-second value).
wPixelDepth Number of bits per pixel.
dwMovieExtentX Width of the playback area (in pixels).
dwMovieExtentY Height of the playback area (in pixels).
chFullMacName[128] Movie title contained in a null-terminated string.

The syntax of mmpGetFileInfo is as follows:

BOOL mmpGetFileInfo(idMovie, lpszFileName, lpMovieInfo)

Pass the movie ID of the Movie Player instance to idMovie and a far pointer to a MMPMOVIEINFO structure to lpMovieInfo. In the lpszFileName parameter, you can specify one of the following:

An LPSTR pointer to the movie filename.

A DWORD value in which the high-order word is set to zero and the low-order word is a file handle to an open file. The file pointer of the specified file must be positioned at the start of the RMMP chunk (at the first byte of the “RIFF” FOURCC code).

The mmpGetFileInfo function returns TRUE if successful.

The mmpGetMovieInfo function has similar syntax but omits the filename parameter. For this function to return useful information, a movie file must be loaded into the Movie Player instance. The mmpGetMovieInfo has the following syntax:

BOOL mmpGetMovieInfo(idMovie, lpMovieInfo)

This function retrieves the movie-information structure for the currently loaded movie file.