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

Unified Diff: media/base/text_track.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/16) 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_track.h
diff --git a/media/base/text_track.h b/media/base/text_track.h
index 01a2ed727f90bc3ce9880796185b9ab782536c5d..a187e1f3eb67c2299ff448f5022155a59330ce19 100644
--- a/media/base/text_track.h
+++ b/media/base/text_track.h
@@ -5,6 +5,7 @@
#ifndef MEDIA_BASE_TEXT_TRACK_H_
#define MEDIA_BASE_TEXT_TRACK_H_
+#include <map>
#include <string>
#include "base/callback.h"
@@ -32,10 +33,32 @@ class TextTrack {
const std::string& settings) = 0;
};
-typedef base::Callback<scoped_ptr<TextTrack>
+typedef base::Callback<void
+ (scoped_ptr<TextTrack>)> AddTextTrackDoneCB;
+
+typedef base::Callback<void
(TextKind kind,
acolwell GONE FROM CHROMIUM 2013/10/21 20:10:40 nit: Use const TextTrackConfig& here instead.
Matthew Heaney (Chromium) 2013/10/23 05:09:01 Done.
const std::string& label,
- const std::string& language)> AddTextTrackCB;
+ const std::string& language,
+ const AddTextTrackDoneCB& done_cb)> AddTextTrackCB;
+
+class TextTrackConfig {
+ public:
+ TextTrackConfig();
+ TextTrackConfig(TextKind kind,
+ const std::string& label,
+ const std::string& language);
+
+ // Returns true if all fields in |config| match this config.
+ bool Matches(const TextTrackConfig& config) const;
+
acolwell GONE FROM CHROMIUM 2013/10/21 20:10:40 Add kind(), label(), language() accessors.
Matthew Heaney (Chromium) 2013/10/23 05:09:01 Done.
+ private:
+ TextKind kind_;
+ std::string label_;
+ std::string language_;
+};
+
+typedef std::map<int, TextTrackConfig> TextTrackConfigMap;
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698