#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/audio/pulse/pulse_input.h"
#include <stdint.h>
#include "base/check.h"
#include "base/strings/stringprintf.h"
#include "media/audio/audio_device_description.h"
#include "media/audio/pulse/audio_manager_pulse.h"
#include "media/audio/pulse/pulse_util.h"
#include "media/base/audio_timestamp_helper.h"
namespace media {
AutoPulseLock;
WaitForOperationCompletion;
const int kNumberOfBlocksBufferInFifo = …;
PulseAudioInputStream::PulseAudioInputStream(
AudioManagerPulse* audio_manager,
const std::string& source_name,
const AudioParameters& params,
pa_threaded_mainloop* mainloop,
pa_context* context,
AudioManager::LogCallback log_callback)
: … { … }
PulseAudioInputStream::~PulseAudioInputStream() { … }
AudioInputStream::OpenOutcome PulseAudioInputStream::Open() { … }
void PulseAudioInputStream::Start(AudioInputCallback* callback) { … }
void PulseAudioInputStream::Stop() { … }
void PulseAudioInputStream::Close() { … }
double PulseAudioInputStream::GetMaxVolume() { … }
void PulseAudioInputStream::SetVolume(double volume) { … }
double PulseAudioInputStream::GetVolume() { … }
bool PulseAudioInputStream::IsMuted() { … }
void PulseAudioInputStream::SetOutputDeviceForAec(
const std::string& output_device_id) { … }
void PulseAudioInputStream::SendLogMessage(const char* format, ...) { … }
void PulseAudioInputStream::ReadCallback(pa_stream* handle,
size_t length,
void* user_data) { … }
void PulseAudioInputStream::VolumeCallback(pa_context* context,
const pa_source_info* info,
int error, void* user_data) { … }
void PulseAudioInputStream::MuteCallback(pa_context* context,
const pa_source_info* info,
int error,
void* user_data) { … }
void PulseAudioInputStream::StreamNotifyCallback(pa_stream* s,
void* user_data) { … }
void PulseAudioInputStream::ReadData() { … }
bool PulseAudioInputStream::GetSourceInformation(pa_source_info_cb_t callback) { … }
}