19#ifndef JELLYFIN_MODEL_PLAYBACKMANAGER_H
20#define JELLYFIN_MODEL_PLAYBACKMANAGER_H
22#include <QLoggingCategory>
24#include <QSharedPointer>
158 virtual
void playItemId(const QString &
id) = 0;
165 virtual
void goTo(
int index) = 0;
167 virtual
void seek(qint64 pos) = 0;
192 Q_PROPERTY(QUrl streamUrl READ streamUrl NOTIFY streamUrlChanged)
197 QString sessionId() const;
199 const QUrl &streamUrl() const;
217 void pause() override;
218 void play() override;
219 void playItem(QSharedPointer<Model::
Item> item) override;
220 void playItemId(const QString &itemId) override;
221 void next() override;
223 void stop() override;
224 void seek(qint64 pos) override;
225 void goTo(
int index) override;
229 void streamUrlChanged(const QUrl &newStreamUrl);
An Api client for Jellyfin. Handles requests and authentication.
Definition apiclient.h:90
Definition playmethod.h:46
Value
Definition playmethod.h:49
Definition playbackmanager.cpp:219
Controls playback whithin this app.
Definition playbackmanager.h:187
Definition playbackmanager.h:37
Value
Definition playbackmanager.h:40
@ RemoteClientNotReachable
Definition playbackmanager.h:43
@ PlayerGeneralError
Definition playbackmanager.h:44
@ NoError
Definition playbackmanager.h:41
@ PlaybackInfoError
Definition playbackmanager.h:42
Definition playbackmanager.cpp:36
Base class for a playback manager.
Definition playbackmanager.h:59
Jellyfin::Model::PlayerStateClass::Value playbackState
Definition playbackmanager.h:85
void setSubtitleIndex(int newSubtitleIndex)
Definition playbackmanager.cpp:196
virtual void playItem(QSharedPointer< Model::Item > item)=0
Start playing the given item.
ApiClient * apiClient() const
Definition playbackmanager.cpp:131
void errorStringChanged(const QString &newErrorString)
void setQueueIndex(int index)
Definition playbackmanager.cpp:208
void setAudioIndex(int newAudioIndex)
Definition playbackmanager.cpp:185
QScopedPointer< PlaybackManagerPrivate > d_ptr
Definition playbackmanager.h:170
virtual bool hasNext() const =0
void errorChanged(Jellyfin::Model::PlaybackManagerErrorClass::Value newError)
virtual void goTo(int index)=0
Play the item at the index in the current playlist.
qint64 position
The position in ticks in the currently playing item.
Definition playbackmanager.h:68
QSharedPointer< Item > currentItem() const
Definition playbackmanager.cpp:141
void seekableChanged(bool newSeekable)
void playbackStateChanged(Jellyfin::Model::PlayerStateClass::Value newPlaybackState)
void swap(PlaybackManager &other)
Definition playbackmanager.cpp:156
virtual PlaybackManagerError error() const =0
void mediaStatusChanged(Jellyfin::Model::MediaStatusClass::Value newMediaStatus)
static const qint64 MS_TICK_FACTOR
Definition playbackmanager.h:131
bool hasVideo
Whether the currently playing item has video.
Definition playbackmanager.h:84
int queueIndex
Definition playbackmanager.h:87
void queueIndexChanged(int index)
bool seekable
Whether the playbackmanager is currently able to seek.
Definition playbackmanager.h:76
void hasPreviousChanged(bool newHasPrevious)
void positionChanged(qint64 newPosition)
void audioIndexChanged(int newAudioIndex)
void setApiClient(ApiClient *apiClient)
Definition playbackmanager.cpp:136
bool hasAudio
Whether the currently playing item has audio.
Definition playbackmanager.h:80
Playlist * queue() const
Definition playbackmanager.cpp:146
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.
Jellyfin::Model::MediaStatusClass::Value mediaStatus
Definition playbackmanager.h:86
virtual const QString & errorString() const =0
int subtitleIndex
Definition playbackmanager.h:64
void setItem(QSharedPointer< Item > item)
Definition playbackmanager.cpp:202
virtual void previous()=0
void hasNextChanged(bool newHasNext)
void setResumePlayback(bool newResumePlayback)
Definition playbackmanager.cpp:174
void resumePlaybackChanged(bool newPlaybackChanged)
virtual void seek(qint64 pos)=0
bool resumePlayback
Definition playbackmanager.h:62
int audioIndex
Definition playbackmanager.h:63
virtual bool hasPrevious() const =0
void queueChanged(Jellyfin::Model::Playlist *newPlaylist)
void durationChanged(qint64 newDuration)
void subtitleIndexChanged(int newSubtitleIndex)
qint64 duration
The duration in ticks of the currently playing item.
Definition playbackmanager.h:72
virtual void playItemId(const QString &id)=0
Definition playbackmanager.cpp:167
Value
Definition player.h:35
Abstract class for a player.
Definition player.h:69
Model of a playlist, a list of items that can be played.
Definition playlist.h:47
Controls playback for remote devices, such as other Jellyfin clients, over the network.
Definition playbackmanager.h:235
Definition mediaplayer2.h:20
Q_DECLARE_LOGGING_CATEGORY(playbackManager)