Skip to content

Commit

Permalink
portals: application of the retries count in hlOnBufferDone
Browse files Browse the repository at this point in the history
  • Loading branch information
aacebedo committed Sep 1, 2024
1 parent d4c2b98 commit 8a957d0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/portals/Screencopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,12 @@ static void hlOnBufferDone(void* data, hyprland_toplevel_export_frame_v1* frame)
PSESSION->sharingData.windowFrameCallback = nullptr;
Debug::log(LOG, "[screencopy/pipewire] Out of buffers");
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);
}
PSESSION->sharingData.copyRetries = 0;
return;
}

Expand Down

0 comments on commit 8a957d0

Please sign in to comment.