#include "media/audio/audio_system_impl.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/task/bind_post_task.h"
#include "base/task/single_thread_task_runner.h"
#include "media/audio/audio_device_description.h"
#include "media/audio/audio_manager.h"
namespace media {
namespace {
void GetInputStreamParametersOnAudioThread(
AudioManager* audio_manager,
const std::string& device_id,
AudioSystem::OnAudioParamsCallback on_params_cb) { … }
void GetOutputStreamParametersOnAudioThread(
AudioManager* audio_manager,
const std::string& device_id,
AudioSystem::OnAudioParamsCallback on_params_cb) { … }
void HasInputDevicesOnAudioThread(
AudioManager* audio_manager,
AudioSystem::OnBoolCallback on_has_devices_cb) { … }
void HasOutputDevicesOnAudioThread(
AudioManager* audio_manager,
AudioSystem::OnBoolCallback on_has_devices_cb) { … }
void GetDeviceDescriptionsOnAudioThread(
AudioManager* audio_manager,
bool for_input,
AudioSystem::OnDeviceDescriptionsCallback on_descriptions_cb) { … }
void GetAssociatedOutputDeviceIDOnAudioThread(
AudioManager* audio_manager,
const std::string& input_device_id,
AudioSystem::OnDeviceIdCallback on_device_id_cb) { … }
void GetInputDeviceInfoOnAudioThread(
AudioManager* audio_manager,
const std::string& input_device_id,
AudioSystem::OnInputDeviceInfoCallback on_input_device_info_cb) { … }
}
template <typename... Args>
inline base::OnceCallback<void(Args...)>
AudioSystemImpl::MaybeBindToCurrentLoop(
base::OnceCallback<void(Args...)> callback) { … }
std::unique_ptr<AudioSystem> AudioSystemImpl::CreateInstance() { … }
AudioSystemImpl::AudioSystemImpl(AudioManager* audio_manager)
: … { … }
void AudioSystemImpl::GetInputStreamParameters(
const std::string& device_id,
OnAudioParamsCallback on_params_cb) { … }
void AudioSystemImpl::GetOutputStreamParameters(
const std::string& device_id,
OnAudioParamsCallback on_params_cb) { … }
void AudioSystemImpl::HasInputDevices(OnBoolCallback on_has_devices_cb) { … }
void AudioSystemImpl::HasOutputDevices(OnBoolCallback on_has_devices_cb) { … }
void AudioSystemImpl::GetDeviceDescriptions(
bool for_input,
OnDeviceDescriptionsCallback on_descriptions_cb) { … }
void AudioSystemImpl::GetAssociatedOutputDeviceID(
const std::string& input_device_id,
OnDeviceIdCallback on_device_id_cb) { … }
void AudioSystemImpl::GetInputDeviceInfo(
const std::string& input_device_id,
OnInputDeviceInfoCallback on_input_device_info_cb) { … }
}