| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 void OnPipelineMetadata(PipelineMetadata metadata); | 195 void OnPipelineMetadata(PipelineMetadata metadata); |
| 191 void OnPipelineBufferingStateChanged(BufferingState buffering_state); | 196 void OnPipelineBufferingStateChanged(BufferingState buffering_state); |
| 192 void OnDemuxerOpened(); | 197 void OnDemuxerOpened(); |
| 193 void OnAddTextTrack(const TextTrackConfig& config, | 198 void OnAddTextTrack(const TextTrackConfig& config, |
| 194 const AddTextTrackDoneCB& done_cb); | 199 const AddTextTrackDoneCB& done_cb); |
| 195 | 200 |
| 196 // WebMediaPlayerDelegate::Observer implementation. | 201 // WebMediaPlayerDelegate::Observer implementation. |
| 197 void OnHidden() override; | 202 void OnHidden() override; |
| 198 void OnShown() override; | 203 void OnShown() override; |
| 199 | 204 |
| 205 #if defined(OS_ANDROID) // WMPI_CAST |
| 206 void requestRemotePlayback() override; |
| 207 void requestRemotePlaybackControl() override; |
| 208 |
| 209 void set_media_player_manager( |
| 210 RendererMediaPlayerManagerInterface* media_player_manager); |
| 211 void OnRemotePlaybackEnded(); |
| 212 void OnDisconnectedFromRemoteDevice(double t); |
| 213 void SuspendForRemote(); |
| 214 void DisplayCastFrameAfterSuspend(const scoped_refptr<VideoFrame>& new_frame, |
| 215 PipelineStatus status); |
| 216 gfx::Size GetCanvasSize() const; |
| 217 #endif |
| 218 |
| 200 private: | 219 private: |
| 220 // Ask for the pipeline to be suspended, will call Suspend() when ready. |
| 221 // (Possibly immediately.) |
| 222 void ScheduleSuspend(); |
| 223 |
| 201 // Initiate suspending the pipeline. | 224 // Initiate suspending the pipeline. |
| 202 void Suspend(); | 225 void Suspend(); |
| 203 | 226 |
| 227 // Ask for the pipeline to be resumed, will call Resume() when ready. |
| 228 // (Possibly immediately.) |
| 229 void ScheduleResume(); |
| 230 |
| 204 // Initiate resuming the pipeline. | 231 // Initiate resuming the pipeline. |
| 205 void Resume(); | 232 void Resume(); |
| 206 | 233 |
| 207 // Called after |defer_load_cb_| has decided to allow the load. If | 234 // Called after |defer_load_cb_| has decided to allow the load. If |
| 208 // |defer_load_cb_| is null this is called immediately. | 235 // |defer_load_cb_| is null this is called immediately. |
| 209 void DoLoad(LoadType load_type, | 236 void DoLoad(LoadType load_type, |
| 210 const blink::WebURL& url, | 237 const blink::WebURL& url, |
| 211 CORSMode cors_mode); | 238 CORSMode cors_mode); |
| 212 | 239 |
| 213 // Called after asynchronous initialization of a data source completed. | 240 // Called after asynchronous initialization of a data source completed. |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 401 // playback. | 428 // playback. |
| 402 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; | 429 scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; |
| 403 | 430 |
| 404 EncryptedMediaPlayerSupport encrypted_media_support_; | 431 EncryptedMediaPlayerSupport encrypted_media_support_; |
| 405 | 432 |
| 406 scoped_ptr<blink::WebContentDecryptionModuleResult> set_cdm_result_; | 433 scoped_ptr<blink::WebContentDecryptionModuleResult> set_cdm_result_; |
| 407 | 434 |
| 408 // Whether a CDM has been successfully attached. | 435 // Whether a CDM has been successfully attached. |
| 409 bool is_cdm_attached_; | 436 bool is_cdm_attached_; |
| 410 | 437 |
| 438 #if defined(OS_ANDROID) // WMPI_CAST |
| 439 WebMediaPlayerCast cast_impl_; |
| 440 #endif |
| 441 |
| 411 scoped_ptr<RendererFactory> renderer_factory_; | 442 scoped_ptr<RendererFactory> renderer_factory_; |
| 412 | 443 |
| 413 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 444 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 414 }; | 445 }; |
| 415 | 446 |
| 416 } // namespace media | 447 } // namespace media |
| 417 | 448 |
| 418 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 449 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |