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

Unified Diff: media/base/text_cue.h

Issue 23702007: Render inband text tracks in the media pipeline (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: incorporate aaron's comments (10/22) Created 7 years, 2 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/text_cue.h
diff --git a/media/base/text_cue.h b/media/base/text_cue.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4c00d547318c70e162da603b47281860e52b145
--- /dev/null
+++ b/media/base/text_cue.h
@@ -0,0 +1,48 @@
+// Copyright 2013 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_TEXT_CUE_H_
+#define MEDIA_BASE_TEXT_CUE_H_
+
+#include <string>
+
+#include "base/memory/ref_counted.h"
+#include "base/time/time.h"
+#include "media/base/media_export.h"
+
+namespace media {
+
+// A text buffer to carry the components of a text track cue.
+class MEDIA_EXPORT TextCue
+ : public base::RefCountedThreadSafe<TextCue> {
+ public:
+ TextCue(const base::TimeDelta& timestamp,
+ const base::TimeDelta& duration,
+ const std::string& id,
+ const std::string& settings,
+ const std::string& text);
+
+ // Access to constructor parameters.
+ base::TimeDelta timestamp() const { return timestamp_; }
+ base::TimeDelta duration() const { return duration_; }
+ const std::string& id() const { return id_; }
+ const std::string& settings() const { return settings_; }
+ const std::string& text() const { return text_; }
+
+ private:
+ friend class base::RefCountedThreadSafe<TextCue>;
+ virtual ~TextCue();
acolwell GONE FROM CHROMIUM 2013/10/24 18:57:51 nit: I don't think this needs to be virtual since
Matthew Heaney (Chromium) 2013/10/25 03:05:38 Done.
+
+ base::TimeDelta timestamp_;
+ base::TimeDelta duration_;
+ std::string id_;
+ std::string settings_;
+ std::string text_;
+
+ DISALLOW_IMPLICIT_CONSTRUCTORS(TextCue);
+};
+
+} // namespace media
+
+#endif // MEDIA_BASE_TEXT_CUE_H_

Powered by Google App Engine
This is Rietveld 408576698