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

Unified Diff: media/base/media_track.h

Issue 1716503002: Basic media tracks implementation for media stream parsers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added DISALLOW_COPY_AND_ASSIGN in MediaTracks Created 4 years, 10 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/media_track.h
diff --git a/media/base/media_track.h b/media/base/media_track.h
new file mode 100644
index 0000000000000000000000000000000000000000..73b2eda8ddef8ce10f6d3e6980cac81d0f3e220d
--- /dev/null
+++ b/media/base/media_track.h
@@ -0,0 +1,41 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
wolenetz 2016/02/26 00:59:41 nit: here and elsewhere in the new files, no (c) t
servolk 2016/02/26 01:56:31 Done.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_BASE_MEDIA_TRACK_H_
+#define MEDIA_BASE_MEDIA_TRACK_H_
+
+#include <string>
+
+#include "media/base/media_export.h"
+
+namespace media {
+
+class MEDIA_EXPORT MediaTrack {
+ public:
+ enum Type { Text, Audio, Video };
+ MediaTrack(Type type,
+ const std::string& id,
+ const std::string& kind,
+ const std::string& label,
+ const std::string& lang);
+ virtual ~MediaTrack();
wolenetz 2016/02/26 00:06:20 Is this class meant to be subtyped? Do we need vir
servolk 2016/02/26 01:56:31 This class is essentially a Chromium-level counter
wolenetz 2016/02/26 19:29:27 Acknowledged.
+
+ Type type() const { return type_; }
+
+ const std::string& id() const { return id_; }
+ const std::string& kind() const { return kind_; }
+ const std::string& label() const { return label_; }
+ const std::string& language() const { return language_; }
+
+ private:
+ Type type_;
+ std::string id_;
+ std::string kind_;
+ std::string label_;
+ std::string language_;
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_MEDIA_TRACK_H_
« no previous file with comments | « media/base/BUILD.gn ('k') | media/base/media_track.cc » ('j') | media/base/media_tracks.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698