![]() |
VLC-Qt 0.8.0- (Different version)
|
Media Player. More...
#include <vlc-qt/MediaPlayer.h>
Public Slots | |
void | play () |
Starts playing current media if possible. | |
void | pause () |
Pauses the playback of current media if possible. | |
void | togglePause () |
Toggles pause of the playback of current media if possible. | |
void | resume () |
Resumes the playback of current media if possible. | |
void | stop () |
Stops playing current media. | |
Signals | |
void | backward () |
Signal sent on backward. | |
void | buffering (const float &) |
Signal sent on buffering. | |
void | end () |
Signal sent when end reached. | |
void | error () |
Signal sent on error. | |
void | forward () |
Signal sent on forward. | |
void | lengthChanged (const int &) |
Signal sent on length change. | |
void | mediaChanged (libvlc_media_t *) |
Signal sent on media change. | |
void | nothingSpecial () |
Signal sent nothing speciall happened. | |
void | opening () |
Signal sent when opening. | |
void | pausableChanged (const bool &) |
Signal sent on pausable change. | |
void | paused () |
Signal sent when paused. | |
void | playing () |
Signal sent when playing. | |
void | positionChanged (const float &) |
Signal sent on position change. | |
void | seekableChanged (const bool &) |
Signal sent on seekable change. | |
void | snapshotTaken (const QString &) |
Signal sent on snapshot taken. | |
void | stopped () |
Signal sent when stopped. | |
void | timeChanged (const int &) |
Signal sent on time change. | |
void | titleChanged (const int &) |
Signal sent on title change. | |
void | vout (const int &) |
Signal sent when video output is available. | |
void | stateChanged () |
Signal sent when state of the player changed. | |
Public Member Functions | |
VlcMediaPlayer (VlcInstance *instance) | |
VlcMediaPlayer constructor. | |
~VlcMediaPlayer () | |
libvlc_media_player_t * | core () |
Returns libvlc media player object. | |
VlcAudio * | audio () |
Returns audio manager object. | |
VlcVideo * | video () |
Returns video manager object. | |
int | length () const |
Get the current movie length (in ms). | |
VlcMedia * | currentMedia () |
Get current media object. | |
libvlc_media_t * | currentMediaCore () |
Get current media core object. | |
void | open (VlcMedia *media) |
Open media file or stream. Any media should be playable and opened. | |
void | openOnly (VlcMedia *media) |
Just opens the media file or stream, do not starts playing the media. | |
void | setTime (const int &time) |
Set the movie time (in ms). | |
int | time () const |
Get the current movie time (in ms). | |
void | setVideoWidget (VlcVideoDelegate *widget) |
Set video widget. | |
bool | hasVout () const |
Get video output status. | |
Vlc::State | state () const |
Get current player state. | |
VlcVideoDelegate * | videoWidget () |
Get current video widget. | |
float | position () |
Get current video position. | |
void | setPosition (const float &pos) |
Set the movie position. |
Media Player.
A basic MediaPlayer manager for VLC-Qt library. It provides main playback controls.
VlcMediaPlayer::VlcMediaPlayer | ( | VlcInstance * | instance | ) | [explicit] |
VlcMediaPlayer constructor.
This is mandatory to use libvlc playback functions.
instance | instance object (VlcInstance *) |
VlcMediaPlayer destructor
Returns audio manager object.
void VlcMediaPlayer::buffering | ( | const float & | _t1 | ) | [signal] |
Signal sent on buffering.
float | buffer |
libvlc_media_player_t * VlcMediaPlayer::core | ( | ) |
Returns libvlc media player object.
Get current media object.
libvlc_media_t * VlcMediaPlayer::currentMediaCore | ( | ) |
Get current media core object.
bool VlcMediaPlayer::hasVout | ( | ) | const |
Get video output status.
int VlcMediaPlayer::length | ( | ) | const |
Get the current movie length (in ms).
void VlcMediaPlayer::lengthChanged | ( | const int & | _t1 | ) | [signal] |
Signal sent on length change.
int | length |
void VlcMediaPlayer::mediaChanged | ( | libvlc_media_t * | _t1 | ) | [signal] |
Signal sent on media change.
libvlc_media_t | * media |
void VlcMediaPlayer::open | ( | VlcMedia * | media | ) |
Open media file or stream. Any media should be playable and opened.
media | object (VlcMedia *) |
void VlcMediaPlayer::openOnly | ( | VlcMedia * | media | ) |
Just opens the media file or stream, do not starts playing the media.
media | object (VlcMedia *) |
void VlcMediaPlayer::pausableChanged | ( | const bool & | _t1 | ) | [signal] |
Signal sent on pausable change.
bool | pausable |
float VlcMediaPlayer::position | ( | ) |
Get current video position.
void VlcMediaPlayer::positionChanged | ( | const float & | _t1 | ) | [signal] |
Signal sent on position change.
float | position |
void VlcMediaPlayer::seekableChanged | ( | const bool & | _t1 | ) | [signal] |
Signal sent on seekable change.
bool | seekable |
void VlcMediaPlayer::setPosition | ( | const float & | pos | ) |
Set the movie position.
This has no effect if no media is being played. Not all formats and protocols support this.
pos | the movie position (float) |
void VlcMediaPlayer::setTime | ( | const int & | time | ) |
Set the movie time (in ms).
This has no effect if no media is being played. Not all formats and protocols support this.
time | the movie time (in ms) (int) |
void VlcMediaPlayer::setVideoWidget | ( | VlcVideoDelegate * | widget | ) |
Set video widget.
Set video widget to be able to play video inside Qt interface.
widget | video widget (VlcVideoDelegate *) |
void VlcMediaPlayer::snapshotTaken | ( | const QString & | _t1 | ) | [signal] |
Signal sent on snapshot taken.
QString | filename |
Vlc::State VlcMediaPlayer::state | ( | ) | const |
Get current player state.
int VlcMediaPlayer::time | ( | ) | const |
Get the current movie time (in ms).
void VlcMediaPlayer::timeChanged | ( | const int & | _t1 | ) | [signal] |
Signal sent on time change.
int | time |
void VlcMediaPlayer::titleChanged | ( | const int & | _t1 | ) | [signal] |
Signal sent on title change.
int | title |
Returns video manager object.
Get current video widget.
void VlcMediaPlayer::vout | ( | const int & | _t1 | ) | [signal] |
Signal sent when video output is available.
int | vout count |