28 #include "../../include/Qt/VideoCacheThread.h"
33 VideoCacheThread::VideoCacheThread()
34 : Thread(
"video-cache"), speed(1), is_playing(false), position(1)
40 VideoCacheThread::~VideoCacheThread()
45 int VideoCacheThread::getCurrentFramePosition()
54 void VideoCacheThread::setCurrentFramePosition(
int current_frame_number)
56 current_display_frame = current_frame_number;
60 void VideoCacheThread::Seek(
int new_position)
62 position = new_position;
66 void VideoCacheThread::Play() {
72 void VideoCacheThread::Stop() {
78 void VideoCacheThread::run()
80 while (!threadShouldExit() && is_playing) {
87 while (speed == 1 && (position - current_display_frame) < max_frames)
97 catch (
const OutOfBoundsFrame &
e)
#define OPEN_MP_NUM_PROCESSORS
ReaderInfo info
Information about the current media file.
Fraction fps
Frames per second, as a fraction (i.e. 24/1 = 24 fps)
virtual tr1::shared_ptr< Frame > GetFrame(long int number)=0
double ToDouble()
Return this fraction as a double (i.e. 1/2 = 0.5)