#include "services/audio/output_stream.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/strings/stringprintf.h"
#include "base/task/sequenced_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "third_party/abseil-cpp/absl/utility/utility.h"
namespace audio {
std::string GetCtorLogString(media::AudioManager* audio_manager,
const std::string& device_id,
const media::AudioParameters& params) { … }
class AudibilityHelperImpl : public OutputStream::AudibilityHelper { … };
OutputStream::OutputStream(
CreatedCallback created_callback,
DeleteCallback delete_callback,
ManagedDeviceOutputStreamCreateCallback
managed_device_output_stream_create_callback,
mojo::PendingReceiver<media::mojom::AudioOutputStream> stream_receiver,
mojo::PendingReceiver<media::mojom::DeviceSwitchInterface>
device_switch_receiver,
mojo::PendingAssociatedRemote<media::mojom::AudioOutputStreamObserver>
observer,
mojo::PendingRemote<media::mojom::AudioLog> log,
media::AudioManager* audio_manager,
const std::string& output_device_id,
const media::AudioParameters& params,
LoopbackCoordinator* coordinator,
const base::UnguessableToken& loopback_group_id)
: … { … }
OutputStream::~OutputStream() { … }
void OutputStream::Play() { … }
void OutputStream::Pause() { … }
void OutputStream::Flush() { … }
void OutputStream::SetVolume(double volume) { … }
void OutputStream::SwitchAudioOutputDeviceId(
const std::string& output_device_id) { … }
void OutputStream::CreateAudioPipe(CreatedCallback created_callback) { … }
void OutputStream::OnControllerPlaying() { … }
void OutputStream::OnControllerPaused() { … }
void OutputStream::OnControllerError() { … }
void OutputStream::OnLog(std::string_view message) { … }
void OutputStream::OnError() { … }
void OutputStream::CallDeleter() { … }
void OutputStream::OnAudibleStateChanged(bool is_audible) { … }
void OutputStream::SendLogMessage(const char* format, ...) { … }
std::unique_ptr<OutputStream::AudibilityHelper>
OutputStream::MakeAudibilityHelperForTest() { … }
}