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

Method CopyCaptureToRemote

qrenderdoc/Code/ReplayManager.cpp:164–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164rdcstr ReplayManager::CopyCaptureToRemote(const rdcstr &localpath, QWidget *window)
165{
166 if(!m_Remote)
167 return "";
168
169 rdcstr remotepath;
170
171 QAtomicInt copied = 0;
172 float progress = 0.0f;
173
174 auto lambda = [this, localpath, &remotepath, &progress, &copied](IReplayController *r) {
175 QMutexLocker autolock(&m_RemoteLock);
176 remotepath = m_Remote->CopyCaptureToRemote(localpath, [&progress](float p) { progress = p; });
177 copied = 1;
178 };
179
180 // we should never have the thread running at this point, but let's be safe.
181 if(IsRunning())
182 {
183 AsyncInvoke(lambda);
184 }
185 else
186 {
187 LambdaThread *thread = new LambdaThread([&lambda]() { lambda(NULL); });
188 thread->selfDelete(true);
189 thread->setName(lit("CopyCaptureToRemote"));
190 thread->start();
191 }
192
193 ShowProgressDialog(
194 window, tr("Transferring..."), [&copied]() { return copied == 1; },
195 [&progress]() { return progress; });
196
197 return remotepath;
198}
199
200void ReplayManager::CopyCaptureFromRemote(const rdcstr &remotepath, const rdcstr &localpath,
201 QWidget *window)

Callers 1

LoadCaptureMethod · 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