|
TracktionEngine
|
Job that archives a Project or single Edit into a standard zip file. More...
#include <tracktion_Archive.h>
Public Types | |
| enum class | CompressionLevel { uncompressed = 0 , fastest = 1 , normal = 6 , best = 9 , defaultLevel = -1 } |
| Compression level for the zip archive (maps to zlib levels 0-9, -1 = default). More... | |
| using | Source = std::variant< Project *, ProjectItem * > |
| What to archive. | |
Public Member Functions | |
| ArchiveJob (Source source, const juce::File &destZipFile, CompressionLevel, bool includeClips=true) | |
| Creates a job to archive a Project or single Edit. | |
| ~ArchiveJob () override | |
| JobStatus | runJob () override |
| float | getCurrentTaskProgress () override |
| bool | canCancel () const override |
| bool | runSynchronously () |
| Runs the archive process synchronously on the calling thread. | |
| juce::String | getError () const |
| After runJob(), returns error message (empty on success). | |
Public Member Functions inherited from engine::ThreadPoolJobWithProgress | |
| ThreadPoolJobWithProgress (const juce::String &name) | |
| ~ThreadPoolJobWithProgress () | |
| void | setManager (BackgroundJobManager &) |
| void | setName (const juce::String &newName) |
| Sets the job's name but also updates the manager so the list will reflect it. | |
| void | prepareForJobDeletion () |
| Call this in your sub-class destructor to to remvoe it from the manager queue before this class's destructor is called which can result in a pure virtual call. | |
Job that archives a Project or single Edit into a standard zip file.
For folder-based projects: consolidates then zips. For file-based projects: converts to folder-based in a temp dir first, then consolidates and zips.
| using engine::ArchiveJob::Source = std::variant<Project*, ProjectItem*> |
What to archive.
|
strong |
| engine::ArchiveJob::ArchiveJob | ( | Source | source, |
| const juce::File & | destZipFile, | ||
| CompressionLevel | , | ||
| bool | includeClips = true |
||
| ) |
Creates a job to archive a Project or single Edit.
If includeClips is false, the Edit's clips are stripped before its referenced material is collected, so the archive contains the Edit's structure but none of its audio. Video and marker clips are kept.
N.B. includeClips is only honoured for a single-Edit (ProjectItem) source - a whole-Project archive always includes the clips.
|
override |
|
override |
|
overridevirtual |
Implements engine::ThreadPoolJobWithProgress.
|
overridevirtual |
Reimplemented from engine::ThreadPoolJobWithProgress.
| bool engine::ArchiveJob::runSynchronously | ( | ) |
Runs the archive process synchronously on the calling thread.
Useful when already on the message thread (avoids MessageManager::callSync deadlock). Returns true on success. Call getError() for details on failure.
| juce::String engine::ArchiveJob::getError | ( | ) | const |
After runJob(), returns error message (empty on success).