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