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

Unified Diff: media/base/renderer_client.h

Issue 1955843002: Move Renderer permanent callbacks into RendererClient interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 7 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/renderer.h ('k') | media/base/video_renderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/renderer_client.h
diff --git a/media/base/renderer_client.h b/media/base/renderer_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..56cc15eaa5be9bf1db3af6cb0e1bb977efe11834
--- /dev/null
+++ b/media/base/renderer_client.h
@@ -0,0 +1,32 @@
+// 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_RENDERER_CLIENT_H_
+#define MEDIA_BASE_RENDERER_CLIENT_H_
+
+namespace media {
+
+// Interface used by Renderer, AudioRenderer, and VideoRenderer implementations
+// to notify their clients.
+class RendererClient {
+ public:
+ // Executed if any error was encountered after Renderer initialization.
+ virtual void OnError(PipelineStatus status) = 0;
+
+ // Executed when rendering has reached the end of stream.
+ virtual void OnEnded() = 0;
+
+ // Executed periodically with rendering statistics.
+ virtual void OnStatisticsUpdate(const PipelineStatistics& stats) = 0;
+
+ // Executed when buffering state is changed.
+ virtual void OnBufferingStateChange(BufferingState state) = 0;
+
+ // Executed whenever the key needed to decrypt the stream is not available.
+ virtual void OnWaitingForDecryptionKey() = 0;
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_RENDERER_CLIENT_H_
« no previous file with comments | « media/base/renderer.h ('k') | media/base/video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698