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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 // Helpers that set the network/ready state and notifies the client if | 261 // Helpers that set the network/ready state and notifies the client if |
262 // they've changed. | 262 // they've changed. |
263 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); | 263 void SetNetworkState(blink::WebMediaPlayer::NetworkState state); |
264 void SetReadyState(blink::WebMediaPlayer::ReadyState state); | 264 void SetReadyState(blink::WebMediaPlayer::ReadyState state); |
265 | 265 |
266 // Gets the duration value reported by the pipeline. | 266 // Gets the duration value reported by the pipeline. |
267 double GetPipelineDuration() const; | 267 double GetPipelineDuration() const; |
268 | 268 |
269 // Callbacks from |pipeline_| that are forwarded to |client_|. | 269 // Callbacks from |pipeline_| that are forwarded to |client_|. |
270 void OnDurationChanged(); | 270 void OnDurationChanged(); |
271 void OnNaturalSizeChanged(gfx::Size size); | 271 void OnNaturalSizeChanged(const gfx::Size& size); |
272 void OnOpacityChanged(bool opaque); | 272 void OnOpacityChanged(bool opaque); |
273 | 273 |
274 // Called by VideoRendererImpl on its internal thread with the new frame to be | 274 // Called by VideoRendererImpl on its internal thread with the new frame to be |
275 // painted. | 275 // painted. |
276 void FrameReady(const scoped_refptr<VideoFrame>& frame); | 276 void FrameReady(const scoped_refptr<VideoFrame>& frame); |
277 | 277 |
278 // Returns the current video frame from |compositor_|. Blocks until the | 278 // Returns the current video frame from |compositor_|. Blocks until the |
279 // compositor can return the frame. | 279 // compositor can return the frame. |
280 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); | 280 scoped_refptr<VideoFrame> GetCurrentFrameFromCompositor(); |
281 | 281 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 // state will be set to YES or NO respectively if a frame is available. | 496 // state will be set to YES or NO respectively if a frame is available. |
497 enum class CanSuspendState { UNKNOWN, YES, NO }; | 497 enum class CanSuspendState { UNKNOWN, YES, NO }; |
498 CanSuspendState can_suspend_state_; | 498 CanSuspendState can_suspend_state_; |
499 | 499 |
500 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 500 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
501 }; | 501 }; |
502 | 502 |
503 } // namespace media | 503 } // namespace media |
504 | 504 |
505 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 505 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
OLD | NEW |