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

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

Issue 2383663002: Make mojo renderer capable of supporting multiple streams/tracks (Closed)
Patch Set: nit 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
« no previous file with comments | « no previous file | media/mojo/clients/mojo_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_renderer.h
diff --git a/media/mojo/clients/mojo_renderer.h b/media/mojo/clients/mojo_renderer.h
index 995a076368ae4106b4f791f8cc2bf81608edc996..65353219719983317a4146ae602897da2962d55d 100644
--- a/media/mojo/clients/mojo_renderer.h
+++ b/media/mojo/clients/mojo_renderer.h
@@ -7,6 +7,9 @@
#include <stdint.h>
+#include <memory>
+#include <vector>
+
#include "base/macros.h"
#include "base/time/default_tick_clock.h"
#include "base/unguessable_token.h"
@@ -96,8 +99,9 @@ class MojoRenderer : public Renderer, public mojom::RendererClient {
// Callback for connection error on |remote_renderer_|.
void OnConnectionError();
- // Callback for connection error on |audio_stream_| and |video_stream_|.
- void OnDemuxerStreamConnectionError(DemuxerStream::Type type);
+ // Callback for connection error on any of |streams_|. The |stream| parameter
+ // indicates which stream the error happened on.
+ void OnDemuxerStreamConnectionError(MojoDemuxerStreamImpl* stream);
// Callbacks for |remote_renderer_| methods.
void OnInitialized(media::RendererClient* client, bool success);
@@ -131,8 +135,7 @@ class MojoRenderer : public Renderer, public mojom::RendererClient {
// destroyed. The local demuxer streams returned by DemuxerStreamProvider
// cannot be used after |this| is destroyed.
// TODO(alokp): Add tests for MojoDemuxerStreamImpl.
- std::unique_ptr<MojoDemuxerStreamImpl> audio_stream_;
- std::unique_ptr<MojoDemuxerStreamImpl> video_stream_;
+ std::vector<std::unique_ptr<MojoDemuxerStreamImpl>> streams_;
// This class is constructed on one thread and used exclusively on another
// thread. This member is used to safely pass the RendererPtr from one thread
« no previous file with comments | « no previous file | media/mojo/clients/mojo_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698