Miam-Player  0.8.0
A nice music player
QtAV::SubtitleFilter Class Reference

The SubtitleFilter class draw text and image subtitles Subtitle load priority: user specified file (setFile(...)) > auto load external (autoLoad() must be true) > embedded subtitle. More...

#include <SubtitleFilter.h>

Inheritance diagram for QtAV::SubtitleFilter:
QtAV::VideoFilter QtAV::SubtitleAPIProxy QtAV::Filter

Public Slots

void setAutoLoad (bool value)
 
- Public Slots inherited from QtAV::Filter
void setEnabled (bool enabled=true)
 

Signals

void rectChanged ()
 
void fontChanged ()
 
void colorChanged ()
 
void autoLoadChanged (bool value)
 
void fileChanged ()
 
void canRenderChanged ()
 
void loaded (const QString &path)
 
void codecChanged ()
 
void enginesChanged ()
 
void fuzzyMatchChanged ()
 
void contentChanged ()
 
void dirsChanged ()
 
void suffixesChanged ()
 
void supportedSuffixesChanged ()
 
void engineChanged ()
 
void delayChanged ()
 
void fontFileChanged ()
 
void fontsDirChanged ()
 
void fontFileForcedChanged ()
 
- Signals inherited from QtAV::Filter
void enabledChanged (bool)
 

Public Member Functions

 SubtitleFilter (QObject *parent=0)
 
void setPlayer (AVPlayer *player)
 
bool isSupported (VideoFilterContext::Type ct) const Q_DECL_OVERRIDE
 
void setFile (const QString &file)
 setFile Load user selected subtitle. More...
 
QString file () const
 
bool autoLoad () const
 autoLoad Auto find and load a suitable external subtitle if file() is not empty. More...
 
void setRect (const QRectF &r)
 
QRectF rect () const
 
void setFont (const QFont &f)
 
QFont font () const
 
void setColor (const QColor &c)
 
QColor color () const
 
- Public Member Functions inherited from QtAV::VideoFilter
 VideoFilter (QObject *parent=0)
 
VideoFilterContextcontext ()
 
bool installTo (AVPlayer *player)
 installTo Install filter to player can process every frame before rendering. More...
 
bool installTo (AVOutput *output)
 installTo The process() function is in rendering thread. More...
 
void apply (Statistics *statistics, VideoFrame *frame=0)
 
bool prepareContext (VideoFilterContext *&ctx, Statistics *statistics=0, VideoFrame *frame=0)
 
- Public Member Functions inherited from QtAV::Filter
virtual ~Filter ()
 
bool isEnabled () const
 
void setOwnedByTarget (bool value=true)
 setOwnedByTarget If a filter is owned by target, it's not safe to access the filter after it's installed to a target. More...
 
bool isOwnedByTarget () const
 
bool uninstall ()
 
- Public Member Functions inherited from QtAV::SubtitleAPIProxy
 SubtitleAPIProxy (QObject *obj)
 
void setSubtitle (Subtitle *sub)
 
void setCodec (const QByteArray &value)
 setCodec set subtitle encoding that supported by QTextCodec. More...
 
QByteArray codec () const
 
bool isLoaded () const
 
void setEngines (const QStringList &value)
 
QStringList engines () const
 
QString engine () const
 
void setFuzzyMatch (bool value)
 
bool fuzzyMatch () const
 
void setDirs (const QStringList &value)
 
QStringList dirs () const
 
QStringList supportedSuffixes () const
 
void setSuffixes (const QStringList &value)
 
QStringList suffixes () const
 
bool canRender () const
 
qreal delay () const
 
void setDelay (qreal value)
 
QString fontFile () const
 
void setFontFile (const QString &value)
 
QString fontsDir () const
 
void setFontsDir (const QString &value)
 
bool isFontFileForced () const
 
void setFontFileForced (bool value)
 

Protected Member Functions

void process (Statistics *statistics, VideoFrame *frame) Q_DECL_OVERRIDE
 
- Protected Member Functions inherited from QtAV::VideoFilter
 VideoFilter (VideoFilterPrivate &d, QObject *parent=0)
 
- Protected Member Functions inherited from QtAV::Filter
 Filter (FilterPrivate &d, QObject *parent=0)
 

Properties

QByteArray codec
 
QStringList engines
 
QString engine
 
bool fuzzyMatch
 
QStringList dirs
 
QStringList suffixes
 
QStringList supportedSuffixes
 
bool canRender
 
qreal delay
 
bool autoLoad
 
QString file
 
QRectF rect
 
QFont font
 
QColor color
 
QString fontFile
 
QString fontsDir
 
bool fontFileForced
 
- Properties inherited from QtAV::Filter
bool enabled
 

Detailed Description

The SubtitleFilter class draw text and image subtitles Subtitle load priority: user specified file (setFile(...)) > auto load external (autoLoad() must be true) > embedded subtitle.

Constructor & Destructor Documentation

QtAV::SubtitleFilter::SubtitleFilter ( QObject *  parent = 0)
explicit

Member Function Documentation

bool QtAV::SubtitleFilter::autoLoad ( ) const

autoLoad Auto find and load a suitable external subtitle if file() is not empty.

void QtAV::SubtitleFilter::autoLoadChanged ( bool  value)
signal
void QtAV::SubtitleFilter::canRenderChanged ( )
signal
void QtAV::SubtitleFilter::codecChanged ( )
signal
QColor QtAV::SubtitleFilter::color ( ) const
void QtAV::SubtitleFilter::colorChanged ( )
signal
void QtAV::SubtitleFilter::contentChanged ( )
signal
void QtAV::SubtitleFilter::delayChanged ( )
signal
void QtAV::SubtitleFilter::dirsChanged ( )
signal
void QtAV::SubtitleFilter::engineChanged ( )
signal
void QtAV::SubtitleFilter::enginesChanged ( )
signal
QString QtAV::SubtitleFilter::file ( ) const
void QtAV::SubtitleFilter::fileChanged ( )
signal
QFont QtAV::SubtitleFilter::font ( ) const
void QtAV::SubtitleFilter::fontChanged ( )
signal
void QtAV::SubtitleFilter::fontFileChanged ( )
signal
void QtAV::SubtitleFilter::fontFileForcedChanged ( )
signal
void QtAV::SubtitleFilter::fontsDirChanged ( )
signal
void QtAV::SubtitleFilter::fuzzyMatchChanged ( )
signal
bool QtAV::SubtitleFilter::isSupported ( VideoFilterContext::Type  ct) const
inlinevirtual

Reimplemented from QtAV::VideoFilter.

void QtAV::SubtitleFilter::loaded ( const QString &  path)
signal
void QtAV::SubtitleFilter::process ( Statistics statistics,
VideoFrame frame 
)
protectedvirtual

Implements QtAV::VideoFilter.

QRectF QtAV::SubtitleFilter::rect ( ) const
void QtAV::SubtitleFilter::rectChanged ( )
signal
void QtAV::SubtitleFilter::setAutoLoad ( bool  value)
slot
void QtAV::SubtitleFilter::setColor ( const QColor &  c)
void QtAV::SubtitleFilter::setFile ( const QString &  file)

setFile Load user selected subtitle.

The subtitle will not change unless you manually setFile(QString()).

void QtAV::SubtitleFilter::setFont ( const QFont &  f)
void QtAV::SubtitleFilter::setPlayer ( AVPlayer player)
void QtAV::SubtitleFilter::setRect ( const QRectF &  r)
void QtAV::SubtitleFilter::suffixesChanged ( )
signal
void QtAV::SubtitleFilter::supportedSuffixesChanged ( )
signal

Property Documentation

bool QtAV::SubtitleFilter::autoLoad
readwrite
bool QtAV::SubtitleFilter::canRender
read
QByteArray QtAV::SubtitleFilter::codec
readwrite
QColor QtAV::SubtitleFilter::color
readwrite
qreal QtAV::SubtitleFilter::delay
readwrite
QStringList QtAV::SubtitleFilter::dirs
readwrite
QString QtAV::SubtitleFilter::engine
read
QStringList QtAV::SubtitleFilter::engines
readwrite
QString QtAV::SubtitleFilter::file
readwrite
QFont QtAV::SubtitleFilter::font
readwrite
QString QtAV::SubtitleFilter::fontFile
readwrite
bool QtAV::SubtitleFilter::fontFileForced
readwrite
QString QtAV::SubtitleFilter::fontsDir
readwrite
bool QtAV::SubtitleFilter::fuzzyMatch
readwrite
QRectF QtAV::SubtitleFilter::rect
readwrite
QStringList QtAV::SubtitleFilter::suffixes
readwrite
QStringList QtAV::SubtitleFilter::supportedSuffixes
read

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