OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_RENDERER_H_ | 5 #ifndef MEDIA_MOJO_CLIENTS_MOJO_RENDERER_H_ |
6 #define MEDIA_MOJO_CLIENTS_MOJO_RENDERER_H_ | 6 #define MEDIA_MOJO_CLIENTS_MOJO_RENDERER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void OnVideoNaturalSizeChange(const gfx::Size& size) override; | 66 void OnVideoNaturalSizeChange(const gfx::Size& size) override; |
67 void OnVideoOpacityChange(bool opaque) override; | 67 void OnVideoOpacityChange(bool opaque) override; |
68 void OnWaitingForDecryptionKey() override; | 68 void OnWaitingForDecryptionKey() override; |
69 void OnStatisticsUpdate(const PipelineStatistics& stats) override; | 69 void OnStatisticsUpdate(const PipelineStatistics& stats) override; |
70 | 70 |
71 // Binds |remote_renderer_| to the mojo message pipe. Can be called multiple | 71 // Binds |remote_renderer_| to the mojo message pipe. Can be called multiple |
72 // times. If an error occurs during connection, OnConnectionError will be | 72 // times. If an error occurs during connection, OnConnectionError will be |
73 // called asynchronously. | 73 // called asynchronously. |
74 void BindRemoteRendererIfNeeded(); | 74 void BindRemoteRendererIfNeeded(); |
75 | 75 |
| 76 // Initialize the remote renderer when |demuxer_stream_provider| is of type |
| 77 // DemuxerSteamProvider::Type::STREAM. |
| 78 void InitializeRendererFromStreams(media::RendererClient* client); |
| 79 |
| 80 // Initialize the remote renderer when |demuxer_stream_provider| is of type |
| 81 // DemuxerSteamProvider::Type::URL. |
| 82 void InitializeRendererFromUrl(media::RendererClient* client); |
| 83 |
76 // Callback for connection error on |remote_renderer_|. | 84 // Callback for connection error on |remote_renderer_|. |
77 void OnConnectionError(); | 85 void OnConnectionError(); |
78 | 86 |
79 // Callback for connection error on |audio_stream_| and |video_stream_|. | 87 // Callback for connection error on |audio_stream_| and |video_stream_|. |
80 void OnDemuxerStreamConnectionError(DemuxerStream::Type type); | 88 void OnDemuxerStreamConnectionError(DemuxerStream::Type type); |
81 | 89 |
82 // Callbacks for |remote_renderer_| methods. | 90 // Callbacks for |remote_renderer_| methods. |
83 void OnInitialized(media::RendererClient* client, bool success); | 91 void OnInitialized(media::RendererClient* client, bool success); |
84 void OnFlushed(); | 92 void OnFlushed(); |
85 void OnCdmAttached(bool success); | 93 void OnCdmAttached(bool success); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // Lock used to serialize access for |time_|. | 142 // Lock used to serialize access for |time_|. |
135 mutable base::Lock lock_; | 143 mutable base::Lock lock_; |
136 base::TimeDelta time_; | 144 base::TimeDelta time_; |
137 | 145 |
138 DISALLOW_COPY_AND_ASSIGN(MojoRenderer); | 146 DISALLOW_COPY_AND_ASSIGN(MojoRenderer); |
139 }; | 147 }; |
140 | 148 |
141 } // namespace media | 149 } // namespace media |
142 | 150 |
143 #endif // MEDIA_MOJO_CLIENTS_MOJO_RENDERER_H_ | 151 #endif // MEDIA_MOJO_CLIENTS_MOJO_RENDERER_H_ |
OLD | NEW |