Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1352)

Unified Diff: media/mojo/clients/mojo_renderer.h

Issue 2491043003: MediaResource refactoring to support multiple streams (Closed)
Patch Set: rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/mojo/clients/mojo_renderer.h
diff --git a/media/mojo/clients/mojo_renderer.h b/media/mojo/clients/mojo_renderer.h
index 65353219719983317a4146ae602897da2962d55d..7e0ad6ab2bd416d1e4557318baf0e83956299c90 100644
--- a/media/mojo/clients/mojo_renderer.h
+++ b/media/mojo/clients/mojo_renderer.h
@@ -25,7 +25,7 @@ class SingleThreadTaskRunner;
namespace media {
-class DemuxerStreamProvider;
+class MediaResource;
class MojoDemuxerStreamImpl;
class VideoOverlayFactory;
class VideoRendererSink;
@@ -49,7 +49,7 @@ class MojoRenderer : public Renderer, public mojom::RendererClient {
~MojoRenderer() override;
// Renderer implementation.
- void Initialize(DemuxerStreamProvider* demuxer_stream_provider,
+ void Initialize(MediaResource* media_resource,
media::RendererClient* client,
const PipelineStatusCB& init_cb) override;
void SetCdm(CdmContext* cdm_context,
@@ -88,12 +88,12 @@ class MojoRenderer : public Renderer, public mojom::RendererClient {
// called asynchronously.
void BindRemoteRendererIfNeeded();
- // Initialize the remote renderer when |demuxer_stream_provider| is of type
- // DemuxerSteamProvider::Type::STREAM.
+ // Initialize the remote renderer when |media_resource| is of type
+ // MediaResource::Type::STREAM.
void InitializeRendererFromStreams(media::RendererClient* client);
- // Initialize the remote renderer when |demuxer_stream_provider| is of type
- // DemuxerSteamProvider::Type::URL.
+ // Initialize the remote renderer when |media_resource| is of type
+ // MediaResource::Type::URL.
void InitializeRendererFromUrl(media::RendererClient* client);
// Callback for connection error on |remote_renderer_|.
@@ -124,7 +124,7 @@ class MojoRenderer : public Renderer, public mojom::RendererClient {
// Provider of audio/video DemuxerStreams. Must be valid throughout the
// lifetime of |this|.
- DemuxerStreamProvider* demuxer_stream_provider_ = nullptr;
+ MediaResource* media_resource_ = nullptr;
// Client of |this| renderer passed in Initialize.
media::RendererClient* client_ = nullptr;
@@ -132,7 +132,7 @@ class MojoRenderer : public Renderer, public mojom::RendererClient {
// Mojo demuxer streams.
// Owned by MojoRenderer instead of remote mojom::Renderer
// becuase these demuxer streams need to be destroyed as soon as |this| is
- // destroyed. The local demuxer streams returned by DemuxerStreamProvider
+ // destroyed. The local demuxer streams returned by MediaResource
xhwang 2017/02/01 18:26:04 nit: reflow comments
servolk 2017/02/01 22:29:17 Done.
// cannot be used after |this| is destroyed.
// TODO(alokp): Add tests for MojoDemuxerStreamImpl.
std::vector<std::unique_ptr<MojoDemuxerStreamImpl>> streams_;

Powered by Google App Engine
This is Rietveld 408576698