#include <VideoRecordingService.h>
Signals | |
| void | recordingChanged (bool recording) |
Public Member Functions | |
| VideoRecordingService (const QList< VideoStreamController * > &sources, QObject *parent=nullptr) | |
| ~VideoRecordingService () override | |
| void | addSource (VideoStreamController *source) |
Follows source as well, for as long as it exists. | |
| bool | recording () const |
| True while any source records. | |
| void | startRecording (const QString &baseName=QString()) |
| void | stopRecording () |
Static Public Member Functions | |
| static QString | recordingFile (const QString &directory, const QString &baseName, const VideoStreamController *source, VideoReceiver::FileFormat format) |
| static QString | uniqueBaseName (const QString &directory, const QDateTime &time) |
time as "yyyy-MM-dd_hh.mm.ss", suffixed "_2", "_3"... while files of that name exist in directory. | |
| static QStringList | pruneStorage (const QString &directory, quint64 maxBytes, const QStringList &openFiles={}) |
Friends | |
| class | VideoRecordingServiceTest |
Records the video sources of the main picture: the primary stream or the USB camera, and the thermal stream. Names the files, keeps the recordings within the storage limit as one starts and while it runs, writes the telemetry subtitles of the video on display (the primary stream or the USB camera) and reports recording failures to the user. The sources in tiles aren't recorded; a recording goes on for a source that moves to a tile meanwhile.
Definition at line 20 of file VideoRecordingService.h.
|
explicit |
Definition at line 29 of file VideoRecordingService.cc.
References addSource().
|
overridedefault |
| void VideoRecordingService::addSource | ( | VideoStreamController * | source | ) |
Follows source as well, for as long as it exists.
Definition at line 43 of file VideoRecordingService.cc.
References VideoStreamController::role().
Referenced by VideoRecordingService().
|
static |
Deletes the oldest recordings and subtitle files in directory until they use less than maxBytes. Leaves the files being written: openFiles, and any written within the last minute, as a recording's file is before it reports its first frame. Returns the deleted files.
Definition at line 191 of file VideoRecordingService.cc.
References VideoReceiver::fileExtension(), VideoReceiver::Mkv, VideoReceiver::Mov, and VideoReceiver::Mp4.
|
inline |
True while any source records.
Definition at line 34 of file VideoRecordingService.h.
Referenced by recordingChanged().
|
signal |
References recording().
|
static |
Definition at line 173 of file VideoRecordingService.cc.
References VideoReceiver::fileExtension(), and VideoStreamController::taggedFile().
Referenced by startRecording().
| void VideoRecordingService::startRecording | ( | const QString & | baseName = QString() | ) |
Records every active source that isn't in a tile into the video save directory as "<baseName>.<ext>", the thermal stream as "<baseName>.thermalVideo.<ext>". An empty baseName picks an unused timestamped name.
Definition at line 131 of file VideoRecordingService.cc.
References VideoStreamController::active(), SettingsManager::appSettings(), SettingsManager::instance(), VideoReceiver::isValidFileFormat(), recordingFile(), QGC::showAppMessage(), VideoStreamController::startRecording(), VideoStreamController::tile(), uniqueBaseName(), AppSettings::videoSavePath(), and SettingsManager::videoSettings().
| void VideoRecordingService::stopRecording | ( | ) |
Definition at line 166 of file VideoRecordingService.cc.
References VideoStreamController::stopRecording().
|
static |
time as "yyyy-MM-dd_hh.mm.ss", suffixed "_2", "_3"... while files of that name exist in directory.
Definition at line 180 of file VideoRecordingService.cc.
Referenced by startRecording().
|
friend |
Definition at line 24 of file VideoRecordingService.h.
References VideoRecordingServiceTest.
Referenced by VideoRecordingServiceTest.