OpenShot Library | libopenshot  0.1.9
Public Member Functions | List of all members
openshot::QtPlayer Class Reference

This class is used to playback a video from a reader. More...

#include <QtPlayer.h>

Inheritance diagram for openshot::QtPlayer:
openshot::PlayerBase

Public Member Functions

void CloseAudioDevice ()
 Close audio device. 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...
 
PlaybackMode Mode ()
 Get the current mode. More...
 
void Pause ()
 Pause the video. More...
 
void Play ()
 Play the video. More...
 
int Position ()
 Get the current frame number being played. More...
 
 QtPlayer ()
 Default constructor. More...
 
 QtPlayer (RendererBase *rb)
 
void Reader (ReaderBase *new_reader)
 Set the current reader. More...
 
ReaderBaseReader ()
 Get the current reader, such as a FFmpegReader. 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...
 
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...
 

Additional Inherited Members

- Protected Attributes inherited from openshot::PlayerBase
PlaybackMode mode
 
ReaderBasereader
 
float speed
 
float volume
 

Detailed Description

This class is used to playback a video from a reader.

Definition at line 46 of file QtPlayer.h.

Constructor & Destructor Documentation

◆ QtPlayer() [1/2]

QtPlayer::QtPlayer ( )
explicit

Default constructor.

Definition at line 38 of file QtPlayer.cpp.

◆ QtPlayer() [2/2]

QtPlayer::QtPlayer ( RendererBase rb)
explicit

Definition at line 43 of file QtPlayer.cpp.

◆ ~QtPlayer()

QtPlayer::~QtPlayer ( )
virtual

Default destructor.

Definition at line 48 of file QtPlayer.cpp.

Member Function Documentation

◆ CloseAudioDevice()

void QtPlayer::CloseAudioDevice ( )

Close audio device.

Definition at line 56 of file QtPlayer.cpp.

◆ GetRendererQObject()

int64_t QtPlayer::GetRendererQObject ( )

Get the Renderer pointer address (for Python to cast back into a QObject)

Definition at line 173 of file QtPlayer.cpp.

◆ Loading()

void QtPlayer::Loading ( )
virtual

Display a loading animation.

Implements openshot::PlayerBase.

Definition at line 95 of file QtPlayer.cpp.

◆ Mode()

PlaybackMode QtPlayer::Mode ( )
virtual

Get the current mode.

Implements openshot::PlayerBase.

Definition at line 101 of file QtPlayer.cpp.

◆ Pause()

void QtPlayer::Pause ( )
virtual

Pause the video.

Implements openshot::PlayerBase.

Definition at line 106 of file QtPlayer.cpp.

◆ Play()

void QtPlayer::Play ( )
virtual

Play the video.

Implements openshot::PlayerBase.

Definition at line 82 of file QtPlayer.cpp.

◆ Position()

int QtPlayer::Position ( )
virtual

Get the current frame number being played.

Implements openshot::PlayerBase.

Definition at line 112 of file QtPlayer.cpp.

◆ Reader() [1/2]

void QtPlayer::Reader ( ReaderBase new_reader)
virtual

Set the current reader.

Implements openshot::PlayerBase.

Definition at line 152 of file QtPlayer.cpp.

◆ Reader() [2/2]

ReaderBase * QtPlayer::Reader ( )
virtual

Get the current reader, such as a FFmpegReader.

Implements openshot::PlayerBase.

Definition at line 162 of file QtPlayer.cpp.

◆ Seek()

void QtPlayer::Seek ( int64_t  new_frame)
virtual

Seek to a specific frame in the player.

Implements openshot::PlayerBase.

Definition at line 117 of file QtPlayer.cpp.

◆ SetQWidget()

void 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 167 of file QtPlayer.cpp.

◆ SetSource()

void QtPlayer::SetSource ( const std::string &  source)

Set the source URL/path of this player (which will create an internal Reader)

Definition at line 62 of file QtPlayer.cpp.

◆ Speed() [1/2]

float QtPlayer::Speed ( )
virtual

Get the Playback speed.

Implements openshot::PlayerBase.

Definition at line 178 of file QtPlayer.cpp.

◆ Speed() [2/2]

void QtPlayer::Speed ( float  new_speed)
virtual

Set the Playback speed (1.0 = normal speed, <1.0 = slower, >1.0 faster)

Implements openshot::PlayerBase.

Definition at line 183 of file QtPlayer.cpp.

◆ Stop()

void QtPlayer::Stop ( )
virtual

Stop the video player and clear the cached frames.

Implements openshot::PlayerBase.

Definition at line 135 of file QtPlayer.cpp.

◆ Volume() [1/2]

float QtPlayer::Volume ( )
virtual

Get the Volume.

Implements openshot::PlayerBase.

Definition at line 192 of file QtPlayer.cpp.

◆ Volume() [2/2]

void QtPlayer::Volume ( float  new_volume)
virtual

Set the Volume (1.0 = normal volume, <1.0 = quieter, >1.0 louder)

Implements openshot::PlayerBase.

Definition at line 197 of file QtPlayer.cpp.


The documentation for this class was generated from the following files: