CK_Movie objects represent an AVI or MPEG movie. Movies can be integrated seamlessly with other graphics and animations. CK_Label components can display a movie. The movie will be "mixed-in" with any other components on the screen. If another component occludes the movie, the movie will play properly underneath the occluding component. If the CK_Label changes position on the screen, the movie will follow.
Internally, the library uses the Microsoft DirectShow API to implement the CK_Movie class. This allows any AVI or MPEG file to be played at any pixel depth, and in windowed or full-screen mode.
The 'Lite' version of the Chilkat SDK exists for applications that do not wish to display movies. The Lite version includes stubs for the CK_Movie class so that the Microsoft DirectShow runtime libraries are not required to build the application.
The CK_Movie class provides functions to control a movie in the following ways:
Creates a CK_Movie from an AVI or MPEG file. Returns a pointer to the CK_Movie created.
Parameters
- fileName
- The name of an AVI (.avi) or MPEG (.mpg) from which a CK_Movie object will be created.
Returns the height in pixels of the movie.
Returns the width in pixels of the movie.
Pauses the movie at the current frame. The movie can be resumed by calling resumeMovie().
Plays the movie continuously, restarting from the beginning once the end is reached.
Replaces the movie with a new AVI or MPEG. If the movie was playing, it will be stopped.
Parameters
- fileName
- The name of an AVI (.avi) or MPEG (.mpg) file to load into the CK_Movie object.
Resumes the movie from it's paused state.
Tells the CK_Movie that the movie could be clipped or occluded. If this function is not called, and the movie IS clipped or occluded, the clipping or occlusion will not be displayed properly.
Sets the time delay between each frame of the movie.
Parameters
- millisec
- The time delay in milliseconds between each frame of the movie.
Tells the CK_Movie that it's position on the screen may change. If this function is not called, the movie will remain positioned where it first appears on the screen.
Renders the first frame of the movie and then pauses it. The movie can be resumed by calling resumeMovie().
Stops the movie. This is different from pausing because when a movie is paused, the current frame will still be showing, whereas a stopped movie will not be showing anything.