#include "components/cast_streaming/browser/control/renderer_control_multiplexer.h"
#include "base/task/bind_post_task.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/time.h"
namespace cast_streaming {
namespace {
constexpr base::TimeDelta kStartPlaybackDelay = …;
}
RendererControlMultiplexer::RendererControlMultiplexer(
mojo::Remote<media::mojom::Renderer> renderer_remote,
scoped_refptr<base::SequencedTaskRunner> task_runner)
: … { … }
RendererControlMultiplexer::~RendererControlMultiplexer() = default;
void RendererControlMultiplexer::RegisterController(
mojo::PendingReceiver<media::mojom::Renderer> controls) { … }
void RendererControlMultiplexer::TryStartPlayback(base::TimeDelta time) { … }
void RendererControlMultiplexer::TryStartPlaybackAfterDelay(
base::TimeDelta time) { … }
void RendererControlMultiplexer::StartPlayingFrom(base::TimeDelta time) { … }
void RendererControlMultiplexer::SetPlaybackRate(double playback_rate) { … }
void RendererControlMultiplexer::SetVolume(float volume) { … }
void RendererControlMultiplexer::SetCdm(
const std::optional<::base::UnguessableToken>& cdm_id,
SetCdmCallback callback) { … }
void RendererControlMultiplexer::SetLatencyHint(
std::optional<base::TimeDelta> latency_hint) { … }
void RendererControlMultiplexer::Initialize(
mojo::PendingAssociatedRemote<media::mojom::RendererClient> client,
std::optional<
std::vector<::mojo::PendingRemote<::media::mojom::DemuxerStream>>>
streams,
media::mojom::MediaUrlParamsPtr media_url_params,
InitializeCallback callback) { … }
void RendererControlMultiplexer::Flush(FlushCallback callback) { … }
void RendererControlMultiplexer::OnMojoDisconnect() { … }
void RendererControlMultiplexer::OnFlushComplete(FlushCallback callback) { … }
}