OLD | NEW |
---|---|
(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_ | |
OLD | NEW |