Jellyfin Qt
QML Library for interacting with the Jellyfin multimedia server
Loading...
Searching...
No Matches
Jellyfin::Model::PlaybackManager Class Referenceabstract

Base class for a playback manager. More...

#include <playbackmanager.h>

Inheritance diagram for Jellyfin::Model::PlaybackManager:
Jellyfin::Model::LocalPlaybackManager Jellyfin::Model::RemoteJellyfinPlayback

Public Slots

virtual void pause ()=0
 
virtual void play ()=0
 
virtual void playItemId (const QString &id)=0
 
virtual void previous ()=0
 
virtual void next ()=0
 
virtual void goTo (int index)=0
 Play the item at the index in the current playlist.
 
virtual void stop ()=0
 
virtual void seek (qint64 pos)=0
 

Signals

void playbackStateChanged (Jellyfin::Model::PlayerStateClass::Value newPlaybackState)
 
void mediaStatusChanged (Jellyfin::Model::MediaStatusClass::Value newMediaStatus)
 
void queueChanged (Jellyfin::Model::Playlist *newPlaylist)
 
void hasNextChanged (bool newHasNext)
 
void hasPreviousChanged (bool newHasPrevious)
 
void itemChanged ()
 
void queueIndexChanged (int index)
 
void errorChanged (Jellyfin::Model::PlaybackManagerErrorClass::Value newError)
 
void errorStringChanged (const QString &newErrorString)
 
void positionChanged (qint64 newPosition)
 
void durationChanged (qint64 newDuration)
 
void seekableChanged (bool newSeekable)
 
void hasAudioChanged ()
 
void hasVideoChanged ()
 
void resumePlaybackChanged (bool newPlaybackChanged)
 
void audioIndexChanged (int newAudioIndex)
 
void subtitleIndexChanged (int newSubtitleIndex)
 

Public Member Functions

 PlaybackManager (QObject *parent=nullptr)
 
virtual ~PlaybackManager ()
 
void swap (PlaybackManager &other)
 
ApiClientapiClient () const
 
void setApiClient (ApiClient *apiClient)
 
QSharedPointer< ItemcurrentItem () const
 
Playlistqueue () const
 
int queueIndex () const
 
bool resumePlayback () const
 
void setResumePlayback (bool newResumePlayback)
 
int audioIndex () const
 
void setAudioIndex (int newAudioIndex)
 
int subtitleIndex () const
 
void setSubtitleIndex (int newSubtitleIndex)
 
virtual PlayerState playbackState () const =0
 
virtual MediaStatus mediaStatus () const =0
 
virtual bool hasNext () const =0
 
virtual bool hasPrevious () const =0
 
virtual PlaybackManagerError error () const =0
 
virtual const QString & errorString () const =0
 
virtual qint64 position () const =0
 
virtual qint64 duration () const =0
 
virtual bool seekable () const =0
 
virtual bool hasAudio () const =0
 
virtual bool hasVideo () const =0
 
virtual void playItem (QSharedPointer< Model::Item > item)=0
 Start playing the given item.
 
virtual void playItemInList (const QList< QSharedPointer< Model::Item > > &items, int index)=0
 Set the playlist to the given playlist and start playing the item at the given index.
 

Static Public Attributes

static const qint64 MS_TICK_FACTOR = 10000
 

Protected Member Functions

void setItem (QSharedPointer< Item > item)
 
void setQueueIndex (int index)
 
 PlaybackManager (PlaybackManagerPrivate *d, QObject *parent=nullptr)
 

Protected Attributes

QScopedPointer< PlaybackManagerPrivated_ptr
 

Properties

bool resumePlayback
 
int audioIndex
 
int subtitleIndex
 
qint64 position
 The position in ticks in the currently playing item.
 
qint64 duration
 The duration in ticks of the currently playing item.
 
bool seekable
 Whether the playbackmanager is currently able to seek.
 
bool hasAudio
 Whether the currently playing item has audio.
 
bool hasVideo
 Whether the currently playing item has video.
 
Jellyfin::Model::PlayerStateClass::Value playbackState
 
Jellyfin::Model::MediaStatusClass::Value mediaStatus
 
int queueIndex
 

Detailed Description

Base class for a playback manager.

Besides some glue code for the properties, most of the actual playback logic is implemented in the two subclasses: LocalPlaybackManager and RemotePlaybackManager

Constructor & Destructor Documentation

◆ PlaybackManager() [1/2]

Jellyfin::Model::PlaybackManager::PlaybackManager ( QObject * parent = nullptr)
explicit

◆ ~PlaybackManager()

Jellyfin::Model::PlaybackManager::~PlaybackManager ( )
virtual

◆ PlaybackManager() [2/2]

Jellyfin::Model::PlaybackManager::PlaybackManager ( PlaybackManagerPrivate * d,
QObject * parent = nullptr )
explicitprotected

Member Function Documentation

◆ apiClient()

ApiClient * Jellyfin::Model::PlaybackManager::apiClient ( ) const

◆ audioIndex()

int Jellyfin::Model::PlaybackManager::audioIndex ( ) const

◆ audioIndexChanged

void Jellyfin::Model::PlaybackManager::audioIndexChanged ( int newAudioIndex)
signal

◆ currentItem()

QSharedPointer< Item > Jellyfin::Model::PlaybackManager::currentItem ( ) const

◆ duration()

virtual qint64 Jellyfin::Model::PlaybackManager::duration ( ) const
pure virtual

◆ durationChanged

void Jellyfin::Model::PlaybackManager::durationChanged ( qint64 newDuration)
signal

◆ error()

virtual PlaybackManagerError Jellyfin::Model::PlaybackManager::error ( ) const
pure virtual

◆ errorChanged

void Jellyfin::Model::PlaybackManager::errorChanged ( Jellyfin::Model::PlaybackManagerErrorClass::Value newError)
signal

◆ errorString()

virtual const QString & Jellyfin::Model::PlaybackManager::errorString ( ) const
pure virtual

◆ errorStringChanged

void Jellyfin::Model::PlaybackManager::errorStringChanged ( const QString & newErrorString)
signal

◆ goTo

virtual void Jellyfin::Model::PlaybackManager::goTo ( int index)
pure virtualslot

Play the item at the index in the current playlist.

Parameters
indexthe item to go to;

◆ hasAudio()

virtual bool Jellyfin::Model::PlaybackManager::hasAudio ( ) const
pure virtual

◆ hasAudioChanged

void Jellyfin::Model::PlaybackManager::hasAudioChanged ( )
signal

◆ hasNext()

virtual bool Jellyfin::Model::PlaybackManager::hasNext ( ) const
pure virtual

◆ hasNextChanged

void Jellyfin::Model::PlaybackManager::hasNextChanged ( bool newHasNext)
signal

◆ hasPrevious()

virtual bool Jellyfin::Model::PlaybackManager::hasPrevious ( ) const
pure virtual

◆ hasPreviousChanged

void Jellyfin::Model::PlaybackManager::hasPreviousChanged ( bool newHasPrevious)
signal

◆ hasVideo()

virtual bool Jellyfin::Model::PlaybackManager::hasVideo ( ) const
pure virtual

◆ hasVideoChanged

void Jellyfin::Model::PlaybackManager::hasVideoChanged ( )
signal

◆ itemChanged

void Jellyfin::Model::PlaybackManager::itemChanged ( )
signal

◆ mediaStatus()

virtual MediaStatus Jellyfin::Model::PlaybackManager::mediaStatus ( ) const
pure virtual

◆ mediaStatusChanged

void Jellyfin::Model::PlaybackManager::mediaStatusChanged ( Jellyfin::Model::MediaStatusClass::Value newMediaStatus)
signal

◆ next

virtual void Jellyfin::Model::PlaybackManager::next ( )
pure virtualslot

◆ pause

virtual void Jellyfin::Model::PlaybackManager::pause ( )
pure virtualslot

◆ play

virtual void Jellyfin::Model::PlaybackManager::play ( )
pure virtualslot

◆ playbackState()

virtual PlayerState Jellyfin::Model::PlaybackManager::playbackState ( ) const
pure virtual

◆ playbackStateChanged

void Jellyfin::Model::PlaybackManager::playbackStateChanged ( Jellyfin::Model::PlayerStateClass::Value newPlaybackState)
signal

◆ playItem()

virtual void Jellyfin::Model::PlaybackManager::playItem ( QSharedPointer< Model::Item > item)
pure virtual

Start playing the given item.

◆ playItemId

void Jellyfin::Model::PlaybackManager::playItemId ( const QString & id)
pure virtualslot

◆ playItemInList()

virtual void Jellyfin::Model::PlaybackManager::playItemInList ( const QList< QSharedPointer< Model::Item > > & items,
int index )
pure virtual

Set the playlist to the given playlist and start playing the item at the given index.

Parameters
itemsThe list of items to play
indexIndex of the item to play

Implemented in Jellyfin::Model::LocalPlaybackManager.

◆ position()

virtual qint64 Jellyfin::Model::PlaybackManager::position ( ) const
pure virtual

◆ positionChanged

void Jellyfin::Model::PlaybackManager::positionChanged ( qint64 newPosition)
signal

◆ previous

virtual void Jellyfin::Model::PlaybackManager::previous ( )
pure virtualslot

◆ queue()

Playlist * Jellyfin::Model::PlaybackManager::queue ( ) const

◆ queueChanged

void Jellyfin::Model::PlaybackManager::queueChanged ( Jellyfin::Model::Playlist * newPlaylist)
signal

◆ queueIndex()

int Jellyfin::Model::PlaybackManager::queueIndex ( ) const

◆ queueIndexChanged

void Jellyfin::Model::PlaybackManager::queueIndexChanged ( int index)
signal

◆ resumePlayback()

bool Jellyfin::Model::PlaybackManager::resumePlayback ( ) const

◆ resumePlaybackChanged

void Jellyfin::Model::PlaybackManager::resumePlaybackChanged ( bool newPlaybackChanged)
signal

◆ seek

virtual void Jellyfin::Model::PlaybackManager::seek ( qint64 pos)
pure virtualslot

◆ seekable()

virtual bool Jellyfin::Model::PlaybackManager::seekable ( ) const
pure virtual

◆ seekableChanged

void Jellyfin::Model::PlaybackManager::seekableChanged ( bool newSeekable)
signal

◆ setApiClient()

void Jellyfin::Model::PlaybackManager::setApiClient ( ApiClient * apiClient)

◆ setAudioIndex()

void Jellyfin::Model::PlaybackManager::setAudioIndex ( int newAudioIndex)

◆ setItem()

void Jellyfin::Model::PlaybackManager::setItem ( QSharedPointer< Item > item)
protected

◆ setQueueIndex()

void Jellyfin::Model::PlaybackManager::setQueueIndex ( int index)
protected

◆ setResumePlayback()

void Jellyfin::Model::PlaybackManager::setResumePlayback ( bool newResumePlayback)

◆ setSubtitleIndex()

void Jellyfin::Model::PlaybackManager::setSubtitleIndex ( int newSubtitleIndex)

◆ stop

virtual void Jellyfin::Model::PlaybackManager::stop ( )
pure virtualslot

◆ subtitleIndex()

int Jellyfin::Model::PlaybackManager::subtitleIndex ( ) const

◆ subtitleIndexChanged

void Jellyfin::Model::PlaybackManager::subtitleIndexChanged ( int newSubtitleIndex)
signal

◆ swap()

void Jellyfin::Model::PlaybackManager::swap ( PlaybackManager & other)

Member Data Documentation

◆ d_ptr

QScopedPointer<PlaybackManagerPrivate> Jellyfin::Model::PlaybackManager::d_ptr
protected

◆ MS_TICK_FACTOR

const qint64 Jellyfin::Model::PlaybackManager::MS_TICK_FACTOR = 10000
static

Property Documentation

◆ audioIndex

int Jellyfin::Model::PlaybackManager::audioIndex
readwrite

◆ duration

qint64 Jellyfin::Model::PlaybackManager::duration
read

The duration in ticks of the currently playing item.

◆ hasAudio

bool Jellyfin::Model::PlaybackManager::hasAudio
read

Whether the currently playing item has audio.

◆ hasVideo

bool Jellyfin::Model::PlaybackManager::hasVideo
read

Whether the currently playing item has video.

◆ mediaStatus

Jellyfin::Model::MediaStatusClass::Value Jellyfin::Model::PlaybackManager::mediaStatus
read

◆ playbackState

Jellyfin::Model::PlayerStateClass::Value Jellyfin::Model::PlaybackManager::playbackState
read

◆ position

qint64 Jellyfin::Model::PlaybackManager::position
read

The position in ticks in the currently playing item.

◆ queueIndex

int Jellyfin::Model::PlaybackManager::queueIndex
read

◆ resumePlayback

bool Jellyfin::Model::PlaybackManager::resumePlayback
readwrite

◆ seekable

bool Jellyfin::Model::PlaybackManager::seekable
read

Whether the playbackmanager is currently able to seek.

◆ subtitleIndex

int Jellyfin::Model::PlaybackManager::subtitleIndex
readwrite

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