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

Unified Diff: media/base/mediaplayer_observer.h

Issue 2204673004: WIP - WebMediaPlayer switch media renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased and some fixes. Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/mediaplayer_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mediaplayer_observer.h
diff --git a/media/base/mediaplayer_observer.h b/media/base/mediaplayer_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..dd156daedc50f027c5f87811da8c94f1b9a235fb
--- /dev/null
+++ b/media/base/mediaplayer_observer.h
@@ -0,0 +1,36 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_
+#define MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_
+
+#include "base/callback.h"
+#include "media/base/audio_decoder_config.h"
+#include "media/base/cdm_context.h"
+#include "media/base/video_decoder_config.h"
+
+namespace media {
+
+// This class is an observer of media player events.
+class MEDIA_EXPORT MediaPlayerObserver {
+ public:
+ MediaPlayerObserver();
+ virtual ~MediaPlayerObserver();
+
+ // Called when the media element or its ancestor is entered/exited fullscreen.
+ virtual void OnEnteredFullscreen() = 0;
+ virtual void OnExitedFullscreen() = 0;
+
+ // Called when CDM is attached to the media element.
+ virtual void OnSetCdm(CdmContext* cdm_context) = 0;
+
+ // Set video/audio config after demuxer is initialized.
+ virtual void OnDecoderConfigChanged(
+ const AudioDecoderConfig& audio_config,
+ const VideoDecoderConfig& video_config) = 0;
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_MEDIAPLAYER_OBSERVER_H_
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/mediaplayer_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698