13 #ifndef OPENSHOT_VIDEO_CACHE_THREAD_H 14 #define OPENSHOT_VIDEO_CACHE_THREAD_H 18 #include <AppConfig.h> 19 #include <juce_audio_basics/juce_audio_basics.h> 24 using juce::WaitableEvent;
52 int64_t
getBytes(
int width,
int height,
int sample_rate,
int channels,
float fps);
61 void Seek(int64_t new_position);
64 void Seek(int64_t new_position,
bool start_preroll);
88 #endif // OPENSHOT_VIDEO_CACHE_THREAD_H void setSpeed(int new_speed)
Set Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster, -1=rewind, etc...)
VideoCacheThread()
Constructor.
void Play()
Play the video.
Header file for ReaderBase class.
This class is used to playback a video from a reader.
int64_t timeline_max_frame
This abstract class is the base class, used by all readers in libopenshot.
~VideoCacheThread()
Destructor.
std::shared_ptr< Frame > last_cached_frame
bool isReady()
Is cache ready for video/audio playback.
void Reader(ReaderBase *new_reader)
Set the current thread's reader.
void Stop()
Stop the audio playback.
The private part of QtPlayer class, which contains an audio thread and video thread, and controls the video timing and audio synchronization code.
int64_t getBytes(int width, int height, int sample_rate, int channels, float fps)
Get the size in bytes of a frame (rough estimate)
int64_t cached_frame_count
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
int getSpeed() const
Get Speed (The speed and direction to playback a reader (1=normal, 2=fast, 3=faster, -1=rewind, etc...)
int64_t requested_display_frame