#include "media/base/decoder_buffer.h"
#include <sstream>
#include "base/containers/heap_array.h"
#include "base/debug/alias.h"
#include "media/base/subsample_entry.h"
namespace media {
DecoderBuffer::TimeInfo::TimeInfo() = default;
DecoderBuffer::TimeInfo::~TimeInfo() = default;
DecoderBuffer::TimeInfo::TimeInfo(const TimeInfo&) = default;
DecoderBuffer::TimeInfo& DecoderBuffer::TimeInfo::operator=(const TimeInfo&) =
default;
DecoderBuffer::DecoderBuffer(size_t size) : … { … }
DecoderBuffer::DecoderBuffer(base::span<const uint8_t> data)
: … { … }
DecoderBuffer::DecoderBuffer(base::HeapArray<uint8_t> data)
: … { … }
DecoderBuffer::DecoderBuffer(base::ReadOnlySharedMemoryMapping mapping,
size_t size)
: … { … }
DecoderBuffer::DecoderBuffer(base::WritableSharedMemoryMapping mapping,
size_t size)
: … { … }
DecoderBuffer::DecoderBuffer(std::unique_ptr<ExternalMemory> external_memory)
: … { … }
DecoderBuffer::DecoderBuffer(DecoderBufferType decoder_buffer_type)
: … { … }
DecoderBuffer::~DecoderBuffer() = default;
void DecoderBuffer::Initialize() { … }
scoped_refptr<DecoderBuffer> DecoderBuffer::CopyFrom(
base::span<const uint8_t> data) { … }
scoped_refptr<DecoderBuffer> DecoderBuffer::FromArray(
base::HeapArray<uint8_t> data) { … }
scoped_refptr<DecoderBuffer> DecoderBuffer::FromSharedMemoryRegion(
base::UnsafeSharedMemoryRegion region,
uint64_t offset,
size_t size) { … }
scoped_refptr<DecoderBuffer> DecoderBuffer::FromSharedMemoryRegion(
base::ReadOnlySharedMemoryRegion region,
uint64_t offset,
size_t size) { … }
scoped_refptr<DecoderBuffer> DecoderBuffer::FromExternalMemory(
std::unique_ptr<ExternalMemory> external_memory) { … }
scoped_refptr<DecoderBuffer> DecoderBuffer::CreateEOSBuffer() { … }
bool DecoderBuffer::DoSubsamplesMatch(const DecoderBuffer& buffer) { … }
base::span<const uint8_t> DecoderBuffer::AsSpan() const { … }
DecoderBufferSideData& DecoderBuffer::WritableSideData() { … }
bool DecoderBuffer::MatchesMetadataForTesting(
const DecoderBuffer& buffer) const { … }
bool DecoderBuffer::MatchesForTesting(const DecoderBuffer& buffer) const { … }
std::string DecoderBuffer::AsHumanReadableString(bool verbose) const { … }
void DecoderBuffer::set_timestamp(base::TimeDelta timestamp) { … }
size_t DecoderBuffer::GetMemoryUsage() const { … }
}