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

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

Issue 254473006: Add media::StreamParser::StreamParameter struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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 #include "media/base/stream_parser.h" 5 #include "media/base/stream_parser.h"
6 6
7 #include "media/base/buffers.h" 7 #include "media/base/buffers.h"
8 #include "media/base/stream_parser_buffer.h" 8 #include "media/base/stream_parser_buffer.h"
9 9
10 namespace media { 10 namespace media {
11 11
12 StreamParser::StreamParameters::StreamParameters()
13 : duration(kInfiniteDuration()),
14 auto_update_timestamp_offset(false) {
15 }
16
12 StreamParser::StreamParser() {} 17 StreamParser::StreamParser() {}
13 18
14 StreamParser::~StreamParser() {} 19 StreamParser::~StreamParser() {}
15 20
16 static bool MergeBufferQueuesInternal( 21 static bool MergeBufferQueuesInternal(
17 const std::vector<const StreamParser::BufferQueue*>& buffer_queues, 22 const std::vector<const StreamParser::BufferQueue*>& buffer_queues,
18 StreamParser::BufferQueue* merged_buffers) { 23 StreamParser::BufferQueue* merged_buffers) {
19 // Instead of std::merge usage, this method implements a custom merge because: 24 // Instead of std::merge usage, this method implements a custom merge because:
20 // 1) |buffer_queues| may contain N queues, 25 // 1) |buffer_queues| may contain N queues,
21 // 2) we must detect and return false if any of the queues in |buffer_queues| 26 // 2) we must detect and return false if any of the queues in |buffer_queues|
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 map_itr++) { 127 map_itr++) {
123 if (!map_itr->second.empty()) 128 if (!map_itr->second.empty())
124 buffer_queues.push_back(&(map_itr->second)); 129 buffer_queues.push_back(&(map_itr->second));
125 } 130 }
126 131
127 // Do the merge. 132 // Do the merge.
128 return MergeBufferQueuesInternal(buffer_queues, merged_buffers); 133 return MergeBufferQueuesInternal(buffer_queues, merged_buffers);
129 } 134 }
130 135
131 } // namespace media 136 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698