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

Side by Side Diff: media/base/text_decoder.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 (9/28) 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2013 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_DECODER_H_
6 #define MEDIA_BASE_TEXT_DECODER_H_
7
8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h"
10 #include "media/base/media_export.h"
11
12 namespace media {
13
14 class DemuxerStream;
15 class TextCue;
16
17 class MEDIA_EXPORT TextDecoder {
acolwell GONE FROM CHROMIUM 2013/10/08 15:45:24 Since we only have one instance of a text decoder
Matthew Heaney (Chromium) 2013/10/13 05:30:17 Done.
18 public:
19 TextDecoder();
20 virtual ~TextDecoder();
21
22 // Initialize a TextDecoder from the text streams from the given demuxer.
23 virtual void Initialize() = 0;
24
25 // Request frame from the given demuxer text stream, to be decoded and
26 // returned as a text track cue via the provided callback. Only one read
27 // per demuxer stream may be in flight at any given time.
28 //
29 // Implementations guarantee that the callback will not be called from within
30 // this method.
31 //
32 // A non-NULL text buffer pointer will contain a decoded text track cue.
33 // A NULL buffer pointer indicates end-of-stream, or error.
34 typedef base::Callback<void(DemuxerStream*,
35 const scoped_refptr<TextCue>&)> ReadCB;
36 virtual void Read(DemuxerStream* stream, const ReadCB& read_cb) = 0;
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(TextDecoder);
40 };
41
42 } // namespace media
43
44 #endif // MEDIA_BASE_TEXT_DECODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698