Chromium Code Reviews| 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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 252 friend class WebMediaPlayerImplTest; | 252 friend class WebMediaPlayerImplTest; |
| 253 friend class WebMediaPlayerImplBackgroundBehaviorTest; | 253 friend class WebMediaPlayerImplBackgroundBehaviorTest; |
| 254 | 254 |
| 255 void EnableOverlay(); | 255 void EnableOverlay(); |
| 256 void DisableOverlay(); | 256 void DisableOverlay(); |
| 257 | 257 |
| 258 // Do we have overlay information? For CVV, this is a surface id. For | 258 // Do we have overlay information? For CVV, this is a surface id. For |
| 259 // AndroidOverlay, this is the routing token. | 259 // AndroidOverlay, this is the routing token. |
| 260 bool HaveOverlayInfo(); | 260 bool HaveOverlayInfo(); |
| 261 | 261 |
| 262 // Send the overlay surface ID / routing token to the decoder if we have it | 262 // Send OverlayInfo to the decoder. If |send_factory_info| is true, then this |
| 263 // and if it has been requested. | 263 // will include the surface ID / routing token. Note that this may cause the |
| 264 void MaybeSendOverlayInfoToDecoder(); | 264 // decoder to change factories, since it probably doesn't de-duplicate these. |
| 265 // We will also include the current fullscreen state. | |
| 266 // | |
| 267 // If we've requested but not yet received the factory info, or if there's | |
| 268 // no decoder-provided callback to send the overlay info, then this call will | |
| 269 // do nothing. | |
| 270 void MaybeSendOverlayInfoToDecoder(bool send_factory_info); | |
|
watk
2017/05/25 18:09:36
"factory info" is a pretty opaque term to me. It w
liberato (no reviews please)
2017/05/25 21:26:56
Done.
| |
| 265 | 271 |
| 266 void OnPipelineSuspended(); | 272 void OnPipelineSuspended(); |
| 267 void OnBeforePipelineResume(); | 273 void OnBeforePipelineResume(); |
| 268 void OnPipelineResumed(); | 274 void OnPipelineResumed(); |
| 269 void OnDemuxerOpened(); | 275 void OnDemuxerOpened(); |
| 270 | 276 |
| 271 // Pipeline::Client overrides. | 277 // Pipeline::Client overrides. |
| 272 void OnError(PipelineStatus status) override; | 278 void OnError(PipelineStatus status) override; |
| 273 void OnEnded() override; | 279 void OnEnded() override; |
| 274 void OnMetadata(PipelineMetadata metadata) override; | 280 void OnMetadata(PipelineMetadata metadata) override; |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 768 | 774 |
| 769 // Use AndroidOverlay for overlays. | 775 // Use AndroidOverlay for overlays. |
| 770 kUseAndroidOverlay, | 776 kUseAndroidOverlay, |
| 771 }; | 777 }; |
| 772 | 778 |
| 773 OverlayMode overlay_mode_ = OverlayMode::kNoOverlays; | 779 OverlayMode overlay_mode_ = OverlayMode::kNoOverlays; |
| 774 | 780 |
| 775 // Optional callback to request the routing token for AndroidOverlay. | 781 // Optional callback to request the routing token for AndroidOverlay. |
| 776 RequestRoutingTokenCallback request_routing_token_cb_; | 782 RequestRoutingTokenCallback request_routing_token_cb_; |
| 777 | 783 |
| 778 // Routing token, if we have one. No value if we have a request pending to | 784 // Routing token, if we have one. If |!overlay_routing_token_|, then we have |
| 779 // get it via |request_routing_token_cb_|. A has_value() is_empty() token | 785 // requested but not yet received one. If |overlay_routing_token_|, but |
| 780 // indicates that we requested and received an empty token. Note that we | 786 // |!(*overlay_routing_token_)|, then there is no routing token (i.e., do not |
| 781 // can't send an empty token via IPC, so we handle that specially. | 787 // use overlays). |
|
watk
2017/05/25 18:09:36
This is really confusing. There's three levels of
liberato (no reviews please)
2017/05/25 21:26:56
i cleaned up the description.
i don't think that
| |
| 782 base::Optional<base::UnguessableToken> overlay_routing_token_; | 788 base::Optional<OverlayInfo::RoutingToken> overlay_routing_token_; |
| 789 | |
| 790 // Is the player fullscreen? | |
|
watk
2017/05/25 18:09:36
Comment can be deleted IMO
liberato (no reviews please)
2017/05/25 21:26:56
Done.
| |
| 791 bool is_fullscreen_ = false; | |
| 783 | 792 |
| 784 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 793 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 785 }; | 794 }; |
| 786 | 795 |
| 787 } // namespace media | 796 } // namespace media |
| 788 | 797 |
| 789 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 798 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |