VlcQmlVideoPlayer Class Reference

QML video player. More...

#include <VLCQtQml/QmlVideoPlayer.h>

Signals

void volumeChanged ()
 Volume changed signal.
 
void stateChanged ()
 State changed signal.
 
void seekableChanged ()
 Seekable status changed signal.
 
void lengthChanged ()
 Length changed signal.
 
void timeChanged ()
 Time changed signal.
 
void positionChanged ()
 Position changed signal.
 

Public Member Functions

 VlcQmlVideoPlayer (QQuickItem *parent=0)
 VlcQmlVideoPlayer constructor. More...
 
 ~VlcQmlVideoPlayer ()
 
Q_INVOKABLE void pause ()
 Pause current playback. More...
 
Q_INVOKABLE void play ()
 Play current playback. More...
 
Q_INVOKABLE void stop ()
 Stop current playback. More...
 
int volume () const
 Get current volume. More...
 
void setVolume (int volume)
 Set volume. More...
 
QString aspectRatio () const
 Get current aspect ratio. More...
 
void setAspectRatio (const QString &aspectRatio)
 Set aspect ratio. More...
 
QString cropRatio () const
 Get current crop ratio. More...
 
void setCropRatio (const QString &cropRatio)
 Set crop ratio. More...
 
QUrl url () const
 Get current media URL. More...
 
void setUrl (const QUrl &url)
 Set media URL. More...
 
bool autoplay () const
 Get current autoplay setting. More...
 
void setAutoplay (bool autoplay)
 Set autoplay setting. More...
 
QString deinterlacing () const
 Get current deinterlacing() mode. More...
 
void setDeinterlacing (const QString &deinterlacing)
 Set deinterlacing mode. More...
 
int state () const
 Get current state. More...
 
bool seekable () const
 Get current seekable status. More...
 
int length () const
 Get current media length. More...
 
int time () const
 Get current media time. More...
 
void setTime (int time)
 Set current media time. More...
 
float position () const
 Get current media position. More...
 
void setPosition (float position)
 Set current media position. More...
 
- Public Member Functions inherited from VlcQmlVideoObject
 VlcQmlVideoObject (QQuickItem *parent=0)
 VlcQmlVideoObject constructor. More...
 
virtual ~VlcQmlVideoObject ()
 
void connectToMediaPlayer (VlcMediaPlayer *player)
 Connect to media player. More...
 
void disconnectFromMediaPlayer (VlcMediaPlayer *player)
 Disconnect from media player. More...
 
Vlc::Ratio aspectRatio () const
 Get current aspect ratio. More...
 
void setAspectRatio (const Vlc::Ratio &aspectRatio)
 Set aspect ratio. More...
 
Vlc::Ratio cropRatio () const
 Get current crop ratio. More...
 
void setCropRatio (const Vlc::Ratio &cropRatio)
 Set crop ratio. More...
 
- Public Member Functions inherited from VlcVideoMemoryStream
void setCallbacks (VlcMediaPlayer *player)
 Set VlcMediaPlayer callbacks. More...
 
void unsetCallbacks (VlcMediaPlayer *player)
 Unset VlcMediaPlayer callbacks. More...
 

Static Public Member Functions

static void registerPlugin ()
 Register QML plugin as VLCQt.VlcVideoPlayer. More...
 
- Static Public Member Functions inherited from VlcVideoMemoryStream
static unsigned setPitchAndLines (const vlc_chroma_description_t *chromaDescription, unsigned width, unsigned height, unsigned *pitches, unsigned *lines, unsigned *visiblePitches=0, unsigned *visibleLines=0)
 Set required information for rendering video. More...
 

Properties

int volume
 Current volume. More...
 
QString aspectRatio
 Current aspect ratio. More...
 
QString cropRatio
 Current crop ratio. More...
 
QString deinterlacing
 Current deinterlacing mode. More...
 
QUrl url
 Current media URL. More...
 
bool autoplay
 Current autoplay setting. More...
 
int state
 Current state. More...
 
bool seekable
 Current seekable status. More...
 
int length
 Current media length. More...
 
int time
 Current media time. More...
 
float position
 Current media position. More...
 

Additional Inherited Members

- Protected Attributes inherited from VlcQmlVideoObject
VlcMediaPlayer_player
 Core media player.
 

Detailed Description

A simple QML video player that can be used standalone and directly inside QML.

Constructor & Destructor Documentation

VlcQmlVideoPlayer::VlcQmlVideoPlayer ( QQuickItem *  parent = 0)
explicit
Parameters
parentparent item (QQuickItem *)
VlcQmlVideoPlayer::~VlcQmlVideoPlayer ( )

VlcMediaPlayer destructor

Member Function Documentation

QString VlcQmlVideoPlayer::aspectRatio ( ) const
Returns
current aspect ratio

Used as property in QML.

bool VlcQmlVideoPlayer::autoplay ( ) const
Returns
current autoplay setting

Used as property in QML.

QString VlcQmlVideoPlayer::cropRatio ( ) const
Returns
current crop ratio

Used as property in QML.

QString VlcQmlVideoPlayer::deinterlacing ( ) const
Returns
current deinterlacing mode

Used as property in QML.

int VlcQmlVideoPlayer::length ( ) const
Returns
current media length

Used as property in QML.

void VlcQmlVideoPlayer::pause ( )

Invokable from QML.

void VlcQmlVideoPlayer::play ( )

Invokable from QML.

float VlcQmlVideoPlayer::position ( ) const
Returns
current media position from 0 to 1

Used as property in QML.

void VlcQmlVideoPlayer::registerPlugin ( )
static

Include into QML file as import VLCQt VERSION_MAJOR.VERSION_MINOR

Object name: VlcVideoPlayer

bool VlcQmlVideoPlayer::seekable ( ) const
Returns
current seekable status

Used as property in QML.

void VlcQmlVideoPlayer::setAspectRatio ( const QString &  aspectRatio)
Parameters
aspectRationew aspect ratio

Used as property in QML.

void VlcQmlVideoPlayer::setAutoplay ( bool  autoplay)
Parameters
autoplaynew autoplay setting

Used as property in QML.

void VlcQmlVideoPlayer::setCropRatio ( const QString &  cropRatio)
Parameters
cropRationew crop ratio

Used as property in QML.

void VlcQmlVideoPlayer::setDeinterlacing ( const QString &  deinterlacing)
Parameters
deinterlacingnew deinterlacing mode

Used as property in QML.

void VlcQmlVideoPlayer::setPosition ( float  position)
Parameters
positionmedia position from 0 to 1

Used as property in QML.

void VlcQmlVideoPlayer::setTime ( int  time)
Parameters
timecurrent media time

Used as property in QML.

void VlcQmlVideoPlayer::setUrl ( const QUrl &  url)
Parameters
urlnew media URL

Used as property in QML.

void VlcQmlVideoPlayer::setVolume ( int  volume)
Parameters
volumenew volume

Used as property in QML.

int VlcQmlVideoPlayer::state ( ) const
Returns
current state

Used as property in QML.

void VlcQmlVideoPlayer::stop ( )

Invokable from QML.

int VlcQmlVideoPlayer::time ( ) const
Returns
current media time

Used as property in QML.

QUrl VlcQmlVideoPlayer::url ( ) const
Returns
current media URL

Used as property in QML.

int VlcQmlVideoPlayer::volume ( ) const
Returns
current volume (int)

Used as property in QML.

Property Documentation

QString VlcQmlVideoPlayer::aspectRatio
readwrite
See also
setAspectRatio
bool VlcQmlVideoPlayer::autoplay
readwrite
See also
setAutoplay
QString VlcQmlVideoPlayer::cropRatio
readwrite
See also
setCropRatio
QString VlcQmlVideoPlayer::deinterlacing
readwrite
int VlcQmlVideoPlayer::length
read
float VlcQmlVideoPlayer::position
readwrite
bool VlcQmlVideoPlayer::seekable
read
See also
seekableChanged
int VlcQmlVideoPlayer::state
read
See also
stateChanged
int VlcQmlVideoPlayer::time
readwrite
See also
time
timeChanged
QUrl VlcQmlVideoPlayer::url
readwrite
See also
setUrl
int VlcQmlVideoPlayer::volume
readwrite

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