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

Method connectionThreadEntry

qrenderdoc/Windows/Dialogs/LiveCapture.cpp:1259–1470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1257}
1258
1259void LiveCapture::connectionThreadEntry()
1260{
1261 ITargetControl *conn =
1262 RENDERDOC_CreateTargetControl(m_Hostname, m_RemoteIdent, GetSystemUsername(), true);
1263 m_Connected.release();
1264
1265 if(!conn || !conn->Connected())
1266 {
1267 if(conn)
1268 conn->Shutdown();
1269
1270 GUIInvoke::call(this, [this]() {
1271 setTitle(tr("Connection failed"));
1272 ui->connectionStatus->setText(tr("Failed"));
1273 ui->connectionIcon->setPixmap(Pixmaps::del(ui->connectionIcon));
1274
1275 connectionClosed();
1276 });
1277
1278 m_Connected.acquire();
1279 return;
1280 }
1281
1282 uint32_t pid = conn->GetPID();
1283 QString target = conn->GetTarget();
1284
1285 GUIInvoke::call(this, [this, pid, target]() {
1286 if(!m_Connected.available())
1287 return;
1288
1289 if(pid)
1290 setTitle(QFormatStr("%1 [PID %2]").arg(target).arg(pid));
1291 else
1292 setTitle(target);
1293
1294 ui->target->setText(windowTitle());
1295 ui->connectionIcon->setPixmap(Pixmaps::connect(ui->connectionIcon));
1296 ui->connectionStatus->setText(tr("Established"));
1297 });
1298
1299 while(conn && conn->Connected())
1300 {
1301 if(m_TriggerCapture.tryAcquire())
1302 {
1303 conn->TriggerCapture((uint)m_CaptureNumFrames);
1304 m_CaptureNumFrames = 1;
1305 }
1306
1307 if(m_QueueCapture.tryAcquire())
1308 {
1309 conn->QueueCapture((uint32_t)m_QueueCaptureFrameNum, (uint32_t)m_CaptureNumFrames);
1310 m_QueueCaptureFrameNum = 0;
1311 m_CaptureNumFrames = 1;
1312 }
1313
1314 if(m_CopyCapture.tryAcquire())
1315 {
1316 conn->CopyCapture(m_CopyCaptureID, m_CopyCaptureLocalPath);

Callers 1

showEventMethod · 0.95

Calls 15

GetSystemUsernameFunction · 0.85
connectFunction · 0.85
APIStatusClass · 0.85
disconnectFunction · 0.85
GetPIDMethod · 0.80
GetTargetMethod · 0.80
availableMethod · 0.80
CopyCaptureMethod · 0.80
ReceiveMessageMethod · 0.80
setMaximumMethod · 0.80
GetAPIMethod · 0.80

Tested by

no test coverage detected