42 : Thread(
"video-cache"), speed(1), is_playing(false), position(1)
70 position = new_position;
89 using ms = std::chrono::milliseconds;
90 using double_ms = std::chrono::duration<double, ms::period>;
132 std::this_thread::sleep_for(frame_duration);
VideoCacheThread()
Constructor.
Source file for VideoCacheThread class.
void Play()
Play the video.
double ToDouble() const
Return this fraction as a double (i.e. 1/2 = 0.5)
std::shared_ptr< Frame > frame
#define OPEN_MP_NUM_PROCESSORS
~VideoCacheThread()
Destructor.
void AppendDebugMethod(std::string method_name, std::string arg1_name="", float arg1_value=-1.0, std::string arg2_name="", float arg2_value=-1.0, std::string arg3_name="", float arg3_value=-1.0, std::string arg4_name="", float arg4_value=-1.0, std::string arg5_name="", float arg5_value=-1.0, std::string arg6_name="", float arg6_value=-1.0)
Append debug information.
virtual std::shared_ptr< openshot::Frame > GetFrame(int64_t number)=0
Header file for all Exception classes.
virtual openshot::CacheBase * GetCache()=0
Get the cache object used by this reader (note: not all readers use cache)
void Stop()
Stop the audio playback.
virtual std::shared_ptr< openshot::Frame > GetSmallestFrame()=0
Get the smallest frame number.
int max_concurrent_frames
openshot::ReaderInfo info
Information about the current media file.
Exception for frames that are out of bounds.
static ZmqLogger * Instance()
Create or get an instance of this logger singleton (invoke the class with this method) ...
void run()
Start the thread.
This namespace is the default namespace for all code in the openshot library.
void Seek(int64_t new_position)
Seek the reader to a particular frame number.
int64_t current_display_frame
void setCurrentFramePosition(int64_t current_frame_number)
Set the currently displaying frame number.
int64_t getCurrentFramePosition()
Get the currently playing frame number (if any)
openshot::Fraction fps
Frames per second, as a fraction (i.e. 24/1 = 24 fps)