Public Member Functions | |
FfmpegVideoCursor (FfmpegVideo src) | |
int | getMaxReadaheadFrames () |
Returns the maximum number of frames that a sub-thread will attempt to read ahead of the current frame. | |
ThreadPriority | getThreadPriority () |
Returns the current thread priority of the thread that decodes the ffmpeg video stream (if max_readahead_frames is nonzero). | |
bool | isThreadStarted () |
Returns true if the thread has been started, false if not. | |
setMaxReadaheadFrames (int max_readahead_frames) | |
Specifies the maximum number of frames that a sub-thread will attempt to read ahead of the current frame. | |
setThreadPriority (ThreadPriority thread_priority) | |
Changes the thread priority of the thread that decodes the ffmpeg video stream (if max_readahead_frames is nonzero). | |
startThread () | |
Explicitly starts the ffmpeg decoding thread after it has been stopped by a call to stop_thread(). | |
stopThread () | |
Explicitly stops the ffmpeg decoding thread. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
FfmpegVideoCursor | ( | FfmpegVideo | src | ) |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from MovieVideoCursor.
Returns the maximum number of frames that a sub-thread will attempt to read ahead of the current frame.
See set_max_readahead_frames().
Returns the current thread priority of the thread that decodes the ffmpeg video stream (if max_readahead_frames is nonzero).
See set_thread_priority().
bool isThreadStarted | ( | ) |
Returns true if the thread has been started, false if not.
This will always return false if max_readahead_frames is 0.
setMaxReadaheadFrames | ( | int | max_readahead_frames | ) |
Specifies the maximum number of frames that a sub-thread will attempt to read ahead of the current frame.
Setting this to a nonzero allows the video decoding to take place in a sub-thread, which smoothes out the video decoding time by spreading it evenly over several frames. Set this number larger to increase the buffer between the currently visible frame and the first undecoded frame; set it smaller to reduce memory consumption.
Setting this to zero forces the video to be decoded in the main thread. If threading is not available in the Panda build, this value is always zero.
setThreadPriority | ( | ThreadPriority | thread_priority | ) |
Changes the thread priority of the thread that decodes the ffmpeg video stream (if max_readahead_frames is nonzero).
Normally you shouldn't mess with this, but there may be special cases where a precise balance of CPU utilization between the main thread and the various ffmpeg service threads may be needed.
startThread | ( | ) |
Explicitly starts the ffmpeg decoding thread after it has been stopped by a call to stop_thread().
The thread is normally started automatically, so there is no need to call this method unless you have previously called stop_thread() for some reason.
stopThread | ( | ) |
Explicitly stops the ffmpeg decoding thread.
There is normally no reason to do this unless you want to maintain precise control over what threads are consuming CPU resources. Calling this method will make the video update in the main thread, regardless of the setting of max_readahead_frames, until you call start_thread() again.