Sayonara Player
|
Global handler for current playback state (Singleton) More...
#include <PlayManager.h>
Public Slots | |
virtual void | play ()=0 |
Start playing if there's a track. | |
virtual void | wakeUp ()=0 |
Emit wake up signal after stopping state. | |
virtual void | playPause ()=0 |
toggle play/pause | |
virtual void | pause ()=0 |
pause track, if currently playing | |
virtual void | previous ()=0 |
change to previous track | |
virtual void | next ()=0 |
change to next track | |
virtual void | stop ()=0 |
stop playback | |
virtual void | record (bool b)=0 |
request recording (see also sig_record(bool b)) | |
virtual void | seekRelative (double percent)=0 |
seek relative | |
virtual void | seekAbsoluteMs (MilliSeconds ms)=0 |
seek absolute | |
virtual void | seekRelativeMs (MilliSeconds ms)=0 |
seekRelativeMs | |
virtual void | setCurrentPositionMs (MilliSeconds ms)=0 |
set current position of track This method does not seek. Just tells the playmanager where the current position is | |
virtual void | changeCurrentTrack (const MetaData &md, int trackIdx)=0 |
change current track | |
virtual void | changeCurrentMetadata (const MetaData &md)=0 |
change_track | |
virtual void | setTrackReady ()=0 |
notify, that track is ready for playback | |
virtual void | setTrackFinished ()=0 |
virtual void | buffering (int progress)=0 |
notifiy, that track is in buffering state currently | |
virtual void | volumeUp ()=0 |
increase volume by 5 | |
virtual void | volumeDown ()=0 |
decrease volume by 5 | |
virtual void | setVolume (int vol)=0 |
set volume | |
virtual void | setMute (bool b)=0 |
mute/unmute | |
virtual void | toggleMute ()=0 |
If already muted, then unmute. If unmuted, then mute it. | |
virtual void | changeDuration (MilliSeconds ms)=0 |
Change the duration. This is usually called when the Engine sends a duration changed signal. You should not use this. | |
virtual void | changeBitrate (Bitrate br)=0 |
virtual void | error (const QString &message)=0 |
Some playback error occured. | |
Signals | |
void | sigStreamFinished (const MetaData &old_md) |
emitted when a streamed track has finished | |
void | sigPlaystateChanged (PlayState) |
emitted, when PlayState was changed | |
void | sigNext () |
next track was triggered | |
void | sigWakeup () |
This signal is sent when the playstate changed from stopped to play. | |
void | sigPrevious () |
previous track was triggered | |
void | sigStopped () |
stop was triggered | |
void | sigSeekedRelative (double percent) |
relative seeking was triggered | |
void | sigSeekedRelativeMs (MilliSeconds ms) |
relative seeking was triggered | |
void | sigSeekedAbsoluteMs (MilliSeconds ms) |
absolute seeking was triggered | |
void | sigPositionChangedMs (MilliSeconds ms) |
position in track has changed | |
void | sigCurrentTrackChanged (const MetaData &md) |
track has changed | |
void | sigCurrentMetadataChanged () |
void | sigTrackIndexChanged (int idx) |
track has changed | |
void | sigDurationChangedMs () |
duration of track has changed | |
void | sigBitrateChanged () |
void | sigPlaylistFinished () |
playlist has finished | |
void | sigRecording (bool b) |
recording is requested | |
void | sigBuffering (int b) |
emitted when currently in buffering state | |
void | sigVolumeChanged (int vol) |
emitted when volume has changed | |
void | sigMuteChanged (bool b) |
emitted when mute state has changed | |
void | sigError (const QString &message) |
Public Member Functions | |
PlayManager (QObject *parent) | |
virtual PlayState | playstate () const =0 |
get current play state | |
virtual MilliSeconds | currentPositionMs () const =0 |
get current position in milliseconds | |
virtual MilliSeconds | currentTrackPlaytimeMs () const =0 |
virtual MilliSeconds | initialPositionMs () const =0 |
get position in milliseconds where track will start | |
virtual MilliSeconds | durationMs () const =0 |
get duration of track | |
virtual Bitrate | bitrate () const =0 |
virtual const MetaData & | currentTrack () const =0 |
get current track | |
virtual int | volume () const =0 |
get current volume | |
virtual bool | isMuted () const =0 |
query mute status | |
virtual void | shutdown ()=0 |
Shutdown the computer. | |
Global handler for current playback state (Singleton)
|
pure virtualslot |
notifiy, that track is in buffering state currently
progress |
Implemented in PlayManagerImpl.
|
pure virtualslot |
|
pure virtualslot |
|
pure virtualslot |
Change the duration. This is usually called when the Engine sends a duration changed signal. You should not use this.
ms |
Implemented in PlayManagerImpl.
|
pure virtual |
get current position in milliseconds
Implemented in PlayManagerImpl.
|
pure virtual |
|
pure virtual |
|
pure virtualslot |
|
pure virtual |
get position in milliseconds where track will start
Implemented in PlayManagerImpl.
|
pure virtual |
|
pure virtualslot |
change to next track
Implemented in PlayManagerImpl.
|
pure virtualslot |
pause track, if currently playing
Implemented in PlayManagerImpl.
|
pure virtualslot |
Start playing if there's a track.
Implemented in PlayManagerImpl.
|
pure virtualslot |
toggle play/pause
Implemented in PlayManagerImpl.
|
pure virtual |
|
pure virtualslot |
change to previous track
Implemented in PlayManagerImpl.
|
pure virtualslot |
request recording (see also sig_record(bool b))
b | true, when a new recording session should begin, false if a recording session should stop |
Implemented in PlayManagerImpl.
|
pure virtualslot |
|
pure virtualslot |
|
pure virtualslot |
seekRelativeMs
ms | relative position to current position in milliseconds |
Implemented in PlayManagerImpl.
|
pure virtualslot |
set current position of track This method does not seek. Just tells the playmanager where the current position is
ms | position in milliseconds. |
Implemented in PlayManagerImpl.
|
pure virtualslot |
|
pure virtualslot |
notify, that track is ready for playback
Implemented in PlayManagerImpl.
|
pure virtualslot |
set volume
vol | value between [0,100], will be cropped if not within boundaries |
Implemented in PlayManagerImpl.
|
pure virtual |
Shutdown the computer.
Implemented in PlayManagerImpl.
|
signal |
emitted when currently in buffering state
b | true if buffering, false else |
|
signal |
track has changed
md | new MetaData |
|
signal |
duration of track has changed
ms | duration of track in milliseconds |
|
signal |
emitted when mute state has changed
b | true if muted, false else |
|
signal |
position in track has changed
ms | absolute position in milliseconds |
|
signal |
recording is requested
b | true, when a new recording session should begin, false if a recording session should stop |
|
signal |
absolute seeking was triggered
ms | absolute position in milliseconds |
|
signal |
relative seeking was triggered
percent | relative position in track |
|
signal |
relative seeking was triggered
ms | relative position to current position in milliseconds |
|
signal |
emitted when a streamed track has finished
old_md | the last played track |
|
signal |
track has changed
idx | index in playlist |
|
signal |
emitted when volume has changed
vol | value between 0 and 100 |
|
pure virtualslot |
stop playback
Implemented in PlayManagerImpl.
|
pure virtualslot |
If already muted, then unmute. If unmuted, then mute it.
Implemented in PlayManagerImpl.
|
pure virtual |
|
pure virtualslot |
decrease volume by 5
Implemented in PlayManagerImpl.
|
pure virtualslot |
increase volume by 5
Implemented in PlayManagerImpl.
|
pure virtualslot |
Emit wake up signal after stopping state.
Implemented in PlayManagerImpl.