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

Side by Side Diff: media/base/text_track.h

Issue 13419002: Media Source dispatches inband text tracks (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: clean compile Created 7 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_BASE_TEXT_TRACK_H_
6 #define MEDIA_BASE_TEXT_TRACK_H_
7
8 #include <string>
9
10 // TODO(matthewjheaney): see note below
11 //#include "base/memory/scoped_ptr.h"
12 #include "base/callback.h"
13 #include "base/time.h"
14
15 namespace media {
16
17 // Specifies the varieties of text tracks.
18 enum TextKind {
19 kTextSubtitles,
20 kTextCaptions,
21 kTextDescriptions,
22 kTextMetadata,
23 kTextNone
24 };
25
26 class TextTrack {
27 public:
28 virtual ~TextTrack() {}
29 virtual void addWebVTTCue(const base::TimeDelta& start,
30 const base::TimeDelta& end,
31 const std::string& id,
32 const std::string& content,
33 const std::string& settings) = 0;
34 };
35
36 // TODO(matthewjheaney): need ruling from Aaron about
37 // return type: scoped_ptr or scoped_refptr?
38 // I think it's the case that scoped_refptr requires that
39 // the type also derive from refcounted.
40 // Does that imply that TextTrack derives from refcounted?
41 // Or does that happened somewhere else in the hierarchy?
42 typedef base::Callback<TextTrack*(TextKind kind,
acolwell GONE FROM CHROMIUM 2013/05/10 02:22:08 A scoped_ptr should be used since I don't believe
Matthew Heaney (Chromium) 2013/05/10 05:21:08 Done.
43 const std::string& label,
44 const std::string& language)> AddTextTrackCB;
45
46 } // namespace media
47
48 #endif // MEDIA_BASE_TEXT_TRACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698