VlcQmlVideoPlayer Class Reference

QML video player. More...

#include <vlc-qt/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...
 
int aspectRatio ()
 Get current aspect ratio. More...
 
void setAspectRatio (int aspectRatio)
 Set aspect ratio. More...
 
int cropRatio ()
 Get current crop ratio. More...
 
void setCropRatio (int 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...
 
int deinterlacing () const
 Get current deinterlacing() mode. More...
 
void setDeinterlacing (int 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 *mediaObject)
 Connect to media player. More...
 
void disconnectFromMediaPlayer (VlcMediaPlayer *mediaObject)
 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...
 
int aspectRatio
 Current aspect ratio. More...
 
int cropRatio
 Current crop ratio. More...
 
int 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

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

int VlcQmlVideoPlayer::aspectRatio ( )
Returns
current aspect ratio (int)

Used as property in QML.

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

Used as property in QML.

int VlcQmlVideoPlayer::cropRatio ( )
Returns
current crop ratio (int)

Used as property in QML.

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

Used as property in QML.

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

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(float)

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 (bool)

Used as property in QML.

void VlcQmlVideoPlayer::setAspectRatio ( int  aspectRatio)
Parameters
aspectRationew aspect ratio (int)

Used as property in QML.

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

Used as property in QML.

void VlcQmlVideoPlayer::setCropRatio ( int  cropRatio)
Parameters
cropRationew crop ratio (int)

Used as property in QML.

void VlcQmlVideoPlayer::setDeinterlacing ( int  deinterlacing)
Parameters
deinterlacingnew deinterlacing mode (int)

Used as property in QML.

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

Used as property in QML.

void VlcQmlVideoPlayer::setTime ( int  time)
Parameters
currentmedia time(int)

Used as property in QML.

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

Used as property in QML.

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

Used as property in QML.

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

Used as property in QML.

void VlcQmlVideoPlayer::stop ( )

Invokable from QML.

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

Used as property in QML.

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

Used as property in QML.

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

Used as property in QML.

Property Documentation

int VlcQmlVideoPlayer::aspectRatio
readwrite
See also
setAspectRatio
bool VlcQmlVideoPlayer::autoplay
readwrite
See also
setAutoplay
int VlcQmlVideoPlayer::cropRatio
readwrite
See also
setCropRatio
int 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: