#include "content/browser/media/audio_input_stream_broker.h"
#include <optional>
#include <utility>
#include "base/command_line.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/read_only_shared_memory_region.h"
#include "base/metrics/histogram_macros.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/media/audio_stream_broker_helper.h"
#include "content/browser/media/media_internals.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "media/audio/audio_logging.h"
#include "media/base/media_switches.h"
#include "media/base/user_input_monitor.h"
#include "media/mojo/mojom/audio_processing.mojom.h"
namespace content {
DisconnectReason;
InputStreamErrorCode;
AudioInputStreamBroker::AudioInputStreamBroker(
int render_process_id,
int render_frame_id,
const std::string& device_id,
const media::AudioParameters& params,
uint32_t shared_memory_count,
media::UserInputMonitorBase* user_input_monitor,
bool enable_agc,
media::mojom::AudioProcessingConfigPtr processing_config,
AudioStreamBroker::DeleterCallback deleter,
mojo::PendingRemote<blink::mojom::RendererAudioInputStreamFactoryClient>
renderer_factory_client)
: … { … }
AudioInputStreamBroker::~AudioInputStreamBroker() { … }
void AudioInputStreamBroker::CreateStream(
media::mojom::AudioStreamFactory* factory) { … }
void AudioInputStreamBroker::DidStartRecording() { … }
void AudioInputStreamBroker::StreamCreated(
mojo::PendingRemote<media::mojom::AudioInputStream> stream,
media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
bool initially_muted,
const std::optional<base::UnguessableToken>& stream_id) { … }
InputStreamErrorCode MapDisconnectReasonToErrorCode(DisconnectReason reason) { … }
void AudioInputStreamBroker::ObserverBindingLost(
uint32_t reason,
const std::string& description) { … }
void AudioInputStreamBroker::ClientBindingLost() { … }
void AudioInputStreamBroker::Cleanup() { … }
}