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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <deque> | 11 #include <deque> |
12 #include <map> | 12 #include <map> |
13 #include <memory> | |
13 #include <string> | 14 #include <string> |
14 #include <vector> | 15 #include <vector> |
15 | 16 |
16 #include "base/callback_forward.h" | 17 #include "base/callback_forward.h" |
17 #include "base/macros.h" | 18 #include "base/macros.h" |
18 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
19 #include "base/memory/scoped_ptr.h" | |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "media/base/demuxer_stream.h" | 21 #include "media/base/demuxer_stream.h" |
22 #include "media/base/eme_constants.h" | 22 #include "media/base/eme_constants.h" |
23 #include "media/base/media_export.h" | 23 #include "media/base/media_export.h" |
24 #include "media/base/media_log.h" | 24 #include "media/base/media_log.h" |
25 | 25 |
26 namespace media { | 26 namespace media { |
27 | 27 |
28 class MediaTracks; | 28 class MediaTracks; |
29 class StreamParserBuffer; | 29 class StreamParserBuffer; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 | 82 |
83 // Indicates when new stream configurations have been parsed. | 83 // Indicates when new stream configurations have been parsed. |
84 // First parameter - An object containing information about media tracks as | 84 // First parameter - An object containing information about media tracks as |
85 // well as audio/video decoder configs associated with each | 85 // well as audio/video decoder configs associated with each |
86 // track the parser will use from the stream. | 86 // track the parser will use from the stream. |
87 // Second parameter - The new text tracks configuration. If the map is empty, | 87 // Second parameter - The new text tracks configuration. If the map is empty, |
88 // then no text tracks were parsed for use from the stream. | 88 // then no text tracks were parsed for use from the stream. |
89 // Return value - True if the new configurations are accepted. | 89 // Return value - True if the new configurations are accepted. |
90 // False if the new configurations are not supported | 90 // False if the new configurations are not supported |
91 // and indicates that a parsing error should be signalled. | 91 // and indicates that a parsing error should be signalled. |
92 typedef base::Callback<bool(scoped_ptr<MediaTracks>, | 92 typedef base::Callback<bool(std::unique_ptr<MediaTracks>, |
dcheng
2016/04/23 00:57:23
using if you're feeling so inclined
danakj
2016/04/23 01:11:15
Done.
| |
93 const TextTrackConfigMap&)> | 93 const TextTrackConfigMap&)> |
94 NewConfigCB; | 94 NewConfigCB; |
95 | 95 |
96 // New stream buffers have been parsed. | 96 // New stream buffers have been parsed. |
97 // First parameter - A queue of newly parsed audio buffers. | 97 // First parameter - A queue of newly parsed audio buffers. |
98 // Second parameter - A queue of newly parsed video buffers. | 98 // Second parameter - A queue of newly parsed video buffers. |
99 // Third parameter - A map of text track ids to queues of newly parsed inband | 99 // Third parameter - A map of text track ids to queues of newly parsed inband |
100 // text buffers. If the map is not empty, it must contain | 100 // text buffers. If the map is not empty, it must contain |
101 // at least one track with a non-empty queue of text | 101 // at least one track with a non-empty queue of text |
102 // buffers. | 102 // buffers. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
166 // subtle issues with tie-breaking. See http://crbug.com/338484. | 166 // subtle issues with tie-breaking. See http://crbug.com/338484. |
167 MEDIA_EXPORT bool MergeBufferQueues( | 167 MEDIA_EXPORT bool MergeBufferQueues( |
168 const StreamParser::BufferQueue& audio_buffers, | 168 const StreamParser::BufferQueue& audio_buffers, |
169 const StreamParser::BufferQueue& video_buffers, | 169 const StreamParser::BufferQueue& video_buffers, |
170 const StreamParser::TextBufferQueueMap& text_buffers, | 170 const StreamParser::TextBufferQueueMap& text_buffers, |
171 StreamParser::BufferQueue* merged_buffers); | 171 StreamParser::BufferQueue* merged_buffers); |
172 | 172 |
173 } // namespace media | 173 } // namespace media |
174 | 174 |
175 #endif // MEDIA_BASE_STREAM_PARSER_H_ | 175 #endif // MEDIA_BASE_STREAM_PARSER_H_ |
OLD | NEW |