#include "rtc_base/memory/fifo_buffer.h"
#include <algorithm>
#include "rtc_base/thread.h"
namespace rtc {
FifoBuffer::FifoBuffer(size_t size)
: … { … }
FifoBuffer::FifoBuffer(size_t size, Thread* owner)
: … { … }
FifoBuffer::~FifoBuffer() { … }
bool FifoBuffer::GetBuffered(size_t* size) const { … }
StreamState FifoBuffer::GetState() const { … }
StreamResult FifoBuffer::Read(rtc::ArrayView<uint8_t> buffer,
size_t& bytes_read,
int& error) { … }
StreamResult FifoBuffer::Write(rtc::ArrayView<const uint8_t> buffer,
size_t& bytes_written,
int& error) { … }
void FifoBuffer::Close() { … }
const void* FifoBuffer::GetReadData(size_t* size) { … }
void FifoBuffer::ConsumeReadData(size_t size) { … }
void* FifoBuffer::GetWriteBuffer(size_t* size) { … }
void FifoBuffer::ConsumeWriteBuffer(size_t size) { … }
StreamResult FifoBuffer::ReadLocked(void* buffer,
size_t bytes,
size_t* bytes_read) { … }
StreamResult FifoBuffer::WriteLocked(const void* buffer,
size_t bytes,
size_t* bytes_written) { … }
}