#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/host/linux/audio_pipe_reader.h"
#include <fcntl.h>
#include <stddef.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <utility>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/task/single_thread_task_runner.h"
namespace remoting {
namespace {
const int kSampleBytesPerSecond = …;
#if !defined(F_SETPIPE_SZ)
#define F_SETPIPE_SZ …
#endif
}
scoped_refptr<AudioPipeReader> AudioPipeReader::Create(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::FilePath& pipe_path) { … }
AudioPipeReader::AudioPipeReader(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
const base::FilePath& pipe_path)
: … { … }
AudioPipeReader::~AudioPipeReader() = default;
void AudioPipeReader::AddObserver(StreamObserver* observer) { … }
void AudioPipeReader::RemoveObserver(StreamObserver* observer) { … }
void AudioPipeReader::StartOnAudioThread() { … }
void AudioPipeReader::OnDirectoryChanged(const base::FilePath& path,
bool error) { … }
void AudioPipeReader::TryOpenPipe() { … }
void AudioPipeReader::StartTimer() { … }
void AudioPipeReader::DoCapture() { … }
void AudioPipeReader::WaitForPipeReadable() { … }
void AudioPipeReaderTraits::Destruct(const AudioPipeReader* audio_pipe_reader) { … }
}