#include "components/media_effects/media_device_info.h"
#include "content/public/browser/audio_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/video_capture_service.h"
#include "services/video_capture/public/mojom/video_capture_service.mojom.h"
namespace {
media_effects::MediaDeviceInfo* g_instance_override = …;
}
namespace media_effects {
std::optional<std::string> GetRealDefaultDeviceId(
const std::vector<media::AudioDeviceDescription>& infos) { … }
std::optional<std::string> GetRealCommunicationsDeviceId(
const std::vector<media::AudioDeviceDescription>& infos) { … }
std::vector<std::string> GetRealAudioDeviceNames(
const std::vector<media::AudioDeviceDescription>& infos) { … }
std::vector<std::string> GetRealVideoDeviceNames(
const std::vector<media::VideoCaptureDeviceInfo>& infos) { … }
MediaDeviceInfo::MediaDeviceInfo() { … }
MediaDeviceInfo::~MediaDeviceInfo() { … }
MediaDeviceInfo* MediaDeviceInfo::GetInstance() { … }
std::pair<std::unique_ptr<MediaDeviceInfo>, base::AutoReset<MediaDeviceInfo*>>
MediaDeviceInfo::OverrideInstanceForTesting() { … }
std::optional<media::AudioDeviceDescription>
MediaDeviceInfo::GetAudioDeviceInfoForId(const std::string& device_id) const { … }
std::optional<media::VideoCaptureDeviceInfo>
MediaDeviceInfo::GetVideoDeviceInfoForId(const std::string& device_id) const { … }
const std::optional<std::vector<media::AudioDeviceDescription>>&
MediaDeviceInfo::GetAudioDeviceInfos() const { … }
const std::optional<std::vector<media::VideoCaptureDeviceInfo>>&
MediaDeviceInfo::GetVideoDeviceInfos() const { … }
void MediaDeviceInfo::GetAudioInputStreamParameters(
const std::string& device_id,
audio::mojom::SystemInfo::GetInputStreamParametersCallback callback) { … }
void MediaDeviceInfo::AddObserver(Observer* observer) { … }
void MediaDeviceInfo::RemoveObserver(Observer* observer) { … }
void MediaDeviceInfo::OnDevicesChanged(
base::SystemMonitor::DeviceType device_type) { … }
void MediaDeviceInfo::OnAudioDeviceDescriptionsReceived(
const std::vector<media::AudioDeviceDescription> device_infos) { … }
void MediaDeviceInfo::OnVideoDeviceInfosReceived(
const std::vector<media::VideoCaptureDeviceInfo>& device_infos) { … }
void MediaDeviceInfo::NotifyAudioDevicesChanged() { … }
void MediaDeviceInfo::NotifyVideoDevicesChanged() { … }
}