Audacity 3.2.0
|
Public Types | |
using | SampleData = std::vector< std::remove_pointer_t< samplePtr > > |
Public Member Functions | |
Workers (BlockHashCache &cache, const std::vector< LockedBlock > blocks, std::function< void()> onComplete) | |
bool | IsReady () const |
std::pair< std::string, bool > | ComputeHash (SampleData &sampleData, const LockedBlock &block) const |
void | NotifyReady () |
std::vector< std::pair< int64_t, std::string > > | TakeResult () |
Private Types | |
using | Result = std::unordered_map< int64_t, std::pair< std::string, bool > > |
Private Attributes | |
const size_t | mThreadsCount |
BlockHashCache & | mCache |
std::vector< std::future< Result > > | mResults |
std::future< void > | mWaiter |
std::function< void()> | mOnComplete |
Definition at line 25 of file BlockHasher.cpp.
|
private |
Definition at line 150 of file BlockHasher.cpp.
using audacity::cloud::audiocom::sync::BlockHasher::Workers::SampleData = std::vector<std::remove_pointer_t<samplePtr> > |
Definition at line 28 of file BlockHasher.cpp.
|
inlineexplicit |
Definition at line 30 of file BlockHasher.cpp.
References ComputeHash(), mResults, mThreadsCount, mWaiter, and NotifyReady().
|
inline |
Definition at line 93 of file BlockHasher.cpp.
References audacity::cloud::audiocom::sync::LockedBlock::Block, audacity::cloud::audiocom::sync::LockedBlock::Format, audacity::cloud::audiocom::sync::BlockHashCache::GetHash(), audacity::cloud::audiocom::sync::LockedBlock::Id, mCache, SAMPLE_SIZE, and crypto::sha256().
Referenced by Workers().
|
inline |
Definition at line 81 of file BlockHasher.cpp.
References mResults.
|
inline |
Definition at line 117 of file BlockHasher.cpp.
References mOnComplete.
Referenced by Workers().
|
inline |
Definition at line 123 of file BlockHasher.cpp.
References mCache, mResults, and audacity::cloud::audiocom::sync::BlockHashCache::UpdateHash().
|
private |
Definition at line 148 of file BlockHasher.cpp.
Referenced by ComputeHash(), and TakeResult().
|
private |
Definition at line 154 of file BlockHasher.cpp.
Referenced by NotifyReady().
|
private |
Definition at line 151 of file BlockHasher.cpp.
Referenced by IsReady(), TakeResult(), and Workers().
|
private |
Definition at line 146 of file BlockHasher.cpp.
Referenced by Workers().
|
private |
Definition at line 152 of file BlockHasher.cpp.
Referenced by Workers().