Audacity 3.2.0
|
#include <MixdownUploader.h>
Classes | |
class | DataExporter |
struct | Tag |
Public Member Functions | |
MixdownUploader (Tag, concurrency::CancellationContextPtr cancellationContext, const ServiceConfig &config, const AudacityProject &project, MixdownProgressCallback progressCallback) | |
~MixdownUploader () | |
void | SetUrls (const UploadUrls &urls) |
std::future< MixdownResult > | GetResultFuture () |
Public Member Functions inherited from audacity::concurrency::ICancellable | |
virtual | ~ICancellable ()=default |
virtual void | Cancel ()=0 |
Static Public Member Functions | |
static std::shared_ptr< MixdownUploader > | Upload (concurrency::CancellationContextPtr cancellationContext, const ServiceConfig &config, const AudacityProject &project, MixdownProgressCallback progressCallback) |
Private Member Functions | |
void | Cancel () |
void | ReportProgress (MixdownState state, double progress, ResponseResult uploadResult) |
void | ExportProject () |
void | UploadMixdown () |
Private Attributes | |
const ServiceConfig & | mServiceConfig |
const AudacityProject & | mProject |
std::mutex | mUploadUrlsMutex |
std::condition_variable | mUploadUrlsSet |
std::optional< UploadUrls > | mUploadUrls |
MixdownProgressCallback | mProgressCallback |
std::unique_ptr< DataExporter > | mDataExporter |
std::string | mExportedFilePath |
std::atomic< double > | mProgress {} |
bool | mProgressUpdateQueued { false } |
std::atomic< bool > | mUploadCancelled { false } |
std::atomic< bool > | mFinished { false } |
std::promise< MixdownResult > | mPromise |
concurrency::CancellationContextPtr | mCancellationContext |
Definition at line 59 of file MixdownUploader.h.
audacity::cloud::audiocom::sync::MixdownUploader::MixdownUploader | ( | Tag | , |
concurrency::CancellationContextPtr | cancellationContext, | ||
const ServiceConfig & | config, | ||
const AudacityProject & | project, | ||
MixdownProgressCallback | progressCallback | ||
) |
Definition at line 221 of file MixdownUploader.cpp.
References ExportProject().
audacity::cloud::audiocom::sync::MixdownUploader::~MixdownUploader | ( | ) |
Definition at line 232 of file MixdownUploader.cpp.
References mExportedFilePath.
|
privatevirtual |
Implements audacity::concurrency::ICancellable.
Definition at line 267 of file MixdownUploader.cpp.
References mDataExporter, mUploadCancelled, and mUploadUrlsSet.
|
private |
Definition at line 326 of file MixdownUploader.cpp.
References audacity::cloud::audiocom::sync::anonymous_namespace{MixdownUploader.cpp}::CalculateChannels(), audacity::cloud::audiocom::sync::Empty, audacity::cloud::audiocom::sync::Failed, audacity::cloud::audiocom::sync::anonymous_namespace{MixdownUploader.cpp}::GenerateTempPath(), ExportPluginRegistry::Get(), ProjectRate::Get(), TrackList::Get(), audacity::cloud::audiocom::ServiceConfig::GetExportConfig(), anonymous_namespace{TimeTrack.cpp}::GetRate(), audacity::cloud::audiocom::GetServiceConfig(), audacity::cloud::audiocom::sync::anonymous_namespace{MixdownUploader.cpp}::HasPlayableTracks(), mDataExporter, mExportedFilePath, mFinished, mProject, mPromise, ExportTaskBuilder::SetFileName(), ExportTaskBuilder::SetNumChannels(), ExportTaskBuilder::SetParameters(), ExportTaskBuilder::SetPlugin(), ExportTaskBuilder::SetRange(), ExportTaskBuilder::SetSampleRate(), audacity::ToWXString(), and tracks.
Referenced by MixdownUploader().
std::future< MixdownResult > audacity::cloud::audiocom::sync::MixdownUploader::GetResultFuture | ( | ) |
Definition at line 281 of file MixdownUploader.cpp.
References mPromise.
|
private |
Definition at line 286 of file MixdownUploader.cpp.
References BasicUI::CallAfter(), audacity::cloud::audiocom::sync::Cancelled, audacity::cloud::audiocom::sync::Failed, BasicUI::IsUiThread(), mFinished, mProgress, mProgressCallback, mProgressUpdateQueued, mPromise, and audacity::cloud::audiocom::sync::Succeeded.
Referenced by UploadMixdown().
void audacity::cloud::audiocom::sync::MixdownUploader::SetUrls | ( | const UploadUrls & | urls | ) |
Definition at line 257 of file MixdownUploader.cpp.
References mUploadUrls, mUploadUrlsMutex, and mUploadUrlsSet.
|
static |
Definition at line 238 of file MixdownUploader.cpp.
References audacity::concurrency::CancellationContext::Create(), and project.
Referenced by audacity::cloud::audiocom::sync::UploadMixdown().
|
private |
Definition at line 401 of file MixdownUploader.cpp.
References audacity::cloud::audiocom::Cancelled, audacity::cloud::audiocom::sync::Cancelled, audacity::cloud::audiocom::ResponseResult::Code, audacity::cloud::audiocom::sync::Failed, audacity::cloud::audiocom::sync::DataUploader::Get(), mCancellationContext, mExportedFilePath, mServiceConfig, mUploadCancelled, mUploadUrls, mUploadUrlsMutex, mUploadUrlsSet, ReportProgress(), audacity::cloud::audiocom::sync::Succeeded, audacity::cloud::audiocom::Success, audacity::cloud::audiocom::sync::DataUploader::Upload(), audacity::cloud::audiocom::sync::Uploading, and audacity::cloud::audiocom::sync::WaitingForUrls.
|
private |
Definition at line 115 of file MixdownUploader.h.
Referenced by UploadMixdown().
|
private |
Definition at line 102 of file MixdownUploader.h.
Referenced by Cancel(), and ExportProject().
|
private |
Definition at line 104 of file MixdownUploader.h.
Referenced by ExportProject(), UploadMixdown(), and ~MixdownUploader().
|
private |
Definition at line 111 of file MixdownUploader.h.
Referenced by ExportProject(), and ReportProgress().
|
private |
Definition at line 106 of file MixdownUploader.h.
Referenced by ReportProgress().
|
private |
Definition at line 99 of file MixdownUploader.h.
Referenced by ReportProgress().
|
private |
Definition at line 108 of file MixdownUploader.h.
Referenced by ReportProgress().
|
private |
Definition at line 93 of file MixdownUploader.h.
Referenced by ExportProject().
|
private |
Definition at line 113 of file MixdownUploader.h.
Referenced by ExportProject(), GetResultFuture(), and ReportProgress().
|
private |
Definition at line 92 of file MixdownUploader.h.
Referenced by UploadMixdown().
|
private |
Definition at line 110 of file MixdownUploader.h.
Referenced by Cancel(), and UploadMixdown().
|
private |
Definition at line 97 of file MixdownUploader.h.
Referenced by SetUrls(), and UploadMixdown().
|
private |
Definition at line 95 of file MixdownUploader.h.
Referenced by SetUrls(), and UploadMixdown().
|
private |
Definition at line 96 of file MixdownUploader.h.
Referenced by Cancel(), SetUrls(), and UploadMixdown().