#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/base/seekable_buffer.h"
#include <algorithm>
#include "base/check_op.h"
#include "media/base/data_buffer.h"
#include "media/base/timestamp_constants.h"
namespace media {
SeekableBuffer::SeekableBuffer(int backward_capacity, int forward_capacity)
: … { … }
SeekableBuffer::~SeekableBuffer() = default;
void SeekableBuffer::Clear() { … }
int SeekableBuffer::Read(uint8_t* data, int size) { … }
int SeekableBuffer::Peek(uint8_t* data, int size, int forward_offset) { … }
bool SeekableBuffer::GetCurrentChunk(const uint8_t** data, int* size) const { … }
bool SeekableBuffer::Append(const scoped_refptr<DataBuffer>& buffer_in) { … }
bool SeekableBuffer::Append(const uint8_t* data, int size) { … }
bool SeekableBuffer::Seek(int32_t offset) { … }
bool SeekableBuffer::SeekForward(int size) { … }
bool SeekableBuffer::SeekBackward(int size) { … }
void SeekableBuffer::EvictBackwardBuffers() { … }
int SeekableBuffer::InternalRead(uint8_t* data,
int size,
bool advance_position,
int forward_offset) { … }
void SeekableBuffer::UpdateCurrentTime(BufferQueue::iterator buffer,
int offset) { … }
}