| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ | 5 #ifndef MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ |
| 6 #define MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ | 6 #define MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "media/base/media_observer.h" | 10 #include "media/base/media_observer.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 scoped_refptr<RemotingSourceImpl> remoting_source); | 28 scoped_refptr<RemotingSourceImpl> remoting_source); |
| 29 ~RemotingRendererController() override; | 29 ~RemotingRendererController() override; |
| 30 | 30 |
| 31 // RemotingSourceImpl::Client implemenations. | 31 // RemotingSourceImpl::Client implemenations. |
| 32 void OnStarted(bool success) override; | 32 void OnStarted(bool success) override; |
| 33 void OnSessionStateChanged() override; | 33 void OnSessionStateChanged() override; |
| 34 | 34 |
| 35 // MediaObserver implementations. | 35 // MediaObserver implementations. |
| 36 void OnEnteredFullscreen() override; | 36 void OnEnteredFullscreen() override; |
| 37 void OnExitedFullscreen() override; | 37 void OnExitedFullscreen() override; |
| 38 void OnStablyFilledMostViewportChanged( |
| 39 bool is_mostly_filling_viewport) override; |
| 38 void OnSetCdm(CdmContext* cdm_context) override; | 40 void OnSetCdm(CdmContext* cdm_context) override; |
| 39 void OnMetadataChanged(const PipelineMetadata& metadata) override; | 41 void OnMetadataChanged(const PipelineMetadata& metadata) override; |
| 40 | 42 |
| 41 void SetSwitchRendererCallback(const base::Closure& cb); | 43 void SetSwitchRendererCallback(const base::Closure& cb); |
| 42 | 44 |
| 43 base::WeakPtr<RemotingRendererController> GetWeakPtr() { | 45 base::WeakPtr<RemotingRendererController> GetWeakPtr() { |
| 44 return weak_factory_.GetWeakPtr(); | 46 return weak_factory_.GetWeakPtr(); |
| 45 } | 47 } |
| 46 | 48 |
| 47 // Used by RemotingRendererFactory to query whether to create Media Remoting | 49 // Used by RemotingRendererFactory to query whether to create Media Remoting |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // Indicates whether remoting is started. | 98 // Indicates whether remoting is started. |
| 97 bool remote_rendering_started_ = false; | 99 bool remote_rendering_started_ = false; |
| 98 | 100 |
| 99 // Indicates whether audio or video is encrypted. | 101 // Indicates whether audio or video is encrypted. |
| 100 bool is_encrypted_ = false; | 102 bool is_encrypted_ = false; |
| 101 | 103 |
| 102 // Current audio/video config. | 104 // Current audio/video config. |
| 103 VideoDecoderConfig video_decoder_config_; | 105 VideoDecoderConfig video_decoder_config_; |
| 104 AudioDecoderConfig audio_decoder_config_; | 106 AudioDecoderConfig audio_decoder_config_; |
| 105 | 107 |
| 108 // Indicates whether video fills most of the viewport. |
| 109 bool is_mostly_filling_viewport_ = false; |
| 110 |
| 106 // The callback to switch the media renderer. | 111 // The callback to switch the media renderer. |
| 107 base::Closure switch_renderer_cb_; | 112 base::Closure switch_renderer_cb_; |
| 108 | 113 |
| 109 // This is initially the RemotingSourceImpl passed to the ctor, and might be | 114 // This is initially the RemotingSourceImpl passed to the ctor, and might be |
| 110 // replaced with a different instance later if OnSetCdm() is called. | 115 // replaced with a different instance later if OnSetCdm() is called. |
| 111 scoped_refptr<RemotingSourceImpl> remoting_source_; | 116 scoped_refptr<RemotingSourceImpl> remoting_source_; |
| 112 | 117 |
| 113 // This is used to check all the methods are called on the current thread in | 118 // This is used to check all the methods are called on the current thread in |
| 114 // debug builds. | 119 // debug builds. |
| 115 base::ThreadChecker thread_checker_; | 120 base::ThreadChecker thread_checker_; |
| 116 | 121 |
| 117 PipelineMetadata pipeline_metadata_; | 122 PipelineMetadata pipeline_metadata_; |
| 118 | 123 |
| 119 base::WeakPtrFactory<RemotingRendererController> weak_factory_; | 124 base::WeakPtrFactory<RemotingRendererController> weak_factory_; |
| 120 | 125 |
| 121 DISALLOW_COPY_AND_ASSIGN(RemotingRendererController); | 126 DISALLOW_COPY_AND_ASSIGN(RemotingRendererController); |
| 122 }; | 127 }; |
| 123 | 128 |
| 124 } // namespace media | 129 } // namespace media |
| 125 | 130 |
| 126 #endif // MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ | 131 #endif // MEDIA_REMOTING_REMOTING_RENDERER_CONTROLLER_H_ |
| OLD | NEW |