14 #ifndef OPENSHOT_QT_PLAYER_H 15 #define OPENSHOT_QT_PLAYER_H 26 using AudioDeviceList = std::vector<std::pair<std::string, std::string>>;
76 void Seek(int64_t new_frame);
79 void SetSource(
const std::string &source);
96 void Speed(
float new_speed);
111 void Volume(
float new_volume);
std::vector< std::pair< std::string, std::string > > AudioDeviceList
std::vector< std::pair< std::string, std::string > > AudioDeviceList
float Speed()
Get the Playback speed.
void Loading()
Display a loading animation.
This class is used to playback a video from a reader.
void SetTimelineSource(const std::string &json)
Set the source JSON of an openshot::Timelime.
float Volume()
Get the Volume.
QtPlayer()
Default constructor.
openshot::ReaderBase * Reader()
Get the current reader, such as a FFmpegReader.
This abstract class is the base class, used by all readers in libopenshot.
This is the base class of all Players in libopenshot.
void Pause()
Pause the video.
void SetSource(const std::string &source)
Set the source URL/path of this player (which will create an internal Reader)
AudioDeviceList GetAudioDeviceNames()
Get Audio Devices from JUCE.
Source file for PlayerPrivate class.
The private part of QtPlayer class, which contains an audio thread and video thread, and controls the video timing and audio synchronization code.
double GetDefaultSampleRate()
Return the default audio sample rate (from the system)
std::string GetError()
Get Error (if any)
int64_t Position()
Get the current frame number being played.
AudioDeviceInfo GetCurrentAudioDevice()
Get current audio device or last attempted.
void SetQWidget(int64_t qwidget_address)
void Play()
Play the video.
void Seek(int64_t new_frame)
Seek to a specific frame in the player.
This namespace is the default namespace for all code in the openshot library.
openshot::PlaybackMode Mode()
Get the current mode.
Header file for RendererBase class.
Header file for PlayerBase class.
void CloseAudioDevice()
Close audio device.
int64_t GetRendererQObject()
Get the Renderer pointer address (for Python to cast back into a QObject)
PlaybackMode
This enumeration determines the mode of the video player (i.e. playing, paused, etc...)
This is the base class of all Renderers in libopenshot.
This struct hold information about Audio Devices.
void Stop()
Stop the video player and clear the cached frames.
virtual ~QtPlayer()
Default destructor.