Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MEDIA_BASE_RENDERER_CONTROLLER_H_ | |
| 6 #define MEDIA_BASE_RENDERER_CONTROLLER_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "media/base/audio_decoder_config.h" | |
| 10 #include "media/base/cdm_context.h" | |
| 11 #include "media/base/video_decoder_config.h" | |
| 12 | |
| 13 namespace media { | |
| 14 | |
| 15 // This class is an observer of media::WebMediaPlayerImpl and can trigger a | |
|
miu
2016/09/28 01:33:31
Don't mention WebMediaPlayerImpl in the comments b
xjz
2016/09/29 22:54:21
Done.
| |
| 16 // pipeline restart (suspend/resume) to switch renderer. | |
| 17 class RendererController { | |
|
miu
2016/09/28 01:33:31
naming: Now that I've seen the code, I think this
xjz
2016/09/29 22:54:21
Renamed it as MediaPlayerObserver, since it could
| |
| 18 public: | |
| 19 RendererController(); | |
| 20 virtual ~RendererController(); | |
| 21 | |
| 22 // Called when the media element or its ancestor is entered/exited fullscreen. | |
| 23 virtual void OnEnteredFullscreen() = 0; | |
| 24 virtual void OnExitedFullscreen() = 0; | |
| 25 | |
| 26 // Called when CDM is attached to a media element. | |
| 27 virtual void OnSetCdm(CdmContext* cdm_context) = 0; | |
| 28 | |
| 29 // Set video/audio config after demuxer is initialized. | |
| 30 virtual void OnSetDecoderConfig(const AudioDecoderConfig& audio_config, | |
| 31 const VideoDecoderConfig& video_config) = 0; | |
| 32 | |
| 33 // Set the callback to schedule restart of pipeline to switch renderer. | |
| 34 using SwitchRendererCallback = base::Callback<void()>; | |
| 35 virtual void SetSwitchRenderCallback(const SwitchRendererCallback& cb) = 0; | |
| 36 | |
| 37 private: | |
| 38 DISALLOW_COPY_AND_ASSIGN(RendererController); | |
| 39 }; | |
| 40 | |
| 41 } // namespace media | |
| 42 | |
| 43 #endif // MEDIA_BASE_RENDERER_CONTROLLER_H_ | |
| OLD | NEW |