The StateHandler class allows one to track information about playback progress.
More...
#include <statehandler.h>
The StateHandler class allows one to track information about playback progress.
- Author
- Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru
Definition at line 32 of file statehandler.h.
StateHandler::StateHandler |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Object constructor.
- Parameters
-
StateHandler::~StateHandler |
( |
| ) |
|
Returns output audio parameters.
Emitted when audio parameters have changed.
- Parameters
-
p | New audio parameters for output. |
int StateHandler::bitrate |
( |
| ) |
const |
Returns current bitrate (in kbps)
void StateHandler::bitrateChanged |
( |
int |
bitrate | ) |
|
|
signal |
Emitted when bitrate has changed.
- Parameters
-
bitrate | New bitrate (in kbps) |
void StateHandler::bufferingProgress |
( |
int |
progress | ) |
|
|
signal |
This signal is emitted when the stream reader fills it's buffer. The argument progress indicates the current percentage of buffering completed.
void StateHandler::dispatch |
( |
qint64 |
elapsed, |
|
|
int |
bitrate |
|
) |
| |
Sends information about playback progress.
- Parameters
-
elapsed | Current time (in milliseconds). |
bitrate | Current bitrate (in kbps). |
Sends information about audio parameters.
- Parameters
-
void StateHandler::dispatch |
( |
qint64 |
duration | ) |
|
Sends information about song length
- Parameters
-
duration | track length in milliseconds |
Sends track information.
- Parameters
-
void StateHandler::dispatch |
( |
const QHash< QString, QString > & |
info | ) |
|
Sends stream information info
void StateHandler::dispatchBuffer |
( |
int |
percent | ) |
|
Sends buffering progress.
- Parameters
-
percent | Indicates the current percentage of buffering completed. |
qint64 StateHandler::duration |
( |
| ) |
const |
Returns duration in milliseconds
qint64 StateHandler::elapsed |
( |
| ) |
const |
Returns the current time (in milliseconds).
void StateHandler::elapsedChanged |
( |
qint64 |
time | ) |
|
|
signal |
Tracks elapesed time.
- Parameters
-
time | New track position in milliseconds. |
Returns a pointer to the first created StateHandler instance.
void StateHandler::sendFinished |
( |
| ) |
|
Sends playback finished event.
void StateHandler::sendNextTrackRequest |
( |
| ) |
|
Sends next track request.
Returns the current state.
int StateHandler::m_bitrate = 0 |
|
private |
qint64 StateHandler::m_duration = 0 |
|
private |
qint64 StateHandler::m_elapsed = -1 |
|
private |
QMutex StateHandler::m_mutex |
|
mutableprivate |
bool StateHandler::m_sendAboutToFinish = true |
|
private |
QHash<QString, QString> StateHandler::m_streamInfo |
|
private |
The documentation for this class was generated from the following file: