|
pianod2
multisource multiuser scriptable networked music player
|
Base class for playing audio from some source. More...
#include <mediaplayer.h>

Public Types | |
| enum | State { DoesNotExist , Initializing , Cueing , Playing , Done } |
Public Member Functions | |
| virtual | ~Player (void) |
| virtual void | pause (void)=0 |
| Pause playback. If already paused, do nothing. More... | |
| virtual void | abort (void)=0 |
| Don't play the rest of the song. More... | |
| virtual void | setVolume (float volume)=0 |
| Adjust volume in decibels. More... | |
| virtual void | cue (void)=0 |
| Starts thread in paused mode. More... | |
| virtual void | play (void)=0 |
| Start playback or resume playback if paused. If already playing, continue. More... | |
| virtual float | trackDuration (void) const =0 |
| Length of track in seconds, or a negative number if unknown. More... | |
| virtual float | playPoint (void) const =0 |
| Seconds from start, or a negative value if unknown. More... | |
| virtual float | playRemaining (void) const |
| Seconds left in playback, or a negative number if unknown. More... | |
| virtual RESPONSE_CODE | completionStatus (void)=0 |
| virtual State | currentState (void) const =0 |
| bool | ready (void) const |
| Indicate if player has finished initializing. More... | |
| bool | playbackComplete (void) const |
| Indicate if playback is complete and ready for cleanup. More... | |
| virtual time_t | getPauseTimeout (void) |
| When paused, get the time at which the song will expire. More... | |
Static Public Member Functions | |
| static Media::Player * | getPlayer (const AudioSettings &settings, const std::string &media_url, float initial_gain) |
| Get the a media player currently compiled in the code. More... | |
Base class for playing audio from some source.
Use as follows:
| enum Media::Player::State |
|
virtual |
|
pure virtual |
Don't play the rest of the song.
Implemented in Media::PlayerWrapper, Audio::AVFoundationPlayer, Audio::GstreamerPlayer, and Media::ThreadedPlayer.

|
pure virtual |
Implemented in Media::PlayerWrapper, Media::ThreadedPlayer, Audio::AVFoundationPlayer, and Audio::GstreamerPlayer.

|
pure virtual |
Starts thread in paused mode.
Implemented in Media::PlayerWrapper, Media::ThreadedPlayer, Audio::AVFoundationPlayer, and Audio::GstreamerPlayer.

|
pure virtual |
Implemented in ToneGenerator::Player, Media::PlayerWrapper, Audio::AVFoundationPlayer, Audio::GstreamerPlayer, and Audio::LavPlayer.

|
virtual |
When paused, get the time at which the song will expire.
Reimplemented in Media::PlayerWrapper.
|
static |
Get the a media player currently compiled in the code.
| settings | Describe the output device. |
| media_url | A URL indicating the media to play. |
| initial_gain | A suggested gain for the media to play. This may be superceded if the media stream contains its own gain value. |
| AudioException | or a derived exception in the event of media problems, output device problems, etc. |


|
pure virtual |
Pause playback. If already paused, do nothing.
Implemented in Media::PlayerWrapper, Media::ThreadedPlayer, Audio::AVFoundationPlayer, and Audio::GstreamerPlayer.

|
pure virtual |
Start playback or resume playback if paused. If already playing, continue.
Implemented in Media::PlayerWrapper, Media::ThreadedPlayer, Audio::AVFoundationPlayer, and Audio::GstreamerPlayer.

|
inline |
Indicate if playback is complete and ready for cleanup.


|
pure virtual |
Seconds from start, or a negative value if unknown.
Implemented in ToneGenerator::Player, Media::PlayerWrapper, Audio::AVFoundationPlayer, Audio::GstreamerPlayer, and Audio::LavPlayer.

|
virtual |
Seconds left in playback, or a negative number if unknown.
Determine the length of track remaining to play.
Reimplemented in Media::PlayerWrapper.


|
inline |
Indicate if player has finished initializing.


|
pure virtual |
Adjust volume in decibels.
Implemented in ToneGenerator::Player, Media::PlayerWrapper, Audio::AVFoundationPlayer, Audio::GstreamerPlayer, and Audio::LavPlayer.

|
pure virtual |
Length of track in seconds, or a negative number if unknown.
Implemented in ToneGenerator::Player, Media::PlayerWrapper, Audio::AVFoundationPlayer, Audio::GstreamerPlayer, and Audio::LavPlayer.
