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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 | 229 |
230 // Pipeline::Client overrides. | 230 // Pipeline::Client overrides. |
231 void OnError(PipelineStatus status) override; | 231 void OnError(PipelineStatus status) override; |
232 void OnEnded() override; | 232 void OnEnded() override; |
233 void OnMetadata(PipelineMetadata metadata) override; | 233 void OnMetadata(PipelineMetadata metadata) override; |
234 void OnBufferingStateChange(BufferingState state) override; | 234 void OnBufferingStateChange(BufferingState state) override; |
235 void OnDurationChange() override; | 235 void OnDurationChange() override; |
236 void OnAddTextTrack(const TextTrackConfig& config, | 236 void OnAddTextTrack(const TextTrackConfig& config, |
237 const AddTextTrackDoneCB& done_cb) override; | 237 const AddTextTrackDoneCB& done_cb) override; |
238 void OnWaitingForDecryptionKey() override; | 238 void OnWaitingForDecryptionKey() override; |
| 239 void OnVideoNaturalSizeChange(const gfx::Size& size) override; |
| 240 void OnVideoOpacityChange(bool opaque) override; |
239 | 241 |
240 // Actually seek. Avoids causing |should_notify_time_changed_| to be set when | 242 // Actually seek. Avoids causing |should_notify_time_changed_| to be set when |
241 // |time_updated| is false. | 243 // |time_updated| is false. |
242 void DoSeek(base::TimeDelta time, bool time_updated); | 244 void DoSeek(base::TimeDelta time, bool time_updated); |
243 | 245 |
244 // Ask for the renderer to be restarted (destructed and recreated). | 246 // Ask for the renderer to be restarted (destructed and recreated). |
245 void ScheduleRestart(); | 247 void ScheduleRestart(); |
246 | 248 |
247 // Called after |defer_load_cb_| has decided to allow the load. If | 249 // Called after |defer_load_cb_| has decided to allow the load. If |
248 // |defer_load_cb_| is null this is called immediately. | 250 // |defer_load_cb_| is null this is called immediately. |
(...skipping 16 matching lines...) Expand all Loading... |
265 void StartPipeline(); | 267 void StartPipeline(); |
266 | 268 |
267 // Helpers that set the network/ready state and notifies the client if | 269 // Helpers that set the network/ready state and notifies the client if |
268 // they've changed. | 270 // they've changed. |
269 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); | 271 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); |
270 void SetReadyState(blink::WebMediaPlayer::ReadyState state); | 272 void SetReadyState(blink::WebMediaPlayer::ReadyState state); |
271 | 273 |
272 // Gets the duration value reported by the pipeline. | 274 // Gets the duration value reported by the pipeline. |
273 double GetPipelineDuration() const; | 275 double GetPipelineDuration() const; |
274 | 276 |
275 // Callbacks from |pipeline_| that are forwarded to |client_|. | |
276 void OnNaturalSizeChanged(gfx::Size size); | |
277 void OnOpacityChanged(bool opaque); | |
278 | |
279 // Called by VideoRendererImpl on its internal thread with the new frame to be | 277 // Called by VideoRendererImpl on its internal thread with the new frame to be |
280 // painted. | 278 // painted. |
281 void FrameReady(const scoped_refptr<VideoFrame>& frame); | 279 void FrameReady(const scoped_refptr<VideoFrame>& frame); |
282 | 280 |
283 // Returns the current video frame from |compositor_|. Blocks until the | 281 // Returns the current video frame from |compositor_|. Blocks until the |
284 // compositor can return the frame. | 282 // compositor can return the frame. |
285 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); | 283 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); |
286 | 284 |
287 // Called when the demuxer encounters encrypted streams. | 285 // Called when the demuxer encounters encrypted streams. |
288 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, | 286 void OnEncryptedMediaInitData(EmeInitDataType init_data_type, |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 // state will be set to YES or NO respectively if a frame is available. | 500 // state will be set to YES or NO respectively if a frame is available. |
503 enum class CanSuspendState { UNKNOWN, YES, NO }; | 501 enum class CanSuspendState { UNKNOWN, YES, NO }; |
504 CanSuspendState can_suspend_state_; | 502 CanSuspendState can_suspend_state_; |
505 | 503 |
506 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 504 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
507 }; | 505 }; |
508 | 506 |
509 } // namespace media | 507 } // namespace media |
510 | 508 |
511 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 509 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |