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

Unified Diff: media/base/pipeline_client.h

Issue 1904793002: Move Pipeline permanent callbacks into Pipeline::Client interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed permanent callbacks Created 4 years, 8 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
Index: media/base/pipeline_client.h
diff --git a/media/base/pipeline_client.h b/media/base/pipeline_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..b3e9bfb97afdd6d91dfd6a4df8c9235e0ee7aeae
--- /dev/null
+++ b/media/base/pipeline_client.h
@@ -0,0 +1,46 @@
+// 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_PIPELINE_CLIENT_H_
+#define MEDIA_BASE_PIPELINE_CLIENT_H_
+
+#include "media/base/buffering_state.h"
+#include "media/base/pipeline_metadata.h"
+#include "media/base/pipeline_status.h"
+#include "media/base/text_track.h"
+
+namespace media {
+
+class PipelineClient {
xhwang 2016/04/21 05:50:35 This can also be a inner class, e.g. Pipeline::Cli
alokp 2016/04/21 21:56:38 Sure. Do you have a better name for Client? Now th
+ public:
+ virtual ~PipelineClient() {}
+
+ // Executed whenever an error occurs but hasn't been reported already through
+ // another callback.
+ virtual void OnError(PipelineStatus status) {}
+
+ // Executed whenever the media reaches the end.
+ virtual void OnEnded() {}
+
+ // Executed when the content duration, container video size, start time, and
+ // whether the content has audio and/or video in supported formats are known.
+ virtual void OnMetadata(PipelineMetadata metadata) {}
+
+ // Executed whenever there are changes in the buffering state of the pipeline.
+ virtual void OnBufferingStateChange(BufferingState state) {}
+
+ // Executed whenever the presentation duration changes.
+ virtual void OnDurationChange() {}
+
+ // Executed whenever a text track is added.
+ virtual void OnAddTextTrack(const TextTrackConfig& config,
+ const AddTextTrackDoneCB& done_cb) {}
+
+ // Executed whenever the key needed to decrypt the stream is not available.
+ virtual void OnWaitingForDecryptionKey() {}
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_PIPELINE_CLIENT_H_
« media/base/pipeline.h ('K') | « media/base/pipeline.h ('k') | media/base/pipeline_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698