OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 5 #ifndef MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 6 #define MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "media/blink/video_frame_compositor.h" | 29 #include "media/blink/video_frame_compositor.h" |
30 #include "media/blink/webmediaplayer_delegate.h" | 30 #include "media/blink/webmediaplayer_delegate.h" |
31 #include "media/blink/webmediaplayer_params.h" | 31 #include "media/blink/webmediaplayer_params.h" |
32 #include "media/blink/webmediaplayer_util.h" | 32 #include "media/blink/webmediaplayer_util.h" |
33 #include "media/renderers/skcanvas_video_renderer.h" | 33 #include "media/renderers/skcanvas_video_renderer.h" |
34 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" | 34 #include "third_party/WebKit/public/platform/WebAudioSourceProvider.h" |
35 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" | 35 #include "third_party/WebKit/public/platform/WebContentDecryptionModuleResult.h" |
36 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" | 36 #include "third_party/WebKit/public/platform/WebMediaPlayer.h" |
37 #include "url/gurl.h" | 37 #include "url/gurl.h" |
38 | 38 |
| 39 #if defined(OS_ANDROID) // WMPI_CAST |
| 40 // Delete this file when WMPI_CAST is no longer needed. |
| 41 #include "media/blink/webmediaplayer_cast_android.h" |
| 42 #endif |
| 43 |
39 namespace blink { | 44 namespace blink { |
40 class WebGraphicsContext3D; | 45 class WebGraphicsContext3D; |
41 class WebLocalFrame; | 46 class WebLocalFrame; |
42 class WebMediaPlayerClient; | 47 class WebMediaPlayerClient; |
43 class WebMediaPlayerEncryptedMediaClient; | 48 class WebMediaPlayerEncryptedMediaClient; |
44 } | 49 } |
45 | 50 |
46 namespace base { | 51 namespace base { |
47 class SingleThreadTaskRunner; | 52 class SingleThreadTaskRunner; |
48 class TaskRunner; | 53 class TaskRunner; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 void OnPipelineMetadata(PipelineMetadata metadata); | 188 void OnPipelineMetadata(PipelineMetadata metadata); |
184 void OnPipelineBufferingStateChanged(BufferingState buffering_state); | 189 void OnPipelineBufferingStateChanged(BufferingState buffering_state); |
185 void OnDemuxerOpened(); | 190 void OnDemuxerOpened(); |
186 void OnAddTextTrack(const TextTrackConfig& config, | 191 void OnAddTextTrack(const TextTrackConfig& config, |
187 const AddTextTrackDoneCB& done_cb); | 192 const AddTextTrackDoneCB& done_cb); |
188 | 193 |
189 // WebMediaPlayerDelegate::Observer implementation. | 194 // WebMediaPlayerDelegate::Observer implementation. |
190 void OnHidden() override; | 195 void OnHidden() override; |
191 void OnShown() override; | 196 void OnShown() override; |
192 | 197 |
| 198 #if defined(OS_ANDROID) // WMPI_CAST |
| 199 void requestRemotePlayback() override; |
| 200 void requestRemotePlaybackControl() override; |
| 201 |
| 202 void set_media_player_manager( |
| 203 RendererMediaPlayerManagerInterface* media_player_manager); |
| 204 void OnRemotePlaybackEnded(); |
| 205 void OnDisconnectedFromRemoteDevice(double t); |
| 206 void SuspendForRemote(const scoped_refptr<VideoFrame>& new_frame); |
| 207 void DisplayCastFrame(const scoped_refptr<VideoFrame>& new_frame, |
| 208 PipelineStatus status); |
| 209 gfx::Size GetCanvasSize() const; |
| 210 #endif |
| 211 |
193 private: | 212 private: |
194 // Initiate suspending the pipeline. | 213 // Initiate suspending the pipeline. |
195 void Suspend(); | 214 void Suspend(); |
196 | 215 |
197 // Initiate resuming the pipeline. | 216 // Initiate resuming the pipeline. |
198 void Resume(); | 217 void Resume(); |
199 | 218 |
200 // Called after |defer_load_cb_| has decided to allow the load. If | 219 // Called after |defer_load_cb_| has decided to allow the load. If |
201 // |defer_load_cb_| is null this is called immediately. | 220 // |defer_load_cb_| is null this is called immediately. |
202 void DoLoad(LoadType load_type, | 221 void DoLoad(LoadType load_type, |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 // The compositor layer for displaying the video content when using composited | 412 // The compositor layer for displaying the video content when using composited |
394 // playback. | 413 // playback. |
395 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; | 414 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; |
396 | 415 |
397 EncryptedMediaPlayerSupport encrypted_media_support_; | 416 EncryptedMediaPlayerSupport encrypted_media_support_; |
398 | 417 |
399 scoped_ptr<blink::WebContentDecryptionModuleResult> set_cdm_result_; | 418 scoped_ptr<blink::WebContentDecryptionModuleResult> set_cdm_result_; |
400 | 419 |
401 scoped_ptr<RendererFactory> renderer_factory_; | 420 scoped_ptr<RendererFactory> renderer_factory_; |
402 | 421 |
| 422 #if defined(OS_ANDROID) // WMPI_CAST |
| 423 WebMediaPlayerCast cast_impl_; |
| 424 #endif |
| 425 |
403 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 426 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
404 }; | 427 }; |
405 | 428 |
406 } // namespace media | 429 } // namespace media |
407 | 430 |
408 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 431 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |