A texture that fetches video frames from an underlying object of class Movie. More...
Public Member Functions | |
MovieTexture (MovieVideo video) | |
Creates a texture playing the specified movie. | |
MovieTexture (string name) | |
Creates a blank movie texture. | |
MovieVideoCursor | getAlphaCursor (int page) |
Returns the MovieVideoCursor that is feeding the alpha channel for the indicated page, where 0 <= page < get_num_pages(). | |
MovieVideoCursor | getColorCursor (int page) |
Returns the MovieVideoCursor that is feeding the color channels for the indicated page, where 0 <= page < get_num_pages(). | |
bool | getLoop () |
Returns true if the movie's loop count is not equal to one. | |
int | getLoopCount () |
Returns the movie's loop count. | |
double | getPlayRate () |
Gets the movie's play-rate. | |
double | getTime () |
Returns the current value of the movie's cursor. | |
int | getVideoHeight () |
Returns the height in texels of the source video stream. | |
double | getVideoLength () |
Returns the length of the video. | |
int | getVideoWidth () |
Returns the width in texels of the source video stream. | |
bool | isPlaying () |
Returns true if the movie's cursor is advancing. | |
play () | |
Plays the movie from the beginning. | |
restart () | |
Start playing the movie from where it was last paused. | |
setLoop (bool enable) | |
If true, sets the movie's loop count to 1 billion. | |
setLoopCount (int count) | |
Sets the movie's loop count to the desired value. | |
setPlayRate (double play_rate) | |
Sets the movie's play-rate. | |
setTime (double t) | |
Sets the movie's cursor. | |
stop () | |
Stops a currently playing or looping movie right where it is. | |
synchronizeTo (AudioSound sound) | |
Synchronize this texture to a sound. | |
unsynchronize () | |
Stop synchronizing with a sound. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
A texture that fetches video frames from an underlying object of class Movie.
MovieTexture | ( | MovieVideo | video | ) |
Creates a texture playing the specified movie.
MovieTexture | ( | string | name | ) |
Creates a blank movie texture.
Movies must be added using do_read_one or do_load_one.
MovieVideoCursor getAlphaCursor | ( | int | page | ) |
Returns the MovieVideoCursor that is feeding the alpha channel for the indicated page, where 0 <= page < get_num_pages().
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from Texture.
MovieVideoCursor getColorCursor | ( | int | page | ) |
Returns the MovieVideoCursor that is feeding the color channels for the indicated page, where 0 <= page < get_num_pages().
bool getLoop | ( | ) |
Returns true if the movie's loop count is not equal to one.
int getLoopCount | ( | ) |
Returns the movie's loop count.
double getPlayRate | ( | ) |
Gets the movie's play-rate.
double getTime | ( | ) |
Returns the current value of the movie's cursor.
If the movie's loop count is greater than one, then its length is effectively multiplied for the purposes of this function. In other words, the return value will be in the range 0.0 to (length * loopcount).
int getVideoHeight | ( | ) |
Returns the height in texels of the source video stream.
This is not necessarily the height of the actual texture, since the texture may have been expanded to raise it to a power of 2.
double getVideoLength | ( | ) |
Returns the length of the video.
int getVideoWidth | ( | ) |
Returns the width in texels of the source video stream.
This is not necessarily the width of the actual texture, since the texture may have been expanded to raise it to a power of 2.
bool isPlaying | ( | ) |
Returns true if the movie's cursor is advancing.
play | ( | ) |
Plays the movie from the beginning.
restart | ( | ) |
Start playing the movie from where it was last paused.
Has no effect if the movie is not paused, or if the movie's cursor is already at the end.
setLoop | ( | bool | enable | ) |
If true, sets the movie's loop count to 1 billion.
If false, sets the movie's loop count to one.
setLoopCount | ( | int | count | ) |
Sets the movie's loop count to the desired value.
setPlayRate | ( | double | play_rate | ) |
Sets the movie's play-rate.
This is the speed at which the movie's cursor advances. The default is to advance 1.0 movie-seconds per real-time second.
setTime | ( | double | t | ) |
Sets the movie's cursor.
stop | ( | ) |
Stops a currently playing or looping movie right where it is.
The movie's cursor remains frozen at the point where it was stopped.
synchronizeTo | ( | AudioSound | sound | ) |
Synchronize this texture to a sound.
Typically, you would load the texture and the sound from the same AVI file.
unsynchronize | ( | ) |
Stop synchronizing with a sound.