OpenShot Library | libopenshot
0.3.3
|
This class is used to playback a video from a reader. More...
#include <QtPlayer.h>
Public Member Functions | |
void | CloseAudioDevice () |
Close audio device. More... | |
AudioDeviceList | GetAudioDeviceNames () |
Get Audio Devices from JUCE. More... | |
AudioDeviceInfo | GetCurrentAudioDevice () |
Get current audio device or last attempted. More... | |
double | GetDefaultSampleRate () |
Return the default audio sample rate (from the system) More... | |
std::string | GetError () |
Get Error (if any) More... | |
int64_t | GetRendererQObject () |
Get the Renderer pointer address (for Python to cast back into a QObject) More... | |
void | Loading () |
Display a loading animation. More... | |
openshot::PlaybackMode | Mode () |
Get the current mode. More... | |
void | Pause () |
Pause the video. More... | |
void | Play () |
Play the video. More... | |
int64_t | Position () |
Get the current frame number being played. More... | |
QtPlayer () | |
Default constructor. More... | |
QtPlayer (openshot::RendererBase *rb) | |
openshot::ReaderBase * | Reader () |
Get the current reader, such as a FFmpegReader. More... | |
void | Reader (openshot::ReaderBase *new_reader) |
Set the current reader. More... | |
void | Seek (int64_t new_frame) |
Seek to a specific frame in the player. More... | |
void | SetQWidget (int64_t qwidget_address) |
void | SetSource (const std::string &source) |
Set the source URL/path of this player (which will create an internal Reader) More... | |
void | SetTimelineSource (const std::string &json) |
Set the source JSON of an openshot::Timelime. More... | |
float | Speed () |
Get the Playback speed. More... | |
void | Speed (float new_speed) |
Set the Playback speed (1.0 = normal speed, <1.0 = slower, >1.0 faster) More... | |
void | Stop () |
Stop the video player and clear the cached frames. More... | |
float | Volume () |
Get the Volume. More... | |
void | Volume (float new_volume) |
Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder) More... | |
virtual | ~QtPlayer () |
Default destructor. More... | |
Public Member Functions inherited from openshot::PlayerBase | |
virtual | ~PlayerBase ()=default |
Additional Inherited Members | |
Protected Attributes inherited from openshot::PlayerBase | |
PlaybackMode | mode |
openshot::ReaderBase * | reader |
float | speed |
float | volume |
This class is used to playback a video from a reader.
Definition at line 32 of file QtPlayer.h.
|
explicit |
Default constructor.
Definition at line 29 of file QtPlayer.cpp.
|
explicit |
Definition at line 34 of file QtPlayer.cpp.
|
virtual |
Default destructor.
Definition at line 42 of file QtPlayer.cpp.
void openshot::QtPlayer::CloseAudioDevice | ( | ) |
Close audio device.
Definition at line 50 of file QtPlayer.cpp.
AudioDeviceList openshot::QtPlayer::GetAudioDeviceNames | ( | ) |
Get Audio Devices from JUCE.
Get vector of audio device names & types.
Definition at line 75 of file QtPlayer.cpp.
AudioDeviceInfo openshot::QtPlayer::GetCurrentAudioDevice | ( | ) |
Get current audio device or last attempted.
Definition at line 81 of file QtPlayer.cpp.
double openshot::QtPlayer::GetDefaultSampleRate | ( | ) |
Return the default audio sample rate (from the system)
Definition at line 66 of file QtPlayer.cpp.
std::string openshot::QtPlayer::GetError | ( | ) |
Get Error (if any)
Definition at line 57 of file QtPlayer.cpp.
int64_t openshot::QtPlayer::GetRendererQObject | ( | ) |
Get the Renderer pointer address (for Python to cast back into a QObject)
Definition at line 221 of file QtPlayer.cpp.
|
virtual |
Display a loading animation.
Implements openshot::PlayerBase.
Definition at line 144 of file QtPlayer.cpp.
|
virtual |
Get the current mode.
Implements openshot::PlayerBase.
Definition at line 150 of file QtPlayer.cpp.
Referenced by PlayerDemo::keyPressEvent().
|
virtual |
Pause the video.
Implements openshot::PlayerBase.
Definition at line 155 of file QtPlayer.cpp.
Referenced by PlayerDemo::keyPressEvent().
|
virtual |
Play the video.
Implements openshot::PlayerBase.
Definition at line 131 of file QtPlayer.cpp.
Referenced by PlayerDemo::keyPressEvent().
|
virtual |
Get the current frame number being played.
Implements openshot::PlayerBase.
Definition at line 161 of file QtPlayer.cpp.
Referenced by PlayerDemo::keyPressEvent().
|
virtual |
Get the current reader, such as a FFmpegReader.
Implements openshot::PlayerBase.
Definition at line 210 of file QtPlayer.cpp.
Referenced by SetSource(), and SetTimelineSource().
|
virtual |
Set the current reader.
Implements openshot::PlayerBase.
Definition at line 200 of file QtPlayer.cpp.
|
virtual |
Seek to a specific frame in the player.
Implements openshot::PlayerBase.
Definition at line 166 of file QtPlayer.cpp.
Referenced by PlayerDemo::keyPressEvent().
void openshot::QtPlayer::SetQWidget | ( | int64_t | qwidget_address | ) |
Set the QWidget which will be used as the display (note: QLabel works well). This does not take a normal pointer, but rather a LONG pointer id (and it re-casts the QWidget pointer inside libopenshot). This is required due to SIP and SWIG incompatibility in the Python bindings.
Definition at line 215 of file QtPlayer.cpp.
void openshot::QtPlayer::SetSource | ( | const std::string & | source | ) |
Set the source URL/path of this player (which will create an internal Reader)
Definition at line 99 of file QtPlayer.cpp.
void openshot::QtPlayer::SetTimelineSource | ( | const std::string & | json | ) |
Set the source JSON of an openshot::Timelime.
Definition at line 86 of file QtPlayer.cpp.
|
virtual |
Get the Playback speed.
Implements openshot::PlayerBase.
Definition at line 226 of file QtPlayer.cpp.
Referenced by PlayerDemo::keyPressEvent(), Pause(), and Play().
|
virtual |
Set the Playback speed (1.0 = normal speed, <1.0 = slower, >1.0 faster)
Implements openshot::PlayerBase.
Definition at line 231 of file QtPlayer.cpp.
|
virtual |
Stop the video player and clear the cached frames.
Implements openshot::PlayerBase.
Definition at line 181 of file QtPlayer.cpp.
Referenced by PlayerDemo::closeEvent(), PlayerDemo::keyPressEvent(), and ~QtPlayer().
|
virtual |
|
virtual |
Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder)
Implements openshot::PlayerBase.
Definition at line 246 of file QtPlayer.cpp.