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> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 | 48 |
49 StreamParser(); | 49 StreamParser(); |
50 virtual ~StreamParser(); | 50 virtual ~StreamParser(); |
51 | 51 |
52 // Indicates completion of parser initialization. | 52 // Indicates completion of parser initialization. |
53 // First parameter - Indicates initialization success. Set to true if | 53 // First parameter - Indicates initialization success. Set to true if |
54 // initialization was successful. False if an error | 54 // initialization was successful. False if an error |
55 // occurred. | 55 // occurred. |
56 // Second parameter - Indicates the stream duration. Only contains a valid | 56 // Second parameter - Indicates the stream duration. Only contains a valid |
57 // value if the first parameter is true. | 57 // value if the first parameter is true. |
58 // Third parameters - Indicates that timestampOffset should be updated based | 58 // Third parameter - Indicates the Time associated with |
| 59 // presentation timestamp 0 if such a mapping exists in |
| 60 // the bytestream. If no mapping exists this parameter |
| 61 // contains null Time object. Only contains a valid |
| 62 // value if the first parameter is true. |
| 63 // Fourth parameters - Indicates that timestampOffset should be updated based |
59 // on the earliest end timestamp (audio or video) provided | 64 // on the earliest end timestamp (audio or video) provided |
60 // during each NewBuffersCB. | 65 // during each NewBuffersCB. |
61 typedef base::Callback<void(bool, base::TimeDelta, bool)> InitCB; | 66 typedef base::Callback<void(bool, base::TimeDelta, base::Time, bool)> InitCB; |
62 | 67 |
63 // Indicates when new stream configurations have been parsed. | 68 // Indicates when new stream configurations have been parsed. |
64 // First parameter - The new audio configuration. If the config is not valid | 69 // First parameter - The new audio configuration. If the config is not valid |
65 // then it means that there isn't an audio stream. | 70 // then it means that there isn't an audio stream. |
66 // Second parameter - The new video configuration. If the config is not valid | 71 // Second parameter - The new video configuration. If the config is not valid |
67 // then it means that there isn't an audio stream. | 72 // then it means that there isn't an audio stream. |
68 // Third parameter - The new text tracks configuration. If the map is empty, | 73 // Third parameter - The new text tracks configuration. If the map is empty, |
69 // then no text tracks were parsed from the stream. | 74 // then no text tracks were parsed from the stream. |
70 // Return value - True if the new configurations are accepted. | 75 // Return value - True if the new configurations are accepted. |
71 // False if the new configurations are not supported | 76 // False if the new configurations are not supported |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 // subtle issues with tie-breaking. See http://crbug.com/338484. | 144 // subtle issues with tie-breaking. See http://crbug.com/338484. |
140 MEDIA_EXPORT bool MergeBufferQueues( | 145 MEDIA_EXPORT bool MergeBufferQueues( |
141 const StreamParser::BufferQueue& audio_buffers, | 146 const StreamParser::BufferQueue& audio_buffers, |
142 const StreamParser::BufferQueue& video_buffers, | 147 const StreamParser::BufferQueue& video_buffers, |
143 const StreamParser::TextBufferQueueMap& text_buffers, | 148 const StreamParser::TextBufferQueueMap& text_buffers, |
144 StreamParser::BufferQueue* merged_buffers); | 149 StreamParser::BufferQueue* merged_buffers); |
145 | 150 |
146 } // namespace media | 151 } // namespace media |
147 | 152 |
148 #endif // MEDIA_BASE_STREAM_PARSER_H_ | 153 #endif // MEDIA_BASE_STREAM_PARSER_H_ |
OLD | NEW |