OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_RENDERER_H_ | 5 #ifndef MEDIA_BASE_TEXT_RENDERER_H_ |
6 #define MEDIA_BASE_TEXT_RENDERER_H_ | 6 #define MEDIA_BASE_TEXT_RENDERER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
14 #include "media/base/demuxer_stream.h" | 14 #include "media/base/demuxer_stream.h" |
15 #include "media/base/media_export.h" | 15 #include "media/base/media_export.h" |
16 #include "media/base/pipeline_status.h" | 16 #include "media/base/pipeline_status.h" |
| 17 #include "media/base/text_ranges.h" |
17 #include "media/base/text_track.h" | 18 #include "media/base/text_track.h" |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
21 } | 22 } |
22 | 23 |
23 namespace media { | 24 namespace media { |
24 | 25 |
25 class TextCue; | 26 class TextCue; |
26 class TextTrackConfig; | 27 class TextTrackConfig; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 enum ReadState { | 76 enum ReadState { |
76 kReadIdle, | 77 kReadIdle, |
77 kReadPending | 78 kReadPending |
78 }; | 79 }; |
79 | 80 |
80 explicit TextTrackState(scoped_ptr<TextTrack> text_track); | 81 explicit TextTrackState(scoped_ptr<TextTrack> text_track); |
81 ~TextTrackState(); | 82 ~TextTrackState(); |
82 | 83 |
83 ReadState read_state; | 84 ReadState read_state; |
84 scoped_ptr<TextTrack> text_track; | 85 scoped_ptr<TextTrack> text_track; |
| 86 TextRanges text_ranges_; |
85 }; | 87 }; |
86 | 88 |
87 // Callback delivered by the demuxer |text_stream| when | 89 // Callback delivered by the demuxer |text_stream| when |
88 // a read from the stream completes. | 90 // a read from the stream completes. |
89 void BufferReady(DemuxerStream* text_stream, | 91 void BufferReady(DemuxerStream* text_stream, |
90 DemuxerStream::Status status, | 92 DemuxerStream::Status status, |
91 const scoped_refptr<DecoderBuffer>& input); | 93 const scoped_refptr<DecoderBuffer>& input); |
92 | 94 |
93 // Dispatches the decoded cue delivered on the demuxer's |text_stream|. | 95 // Dispatches the decoded cue delivered on the demuxer's |text_stream|. |
94 void CueReady(DemuxerStream* text_stream, | 96 void CueReady(DemuxerStream* text_stream, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // Indicates which text streams have not delivered end-of-stream yet. | 139 // Indicates which text streams have not delivered end-of-stream yet. |
138 typedef std::set<DemuxerStream*> PendingEosSet; | 140 typedef std::set<DemuxerStream*> PendingEosSet; |
139 PendingEosSet pending_eos_set_; | 141 PendingEosSet pending_eos_set_; |
140 | 142 |
141 DISALLOW_IMPLICIT_CONSTRUCTORS(TextRenderer); | 143 DISALLOW_IMPLICIT_CONSTRUCTORS(TextRenderer); |
142 }; | 144 }; |
143 | 145 |
144 } // namespace media | 146 } // namespace media |
145 | 147 |
146 #endif // MEDIA_BASE_TEXT_RENDERER_H_ | 148 #endif // MEDIA_BASE_TEXT_RENDERER_H_ |
OLD | NEW |