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

Unified Diff: media/base/demuxer_stream_provider.h

Issue 523283002: media: Introduce DemuxerStreamProvider interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/demuxer_stream_provider.h
diff --git a/media/base/demuxer_stream_provider.h b/media/base/demuxer_stream_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..83082fc375dbc9a489eb6acfb2591abfecdfe3fa
--- /dev/null
+++ b/media/base/demuxer_stream_provider.h
@@ -0,0 +1,37 @@
+// Copyright 2014 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_DEMUXER_STREAM_PROVIDER_H_
+#define MEDIA_BASE_DEMUXER_STREAM_PROVIDER_H_
+
+#include "media/base/demuxer_stream.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+class MEDIA_EXPORT DemuxerStreamProvider {
+ public:
+ enum Liveness {
+ LIVENESS_UNKNOWN,
+ LIVENESS_RECORDED,
+ LIVENESS_LIVE,
+ };
+
+ DemuxerStreamProvider();
+ virtual ~DemuxerStreamProvider();
+
+ // Returns the first stream of the given stream type (which is not allowed
tim (not reviewing) 2014/09/03 22:43:02 OOC as someone using DemuxerStreamProvider, when d
xhwang 2014/09/03 23:45:25 This is moved from the old Demuxer code. Basically
+ // to be DemuxerStream::TEXT), or NULL if that type of stream is not present.
+ virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0;
+
+ // Returns liveness of the streams provided, i.e. whether recorded or live.
+ virtual Liveness GetLiveness() const = 0;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DemuxerStreamProvider);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_DEMUXER_STREAM_PROVIDER_H_

Powered by Google App Engine
This is Rietveld 408576698