Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Side by Side Diff: media/base/stream_parser.h

Issue 1826583003: MSE: Record counts of detected MSE audio, video and text tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another attempt to fix that link failure. MEDIA_EXPORT should do it! Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | media/base/stream_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // bytestream-specific-ranged track numbers. See http://crbug.com/341581. 45 // bytestream-specific-ranged track numbers. See http://crbug.com/341581.
46 typedef int TrackId; 46 typedef int TrackId;
47 47
48 // Map of text track ID to the track configuration. 48 // Map of text track ID to the track configuration.
49 typedef std::map<TrackId, TextTrackConfig> TextTrackConfigMap; 49 typedef std::map<TrackId, TextTrackConfig> TextTrackConfigMap;
50 50
51 // Map of text track ID to decode-timestamp-ordered buffers for the track. 51 // Map of text track ID to decode-timestamp-ordered buffers for the track.
52 typedef std::map<TrackId, const BufferQueue> TextBufferQueueMap; 52 typedef std::map<TrackId, const BufferQueue> TextBufferQueueMap;
53 53
54 // Stream parameters passed in InitCB. 54 // Stream parameters passed in InitCB.
55 struct InitParameters { 55 struct MEDIA_EXPORT InitParameters {
56 InitParameters(base::TimeDelta duration); 56 InitParameters(base::TimeDelta duration);
57 57
58 // Stream duration. 58 // Stream duration.
59 base::TimeDelta duration; 59 base::TimeDelta duration;
60 60
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
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_
OLDNEW
« no previous file with comments | « no previous file | media/base/stream_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698