mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-10-04 07:09:56 +00:00
feat: record asynchronously
The record file was written from the stream thread. As a consequence, any blocking I/O to write the file delayed the decoder. For maximum performance even when recording is enabled, send (refcounted) packets to a separate recording thread.
This commit is contained in:
parent
65a7cb7467
commit
c79a93c429
7 changed files with 189 additions and 16 deletions
|
@ -53,7 +53,7 @@ bool DeviceManage::disconnectDevice(const QString &serial)
|
|||
if (!serial.isEmpty() && m_devices.contains(serial)) {
|
||||
auto it = m_devices.find(serial);
|
||||
if (it->data()) {
|
||||
it->data()->deleteLater();
|
||||
delete it->data();
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ void DeviceManage::disconnectAllDevice()
|
|||
while (i.hasNext()) {
|
||||
i.next();
|
||||
if (i.value()) {
|
||||
i.value()->deleteLater();
|
||||
delete i.value();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue