Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: media/base/renderer_controller.h

Issue 2204673004: WIP - WebMediaPlayer switch media renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Get Audio/Video config from PipelineMetadata. And rebase. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698