KDE::Multimedia::Player Class Reference
Interface for accessing media playback functions. More...
#include <player.h>
Inheritance diagram for KDE::Multimedia::Player:


Public Types | |
| enum | State { NoMedia, Loading, Stopped, Playing, Buffering, Paused } |
Public Slots | |
| virtual bool | load (const KURL &url)=0 |
| virtual bool | play ()=0 |
| virtual bool | pause ()=0 |
| virtual bool | stop ()=0 |
| virtual bool | setVolume (float volume)=0 |
| virtual bool | seek (long time)=0 |
| virtual bool | setTickInterval (long ms)=0 |
Signals | |
| void | finished () |
| void | stateChanged (KDE::Multimedia::Player::State newstate, KDE::Multimedia::Player::State oldstate) |
| void | tick (long time) |
| void | length (long length) |
Public Member Functions | |
| virtual | ~Player () |
| virtual bool | setOutputChannel (Channel *device)=0 |
| virtual State | state () const |
| virtual bool | hasVolumeControl () const =0 |
| virtual float | volume () const =0 |
| virtual long | totalTime () const =0 |
| virtual long | remainingTime () const =0 |
| virtual long | currentTime () const =0 |
| virtual bool | seekable () const =0 |
| virtual long | tickInterval () const =0 |
Protected Member Functions | |
| Player (QObject *parent, const char *name) | |
| void | setState (State newstate) |
Detailed Description
Interface for accessing media playback functions.
- Author:
- Matthias Kretz <kretz@kde.org>
- Since:
- 4.0
Definition at line 39 of file player.h.
Member Enumeration Documentation
|
|
The state the playobject is in at the moment.
|
Constructor & Destructor Documentation
|
||||||||||||
|
You can not instantiate players yourself, use the Factory to create them.
Definition at line 24 of file player.cpp. |
Member Function Documentation
|
|
Set the output device the Player should use.
Referenced by KDE::Multimedia::Backend::playSoundEvent(). |
|
|
Get the current state.
Definition at line 34 of file player.cpp. |
|
|
Check whether the Player supports to control the volume.
|
|
|
Get the current volume.
|
|
|
Get the total time (in milliseconds) of the file currently being played.
|
|
|
Get the remaining time (in milliseconds) of the file currently being played.
|
|
|
Get the current time (in milliseconds) of the file currently being played.
|
|
|
If the current media may be seeked returns true.
|
|
|
Return the time interval in milliseconds between two ticks.
|
|
|
Load a media file. If another media is currently loaded it is stopped and unloaded.
Referenced by KDE::Multimedia::Backend::playSoundEvent(). |
|
|
Play the media file.
Referenced by KDE::Multimedia::Backend::playSoundEvent(). |
|
|
Pause a playing media. If it was paused before nothing changes. |
|
|
Stop a playback.
|
|
|
Set the volume of the playback.
|
|
|
Seek to the time indicated.
|
|
|
Change the interval the tick signal is emitted.
If you set
|
|
|
Emitted when the file has finished playing on its own. I.e. it is not emitted if you call stop(), pause() or load(), but only on end-of-file or a critical error. |
|
||||||||||||
|
Emitted when the state of the Player has changed. In case you're not interested in the old state you can also connect to a slot that only has one State argument.
Referenced by setState(). |
|
|
This signal gets emitted every tickInterval milliseconds.
|
|
|
This signal is emitted as soon as the length of the media file is known or has changed.
|
|
|
Call this in your reimplementation for state changes. It emits the stateChanged signal if the state has really changed.
Definition at line 39 of file player.cpp. References stateChanged(). |
The documentation for this class was generated from the following files:
