The UMSMovieFileReader is a base class used by both the UMSMoviePlayer object and the movie_editor application. The UMSAVIMovieFileReader is an implementation of the base class for AVI movie files. The UMSMovieFileReader base class provides an abstraction that can be mapped onto various movie file formats. This permits other implementations of the base class for new file formats which can be used as UMSMovieFileReader objects. The UMSMovieFileReaderMClass metaclass has the method:
make_by_pathname
Which detects the file type of a given file and instantiates the corresponding UMSMovieFileReader as specified for that file type in the UMS_config configuration file. This permits the UMSMoviePlayer object to inherit support for new file formats without being modified or recompiled.
To learn more about the UMSMovieFileReader, see:
For introductory information, see Programming with Formatted File Access Objects.
UMSMovieFileReader object method calls include:
The UMSMovieFileReader provides an abstraction to a file containing audio and video data having synchronized playback. This abstraction permits the file to contain multiple video and audio streams. The first video stream is referred to as video track 0, the second as video track 1, and so forth. Similarly, the first audio stream is audio track 0. Track 0 is the default video and audio track.
The data in the file is accessed as frames. An audio frame is the audio data to be heard during the frame presentation time. The get_next_frame method returns the next video frame and the corresponding audio frame data and advances the file position one frame. The file location is specified through the seek_to_frame method or queried with get_current_frame_position method. The first frame in a file is numbered 0.
Random access to audio or video frame data is provided by the get_video_frame and get_audio_frame which specify both a frame and a track number. These methods do not change the current file location. Various queries are provided to determine the characteristics of the audio and video data for the selected track.
For introductory information, see Programming with Formatted File Access Objects.