MovieTexture

from panda3d.core import MovieTexture
class MovieTexture

Bases:

Bases: Texture

A texture that fetches video frames from an underlying object of class Movie.

Inheritance diagram

Inheritance diagram of MovieTexture

__init__(video: MovieVideo)

Creates a texture playing the specified movie.

__init__(name: str)

Creates a blank movie texture. Movies must be added using do_read_one or do_load_one.

get_alpha_cursor(page: int) MovieVideoCursor

Returns the MovieVideoCursor that is feeding the alpha channel for the indicated page, where 0 <= page < get_num_pages().

static get_class_type() TypeHandle
get_color_cursor(page: int) MovieVideoCursor

Returns the MovieVideoCursor that is feeding the color channels for the indicated page, where 0 <= page < get_num_pages().

get_loop() bool

Returns true if the movie’s loop count is not equal to one.

get_loop_count() int

Returns the movie’s loop count.

get_play_rate() float

Gets the movie’s play-rate.

get_time() float

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).

get_video_height() int

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.

get_video_length() float

Returns the length of the video.

get_video_width() int

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.

is_playing() bool

Returns true if the movie’s cursor is advancing.

property loop bool
Getter

Returns true if the movie’s loop count is not equal to one.

Setter

If true, sets the movie’s loop count to 1 billion. If false, sets the movie’s loop count to one.

property loop_count int
Getter

Returns the movie’s loop count.

Setter

Sets the movie’s loop count to the desired value.

play()

Plays the movie from the beginning.

property play_rate float
Getter

Gets the movie’s play-rate.

Setter

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.

property playing bool

Returns true if the movie’s cursor is advancing.

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.

set_loop(enable: bool)

If true, sets the movie’s loop count to 1 billion. If false, sets the movie’s loop count to one.

set_loop_count(count: int)

Sets the movie’s loop count to the desired value.

set_play_rate(play_rate: float)

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.

set_time(t: float)

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.

synchronize_to(sound: AudioSound)

Synchronize this texture to a sound. Typically, you would load the texture and the sound from the same AVI file.

property time float
Getter

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).

Setter

Sets the movie’s cursor.

unsynchronize()

Stop synchronizing with a sound.

property video_height int

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.

property video_length float

Returns the length of the video.

property video_width int

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.