VlcMedia Class Reference

Media item. More...

#include <VLCQtCore/Media.h>

Signals

void metaChanged (const Vlc::Meta &meta)
 Signal sent on meta change. More...
 
void subitemAdded (libvlc_media_t *subitem)
 Signal sent on subitem added. More...
 
void durationChanged (int duration)
 Signal sent on duration change. More...
 
void parsedChanged (int status)
 Signal sent on parsed change. More...
 
void freed (libvlc_media_t *media)
 Signal sent on freed. More...
 
void stateChanged (const Vlc::State &state)
 Signal sent on state change. More...
 

Public Member Functions

 VlcMedia (const QString &location, bool localFile, VlcInstance *instance)
 VlcMedia constructor. More...
 
 VlcMedia (const QString &location, VlcInstance *instance)
 VlcMedia constructor. More...
 
 VlcMedia (libvlc_media_t *media)
 VlcMedia constructor. More...
 
 ~VlcMedia ()
 VlcMedia destructor.
 
libvlc_media_t * core ()
 libvlc media item More...
 
QString currentLocation () const
 Current media location. More...
 
VlcStatsgetStats ()
 Get media stats. More...
 
QString duplicate (const QString &name, const QString &path, const Vlc::Mux &mux)
 Duplicate (provided for convenience) More...
 
QString duplicate (const QString &name, const QString &path, const Vlc::Mux &mux, const Vlc::AudioCodec &audioCodec, const Vlc::VideoCodec &videoCodec)
 Duplicate (provided for convenience) More...
 
QString duplicate (const QString &name, const QString &path, const Vlc::Mux &mux, const Vlc::AudioCodec &audioCodec, const Vlc::VideoCodec &videoCodec, int bitrate, int fps, int scale)
 Duplicate (provided for convenience) More...
 
QString merge (const QString &name, const QString &path, const Vlc::Mux &mux)
 Merge. More...
 
QString record (const QString &name, const QString &path, const Vlc::Mux &mux, bool duplicate=false)
 Record. More...
 
QString record (const QString &name, const QString &path, const Vlc::Mux &mux, const Vlc::AudioCodec &audioCodec, const Vlc::VideoCodec &videoCodec, bool duplicate=false)
 Record. More...
 
QString record (const QString &name, const QString &path, const Vlc::Mux &mux, const Vlc::AudioCodec &audioCodec, const Vlc::VideoCodec &videoCodec, int bitrate, int fps, int scale, bool duplicate=false)
 Record. More...
 
void setProgram (int program)
 Set program. More...
 
void setOption (const QString &option)
 Set media option. More...
 
void setOptions (const QStringList &options)
 Set media options. More...
 

Detailed Description

An abstract representation of a playable media. It consists of a media location and various optional meta data.

Constructor & Destructor Documentation

VlcMedia::VlcMedia ( const QString &  location,
bool  localFile,
VlcInstance instance 
)
explicit

This constructor creates a new media instance from a media location.

Parameters
locationlocation of the media (QString)
localFiletrue, if media is local file (bool)
instancemain libvlc instance (VlcInstance *)
VlcMedia::VlcMedia ( const QString &  location,
VlcInstance instance 
)
explicit

This constructor creates a new media instance from a remote media location. Provided for convenience.

Parameters
locationremote location of the media (QString)
instancemain libvlc instance (VlcInstance *)
VlcMedia::VlcMedia ( libvlc_media_t *  media)

This constructor creates a new media instance from an existing one.

Parameters
medialibvlc media item (libvlc_media_t *)

Member Function Documentation

libvlc_media_t * VlcMedia::core ( )
Returns
libvlc media item (libvlc_media_t *)
QString VlcMedia::currentLocation ( ) const
Returns
QString media location
QString VlcMedia::duplicate ( const QString &  name,
const QString &  path,
const Vlc::Mux mux 
)

Apply duplicate options with desired mux but without transcoding.

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
Returns
QString output file
See also
record()
QString VlcMedia::duplicate ( const QString &  name,
const QString &  path,
const Vlc::Mux mux,
const Vlc::AudioCodec audioCodec,
const Vlc::VideoCodec videoCodec 
)

Apply duplicate options with desired mux and transcoding (experimental).

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
audioCodecaudio codec (Vlc::AudioCodec)
videoCodecvideo codec (Vlc::VideoCodec)
Returns
QString output file
See also
record()
QString VlcMedia::duplicate ( const QString &  name,
const QString &  path,
const Vlc::Mux mux,
const Vlc::AudioCodec audioCodec,
const Vlc::VideoCodec videoCodec,
int  bitrate,
int  fps,
int  scale 
)

Apply duplicate options with desired mux, transcoding and some other options (experimental).

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
audioCodecaudio codec (Vlc::AudioCodec)
videoCodecvideo codec (Vlc::VideoCodec)
bitratevideo bitrate (int)
fpsframes per second (int)
scalevideo scale (int)
Returns
QString output file
See also
record()
void VlcMedia::durationChanged ( int  duration)
signal
Parameters
durationnew duration
void VlcMedia::freed ( libvlc_media_t *  media)
signal
Parameters
mediafreed libvlc_media_t object
VlcStats * VlcMedia::getStats ( )
Returns
VlcStats media stats object
QString VlcMedia::merge ( const QString &  name,
const QString &  path,
const Vlc::Mux mux 
)

Apply merge options with desired mux but without transcoding.

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
Returns
QString output file
void VlcMedia::metaChanged ( const Vlc::Meta meta)
signal
Parameters
metanew meta
void VlcMedia::parsedChanged ( int  status)
signal
Parameters
statusnew parsed status
QString VlcMedia::record ( const QString &  name,
const QString &  path,
const Vlc::Mux mux,
bool  duplicate = false 
)

Apply recording options with desired mux but without transcoding.

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
duplicatealso duplicate on screen (bool)
Returns
QString output file
QString VlcMedia::record ( const QString &  name,
const QString &  path,
const Vlc::Mux mux,
const Vlc::AudioCodec audioCodec,
const Vlc::VideoCodec videoCodec,
bool  duplicate = false 
)

Apply recording options with desired mux and transcoding (experimental).

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
audioCodecaudio codec (Vlc::AudioCodec)
videoCodecvideo codec (Vlc::VideoCodec)
duplicatealso duplicate on screen (bool)
Returns
QString output file
QString VlcMedia::record ( const QString &  name,
const QString &  path,
const Vlc::Mux mux,
const Vlc::AudioCodec audioCodec,
const Vlc::VideoCodec videoCodec,
int  bitrate,
int  fps,
int  scale,
bool  duplicate = false 
)

Apply recording options with desired mux, transcoding and some other options (experimental).

Parameters
nameoutput file name (QString)
pathoutput path (QString)
muxoutput mux (Vlc::Mux)
audioCodecaudio codec (Vlc::AudioCodec)
videoCodecvideo codec (Vlc::VideoCodec)
bitratevideo bitrate (int)
fpsframes per second (int)
scalevideo scale (int)
duplicatealso duplicate on screen (bool)
Returns
QString output file
void VlcMedia::setOption ( const QString &  option)
Parameters
optionmedia option (QString)
void VlcMedia::setOptions ( const QStringList &  options)
Parameters
optionsmedia options (QStringList)
void VlcMedia::setProgram ( int  program)
Parameters
programprogram PID (int)
void VlcMedia::stateChanged ( const Vlc::State state)
signal
Parameters
statenew state
void VlcMedia::subitemAdded ( libvlc_media_t *  subitem)
signal
Parameters
subitemsubitem that was added

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