#include "media/audio/audio_device_description.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/notreached.h"
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "media/base/localized_strings.h"
namespace media {
const char AudioDeviceDescription::kDefaultDeviceId[] = …;
const char AudioDeviceDescription::kCommunicationsDeviceId[] = …;
const char AudioDeviceDescription::kLoopbackInputDeviceId[] = …;
const char AudioDeviceDescription::kLoopbackWithMuteDeviceId[] = …;
const char AudioDeviceDescription::kLoopbackWithoutChromeId[] = …;
namespace {
constexpr char kAirpodsNameSubstring[] = …;
constexpr char kProfileNameHandsFree[] = …;
constexpr char kProfileNameStereo[] = …;
void RedactDeviceName(std::string& name) { … }
}
bool AudioDeviceDescription::IsDefaultDevice(const std::string& device_id) { … }
bool AudioDeviceDescription::IsCommunicationsDevice(
const std::string& device_id) { … }
bool AudioDeviceDescription::IsLoopbackDevice(const std::string& device_id) { … }
bool AudioDeviceDescription::UseSessionIdToSelectDevice(
const base::UnguessableToken& session_id,
const std::string& device_id) { … }
std::string AudioDeviceDescription::GetDefaultDeviceName() { … }
std::string AudioDeviceDescription::GetCommunicationsDeviceName() { … }
std::string AudioDeviceDescription::GetDefaultDeviceName(
const std::string& real_device_name) { … }
std::string AudioDeviceDescription::GetCommunicationsDeviceName(
const std::string& real_device_name) { … }
void AudioDeviceDescription::LocalizeDeviceDescriptions(
AudioDeviceDescriptions* device_descriptions) { … }
AudioDeviceDescription::AudioDeviceDescription() = default;
AudioDeviceDescription::~AudioDeviceDescription() = default;
AudioDeviceDescription::AudioDeviceDescription(
const AudioDeviceDescription& other) = default;
AudioDeviceDescription& AudioDeviceDescription::operator=(
const AudioDeviceDescription& other) = default;
AudioDeviceDescription::AudioDeviceDescription(AudioDeviceDescription&& other) =
default;
AudioDeviceDescription& AudioDeviceDescription::operator=(
AudioDeviceDescription&& other) = default;
AudioDeviceDescription::AudioDeviceDescription(std::string device_name,
std::string unique_id,
std::string group_id,
bool is_system_default,
bool is_communications_device)
: … { … }
bool AudioDeviceDescription::operator==(
const AudioDeviceDescription& other) const { … }
}