|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
Handles exports of sequential image files to video formats. More...
#include <qgsvideoexporter.h>

Public Slots | |
| void | writeVideo () |
| Starts the video export operation. | |
Signals | |
| void | finished () |
| Emitted when the video export finishes. | |
Public Member Functions | |
| QgsVideoExporter (const QString &filename, QSize size, double framesPerSecond) | |
| Constructor for QgsVideoExporter. | |
| ~QgsVideoExporter () override | |
| QMediaRecorder::Error | error () const |
| Returns the last error received while writing the video. | |
| QString | errorString () const |
| Returns the string describing the last error received while writing the video. | |
| QgsFeedback * | feedback () |
| Returns the optional feedback object. | |
| QMediaFormat::FileFormat | fileFormat () const |
| Returns the output file format. | |
| qint64 | frameDuration () const |
| Returns the duration of each frame, in micro-seconds. | |
| double | framesPerSecond () const |
| Returns the output video frames per second. | |
| QStringList | inputFiles () const |
| Returns the list of input image files. | |
| void | setFeedback (QgsFeedback *feedback) |
| Sets an optional feedback object, for progress reports and cancellation support. | |
| void | setFileFormat (QMediaFormat::FileFormat format) |
| Sets the output file format. | |
| void | setInputFiles (const QStringList &files) |
| Sets the list of input image files. | |
| void | setInputFilesByPattern (const QString &directory, const QString &pattern) |
| Sets the input image files by searching a directory for files matching a pattern. | |
| void | setVideoCodec (QMediaFormat::VideoCodec codec) |
| Sets the output video codec. | |
| QSize | size () const |
| Returns the output video frame size. | |
| QMediaFormat::VideoCodec | videoCodec () const |
| Returns the output video codec. | |
Static Public Member Functions | |
| static bool | isAvailable () |
Returns true if the video export functionality is available on the current system. | |
Handles exports of sequential image files to video formats.
Video export functionality is not available on all systems. The isAvailable() function can be used to test whether video export is available on the current system.
Definition at line 44 of file qgsvideoexporter.h.
| QgsVideoExporter::QgsVideoExporter | ( | const QString & | filename, |
| QSize | size, | ||
| double | framesPerSecond ) |
Constructor for QgsVideoExporter.
| filename | destination video file name |
| size | output video frame size |
| framesPerSecond | output video frames per second |
Definition at line 42 of file qgsvideoexporter.cpp.
|
override |
Definition at line 51 of file qgsvideoexporter.cpp.
| QMediaRecorder::Error QgsVideoExporter::error | ( | ) | const |
Returns the last error received while writing the video.
Definition at line 109 of file qgsvideoexporter.cpp.
| QString QgsVideoExporter::errorString | ( | ) | const |
Returns the string describing the last error received while writing the video.
Definition at line 115 of file qgsvideoexporter.cpp.
| QgsFeedback * QgsVideoExporter::feedback | ( | ) |
Returns the optional feedback object.
Definition at line 60 of file qgsvideoexporter.cpp.
| QMediaFormat::FileFormat QgsVideoExporter::fileFormat | ( | ) | const |
Returns the output file format.
Definition at line 94 of file qgsvideoexporter.cpp.
|
signal |
Emitted when the video export finishes.
|
inline |
Returns the duration of each frame, in micro-seconds.
Definition at line 93 of file qgsvideoexporter.h.
|
inline |
Returns the output video frames per second.
Definition at line 86 of file qgsvideoexporter.h.
| QStringList QgsVideoExporter::inputFiles | ( | ) | const |
Returns the list of input image files.
Definition at line 83 of file qgsvideoexporter.cpp.
|
static |
Returns true if the video export functionality is available on the current system.
Definition at line 33 of file qgsvideoexporter.cpp.
| void QgsVideoExporter::setFeedback | ( | QgsFeedback * | feedback | ) |
Sets an optional feedback object, for progress reports and cancellation support.
The object must exist for the lifetime of the export, ownership is not transferred.
Definition at line 55 of file qgsvideoexporter.cpp.
| void QgsVideoExporter::setFileFormat | ( | QMediaFormat::FileFormat | format | ) |
Sets the output file format.
The Qt QMediaFormat::supportedFileFormats() method can be used to retrieve a list of formats supported by the system.
Definition at line 89 of file qgsvideoexporter.cpp.
| void QgsVideoExporter::setInputFiles | ( | const QStringList & | files | ) |
Sets the list of input image files.
The list must be an ordered list of existing image file paths, which will form the output video frames.
Definition at line 65 of file qgsvideoexporter.cpp.
| void QgsVideoExporter::setInputFilesByPattern | ( | const QString & | directory, |
| const QString & | pattern ) |
Sets the input image files by searching a directory for files matching a pattern.
E.g. setting pattern to "*.png" will find all PNG files in the directory and use them as input frames.
The frames will be sorted alphabetically by filename.
Definition at line 70 of file qgsvideoexporter.cpp.
| void QgsVideoExporter::setVideoCodec | ( | QMediaFormat::VideoCodec | codec | ) |
Sets the output video codec.
The Qt QMediaFormat::supportedVideoCodecs() method can be used to retrieve a list of video codecs supported by the system.
Definition at line 99 of file qgsvideoexporter.cpp.
|
inline |
Returns the output video frame size.
Definition at line 98 of file qgsvideoexporter.h.
| QMediaFormat::VideoCodec QgsVideoExporter::videoCodec | ( | ) | const |
Returns the output video codec.
Definition at line 104 of file qgsvideoexporter.cpp.
|
slot |
Starts the video export operation.
The finished() signal will be emitted when the operation is complete.
| QgsNotSupportedException | if writing video is not supported on the current system. |
Definition at line 120 of file qgsvideoexporter.cpp.