#include "components/mirroring/service/captured_audio_input.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "components/mirroring/mojom/session_observer.mojom.h"
#include "media/mojo/common/input_error_code_converter.h"
#include "media/mojo/mojom/audio_data_pipe.mojom.h"
#include "mojo/public/cpp/system/platform_handle.h"
namespace mirroring {
CapturedAudioInput::CapturedAudioInput(
StreamCreatorCallback callback,
mojo::Remote<mojom::SessionObserver>& observer)
: … { … }
CapturedAudioInput::~CapturedAudioInput() { … }
void CapturedAudioInput::CreateStream(media::AudioInputIPCDelegate* delegate,
const media::AudioParameters& params,
bool automatic_gain_control,
uint32_t total_segments) { … }
void CapturedAudioInput::RecordStream() { … }
void CapturedAudioInput::SetVolume(double volume) { … }
void CapturedAudioInput::CloseStream() { … }
void CapturedAudioInput::SetOutputDeviceForAec(
const std::string& output_device_id) { … }
void CapturedAudioInput::StreamCreated(
mojo::PendingRemote<media::mojom::AudioInputStream> stream,
mojo::PendingReceiver<media::mojom::AudioInputStreamClient> client_receiver,
media::mojom::ReadOnlyAudioDataPipePtr data_pipe) { … }
void CapturedAudioInput::OnError(media::mojom::InputStreamErrorCode code) { … }
void CapturedAudioInput::OnMutedStateChanged(bool is_muted) { … }
}