#include "media/mojo/common/mojo_decoder_buffer_converter.h"
#include <memory>
#include <tuple>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/trace_event/trace_event.h"
#include "media/base/audio_buffer.h"
#include "media/base/cdm_context.h"
#include "media/base/decoder_buffer.h"
#include "media/base/media_util.h"
#include "media/mojo/common/media_type_converters.h"
#include "media/mojo/common/mojo_pipe_read_write_util.h"
IsPipeReadWriteError;
namespace media {
bool CreateDataPipe(uint32_t capacity,
mojo::ScopedDataPipeProducerHandle* producer_handle,
mojo::ScopedDataPipeConsumerHandle* consumer_handle) { … }
uint32_t GetDefaultDecoderBufferConverterCapacity(DemuxerStream::Type type) { … }
std::unique_ptr<MojoDecoderBufferReader> MojoDecoderBufferReader::Create(
uint32_t capacity,
mojo::ScopedDataPipeProducerHandle* producer_handle) { … }
MojoDecoderBufferReader::MojoDecoderBufferReader(
mojo::ScopedDataPipeConsumerHandle consumer_handle)
: … { … }
MojoDecoderBufferReader::~MojoDecoderBufferReader() { … }
void MojoDecoderBufferReader::ReadDecoderBuffer(
mojom::DecoderBufferPtr mojo_buffer,
ReadCB read_cb) { … }
void MojoDecoderBufferReader::Flush(base::OnceClosure flush_cb) { … }
bool MojoDecoderBufferReader::HasPendingReads() const { … }
void MojoDecoderBufferReader::CancelReadCB(ReadCB read_cb) { … }
void MojoDecoderBufferReader::CancelAllPendingReadCBs() { … }
void MojoDecoderBufferReader::CompleteCurrentRead() { … }
void MojoDecoderBufferReader::ScheduleNextRead() { … }
void MojoDecoderBufferReader::OnPipeReadable(
MojoResult result,
const mojo::HandleSignalsState& state) { … }
void MojoDecoderBufferReader::ProcessPendingReads() { … }
void MojoDecoderBufferReader::OnPipeError(MojoResult result) { … }
std::unique_ptr<MojoDecoderBufferWriter> MojoDecoderBufferWriter::Create(
uint32_t capacity,
mojo::ScopedDataPipeConsumerHandle* consumer_handle) { … }
MojoDecoderBufferWriter::MojoDecoderBufferWriter(
mojo::ScopedDataPipeProducerHandle producer_handle)
: … { … }
MojoDecoderBufferWriter::~MojoDecoderBufferWriter() { … }
void MojoDecoderBufferWriter::ScheduleNextWrite() { … }
mojom::DecoderBufferPtr MojoDecoderBufferWriter::WriteDecoderBuffer(
scoped_refptr<DecoderBuffer> media_buffer) { … }
void MojoDecoderBufferWriter::OnPipeWritable(
MojoResult result,
const mojo::HandleSignalsState& state) { … }
void MojoDecoderBufferWriter::ProcessPendingWrites() { … }
void MojoDecoderBufferWriter::OnPipeError(MojoResult result) { … }
}