|
A control to playing Theora videos. More...
Public Member Functions | |
float | getCurrentTime () |
Get the current playback time. | |
bool | isPlaybackDone () |
Test whether the video has finished playing. | |
void | pause () |
Pause playback of the video. If the video is not currently playing, the call is ignored. | |
void | play () |
Start playing the video. If the video is already playing, the call is ignored. | |
void | setFile (string filename) |
Set the video file to play. If a video is already playing, playback is stopped and the new video file is loaded. | |
void | stop () |
Stop playback of the video. The next call to play() will then start playback from the beginning of the video. | |
Public Attributes | |
Playback | |
ColorI | backgroundColor |
Fill color when video is not playing. | |
bool | matchVideoSize |
Whether to automatically match control extents to the video size. | |
bool | playOnWake |
Whether to start playing video when control is woken up. | |
bool | renderDebugInfo |
If true, displays an overlay on top of the video with useful debugging information. | |
bool | stopOnSleep |
Whether to stop video when control is set to sleep. | |
filename | theoraFile |
Theora video file to play. | |
GuiTheoraTranscoder | transcoder |
The routine to use for Y'CbCr to RGB conversion. |
A control to playing Theora videos.
This control can be used to play videos in the Theora video format. The videos may include audio in Vorbis format. The codecs for both formats are integrated with the engine and no codecs must be present on the user's machine.
%video = new GuiTheoraCtrl() { theoraFile = "videos/intro.ogv"; playOnWake = false; stopOnSleep = true; } Canvas.setContent( %video ); %video.play();
float GuiTheoraCtrl::getCurrentTime | ( | ) |
Get the current playback time.
bool GuiTheoraCtrl::isPlaybackDone | ( | ) |
Test whether the video has finished playing.
void GuiTheoraCtrl::pause | ( | ) |
Pause playback of the video. If the video is not currently playing, the call is ignored.
While stopped, the control displays the last frame.
void GuiTheoraCtrl::play | ( | ) |
Start playing the video. If the video is already playing, the call is ignored.
void GuiTheoraCtrl::setFile | ( | string | filename | ) |
Set the video file to play. If a video is already playing, playback is stopped and the new video file is loaded.
filename | The video file to load. |
void GuiTheoraCtrl::stop | ( | ) |
Stop playback of the video. The next call to play() will then start playback from the beginning of the video.
While stopped, the control renders empty with just the background color.
Fill color when video is not playing.
Whether to automatically match control extents to the video size.
Whether to start playing video when control is woken up.
If true, displays an overlay on top of the video with useful debugging information.
Whether to stop video when control is set to sleep.
If this is not set to true, the video will be paused when the control is put to sleep. This is because there is no support for seeking in the video stream in the player backend and letting the time source used to synchronize video (either audio or a raw timer) get far ahead of frame decoding will cause possibly very long delays when the control is woken up again.
filename GuiTheoraCtrl::theoraFile |
Theora video file to play.
The routine to use for Y'CbCr to RGB conversion.