PipeWire capturer: set capturer as failed when session is closed

Marking capturer as failed will indicate consumers will not be getting
any new frames by sending back ERROR_PERMANENT and let them know that
screencast can be stopped from their side. This will make screencast to
stop when a window we share is closed or when screencast is closed from
system tray.

Bug: chromium:40276865
Change-Id: Ia2c13461bd3126cab9c4838b8aa6840578562e9e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339560
Commit-Queue: Jan Grulich <grulja@gmail.com>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#41817}
This commit is contained in:
Jan Grulich 2024-02-15 13:30:09 +01:00 committed by WebRTC LUCI CQ
parent 8e137d0509
commit 058bfe3ae3

View File

@ -112,6 +112,7 @@ void BaseCapturerPipeWire::OnScreenCastSessionClosed() {
if (!capturer_failed_) {
options_.screencast_stream()->StopScreenCastStream();
}
capturer_failed_ = true;
}
void BaseCapturerPipeWire::UpdateResolution(uint32_t width, uint32_t height) {