MCPcopy Create free account
hub / github.com/baldurk/renderdoc / CopyCaptureFromRemote

Method CopyCaptureFromRemote

qrenderdoc/Code/ReplayManager.cpp:200–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200void ReplayManager::CopyCaptureFromRemote(const rdcstr &remotepath, const rdcstr &localpath,
201 QWidget *window)
202{
203 if(!m_Remote)
204 return;
205
206 QAtomicInt copied = 0;
207 float progress = 0.0f;
208
209 auto lambda = [this, localpath, remotepath, &progress, &copied](IReplayController *r) {
210 QMutexLocker autolock(&m_RemoteLock);
211 m_Remote->CopyCaptureFromRemote(remotepath, localpath, [&progress](float p) { progress = p; });
212 copied = 1;
213 };
214
215 // we should never have the thread running at this point, but let's be safe.
216 if(IsRunning())
217 {
218 AsyncInvoke(lambda);
219 }
220 else
221 {
222 LambdaThread *thread = new LambdaThread([&lambda]() { lambda(NULL); });
223 thread->selfDelete(true);
224 thread->setName(lit("CopyCaptureFromRemote"));
225 thread->start();
226 }
227
228 ShowProgressDialog(
229 window, tr("Transferring..."), [&copied]() { return copied == 1; },
230 [&progress]() { return progress; });
231}
232
233bool ReplayManager::IsRunning()
234{

Callers 5

RecompressCaptureMethod · 0.45
SaveCaptureToMethod · 0.45
EmbedDependentFilesMethod · 0.45
RemoveDependentFilesMethod · 0.45
saveCaptureMethod · 0.45

Calls 5

ShowProgressDialogFunction · 0.85
selfDeleteMethod · 0.80
trFunction · 0.70
setNameMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected