#include "media/base/serial_runner.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
namespace media {
static void RunClosure(base::OnceClosure closure,
PipelineStatusCallback status_cb) { … }
static void RunBoundClosure(SerialRunner::BoundClosure bound_closure,
PipelineStatusCallback status_cb) { … }
static void RunOnTaskRunner(
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
PipelineStatusCallback status_cb,
PipelineStatus last_status) { … }
SerialRunner::Queue::Queue() = default;
SerialRunner::Queue::Queue(Queue&& other) = default;
SerialRunner::Queue::~Queue() = default;
void SerialRunner::Queue::Push(base::OnceClosure closure) { … }
void SerialRunner::Queue::Push(BoundClosure bound_closure) { … }
void SerialRunner::Queue::Push(BoundPipelineStatusCallback bound_status_cb) { … }
SerialRunner::BoundPipelineStatusCallback SerialRunner::Queue::Pop() { … }
bool SerialRunner::Queue::empty() { … }
SerialRunner::SerialRunner(Queue&& bound_fns, PipelineStatusCallback done_cb)
: … { … }
SerialRunner::~SerialRunner() = default;
std::unique_ptr<SerialRunner> SerialRunner::Run(
Queue&& bound_fns,
PipelineStatusCallback done_cb) { … }
void SerialRunner::RunNextInSeries(PipelineStatus last_status) { … }
}