Go to the documentation of this file.
102 void stop(
bool stopAll =
false);
133 void addTrack(
int trackID,
bool updateUI);
151 void seek(std::chrono::seconds pos);
214 void sendNotification(
int notificationID,
const QString &title,
const QString &author,
const QString &desc);
void addVisual(MainVisual *visual)
bool openOutputDevice(void)
Decoder * getDecoder(void)
AudioOutput * getOutput(void)
bool m_showScannerNotifications
QMap< QString, int > m_notificationMap
bool setCurrentTrackPos(int pos)
RepeatMode getRepeatMode(void)
void setVolume(int volume)
MythEvent * clone(void) const override
void toMap(InfoMap &infoMap) const
Q_DECLARE_METATYPE(MusicPlayer::ResumeMode)
void sendNotification(int notificationID, const QString &title, const QString &author, const QString &desc)
bool getAutoShowPlayer(void) const
ResumeMode getResumeMode(void)
void loadStreamPlaylist(void)
Superclass for making an object have a set of listeners.
This class is used as a container for messages.
static Type TrackStatsChangedEvent
void setShuffleMode(ShuffleMode mode)
int getCurrentTrackPos(void) const
static Type TrackAddedEvent
bool isPlaying(void) const
MusicPlayer(QObject *parent)
std::chrono::seconds m_lastplayDelay
ResumeMode m_resumeModePlayback
static StreamList * getStreamList(void)
static Type MetadataChangedEvent
MuteState getMuteState(void) const
Playlist * getCurrentPlaylist(void)
void removeListener(QObject *listener)
void setPlayMode(PlayMode mode)
void updateVolatileMetadata(void)
PlayMode getPlayMode(void)
DecoderHandler * m_decoderHandler
void changeCurrentTrack(int trackNo)
change the current track to the given track
ResumeMode m_resumeModeRadio
QHash< QString, QString > InfoMap
void sendTrackStatsChangedEvent(int trackID)
MusicMetadata * getCurrentMetadata(void)
get the metadata for the current track in the playlist
int getNotificationID(const QString &hostname)
Class for starting stream decoding.
MusicPlayerEvent(Type type, int id)
RepeatMode toggleRepeatMode(void)
static Type TrackChangeEvent
std::chrono::seconds m_lastTrackStart
static Type PlayedTracksChangedEvent
void removeVisual(MainVisual *visual)
MPLUGIN_PUBLIC MusicPlayer * gPlayer
ShuffleMode toggleShuffleMode(void)
MusicPlayerEvent & operator=(const MusicPlayerEvent &other)=default
void setupDecoderHandler(void)
void sendTrackUnavailableEvent(int trackID)
~MusicPlayerEvent() override=default
ShuffleMode m_shuffleMode
ShuffleMode getShuffleMode(void)
Decoder * getDecoder(void)
void playlistChanged(int playlistID)
void sendMetadataChangedEvent(int trackID)
void removeTrack(int trackID)
static Type AllTracksRemovedEvent
void updateLastplay(void)
void showMiniPlayer(void) const
@ PLAYMODE_TRACKSPLAYLIST
MusicMetadata * getNextMetadata(void)
get the metadata for the next track in the playlist
QList< MusicMetadata * > & getPlayedTracksList(void)
void decoderHandlerReady(void)
QSet< QObject * > m_visualisers
DecoderHandler * getDecoderHandler(void)
static Type TrackUnavailableEvent
void activePlaylistChanged(int trackID, bool deleted)
void setSpeed(float speed)
void setRepeatMode(RepeatMode mode)
void addTrack(int trackID, bool updateUI)
static Type PlaylistChangedEvent
static Type VolumeChangeEvent
QList< MusicMetadata * > m_playedList
static Type TrackRemovedEvent
void customEvent(QEvent *event) override
ResumeMode m_resumeModeEditor
void sendVolumeChangedEvent(void)
~MusicPlayer(void) override
void setAllowRestorePos(bool allow)
static Type CDChangedEvent
void sendAlbumArtChangedEvent(int trackID)
MusicMetadata * m_oneshotMetadata
void restorePosition(void)
void autoShowPlayer(bool autoShow)
This will allow/disallow the mini player showing on track changes.
MPLUGIN_PUBLIC QString gCDdevice
void sendCDChangedEvent(void)
void seek(std::chrono::seconds pos)
void playFile(const MusicMetadata &mdata)
void stop(bool stopAll=false)
std::chrono::seconds getCurrentTrackTime(void) const
bool getCanShowPlayer(void) const
void getBufferStatus(int *bufferAvailable, int *bufferSize) const
void canShowPlayer(bool canShow)
This will allow/disallow the mini player showing even using its jumppoint.
static Type AlbumArtChangedEvent
uint getVolume(void) const
static constexpr std::chrono::seconds LASTPLAY_DELAY
std::chrono::seconds m_currentTime
MusicPlayerEvent(Type type, uint vol, bool muted)
virtual bool IsPaused(void) const =0
void addListener(QObject *listener)
void moveTrackUpDown(bool moveUp, int whichTrack)