#include "media/capture/video/video_capture_system_impl.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/ranges/algorithm.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "media/base/scoped_async_trace.h"
#include "media/capture/video/video_capture_device_factory.h"
#include "media/capture/video/video_capture_metrics.h"
ScopedCaptureTrace;
namespace {
bool IsCaptureFormatSmaller(const media::VideoCaptureFormat& format1,
const media::VideoCaptureFormat& format2) { … }
bool IsCaptureFormatEqual(const media::VideoCaptureFormat& format1,
const media::VideoCaptureFormat& format2) { … }
void ConsolidateCaptureFormats(media::VideoCaptureFormats* formats) { … }
void DeviceInfosCallbackTrampoline(
media::VideoCaptureSystem::DeviceInfoCallback callback,
std::unique_ptr<ScopedCaptureTrace> trace,
const std::vector<media::VideoCaptureDeviceInfo>& infos) { … }
}
namespace media {
VideoCaptureSystemImpl::VideoCaptureSystemImpl(
std::unique_ptr<VideoCaptureDeviceFactory> factory)
: … { … }
VideoCaptureSystemImpl::~VideoCaptureSystemImpl() = default;
void VideoCaptureSystemImpl::GetDeviceInfosAsync(
DeviceInfoCallback result_callback) { … }
VideoCaptureErrorOrDevice VideoCaptureSystemImpl::CreateDevice(
const std::string& device_id) { … }
const VideoCaptureDeviceInfo* VideoCaptureSystemImpl::LookupDeviceInfoFromId(
const std::string& device_id) { … }
void VideoCaptureSystemImpl::DevicesInfoReady(
std::vector<VideoCaptureDeviceInfo> devices_info) { … }
VideoCaptureDeviceFactory* VideoCaptureSystemImpl::GetFactory() { … }
}