| 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 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // Indicates the source time associated with presentation timestamp 0. A | 61 // Indicates the source time associated with presentation timestamp 0. A |
| 62 // null Time is returned if no mapping to Time exists. | 62 // null Time is returned if no mapping to Time exists. |
| 63 base::Time timeline_offset; | 63 base::Time timeline_offset; |
| 64 | 64 |
| 65 // Indicates that timestampOffset should be updated based on the earliest | 65 // Indicates that timestampOffset should be updated based on the earliest |
| 66 // end timestamp (audio or video) provided during each NewBuffersCB. | 66 // end timestamp (audio or video) provided during each NewBuffersCB. |
| 67 bool auto_update_timestamp_offset; | 67 bool auto_update_timestamp_offset; |
| 68 | 68 |
| 69 // Indicates live stream. | 69 // Indicates live stream. |
| 70 DemuxerStream::Liveness liveness; | 70 DemuxerStream::Liveness liveness; |
| 71 |
| 72 // Counts of tracks detected by type within this stream. Not all of these |
| 73 // tracks may be selected for use by the parser. |
| 74 int detected_audio_track_count; |
| 75 int detected_video_track_count; |
| 76 int detected_text_track_count; |
| 71 }; | 77 }; |
| 72 | 78 |
| 73 // Indicates completion of parser initialization. | 79 // Indicates completion of parser initialization. |
| 74 // params - Stream parameters. | 80 // params - Stream parameters. |
| 75 typedef base::Callback<void(const InitParameters& params)> InitCB; | 81 typedef base::Callback<void(const InitParameters& params)> InitCB; |
| 76 | 82 |
| 77 // Indicates when new stream configurations have been parsed. | 83 // Indicates when new stream configurations have been parsed. |
| 78 // First parameter - An object containing information about media tracks as | 84 // First parameter - An object containing information about media tracks as |
| 79 // well as audio/video decoder configs associated with each | 85 // well as audio/video decoder configs associated with each |
| 80 // track. | 86 // track the parser will use from the stream. |
| 81 // 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, |
| 82 // then no text tracks were parsed from the stream. | 88 // then no text tracks were parsed for use from the stream. |
| 83 // Return value - True if the new configurations are accepted. | 89 // Return value - True if the new configurations are accepted. |
| 84 // False if the new configurations are not supported | 90 // False if the new configurations are not supported |
| 85 // and indicates that a parsing error should be signalled. | 91 // and indicates that a parsing error should be signalled. |
| 86 typedef base::Callback<bool(scoped_ptr<MediaTracks>, | 92 typedef base::Callback<bool(scoped_ptr<MediaTracks>, |
| 87 const TextTrackConfigMap&)> | 93 const TextTrackConfigMap&)> |
| 88 NewConfigCB; | 94 NewConfigCB; |
| 89 | 95 |
| 90 // New stream buffers have been parsed. | 96 // New stream buffers have been parsed. |
| 91 // First parameter - A queue of newly parsed audio buffers. | 97 // First parameter - A queue of newly parsed audio buffers. |
| 92 // Second parameter - A queue of newly parsed video buffers. | 98 // Second parameter - A queue of newly parsed video buffers. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // subtle issues with tie-breaking. See http://crbug.com/338484. | 166 // subtle issues with tie-breaking. See http://crbug.com/338484. |
| 161 MEDIA_EXPORT bool MergeBufferQueues( | 167 MEDIA_EXPORT bool MergeBufferQueues( |
| 162 const StreamParser::BufferQueue& audio_buffers, | 168 const StreamParser::BufferQueue& audio_buffers, |
| 163 const StreamParser::BufferQueue& video_buffers, | 169 const StreamParser::BufferQueue& video_buffers, |
| 164 const StreamParser::TextBufferQueueMap& text_buffers, | 170 const StreamParser::TextBufferQueueMap& text_buffers, |
| 165 StreamParser::BufferQueue* merged_buffers); | 171 StreamParser::BufferQueue* merged_buffers); |
| 166 | 172 |
| 167 } // namespace media | 173 } // namespace media |
| 168 | 174 |
| 169 #endif // MEDIA_BASE_STREAM_PARSER_H_ | 175 #endif // MEDIA_BASE_STREAM_PARSER_H_ |
| OLD | NEW |