#include "media/mojo/clients/mojo_renderer.h"
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "media/base/cdm_context.h"
#include "media/base/media_resource.h"
#include "media/base/pipeline_status.h"
#include "media/base/renderer_client.h"
#include "media/base/video_renderer_sink.h"
#include "media/mojo/clients/mojo_demuxer_stream_impl.h"
#include "media/mojo/common/media_type_converters.h"
#include "media/renderers/video_overlay_factory.h"
namespace media {
MojoRenderer::MojoRenderer(
const scoped_refptr<base::SequencedTaskRunner>& task_runner,
std::unique_ptr<VideoOverlayFactory> video_overlay_factory,
VideoRendererSink* video_renderer_sink,
mojo::PendingRemote<mojom::Renderer> remote_renderer)
: … { … }
MojoRenderer::~MojoRenderer() { … }
void MojoRenderer::Initialize(MediaResource* media_resource,
media::RendererClient* client,
PipelineStatusCallback init_cb) { … }
void MojoRenderer::InitializeRendererFromStreams(
media::RendererClient* client) { … }
void MojoRenderer::InitializeRendererFromUrl(media::RendererClient* client) { … }
void MojoRenderer::SetCdm(CdmContext* cdm_context,
CdmAttachedCB cdm_attached_cb) { … }
void MojoRenderer::SetLatencyHint(std::optional<base::TimeDelta> latency_hint) { … }
void MojoRenderer::Flush(base::OnceClosure flush_cb) { … }
void MojoRenderer::StartPlayingFrom(base::TimeDelta time) { … }
void MojoRenderer::SetPlaybackRate(double playback_rate) { … }
void MojoRenderer::SetVolume(float volume) { … }
base::TimeDelta MojoRenderer::GetMediaTime() { … }
RendererType MojoRenderer::GetRendererType() { … }
void MojoRenderer::OnTimeUpdate(base::TimeDelta time,
base::TimeDelta max_time,
base::TimeTicks capture_time) { … }
void MojoRenderer::OnBufferingStateChange(BufferingState state,
BufferingStateChangeReason reason) { … }
void MojoRenderer::OnEnded() { … }
void MojoRenderer::OnError(const PipelineStatus& status) { … }
void MojoRenderer::OnVideoNaturalSizeChange(const gfx::Size& size) { … }
void MojoRenderer::OnVideoOpacityChange(bool opaque) { … }
void MojoRenderer::OnAudioConfigChange(const AudioDecoderConfig& config) { … }
void MojoRenderer::OnVideoConfigChange(const VideoDecoderConfig& config) { … }
void MojoRenderer::OnStatisticsUpdate(const PipelineStatistics& stats) { … }
void MojoRenderer::OnWaiting(WaitingReason reason) { … }
void MojoRenderer::OnConnectionError() { … }
void MojoRenderer::OnDemuxerStreamConnectionError(
MojoDemuxerStreamImpl* stream) { … }
void MojoRenderer::BindRemoteRendererIfNeeded() { … }
void MojoRenderer::OnInitialized(media::RendererClient* client, bool success) { … }
void MojoRenderer::OnFlushed() { … }
void MojoRenderer::OnCdmAttached(bool success) { … }
void MojoRenderer::CancelPendingCallbacks() { … }
}