| 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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 friend class WebMediaPlayerImplTest; | 253 friend class WebMediaPlayerImplTest; |
| 254 friend class WebMediaPlayerImplBackgroundBehaviorTest; | 254 friend class WebMediaPlayerImplBackgroundBehaviorTest; |
| 255 | 255 |
| 256 void EnableOverlay(); | 256 void EnableOverlay(); |
| 257 void DisableOverlay(); | 257 void DisableOverlay(); |
| 258 | 258 |
| 259 // Do we have overlay information? For CVV, this is a surface id. For | 259 // Do we have overlay information? For CVV, this is a surface id. For |
| 260 // AndroidOverlay, this is the routing token. | 260 // AndroidOverlay, this is the routing token. |
| 261 bool HaveOverlayInfo(); | 261 bool HaveOverlayInfo(); |
| 262 | 262 |
| 263 // Send the overlay surface ID / routing token to the decoder if we have it | 263 // Send OverlayInfo to the decoder. |
| 264 // and if it has been requested. | 264 // |
| 265 // If we've requested but not yet received the surface id or routing token, or |
| 266 // if there's no decoder-provided callback to send the overlay info, then this |
| 267 // call will do nothing. |
| 265 void MaybeSendOverlayInfoToDecoder(); | 268 void MaybeSendOverlayInfoToDecoder(); |
| 266 | 269 |
| 267 void OnPipelineSuspended(); | 270 void OnPipelineSuspended(); |
| 268 void OnBeforePipelineResume(); | 271 void OnBeforePipelineResume(); |
| 269 void OnPipelineResumed(); | 272 void OnPipelineResumed(); |
| 270 void OnDemuxerOpened(); | 273 void OnDemuxerOpened(); |
| 271 | 274 |
| 272 // Pipeline::Client overrides. | 275 // Pipeline::Client overrides. |
| 273 void OnError(PipelineStatus status) override; | 276 void OnError(PipelineStatus status) override; |
| 274 void OnEnded() override; | 277 void OnEnded() override; |
| (...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 | 772 |
| 770 // Use AndroidOverlay for overlays. | 773 // Use AndroidOverlay for overlays. |
| 771 kUseAndroidOverlay, | 774 kUseAndroidOverlay, |
| 772 }; | 775 }; |
| 773 | 776 |
| 774 OverlayMode overlay_mode_ = OverlayMode::kNoOverlays; | 777 OverlayMode overlay_mode_ = OverlayMode::kNoOverlays; |
| 775 | 778 |
| 776 // Optional callback to request the routing token for AndroidOverlay. | 779 // Optional callback to request the routing token for AndroidOverlay. |
| 777 RequestRoutingTokenCallback request_routing_token_cb_; | 780 RequestRoutingTokenCallback request_routing_token_cb_; |
| 778 | 781 |
| 779 // Routing token, if we have one. No value if we have a request pending to | 782 // If |overlay_routing_token_is_pending_| is false, then |
| 780 // get it via |request_routing_token_cb_|. A has_value() is_empty() token | 783 // |overlay_routing_token_| contains the routing token we should send, if any. |
| 781 // indicates that we requested and received an empty token. Note that we | 784 // Otherwise, |overlay_routing_token_| is undefined. We set the flag while |
| 782 // can't send an empty token via IPC, so we handle that specially. | 785 // we have a request for the token that hasn't been answered yet; i.e., it |
| 783 base::Optional<base::UnguessableToken> overlay_routing_token_; | 786 // means that we don't know what, if any, token we should be using. |
| 787 bool overlay_routing_token_is_pending_ = false; |
| 788 OverlayInfo::RoutingToken overlay_routing_token_; |
| 789 |
| 790 OverlayInfo overlay_info_; |
| 784 | 791 |
| 785 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); | 792 DISALLOW_COPY_AND_ASSIGN(WebMediaPlayerImpl); |
| 786 }; | 793 }; |
| 787 | 794 |
| 788 } // namespace media | 795 } // namespace media |
| 789 | 796 |
| 790 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ | 797 #endif // MEDIA_BLINK_WEBMEDIAPLAYER_IMPL_H_ |
| OLD | NEW |