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 <memory> | 10 #include <memory> |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 | 60 |
61 namespace gpu { | 61 namespace gpu { |
62 namespace gles2 { | 62 namespace gles2 { |
63 class GLES2Interface; | 63 class GLES2Interface; |
64 } | 64 } |
65 } | 65 } |
66 | 66 |
67 namespace media { | 67 namespace media { |
68 class AudioHardwareConfig; | 68 class AudioHardwareConfig; |
69 class ChunkDemuxer; | 69 class ChunkDemuxer; |
| 70 class DemuxerStream; |
70 class GpuVideoAcceleratorFactories; | 71 class GpuVideoAcceleratorFactories; |
71 class MediaLog; | 72 class MediaLog; |
72 class UrlIndex; | 73 class UrlIndex; |
73 class VideoFrameCompositor; | 74 class VideoFrameCompositor; |
74 class WebAudioSourceProviderImpl; | 75 class WebAudioSourceProviderImpl; |
75 class WebMediaPlayerDelegate; | 76 class WebMediaPlayerDelegate; |
76 class WebTextTrackImpl; | 77 class WebTextTrackImpl; |
77 | 78 |
78 // The canonical implementation of blink::WebMediaPlayer that's backed by | 79 // The canonical implementation of blink::WebMediaPlayer that's backed by |
79 // Pipeline. Handles normal resource loading, Media Source, and | 80 // Pipeline. Handles normal resource loading, Media Source, and |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 void StartPipeline(); | 275 void StartPipeline(); |
275 | 276 |
276 // Helpers that set the network/ready state and notifies the client if | 277 // Helpers that set the network/ready state and notifies the client if |
277 // they've changed. | 278 // they've changed. |
278 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); | 279 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); |
279 void SetReadyState(blink::WebMediaPlayer::ReadyState state); | 280 void SetReadyState(blink::WebMediaPlayer::ReadyState state); |
280 | 281 |
281 // Gets the duration value reported by the pipeline. | 282 // Gets the duration value reported by the pipeline. |
282 double GetPipelineDuration() const; | 283 double GetPipelineDuration() const; |
283 | 284 |
| 285 // Restarts playback of the given demuxer |stream| at the position |time| |
| 286 // after it has been re-enabled. |
| 287 void RestartStreamPlayback(DemuxerStream* stream, base::TimeDelta time); |
| 288 |
284 // Called by VideoRendererImpl on its internal thread with the new frame to be | 289 // Called by VideoRendererImpl on its internal thread with the new frame to be |
285 // painted. | 290 // painted. |
286 void FrameReady(const scoped_refptr<VideoFrame>& frame); | 291 void FrameReady(const scoped_refptr<VideoFrame>& frame); |
287 | 292 |
288 // Returns the current video frame from |compositor_|. Blocks until the | 293 // Returns the current video frame from |compositor_|. Blocks until the |
289 // compositor can return the frame. | 294 // compositor can return the frame. |
290 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); | 295 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); |
291 | 296 |
292 // Called when the demuxer encounters encrypted streams. | 297 // Called when the demuxer encounters encrypted streams. |
293 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, | 298 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 // state will be set to YES or NO respectively if a frame is available. | 512 // state will be set to YES or NO respectively if a frame is available. |
508 enum class CanSuspendState { UNKNOWN, YES, NO }; | 513 enum class CanSuspendState { UNKNOWN, YES, NO }; |
509 CanSuspendState can_suspend_state_; | 514 CanSuspendState can_suspend_state_; |
510 | 515 |
511 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 516 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
512 }; | 517 }; |
513 | 518 |
514 } // namespace media | 519 } // namespace media |
515 | 520 |
516 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 521 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |