mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-06 00:35:58 +01:00
portals: application of the retries count in hlOnBufferDone (#255)
This commit is contained in:
parent
d4c2b983c8
commit
11e15b437e
1 changed files with 7 additions and 1 deletions
|
@ -271,10 +271,16 @@ static void hlOnBufferDone(void* data, hyprland_toplevel_export_frame_v1* frame)
|
||||||
PSESSION->sharingData.windowFrameCallback = nullptr;
|
PSESSION->sharingData.windowFrameCallback = nullptr;
|
||||||
Debug::log(LOG, "[screencopy/pipewire] Out of buffers");
|
Debug::log(LOG, "[screencopy/pipewire] Out of buffers");
|
||||||
PSESSION->sharingData.status = FRAME_NONE;
|
PSESSION->sharingData.status = FRAME_NONE;
|
||||||
|
if (PSESSION->sharingData.copyRetries++ < MAX_RETRIES) {
|
||||||
|
Debug::log(LOG, "[sc] Retrying screencopy ({}/{})", PSESSION->sharingData.copyRetries, MAX_RETRIES);
|
||||||
|
g_pPortalManager->m_sPortals.screencopy->m_pPipewire->updateStreamParam(PSTREAM);
|
||||||
|
g_pPortalManager->m_sPortals.screencopy->queueNextShareFrame(PSESSION);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
hyprland_toplevel_export_frame_v1_copy(frame, PSTREAM->currentPWBuffer->wlBuffer, false);
|
hyprland_toplevel_export_frame_v1_copy(frame, PSTREAM->currentPWBuffer->wlBuffer, false);
|
||||||
|
PSESSION->sharingData.copyRetries = 0;
|
||||||
|
|
||||||
Debug::log(TRACE, "[sc] wlr frame copied");
|
Debug::log(TRACE, "[sc] wlr frame copied");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue