Describes an output video file. More...
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... | |
![]() | |
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... | |
QtlLogger * | log () 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... | |
![]() | |
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< OutputType > | outputTypes () |
Get a list of all output types, in GUI presentation order. More... | |
![]() | |
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... | |
Describes an output video file.
QtlMovieOutputFile::QtlMovieOutputFile | ( | const QString & | fileName, |
const QtlMovieSettings * | settings, | ||
QtlLogger * | log, | ||
QObject * | parent = 0 |
||
) |
Constructor.
[in] | fileName | Output file name. |
[in] | settings | Application settings. |
[in] | log | Where to log errors. |
[in] | parent | Optional parent widget. |
|
explicit |
Copy constructor.
[in] | other | Other instance to copy (except parent). |
[in] | parent | Optional parent widget. |
|
private |
|
inline |
Get the associated error logger.
|
inline |
Get the output file type.
void QtlMovieOutputFile::setOutputType | ( | OutputType | type | ) |
Set the output file type.
[in] | type | Output file type. |
QString QtlMovieOutputFile::defaultOutputDirectory | ( | const QString & | inputFileName | ) |
Get the default output directory for an input file name, based on the output type.
[in] | inputFileName | Input file name. Can be empty. |
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.
[in] | inputFileName | Input file name. Can be empty. |
[in] | keepPreviousDirectory | If true, keep previous directory of output file. |
[in] | keepPreviousBase | If true, keep previous base name (without directory and suffix). |
|
inline |
Get the forced display aspect ratio.
|
inline |
Set the forced display aspect ratio.
[in] | forcedDisplayAspectRatio | The forced display aspect ratio (different from the input file) or 0.O to keep the same display aspect ratio as the input file. |
|
static |
Get a list of all output types, in GUI presentation order.
|
static |
Get a user friendly name for an output type.
[in] | outputType | Output type. |
|
static |
Get an identifier name for an output type.
[in] | outputType | Output type. |
|
static |
Get the default output file extension for a given output type.
[in] | outputType | Output type. |
|
signal |
Emitted when the output type changes.
[in] | type | The new type. |
|
private |
Where to log errors.
|
private |
Application settings.
|
private |
Output format.
|
private |
Forced output DAR (different from input one).