VlcQmlPlayer Class Reference

QML player. More...

#include <VLCQtQml/QmlPlayer.h>

Signals

void autoplayChanged ()
 Autoplay changed signal.
 
void deinterlacingChanged ()
 Deinterlacing changed signal.
 
void lengthChanged ()
 Length changed signal.
 
void logLevelChanged ()
 Log level changed signal.
 
void positionChanged ()
 Position changed signal.
 
void seekableChanged ()
 Seekable changed signal.
 
void stateChanged ()
 State changed signal.
 
void timeChanged ()
 Time changed signal.
 
void urlChanged ()
 URL changed signal.
 
void volumeChanged ()
 Volume changed signal.
 
void audioTrackChanged ()
 Audio track changed signal.
 
void audioPreferredLanguagesChanged ()
 Audio preferred languages changed signal.
 
void subtitleTrackChanged ()
 Subtitle track changed signal.
 
void subtitlePreferredLanguagesChanged ()
 Subtitle preferred languages changed signal.
 
void videoTrackChanged ()
 Video track changed signal.
 

Public Member Functions

 VlcQmlPlayer (QObject *parent=0)
 VlcQmlPlayer constructor. More...
 
Q_INVOKABLE void pause ()
 Pause current playback. More...
 
Q_INVOKABLE void play ()
 Play current playback. More...
 
Q_INVOKABLE void stop ()
 Stop current playback. More...
 
bool autoplay () const
 Get current autoplay setting. More...
 
void setAutoplay (bool autoplay)
 Set autoplay setting. More...
 
int deinterlacing () const
 Get current deinterlacing mode. More...
 
void setDeinterlacing (int deinterlacing)
 Set deinterlacing mode. More...
 
qint64 length () const
 Get current media length. More...
 
int logLevel () const
 Get current log level. More...
 
void setLogLevel (int level)
 Set log level. More...
 
float position () const
 Get current media position. More...
 
void setPosition (float position)
 Set current media position. More...
 
bool seekable () const
 Get current seekable status. More...
 
int state () const
 Get current state. More...
 
qint64 time () const
 Get current media time. More...
 
void setTime (qint64 time)
 Set current media time. More...
 
QUrl url () const
 Get current media URL. More...
 
void setUrl (const QUrl &url)
 Set media URL. More...
 
int volume () const
 Get current volume. More...
 
void setVolume (int volume)
 Set volume. More...
 
VlcTrackModelaudioTrackModel () const
 Get audio track model. More...
 
int audioTrack () const
 Get current audio track. More...
 
void setAudioTrack (int audioTrack)
 Set current audio track. More...
 
QStringList audioPreferredLanguages () const
 Get preferred audio languages. More...
 
void setAudioPreferredLanguages (const QStringList &audioPreferredLanguages)
 Set preferred audio language. More...
 
VlcTrackModelsubtitleTrackModel () const
 Get subtitle track model. More...
 
int subtitleTrack () const
 Get current subtitle track. More...
 
void setSubtitleTrack (int subtitleTrack)
 Set current subtitle track. More...
 
QStringList subtitlePreferredLanguages () const
 Get preferred subtitle languages. More...
 
void setSubtitlePreferredLanguages (const QStringList &subtitlePreferredLanguages)
 Set preferred subtitle languages. More...
 
VlcTrackModelvideoTrackModel () const
 Get video track model. More...
 
int videoTrack () const
 Get current video track. More...
 
void setVideoTrack (int videoTrack)
 Set current video track. More...
 
- Public Member Functions inherited from VlcQmlSource
 VlcQmlSource (QObject *parent)
 VlcQmlSource constructor. More...
 
void setPlayer (VlcMediaPlayer *player)
 Set media player to use. More...
 
void removePlayer ()
 Remove player from source.
 
virtual void registerVideoOutput (VlcQmlVideoOutput *output)
 Register video output. More...
 
virtual void deregisterVideoOutput (VlcQmlVideoOutput *output)
 Deregister video output. More...
 

Properties

bool autoplay
 Current autoplay setting. More...
 
int deinterlacing
 Current deinterlacing mode. More...
 
qint64 length
 Current media length. More...
 
int logLevel
 Current log level. More...
 
float position
 Current media position. More...
 
bool seekable
 Current seekable status. More...
 
int state
 Current state. More...
 
qint64 time
 Current media time. More...
 
QUrl url
 Current media URL. More...
 
int volume
 Current volume. More...
 
VlcTrackModel audioTrackModel
 Audio track model. More...
 
int audioTrack
 Current audio track. More...
 
QStringList audioPreferredLanguages
 Current audio preferred languages. More...
 
VlcTrackModel subtitleTrackModel
 Subtitle track model. More...
 
int subtitleTrack
 Current subtitle track. More...
 
QStringList subtitlePreferredLanguages
 Current subtitle preferred languages. More...
 
VlcTrackModel videoTrackModel
 Video track model. More...
 
int videoTrack
 Current video track. More...
 

Detailed Description

QML player.

A QML media player that can play multimedia files inside QML interface. You need VlcQmlVideoOutput to display video.

See also
VlcQmlVideoOutput
Since
VLC-Qt 1.1

Constructor & Destructor Documentation

VlcQmlPlayer::VlcQmlPlayer ( QObject *  parent = 0)
explicit

VlcQmlPlayer constructor.

Parameters
parentparent object

Member Function Documentation

QStringList VlcQmlPlayer::audioPreferredLanguages ( ) const

Get preferred audio languages.

Returns
preferred languages

Used as property in QML.

int VlcQmlPlayer::audioTrack ( ) const

Get current audio track.

Returns
the id of current audio track, or -1 if none

Used as property in QML.

VlcTrackModel* VlcQmlPlayer::audioTrackModel ( ) const

Get audio track model.

Returns
audio track model poiner

Used as property in QML.

bool VlcQmlPlayer::autoplay ( ) const

Get current autoplay setting.

Returns
current autoplay setting

Used as property in QML.

int VlcQmlPlayer::deinterlacing ( ) const

Get current deinterlacing mode.

Returns
current deinterlacing mode

Used as property in QML.

qint64 VlcQmlPlayer::length ( ) const

Get current media length.

Returns
current media length

Used as property in QML.

int VlcQmlPlayer::logLevel ( ) const

Get current log level.

Returns
current log level

Used as property in QML.

void VlcQmlPlayer::pause ( )

Pause current playback.

Invokable from QML.

void VlcQmlPlayer::play ( )

Play current playback.

Invokable from QML.

float VlcQmlPlayer::position ( ) const

Get current media position.

Returns
current media position from 0 to 1

Used as property in QML.

bool VlcQmlPlayer::seekable ( ) const

Get current seekable status.

Returns
current seekable status

Used as property in QML.

void VlcQmlPlayer::setAudioPreferredLanguages ( const QStringList &  audioPreferredLanguages)

Set preferred audio language.

Parameters
audioPreferredLanguagespreferred languages

Used as property in QML.

void VlcQmlPlayer::setAudioTrack ( int  audioTrack)

Set current audio track.

Parameters
audioTracknew audio track

Used as property in QML.

void VlcQmlPlayer::setAutoplay ( bool  autoplay)

Set autoplay setting.

Parameters
autoplaynew autoplay setting

Used as property in QML.

void VlcQmlPlayer::setDeinterlacing ( int  deinterlacing)

Set deinterlacing mode.

Parameters
deinterlacingnew deinterlacing mode

Used as property in QML.

void VlcQmlPlayer::setLogLevel ( int  level)

Set log level.

Parameters
levellog level

Used as property in QML.

void VlcQmlPlayer::setPosition ( float  position)

Set current media position.

Parameters
positionmedia position from 0 to 1

Used as property in QML.

void VlcQmlPlayer::setSubtitlePreferredLanguages ( const QStringList &  subtitlePreferredLanguages)

Set preferred subtitle languages.

Parameters
subtitlePreferredLanguagespreferred languages, empty if disabled

Used as property in QML.

void VlcQmlPlayer::setSubtitleTrack ( int  subtitleTrack)

Set current subtitle track.

Parameters
subtitleTracknew subtitle track

Used as property in QML.

void VlcQmlPlayer::setTime ( qint64  time)

Set current media time.

Parameters
timecurrent media time

Used as property in QML.

void VlcQmlPlayer::setUrl ( const QUrl &  url)

Set media URL.

Parameters
urlnew media URL

Used as property in QML.

void VlcQmlPlayer::setVideoTrack ( int  videoTrack)

Set current video track.

Parameters
videoTracknew video track

Used as property in QML.

void VlcQmlPlayer::setVolume ( int  volume)

Set volume.

Parameters
volumenew volume

Used as property in QML.

int VlcQmlPlayer::state ( ) const

Get current state.

Returns
current state

Used as property in QML.

void VlcQmlPlayer::stop ( )

Stop current playback.

Invokable from QML.

QStringList VlcQmlPlayer::subtitlePreferredLanguages ( ) const

Get preferred subtitle languages.

Returns
preferred languages

Used as property in QML.

int VlcQmlPlayer::subtitleTrack ( ) const

Get current subtitle track.

Returns
the id of current subtitle track, or -1 if none

Used as property in QML.

VlcTrackModel* VlcQmlPlayer::subtitleTrackModel ( ) const

Get subtitle track model.

Returns
subtitle track model poiner

Used as property in QML.

qint64 VlcQmlPlayer::time ( ) const

Get current media time.

Returns
current media time

Used as property in QML.

QUrl VlcQmlPlayer::url ( ) const

Get current media URL.

Returns
current media URL

Used as property in QML.

int VlcQmlPlayer::videoTrack ( ) const

Get current video track.

Returns
the id of current video track, or -1 if none

Used as property in QML.

VlcTrackModel* VlcQmlPlayer::videoTrackModel ( ) const

Get video track model.

Returns
video track model poiner

Used as property in QML.

int VlcQmlPlayer::volume ( ) const

Get current volume.

Returns
current volume (int)

Used as property in QML.

Property Documentation

QStringList VlcQmlPlayer::audioPreferredLanguages
readwrite
int VlcQmlPlayer::audioTrack
readwrite

Current audio track.

See also
audioTrack
setAudioTrack
audioTrackChanged
VlcTrackModel * VlcQmlPlayer::audioTrackModel
read

Audio track model.

See also
audioTrackModel
bool VlcQmlPlayer::autoplay
readwrite

Current autoplay setting.

See also
autoplay
setAutoplay
autoplayChanged
int VlcQmlPlayer::deinterlacing
readwrite

Current deinterlacing mode.

See also
deinterlacing
setDeinterlacing
deinterlacingChanged
qint64 VlcQmlPlayer::length
read

Current media length.

See also
length
lengthChanged
int VlcQmlPlayer::logLevel
readwrite

Current log level.

See also
logLevel
setLogLevel
logLevelChanged
float VlcQmlPlayer::position
readwrite

Current media position.

See also
position
setPosition;
positionChanged
bool VlcQmlPlayer::seekable
read

Current seekable status.

See also
seekable
seekableChanged
int VlcQmlPlayer::state
read

Current state.

See also
state
stateChanged
QStringList VlcQmlPlayer::subtitlePreferredLanguages
readwrite
int VlcQmlPlayer::subtitleTrack
readwrite

Current subtitle track.

See also
subtitleTrack
setSubtitleTrack
subtitleTrackChanged
VlcTrackModel * VlcQmlPlayer::subtitleTrackModel
read

Subtitle track model.

See also
subtitleTrackModel
qint64 VlcQmlPlayer::time
readwrite

Current media time.

See also
time
setTime
timeChanged
QUrl VlcQmlPlayer::url
readwrite

Current media URL.

See also
url
setUrl
urlChanged
int VlcQmlPlayer::videoTrack
readwrite

Current video track.

See also
videoTrack
setVideoTrack
videoTrackChanged
VlcTrackModel * VlcQmlPlayer::videoTrackModel
read

Video track model.

See also
videoTrackModel
int VlcQmlPlayer::volume
readwrite

Current volume.

See also
volume
setVolume
volumeChanged

The documentation for this class was generated from the following files: