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

Side by Side 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: fix compile errors 11/21 #6 Created 7 years 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 unified diff | Download patch
« no previous file with comments | « media/base/text_renderer_unittest.cc ('k') | media/base/text_track_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_TEXT_TRACK_H_ 5 #ifndef MEDIA_BASE_TEXT_TRACK_H_
6 #define MEDIA_BASE_TEXT_TRACK_H_ 6 #define MEDIA_BASE_TEXT_TRACK_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 13
14 namespace media { 14 namespace media {
15 15
16 // Specifies the varieties of text tracks. 16 class TextTrackConfig;
17 enum TextKind {
18 kTextSubtitles,
19 kTextCaptions,
20 kTextDescriptions,
21 kTextMetadata,
22 kTextNone
23 };
24 17
25 class TextTrack { 18 class TextTrack {
26 public: 19 public:
27 virtual ~TextTrack() {} 20 virtual ~TextTrack() {}
28 virtual void addWebVTTCue(const base::TimeDelta& start, 21 virtual void addWebVTTCue(const base::TimeDelta& start,
29 const base::TimeDelta& end, 22 const base::TimeDelta& end,
30 const std::string& id, 23 const std::string& id,
31 const std::string& content, 24 const std::string& content,
32 const std::string& settings) = 0; 25 const std::string& settings) = 0;
33 }; 26 };
34 27
35 typedef base::Callback<scoped_ptr<TextTrack> 28 typedef base::Callback<void
36 (TextKind kind, 29 (scoped_ptr<TextTrack>)> AddTextTrackDoneCB;
37 const std::string& label, 30
38 const std::string& language)> AddTextTrackCB; 31 typedef base::Callback<void
32 (const TextTrackConfig& config,
33 const AddTextTrackDoneCB& done_cb)> AddTextTrackCB;
39 34
40 } // namespace media 35 } // namespace media
41 36
42 #endif // MEDIA_BASE_TEXT_TRACK_H_ 37 #endif // MEDIA_BASE_TEXT_TRACK_H_
OLDNEW
« no previous file with comments | « media/base/text_renderer_unittest.cc ('k') | media/base/text_track_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698