From 3881cb65cfcec90b6f0a56ce7223a471aa0115f2 Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 2 Sep 2024 16:30:59 +0200 Subject: [PATCH] PipeWire camera: make member variable with the PipeWire status updated We keep information about the PipeWire camera status as a member of the PipeWire session, but it's never updated and remains in uninitialized state. Make sure it gets updated once PipeWire is initialized or when it fails. There is currently no use for this member variable, but there is a plan to use it so I'm rather keeping it instead of removing it. Bug: webrtc:42225999 Change-Id: If409761b148be8f0724fd9ab7a1ed4cf0e459503 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/360922 Reviewed-by: Andreas Pehrson Commit-Queue: Jan Grulich Reviewed-by: Ilya Nikolaevskiy Cr-Commit-Position: refs/heads/main@{#42926} --- modules/video_capture/linux/pipewire_session.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/video_capture/linux/pipewire_session.cc b/modules/video_capture/linux/pipewire_session.cc index 49421de7b1..e9f7f765a5 100644 --- a/modules/video_capture/linux/pipewire_session.cc +++ b/modules/video_capture/linux/pipewire_session.cc @@ -422,6 +422,8 @@ void PipeWireSession::OnRegistryGlobalRemove(void* data, uint32_t id) { } void PipeWireSession::Finish(VideoCaptureOptions::Status status) { + status_ = status; + webrtc::MutexLock lock(&callback_lock_); if (callback_) {