QtlMovie 1.12 (A specialized FFmpeg front-end)
QtlMovieOutputFile Class Reference

Describes an output video file. More...

Inheritance diagram for QtlMovieOutputFile:
QtlFile

Public Types

enum  OutputType {
  DvdFile,
  DvdImage,
  DvdBurn,
  Ipad,
  Iphone,
  Android,
  Avi,
  SubRip,
  None
}
 Type of output file. More...
 

Signals

void outputTypeChanged (OutputType type)
 Emitted when the output type changes. More...
 
- Signals inherited from QtlFile
void fileNameChanged (const QString &fileName)
 Emitted when the file name has changed. More...
 

Public Member Functions

 QtlMovieOutputFile (const QString &fileName, const QtlMovieSettings *settings, QtlLogger *log, QObject *parent=0)
 Constructor. More...
 
 QtlMovieOutputFile (const QtlMovieOutputFile &other, QObject *parent=0)
 Copy constructor. More...
 
QString defaultOutputDirectory (const QString &inputFileName)
 Get the default output directory for an input file name, based on the output type. More...
 
float forcedDisplayAspectRatio () const
 Get the forced display aspect ratio. More...
 
QtlLoggerlog () const
 Get the associated error logger. More...
 
OutputType outputType () const
 Get the output file type. More...
 
void setDefaultFileName (const QString &inputFileName, bool keepPreviousDirectory, bool keepPreviousBase)
 Set the default output file name from an input file name, based on the output type. More...
 
void setForcedDisplayAspectRatio (float forcedDisplayAspectRatio)
 Set the forced display aspect ratio. More...
 
void setOutputType (OutputType type)
 Set the output file type. More...
 
- Public Member Functions inherited from QtlFile
 QtlFile (const QString &fileName, QObject *parent=0)
 Constructor. More...
 
 QtlFile (const QtlFile &other, QObject *parent=0)
 Copy constructor. More...
 
QString directoryName () const
 Get the directory name of the file. More...
 
QString fileName () const
 Get the file name. More...
 
bool isSet () const
 Check if the file name is set. More...
 
QtlByteBlock readBinary (int maxSize=-1) const
 Read the binary content of the file. More...
 
QString readText () const
 Read the text content of the file. More...
 
QStringList readTextLines (int maxSize=-1) const
 Read the text content of the file. More...
 
virtual bool setFileName (const QString &fileName)
 Set the file name. More...
 
QString shortPath (bool keepOnError) const
 Get the "short path name" of the file. More...
 
bool writeBinary (const QtlByteBlock &content)
 Write the binary content of the file. More...
 
bool writeText (const QString &text)
 Write the text content of the file. More...
 
bool writeTextLines (const QStringList &lines)
 Write the text content of the file. More...
 

Static Public Member Functions

static QString fileExtension (OutputType outputType)
 Get the default output file extension for a given output type. More...
 
static QString outputIdName (OutputType outputType)
 Get an identifier name for an output type. More...
 
static QString outputTypeName (OutputType outputType)
 Get a user friendly name for an output type. More...
 
static QList< OutputTypeoutputTypes ()
 Get a list of all output types, in GUI presentation order. More...
 
- Static Public Member Functions inherited from QtlFile
static QString absoluteNativeFilePath (const QString &path, bool removeSymLinks=false)
 Build an absolute file path with native directory separators. More...
 
static QStringList commandSearchPath ()
 Return the list of directories in the system search path. More...
 
static bool createDirectory (const QString &path, bool createOnly=false)
 Create a directory and all parent directories if necessary. More...
 
static QString enforceSuffix (const QString &path, const QString &suffix, Qt::CaseSensitivity cs=Qt::CaseInsensitive)
 Enforce a suffix in a file name. More...
 
static QStringList expandFilePath (const QString &path, QtlFilePathFilterInterface *filter=0)
 Expand a file path containing wildcards to all existing files matching the specification. More...
 
static QString parentPath (const QString &path, int upLevels=1)
 Get the absolute file path of the parent directory of a file. More...
 
template<typename T >
static bool readBigEndianAt (QIODevice &device, qint64 position, T &data)
 Read a big endian integer in a binary file at a given position. More...
 
static bool readBinary (QIODevice &device, QtlByteBlock &data, int maxSize=-1)
 Read a portion of a binary file at the current position. More...
 
static bool readBinaryAt (QIODevice &device, qint64 position, QtlByteBlock &data, int maxSize=-1)
 Read a portion of a binary file at a given position. More...
 
static QtlByteBlock readBinaryFile (const QString &fileName, int maxSize=-1)
 Read the content of a binary file. More...
 
static QString readTextFile (const QString &fileName)
 Read the content of a text file. More...
 
static QStringList readTextLinesFile (const QString &fileName, int maxSize=-1)
 Read the content of a text file. More...
 
static QString search (const QString &baseName, const QStringList &searchPath, const QString &extension=QString(), QFile::Permissions permissions=QFile::Permissions())
 Search a file in a list of directories. More...
 
static QString searchExecutable (const QString &baseName, const QStringList &searchPath)
 Search an executable file in a list of directories. More...
 
static QString searchParentSubdirectory (const QString &dir, const QString &subdir, int maxLevels=128)
 Search a subdirectory in the parent path. More...
 
static QString shortPath (const QString &path, bool keepOnError)
 Get the "short path name" of a file path. More...
 
static QString toFileName (const QUrl &url)
 Format the content of an URL into a file path if the URL scheme is file: More...
 
static bool writeBinary (QIODevice &file, const QtlByteBlock &data)
 Write binary data into an open file. More...
 
static bool writeBinary (QIODevice &file, const void *data, int size, bool processEvents=false)
 Write binary data into an open file. More...
 
static bool writeBinaryFile (const QString &fileName, const QtlByteBlock &content)
 Write the content of a binary file. More...
 
static bool writeTextFile (const QString &fileName, const QString &text)
 Write the content of a text file. More...
 
static bool writeTextLinesFile (const QString &fileName, const QStringList &lines)
 Write the content of a text file. More...
 

Private Member Functions

 QtlMovieOutputFile () Q_DECL_EQ_DELETE
 

Private Attributes

float _forcedDar
 Forced output DAR (different from input one). More...
 
QtlLogger_log
 Where to log errors. More...
 
OutputType _outputType
 Output format. More...
 
const QtlMovieSettings_settings
 Application settings. More...
 

Detailed Description

Describes an output video file.

Member Enumeration Documentation

◆ OutputType

Type of output file.

Enumerator
DvdFile 

DVD MPEG-PS file.

DvdImage 

DVD ISO image.

DvdBurn 

DVD ISO image and burn it.

Ipad 

iPad target.

Iphone 

iPhone target.

Android 

Android devices.

Avi 

AVI target (highly compressed).

SubRip 

Subtitles only in SRT format.

None 

No output.

Constructor & Destructor Documentation

◆ QtlMovieOutputFile() [1/3]

QtlMovieOutputFile::QtlMovieOutputFile ( const QString &  fileName,
const QtlMovieSettings settings,
QtlLogger log,
QObject *  parent = 0 
)

Constructor.

Parameters
[in]fileNameOutput file name.
[in]settingsApplication settings.
[in]logWhere to log errors.
[in]parentOptional parent widget.

◆ QtlMovieOutputFile() [2/3]

QtlMovieOutputFile::QtlMovieOutputFile ( const QtlMovieOutputFile other,
QObject *  parent = 0 
)
explicit

Copy constructor.

Parameters
[in]otherOther instance to copy (except parent).
[in]parentOptional parent widget.

◆ QtlMovieOutputFile() [3/3]

QtlMovieOutputFile::QtlMovieOutputFile ( )
private

Member Function Documentation

◆ log()

QtlLogger* QtlMovieOutputFile::log ( ) const
inline

Get the associated error logger.

Returns
The associated error logger.

◆ outputType()

OutputType QtlMovieOutputFile::outputType ( ) const
inline

Get the output file type.

Returns
Output file type.

◆ setOutputType()

void QtlMovieOutputFile::setOutputType ( OutputType  type)

Set the output file type.

Parameters
[in]typeOutput file type.

◆ defaultOutputDirectory()

QString QtlMovieOutputFile::defaultOutputDirectory ( const QString &  inputFileName)

Get the default output directory for an input file name, based on the output type.

Parameters
[in]inputFileNameInput file name. Can be empty.
Returns
Directory name.

◆ setDefaultFileName()

void QtlMovieOutputFile::setDefaultFileName ( const QString &  inputFileName,
bool  keepPreviousDirectory,
bool  keepPreviousBase 
)

Set the default output file name from an input file name, based on the output type.

Parameters
[in]inputFileNameInput file name. Can be empty.
[in]keepPreviousDirectoryIf true, keep previous directory of output file.
[in]keepPreviousBaseIf true, keep previous base name (without directory and suffix).

◆ forcedDisplayAspectRatio()

float QtlMovieOutputFile::forcedDisplayAspectRatio ( ) const
inline

Get the forced display aspect ratio.

Returns
The forced display aspect ratio (different from the input file) or 0.O to keep the same display aspect ratio as the input file.

◆ setForcedDisplayAspectRatio()

void QtlMovieOutputFile::setForcedDisplayAspectRatio ( float  forcedDisplayAspectRatio)
inline

Set the forced display aspect ratio.

Parameters
[in]forcedDisplayAspectRatioThe forced display aspect ratio (different from the input file) or 0.O to keep the same display aspect ratio as the input file.

◆ outputTypes()

QList< QtlMovieOutputFile::OutputType > QtlMovieOutputFile::outputTypes ( )
static

Get a list of all output types, in GUI presentation order.

Returns
A list of all output types, in GUI presentation order.

◆ outputTypeName()

QString QtlMovieOutputFile::outputTypeName ( QtlMovieOutputFile::OutputType  outputType)
static

Get a user friendly name for an output type.

Parameters
[in]outputTypeOutput type.
Returns
User friendly name.

◆ outputIdName()

QString QtlMovieOutputFile::outputIdName ( QtlMovieOutputFile::OutputType  outputType)
static

Get an identifier name for an output type.

Parameters
[in]outputTypeOutput type.
Returns
Identifier name.

◆ fileExtension()

QString QtlMovieOutputFile::fileExtension ( QtlMovieOutputFile::OutputType  outputType)
static

Get the default output file extension for a given output type.

Parameters
[in]outputTypeOutput type.
Returns
The output file extension.

◆ outputTypeChanged

void QtlMovieOutputFile::outputTypeChanged ( OutputType  type)
signal

Emitted when the output type changes.

Parameters
[in]typeThe new type.

Member Data Documentation

◆ _log

QtlLogger* QtlMovieOutputFile::_log
private

Where to log errors.

◆ _settings

const QtlMovieSettings* QtlMovieOutputFile::_settings
private

Application settings.

◆ _outputType

OutputType QtlMovieOutputFile::_outputType
private

Output format.

◆ _forcedDar

float QtlMovieOutputFile::_forcedDar
private

Forced output DAR (different from input one).


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