MythTV  master
musicplayer.h
Go to the documentation of this file.
1 #ifndef MUSICPLAYER_H_
2 #define MUSICPLAYER_H_
3 
4 // MythTV
9 
10 // mythmusic
11 #include "decoderhandler.h"
12 
13 // how long to wait before updating the lastplay and playcount fields
14 static constexpr std::chrono::seconds LASTPLAY_DELAY { 15s };
15 
16 class AudioOutput;
17 class MainVisual;
18 class Playlist;
19 
21 {
22  public:
23  MusicPlayerEvent(Type type, int id) :
24  MythEvent(type), m_trackID(id) {}
25  MusicPlayerEvent(Type type, uint vol, bool muted) :
26  MythEvent(type), m_trackID(0), m_volume(vol), m_isMuted(muted) {}
27  ~MusicPlayerEvent() override = default;
28 
29  MythEvent *clone(void) const override // MythEvent
30  { return new MusicPlayerEvent(*this); }
31 
32  // for track changed/added/deleted/metadata changed/playlist changed events
33  int m_trackID;
34 
35  // for volume changed event
37  bool m_isMuted {false};
38 
39  static Type TrackChangeEvent;
40  static Type VolumeChangeEvent;
41  static Type TrackAddedEvent;
42  static Type TrackRemovedEvent;
43  static Type TrackUnavailableEvent;
44  static Type AllTracksRemovedEvent;
45  static Type MetadataChangedEvent;
47  static Type AlbumArtChangedEvent;
48  static Type CDChangedEvent;
49  static Type PlaylistChangedEvent;
51 
52  // No implicit copying.
53  protected:
54  MusicPlayerEvent(const MusicPlayerEvent &other) = default;
55  MusicPlayerEvent &operator=(const MusicPlayerEvent &other) = default;
56  public:
59 };
60 
61 class MusicPlayer : public QObject, public MythObservable
62 {
63  Q_OBJECT
64 
65  public:
66  explicit MusicPlayer(QObject *parent);
67  ~MusicPlayer(void) override;
68 
69  enum PlayMode
70  {
74  };
75 
76  void setPlayMode(PlayMode mode);
77  PlayMode getPlayMode(void) { return m_playMode; }
78 
79  void playFile(const MusicMetadata &mdata);
80 
81  void addListener(QObject *listener);
82  void removeListener(QObject *listener);
83 
84  void addVisual(MainVisual *visual);
85  void removeVisual(MainVisual *visual);
86 
87  void toggleMute(void);
88  MuteState getMuteState(void) const;
89  bool isMuted(void) const { return getMuteState() == kMuteAll; }
90 
91  void setVolume(int volume);
92  void incVolume(void);
93  void decVolume(void);
94  uint getVolume(void) const;
95 
96  void setSpeed(float speed);
97  void incSpeed();
98  void decSpeed();
99  float getSpeed() const { return m_playSpeed; }
100 
101  void play(void);
102  void stop(bool stopAll = false);
103  void pause(void);
104  void next(void);
105  void previous(void);
106 
107  void nextAuto(void);
108 
109  bool isPlaying(void) const { return m_isPlaying; }
110  bool isPaused(void) { return getOutput() ? getOutput()->IsPaused() : false; }
111  bool isStopped(void) { return !(isPlaying() || isPaused()); }
112  bool hasClient(void) { return hasListeners(); }
113 
115  void autoShowPlayer(bool autoShow) { m_autoShowPlayer = autoShow; }
116  bool getAutoShowPlayer(void) const { return m_autoShowPlayer; }
117 
119  void canShowPlayer(bool canShow) { m_canShowPlayer = canShow; }
120  bool getCanShowPlayer(void) const { return m_canShowPlayer; }
121 
124  AudioOutput *getOutput(void) { return m_output; }
125 
126  void loadPlaylist(void);
127  void loadStreamPlaylist(void);
129  static StreamList *getStreamList(void);
130 
131  // these add and remove tracks from the active playlist
132  void removeTrack(int trackID);
133  void addTrack(int trackID, bool updateUI);
134 
135  void moveTrackUpDown(bool moveUp, int whichTrack);
136 
137  QList<MusicMetadata*> &getPlayedTracksList(void) { return m_playedList; }
138 
139  int getCurrentTrackPos(void) const { return m_currentTrack; }
140  bool setCurrentTrackPos(int pos);
141  void changeCurrentTrack(int trackNo);
142 
143  std::chrono::seconds getCurrentTrackTime(void) const { return m_currentTime; }
144 
145  void activePlaylistChanged(int trackID, bool deleted);
146  void playlistChanged(int playlistID);
147 
148  void savePosition(void);
149  void restorePosition(void);
150  void setAllowRestorePos(bool allow) { m_allowRestorePos = allow; }
151  void seek(std::chrono::seconds pos);
152 
155  void sendMetadataChangedEvent(int trackID);
156  void sendTrackStatsChangedEvent(int trackID);
157  void sendAlbumArtChangedEvent(int trackID);
158  void sendTrackUnavailableEvent(int trackID);
159  void sendCDChangedEvent(void);
160 
161  void toMap(InfoMap &infoMap) const;
162 
163  void showMiniPlayer(void) const;
165  { REPEAT_OFF = 0,
169  };
171  { SHUFFLE_OFF = 0,
177  };
178 
185  };
186 
188  void setRepeatMode(RepeatMode mode) { m_repeatMode = mode; }
190 
192  void setShuffleMode(ShuffleMode mode);
194 
196 
197  void getBufferStatus(int *bufferAvailable, int *bufferSize) const;
198 
199  public slots:
200  void StartPlayback(void);
201  void StopPlayback(void);
202 
203  protected:
204  void customEvent(QEvent *event) override; // QObject
205 
206  private:
207  void loadSettings(void);
208  void stopDecoder(void);
209  bool openOutputDevice(void);
210  void updateLastplay(void);
211  void updateVolatileMetadata(void);
212  void sendVolumeChangedEvent(void);
213  int getNotificationID(const QString &hostname);
214  void sendNotification(int notificationID, const QString &title, const QString &author, const QString &desc);
215 
216  void setupDecoderHandler(void);
217  void decoderHandlerReady(void);
218 
219  int m_currentTrack {-1};
220  std::chrono::seconds m_currentTime {0s};
221 
223 
224  AudioOutput *m_output {nullptr};
226 
227  QSet<QObject*> m_visualisers;
228 
230  bool m_isPlaying {false};
231  bool m_isAutoplay {false};
232  bool m_canShowPlayer {true};
233  bool m_autoShowPlayer {true};
234  bool m_wasPlaying {false};
235  bool m_updatedLastplay {false};
236  bool m_allowRestorePos {true};
237 
238  std::chrono::seconds m_lastplayDelay {LASTPLAY_DELAY};
239 
245 
246  float m_playSpeed {1.0F};
247 
248  // notification
250  QMap<QString, int> m_notificationMap;
251 
252  // radio stuff
253  QList<MusicMetadata*> m_playedList;
254  std::chrono::seconds m_lastTrackStart {0s};
256  int m_bufferSize {0};
257 
258  int m_errorCount {0};
259 };
260 
264 
265 // This global variable contains the MusicPlayer instance for the application
267 
268  // This stores the last MythMediaDevice that was detected:
269 extern MPLUGIN_PUBLIC QString gCDdevice;
270 
271 #endif
MusicPlayer::addVisual
void addVisual(MainVisual *visual)
Definition: musicplayer.cpp:177
MusicPlayer::StopPlayback
void StopPlayback(void)
Definition: musicplayer.cpp:534
MusicPlayer::PLAYMODE_TRACKSEDITOR
@ PLAYMODE_TRACKSEDITOR
Definition: musicplayer.h:72
MusicPlayer::toggleMute
void toggleMute(void)
Definition: musicplayer.cpp:1401
MusicPlayer::openOutputDevice
bool openOutputDevice(void)
Definition: musicplayer.cpp:362
MusicPlayer::SHUFFLE_INTELLIGENT
@ SHUFFLE_INTELLIGENT
Definition: musicplayer.h:173
MusicPlayer::m_bufferAvailable
int m_bufferAvailable
Definition: musicplayer.h:255
MusicPlayer::getDecoder
Decoder * getDecoder(void)
Definition: musicplayer.h:122
MusicPlayer::StartPlayback
void StartPlayback(void)
Definition: musicplayer.cpp:524
MusicPlayer::getOutput
AudioOutput * getOutput(void)
Definition: musicplayer.h:124
MusicPlayer::m_showScannerNotifications
bool m_showScannerNotifications
Definition: musicplayer.h:249
MusicPlayer::m_notificationMap
QMap< QString, int > m_notificationMap
Definition: musicplayer.h:250
MusicPlayer::m_bufferSize
int m_bufferSize
Definition: musicplayer.h:256
MusicPlayer::setCurrentTrackPos
bool setCurrentTrackPos(int pos)
Definition: musicplayer.cpp:1037
MusicPlayer::getRepeatMode
RepeatMode getRepeatMode(void)
Definition: musicplayer.h:187
MusicPlayer::RESUME_OFF
@ RESUME_OFF
Definition: musicplayer.h:180
MusicPlayer::setVolume
void setVolume(int volume)
Definition: musicplayer.cpp:1385
MusicPlayerEvent::clone
MythEvent * clone(void) const override
Definition: musicplayer.h:29
MusicPlayer::toMap
void toMap(InfoMap &infoMap) const
Definition: musicplayer.cpp:1417
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(MusicPlayer::ResumeMode)
MusicPlayer::sendNotification
void sendNotification(int notificationID, const QString &title, const QString &author, const QString &desc)
Definition: musicplayer.cpp:1626
MusicPlayer::RESUME_TRACK
@ RESUME_TRACK
Definition: musicplayer.h:182
MusicPlayer::getAutoShowPlayer
bool getAutoShowPlayer(void) const
Definition: musicplayer.h:116
MusicPlayer::getResumeMode
ResumeMode getResumeMode(void)
Definition: musicplayer.cpp:205
MusicPlayer::loadPlaylist
void loadPlaylist(void)
Definition: musicplayer.cpp:966
MusicPlayerEvent
Definition: musicplayer.h:20
MusicPlayer::loadStreamPlaylist
void loadStreamPlaylist(void)
Definition: musicplayer.cpp:998
decoderhandler.h
MythObservable
Superclass for making an object have a set of listeners.
Definition: mythobservable.h:12
MusicPlayer::decVolume
void decVolume(void)
Definition: musicplayer.cpp:1376
Playlist
Definition: playlist.h:45
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
MusicPlayerEvent::TrackStatsChangedEvent
static Type TrackStatsChangedEvent
Definition: musicplayer.h:46
MusicPlayer::setShuffleMode
void setShuffleMode(ShuffleMode mode)
Definition: musicplayer.cpp:1243
MusicPlayer::getCurrentTrackPos
int getCurrentTrackPos(void) const
Definition: musicplayer.h:139
MusicPlayerEvent::TrackAddedEvent
static Type TrackAddedEvent
Definition: musicplayer.h:41
MusicPlayer::isPlaying
bool isPlaying(void) const
Definition: musicplayer.h:109
MusicPlayer::MusicPlayer
MusicPlayer(QObject *parent)
Definition: musicplayer.cpp:55
MusicPlayer::m_playMode
PlayMode m_playMode
Definition: musicplayer.h:229
MusicPlayer::m_lastplayDelay
std::chrono::seconds m_lastplayDelay
Definition: musicplayer.h:238
MusicPlayer::m_resumeModePlayback
ResumeMode m_resumeModePlayback
Definition: musicplayer.h:242
MusicMetadata
Definition: musicmetadata.h:80
MusicPlayer::getStreamList
static StreamList * getStreamList(void)
Definition: musicplayer.cpp:1613
MusicPlayerEvent::MetadataChangedEvent
static Type MetadataChangedEvent
Definition: musicplayer.h:45
MusicPlayer::getMuteState
MuteState getMuteState(void) const
Definition: musicplayer.cpp:1410
MusicPlayer::getCurrentPlaylist
Playlist * getCurrentPlaylist(void)
Definition: musicplayer.cpp:1601
MusicPlayer::removeListener
void removeListener(QObject *listener)
Definition: musicplayer.cpp:161
MusicPlayer::setPlayMode
void setPlayMode(PlayMode mode)
Definition: musicplayer.cpp:954
MusicPlayer::pause
void pause(void)
Definition: musicplayer.cpp:288
MusicPlayer::updateVolatileMetadata
void updateVolatileMetadata(void)
Definition: musicplayer.cpp:1283
MusicPlayer::getPlayMode
PlayMode getPlayMode(void)
Definition: musicplayer.h:77
MusicPlayer::m_decoderHandler
DecoderHandler * m_decoderHandler
Definition: musicplayer.h:225
MusicPlayer::isStopped
bool isStopped(void)
Definition: musicplayer.h:111
MusicPlayer::changeCurrentTrack
void changeCurrentTrack(int trackNo)
change the current track to the given track
Definition: musicplayer.cpp:1138
MusicPlayer::m_resumeModeRadio
ResumeMode m_resumeModeRadio
Definition: musicplayer.h:244
MuteState
MuteState
Definition: volumebase.h:6
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
MusicPlayer::sendTrackStatsChangedEvent
void sendTrackStatsChangedEvent(int trackID)
Definition: musicplayer.cpp:1343
MusicPlayer::ResumeMode
ResumeMode
Definition: musicplayer.h:179
MusicPlayerEvent::m_volume
uint m_volume
Definition: musicplayer.h:36
MusicPlayer::getCurrentMetadata
MusicMetadata * getCurrentMetadata(void)
get the metadata for the current track in the playlist
Definition: musicplayer.cpp:1160
MusicPlayer::getNotificationID
int getNotificationID(const QString &hostname)
Definition: musicplayer.cpp:1618
DecoderHandler
Class for starting stream decoding.
Definition: decoderhandler.h:77
mythpluginexport.h
MusicPlayerEvent::MusicPlayerEvent
MusicPlayerEvent(Type type, int id)
Definition: musicplayer.h:23
MusicPlayer::SHUFFLE_OFF
@ SHUFFLE_OFF
Definition: musicplayer.h:171
AudioOutput
Definition: audiooutput.h:26
MusicPlayer::toggleRepeatMode
RepeatMode toggleRepeatMode(void)
Definition: musicplayer.cpp:1197
Decoder
Definition: decoder.h:70
MusicPlayerEvent::TrackChangeEvent
static Type TrackChangeEvent
Definition: musicplayer.h:39
MusicPlayer::m_lastTrackStart
std::chrono::seconds m_lastTrackStart
Definition: musicplayer.h:254
MusicPlayerEvent::PlayedTracksChangedEvent
static Type PlayedTracksChangedEvent
Definition: musicplayer.h:50
MusicPlayer::removeVisual
void removeVisual(MainVisual *visual)
Definition: musicplayer.cpp:191
MusicPlayer::incVolume
void incVolume(void)
Definition: musicplayer.cpp:1367
gPlayer
MPLUGIN_PUBLIC MusicPlayer * gPlayer
Definition: musicplayer.cpp:37
MusicPlayer::toggleShuffleMode
ShuffleMode toggleShuffleMode(void)
Definition: musicplayer.cpp:1216
MusicPlayer::m_currentTrack
int m_currentTrack
Definition: musicplayer.h:219
MusicPlayer::MAX_REPEAT_MODES
@ MAX_REPEAT_MODES
Definition: musicplayer.h:168
MusicPlayer::m_wasPlaying
bool m_wasPlaying
Definition: musicplayer.h:234
MusicPlayerEvent::operator=
MusicPlayerEvent & operator=(const MusicPlayerEvent &other)=default
MusicPlayer::setupDecoderHandler
void setupDecoderHandler(void)
Definition: musicplayer.cpp:1495
MusicPlayer::PlayMode
PlayMode
Definition: musicplayer.h:69
MusicPlayer::m_output
AudioOutput * m_output
Definition: musicplayer.h:224
MusicPlayer::nextAuto
void nextAuto(void)
Definition: musicplayer.cpp:488
MusicPlayer::REPEAT_TRACK
@ REPEAT_TRACK
Definition: musicplayer.h:166
MusicPlayer::sendTrackUnavailableEvent
void sendTrackUnavailableEvent(int trackID)
Definition: musicplayer.cpp:1355
MusicPlayerEvent::~MusicPlayerEvent
~MusicPlayerEvent() override=default
MusicPlayer::stopDecoder
void stopDecoder(void)
Definition: musicplayer.cpp:356
MusicPlayer::m_shuffleMode
ShuffleMode m_shuffleMode
Definition: musicplayer.h:240
MusicPlayerEvent::m_isMuted
bool m_isMuted
Definition: musicplayer.h:37
MusicPlayer::incSpeed
void incSpeed()
Definition: musicplayer.cpp:1319
MusicPlayer::RESUME_FIRST
@ RESUME_FIRST
Definition: musicplayer.h:181
MusicPlayer::m_autoShowPlayer
bool m_autoShowPlayer
Definition: musicplayer.h:233
MusicPlayer::getShuffleMode
ShuffleMode getShuffleMode(void)
Definition: musicplayer.h:191
MusicPlayer::SHUFFLE_ARTIST
@ SHUFFLE_ARTIST
Definition: musicplayer.h:175
MusicPlayerEvent::m_trackID
int m_trackID
Definition: musicplayer.h:33
MusicPlayer::savePosition
void savePosition(void)
Definition: musicplayer.cpp:1052
DecoderHandler::getDecoder
Decoder * getDecoder(void)
Definition: decoderhandler.h:92
MythObservable::hasListeners
bool hasListeners(void)
Definition: mythobservable.h:24
MusicPlayer::playlistChanged
void playlistChanged(int playlistID)
Definition: musicplayer.cpp:1489
MusicPlayer::sendMetadataChangedEvent
void sendMetadataChangedEvent(int trackID)
Definition: musicplayer.cpp:1337
MusicPlayer::hasClient
bool hasClient(void)
Definition: musicplayer.h:112
uint
unsigned int uint
Definition: compat.h:79
MusicPlayer::removeTrack
void removeTrack(int trackID)
Definition: musicplayer.cpp:1583
MusicPlayer::next
void next(void)
Definition: musicplayer.cpp:420
MusicPlayer::isPaused
bool isPaused(void)
Definition: musicplayer.h:110
MusicPlayerEvent::AllTracksRemovedEvent
static Type AllTracksRemovedEvent
Definition: musicplayer.h:44
MusicPlayer::m_allowRestorePos
bool m_allowRestorePos
Definition: musicplayer.h:236
MusicPlayer::updateLastplay
void updateLastplay(void)
Definition: musicplayer.cpp:1272
MusicPlayer::showMiniPlayer
void showMiniPlayer(void) const
Definition: musicplayer.cpp:1121
MusicPlayer
Definition: musicplayer.h:61
MusicPlayer::m_updatedLastplay
bool m_updatedLastplay
Definition: musicplayer.h:235
MusicPlayer::SHUFFLE_RANDOM
@ SHUFFLE_RANDOM
Definition: musicplayer.h:172
StreamList
QList< MusicMetadata * > StreamList
Definition: musicmetadata.h:474
MusicPlayer::PLAYMODE_TRACKSPLAYLIST
@ PLAYMODE_TRACKSPLAYLIST
Definition: musicplayer.h:71
MusicPlayer::getNextMetadata
MusicMetadata * getNextMetadata(void)
get the metadata for the next track in the playlist
Definition: musicplayer.cpp:1172
MainVisual
Definition: mainvisual.h:34
MusicPlayer::getPlayedTracksList
QList< MusicMetadata * > & getPlayedTracksList(void)
Definition: musicplayer.h:137
MusicPlayer::decoderHandlerReady
void decoderHandlerReady(void)
Definition: musicplayer.cpp:1509
MusicPlayer::previous
void previous(void)
Definition: musicplayer.cpp:457
MusicPlayer::m_visualisers
QSet< QObject * > m_visualisers
Definition: musicplayer.h:227
MusicPlayer::getDecoderHandler
DecoderHandler * getDecoderHandler(void)
Definition: musicplayer.h:123
MusicPlayer::decSpeed
void decSpeed()
Definition: musicplayer.cpp:1325
MusicPlayerEvent::TrackUnavailableEvent
static Type TrackUnavailableEvent
Definition: musicplayer.h:43
MusicPlayer::activePlaylistChanged
void activePlaylistChanged(int trackID, bool deleted)
Definition: musicplayer.cpp:1426
MusicPlayer::m_canShowPlayer
bool m_canShowPlayer
Definition: musicplayer.h:232
MusicPlayer::setSpeed
void setSpeed(float speed)
Definition: musicplayer.cpp:1310
MusicPlayer::setRepeatMode
void setRepeatMode(RepeatMode mode)
Definition: musicplayer.h:188
MusicPlayer::m_repeatMode
RepeatMode m_repeatMode
Definition: musicplayer.h:241
MusicPlayer::REPEAT_OFF
@ REPEAT_OFF
Definition: musicplayer.h:165
MusicPlayer::RepeatMode
RepeatMode
Definition: musicplayer.h:164
MusicPlayer::addTrack
void addTrack(int trackID, bool updateUI)
Definition: musicplayer.cpp:1596
MusicPlayer::SHUFFLE_ALBUM
@ SHUFFLE_ALBUM
Definition: musicplayer.h:174
MusicPlayerEvent::PlaylistChangedEvent
static Type PlaylistChangedEvent
Definition: musicplayer.h:49
audiooutput.h
MusicPlayerEvent::VolumeChangeEvent
static Type VolumeChangeEvent
Definition: musicplayer.h:40
MusicPlayer::m_playedList
QList< MusicMetadata * > m_playedList
Definition: musicplayer.h:253
MusicPlayer::getSpeed
float getSpeed() const
Definition: musicplayer.h:99
MPLUGIN_PUBLIC
#define MPLUGIN_PUBLIC
Definition: mythpluginexport.h:9
MusicPlayerEvent::TrackRemovedEvent
static Type TrackRemovedEvent
Definition: musicplayer.h:42
MusicPlayer::customEvent
void customEvent(QEvent *event) override
Definition: musicplayer.cpp:545
MusicPlayer::isMuted
bool isMuted(void) const
Definition: musicplayer.h:89
MusicPlayer::m_resumeModeEditor
ResumeMode m_resumeModeEditor
Definition: musicplayer.h:243
MusicPlayer::sendVolumeChangedEvent
void sendVolumeChangedEvent(void)
Definition: musicplayer.cpp:1331
MusicPlayer::~MusicPlayer
~MusicPlayer(void) override
Definition: musicplayer.cpp:88
MusicPlayer::setAllowRestorePos
void setAllowRestorePos(bool allow)
Definition: musicplayer.h:150
MusicPlayerEvent::CDChangedEvent
static Type CDChangedEvent
Definition: musicplayer.h:48
MusicPlayer::loadSettings
void loadSettings(void)
Definition: musicplayer.cpp:214
MusicPlayer::PLAYMODE_RADIO
@ PLAYMODE_RADIO
Definition: musicplayer.h:73
MusicPlayer::sendAlbumArtChangedEvent
void sendAlbumArtChangedEvent(int trackID)
Definition: musicplayer.cpp:1349
MusicPlayer::m_oneshotMetadata
MusicMetadata * m_oneshotMetadata
Definition: musicplayer.h:222
MusicPlayer::play
void play(void)
Definition: musicplayer.cpp:307
MusicPlayer::restorePosition
void restorePosition(void)
Definition: musicplayer.cpp:1069
MusicPlayer::MAX_RESUME_MODES
@ MAX_RESUME_MODES
Definition: musicplayer.h:184
MusicPlayer::autoShowPlayer
void autoShowPlayer(bool autoShow)
This will allow/disallow the mini player showing on track changes.
Definition: musicplayer.h:115
gCDdevice
MPLUGIN_PUBLIC QString gCDdevice
Definition: musicplayer.cpp:38
MusicPlayer::sendCDChangedEvent
void sendCDChangedEvent(void)
Definition: musicplayer.cpp:1361
MusicPlayer::seek
void seek(std::chrono::seconds pos)
Definition: musicplayer.cpp:1109
MusicPlayer::playFile
void playFile(const MusicMetadata &mdata)
Definition: musicplayer.cpp:225
MusicPlayer::m_isPlaying
bool m_isPlaying
Definition: musicplayer.h:230
musicbrainzngs.caa.hostname
string hostname
Definition: caa.py:17
MusicPlayer::stop
void stop(bool stopAll=false)
Definition: musicplayer.cpp:239
MusicPlayer::m_errorCount
int m_errorCount
Definition: musicplayer.h:258
MusicPlayer::m_playSpeed
float m_playSpeed
Definition: musicplayer.h:246
kMuteAll
@ kMuteAll
Definition: volumebase.h:10
MusicPlayer::getCurrentTrackTime
std::chrono::seconds getCurrentTrackTime(void) const
Definition: musicplayer.h:143
MusicPlayer::getCanShowPlayer
bool getCanShowPlayer(void) const
Definition: musicplayer.h:120
MusicPlayer::getBufferStatus
void getBufferStatus(int *bufferAvailable, int *bufferSize) const
Definition: musicplayer.cpp:948
MusicPlayer::canShowPlayer
void canShowPlayer(bool canShow)
This will allow/disallow the mini player showing even using its jumppoint.
Definition: musicplayer.h:119
MusicPlayerEvent::AlbumArtChangedEvent
static Type AlbumArtChangedEvent
Definition: musicplayer.h:47
MusicPlayer::getVolume
uint getVolume(void) const
Definition: musicplayer.cpp:1394
LASTPLAY_DELAY
static constexpr std::chrono::seconds LASTPLAY_DELAY
Definition: musicplayer.h:14
MusicPlayer::m_currentTime
std::chrono::seconds m_currentTime
Definition: musicplayer.h:220
MusicPlayerEvent::MusicPlayerEvent
MusicPlayerEvent(Type type, uint vol, bool muted)
Definition: musicplayer.h:25
MusicPlayer::m_isAutoplay
bool m_isAutoplay
Definition: musicplayer.h:231
musicmetadata.h
AudioOutput::IsPaused
virtual bool IsPaused(void) const =0
MusicPlayer::addListener
void addListener(QObject *listener)
Definition: musicplayer.cpp:145
MusicPlayer::RESUME_EXACT
@ RESUME_EXACT
Definition: musicplayer.h:183
mythobservable.h
MusicPlayer::ShuffleMode
ShuffleMode
Definition: musicplayer.h:170
MusicPlayer::MAX_SHUFFLE_MODES
@ MAX_SHUFFLE_MODES
Definition: musicplayer.h:176
MusicPlayer::REPEAT_ALL
@ REPEAT_ALL
Definition: musicplayer.h:167
MusicPlayer::moveTrackUpDown
void moveTrackUpDown(bool moveUp, int whichTrack)
Definition: musicplayer.cpp:1019