Fully migrate to Webrtc::Environment.

This commit is contained in:
John Preston
2024-01-24 12:42:37 +04:00
parent 9a6ab3b0f2
commit 104ba4db7c
21 changed files with 329 additions and 528 deletions
@@ -34,7 +34,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "media/streaming/media_streaming_player.h"
#include "media/streaming/media_streaming_document.h"
#include "settings/settings_calls.h" // Calls::AddCameraSubsection.
#include "webrtc/webrtc_media_devices.h" // Webrtc::GetVideoInputList.
#include "webrtc/webrtc_environment.h"
#include "webrtc/webrtc_video_track.h"
#include "ui/widgets/popup_menu.h"
#include "window/window_controller.h"
@@ -53,7 +53,8 @@ namespace {
[[nodiscard]] bool IsCameraAvailable() {
return (Core::App().calls().currentCall() == nullptr)
&& !Webrtc::GetVideoInputList().empty();
&& !Core::App().mediaDevices().defaultId(
Webrtc::DeviceType::Camera).isEmpty();
}
void CameraBox(