#include "services/audio/public/cpp/input_ipc.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "media/mojo/common/input_error_code_converter.h"
#include "media/mojo/mojom/audio_data_pipe.mojom.h"
#include "media/mojo/mojom/audio_processing.mojom.h"
#include "mojo/public/cpp/bindings/remote.h"
namespace audio {
InputIPC::InputIPC(
mojo::PendingRemote<media::mojom::AudioStreamFactory> stream_factory,
const std::string& device_id,
mojo::PendingRemote<media::mojom::AudioLog> log)
: … { … }
InputIPC::~InputIPC() = default;
void InputIPC::CreateStream(media::AudioInputIPCDelegate* delegate,
const media::AudioParameters& params,
bool automatic_gain_control,
uint32_t total_segments) { … }
void InputIPC::StreamCreated(
media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
bool initially_muted,
const std::optional<base::UnguessableToken>& stream_id) { … }
void InputIPC::RecordStream() { … }
void InputIPC::SetVolume(double volume) { … }
void InputIPC::SetOutputDeviceForAec(const std::string& output_device_id) { … }
void InputIPC::CloseStream() { … }
void InputIPC::OnError(media::mojom::InputStreamErrorCode code) { … }
void InputIPC::OnMutedStateChanged(bool is_muted) { … }
}