OLD | NEW |
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_STREAM_PARSER_H_ | 5 #ifndef MEDIA_BASE_STREAM_PARSER_H_ |
6 #define MEDIA_BASE_STREAM_PARSER_H_ | 6 #define MEDIA_BASE_STREAM_PARSER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/callback_forward.h" | 13 #include "base/callback_forward.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "media/base/demuxer_stream.h" |
17 #include "media/base/media_export.h" | 18 #include "media/base/media_export.h" |
18 #include "media/base/media_log.h" | 19 #include "media/base/media_log.h" |
19 | 20 |
20 namespace media { | 21 namespace media { |
21 | 22 |
22 class AudioDecoderConfig; | 23 class AudioDecoderConfig; |
23 class StreamParserBuffer; | 24 class StreamParserBuffer; |
24 class TextTrackConfig; | 25 class TextTrackConfig; |
25 class VideoDecoderConfig; | 26 class VideoDecoderConfig; |
26 | 27 |
(...skipping 28 matching lines...) Expand all Loading... |
55 | 56 |
56 // Indicates the source time associated with presentation timestamp 0. A | 57 // Indicates the source time associated with presentation timestamp 0. A |
57 // null Time is returned if no mapping to Time exists. | 58 // null Time is returned if no mapping to Time exists. |
58 base::Time timeline_offset; | 59 base::Time timeline_offset; |
59 | 60 |
60 // Indicates that timestampOffset should be updated based on the earliest | 61 // Indicates that timestampOffset should be updated based on the earliest |
61 // end timestamp (audio or video) provided during each NewBuffersCB. | 62 // end timestamp (audio or video) provided during each NewBuffersCB. |
62 bool auto_update_timestamp_offset; | 63 bool auto_update_timestamp_offset; |
63 | 64 |
64 // Indicates live stream. | 65 // Indicates live stream. |
65 Demuxer::Liveness liveness; | 66 DemuxerStream::Liveness liveness; |
66 }; | 67 }; |
67 | 68 |
68 // Indicates completion of parser initialization. | 69 // Indicates completion of parser initialization. |
69 // success - True if initialization was successful. | 70 // success - True if initialization was successful. |
70 // params - Stream parameters, in case of successful initialization. | 71 // params - Stream parameters, in case of successful initialization. |
71 typedef base::Callback<void(bool success, | 72 typedef base::Callback<void(bool success, |
72 const InitParameters& params)> InitCB; | 73 const InitParameters& params)> InitCB; |
73 | 74 |
74 // Indicates when new stream configurations have been parsed. | 75 // Indicates when new stream configurations have been parsed. |
75 // First parameter - The new audio configuration. If the config is not valid | 76 // First parameter - The new audio configuration. If the config is not valid |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // subtle issues with tie-breaking. See http://crbug.com/338484. | 154 // subtle issues with tie-breaking. See http://crbug.com/338484. |
154 MEDIA_EXPORT bool MergeBufferQueues( | 155 MEDIA_EXPORT bool MergeBufferQueues( |
155 const StreamParser::BufferQueue& audio_buffers, | 156 const StreamParser::BufferQueue& audio_buffers, |
156 const StreamParser::BufferQueue& video_buffers, | 157 const StreamParser::BufferQueue& video_buffers, |
157 const StreamParser::TextBufferQueueMap& text_buffers, | 158 const StreamParser::TextBufferQueueMap& text_buffers, |
158 StreamParser::BufferQueue* merged_buffers); | 159 StreamParser::BufferQueue* merged_buffers); |
159 | 160 |
160 } // namespace media | 161 } // namespace media |
161 | 162 |
162 #endif // MEDIA_BASE_STREAM_PARSER_H_ | 163 #endif // MEDIA_BASE_STREAM_PARSER_H_ |
OLD | NEW |