diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc')
-rw-r--r-- | third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc index ad6cea57b8..31d922035b 100644 --- a/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc +++ b/third_party/libwebrtc/modules/video_capture/linux/device_info_pipewire.cc @@ -20,10 +20,10 @@ #include <vector> +#include "modules/video_capture/linux/pipewire_session.h" #include "modules/video_capture/video_capture.h" #include "modules/video_capture/video_capture_defines.h" #include "modules/video_capture/video_capture_impl.h" -#include "modules/video_capture/video_capture_options.h" #include "rtc_base/logging.h" namespace webrtc { @@ -38,6 +38,8 @@ int32_t DeviceInfoPipeWire::Init() { DeviceInfoPipeWire::~DeviceInfoPipeWire() = default; uint32_t DeviceInfoPipeWire::NumberOfDevices() { + RTC_CHECK(pipewire_session_); + return pipewire_session_->nodes().size(); } @@ -50,6 +52,8 @@ int32_t DeviceInfoPipeWire::GetDeviceName(uint32_t deviceNumber, uint32_t productUniqueIdUTF8Length, pid_t* pid, bool* deviceIsPlaceholder) { + RTC_CHECK(pipewire_session_); + if (deviceNumber >= NumberOfDevices()) return -1; @@ -85,6 +89,8 @@ int32_t DeviceInfoPipeWire::GetDeviceName(uint32_t deviceNumber, int32_t DeviceInfoPipeWire::CreateCapabilityMap( const char* deviceUniqueIdUTF8) { + RTC_CHECK(pipewire_session_); + for (auto& node : pipewire_session_->nodes()) { if (node.unique_id().compare(deviceUniqueIdUTF8) != 0) continue; |