chromium/media/audio/audio_device_description.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {
// Sanitize names which are known to contain the user's name, such as AirPods'
// default name as recommended in
// https://w3c.github.io/mediacapture-main/#sanitize-device-labels
// See crbug.com/1163072 and crbug.com/1293761 for background information..
constexpr char kAirpodsNameSubstring[] =;  // crbug.com/1163072

// On Windows 10, "... Hands-Free AG Audio" is a special profile with
// both microphone and speakers.  "... Stereo" is another special profile
// which supports higher quality audio. Windows 11 merges the two to avoid
// confusing the user.
// TODO(crbug.com/40255253): The strings are localized by the OS which
// should be taken into account.
constexpr char kProfileNameHandsFree[] =;
constexpr char kProfileNameStereo[] =;

void RedactDeviceName(std::string& name) {}

}  // namespace

// static
bool AudioDeviceDescription::IsDefaultDevice(const std::string& device_id) {}

// static
bool AudioDeviceDescription::IsCommunicationsDevice(
    const std::string& device_id) {}

// static
bool AudioDeviceDescription::IsLoopbackDevice(const std::string& device_id) {}

// static
bool AudioDeviceDescription::UseSessionIdToSelectDevice(
    const base::UnguessableToken& session_id,
    const std::string& device_id) {}

// static
std::string AudioDeviceDescription::GetDefaultDeviceName() {}

// static
std::string AudioDeviceDescription::GetCommunicationsDeviceName() {}

// static
std::string AudioDeviceDescription::GetDefaultDeviceName(
    const std::string& real_device_name) {}

// static
std::string AudioDeviceDescription::GetCommunicationsDeviceName(
    const std::string& real_device_name) {}

// static
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 {}

}  // namespace media