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

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

Issue 506683002: Remove implicit conversions from scoped_refptr to T* in media/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/base/stream_parser.h" 9 #include "media/base/stream_parser.h"
10 #include "media/base/stream_parser_buffer.h" 10 #include "media/base/stream_parser_buffer.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // media types but the same decode timestamp are expected, and the exact 122 // media types but the same decode timestamp are expected, and the exact
123 // sequence of media types for the tying timestamps is not subject to 123 // sequence of media types for the tying timestamps is not subject to
124 // verification. 124 // verification.
125 std::string MergedBufferQueueString(bool include_type_and_text_track) { 125 std::string MergedBufferQueueString(bool include_type_and_text_track) {
126 std::stringstream results_stream; 126 std::stringstream results_stream;
127 for (BufferQueue::const_iterator itr = merged_buffers_.begin(); 127 for (BufferQueue::const_iterator itr = merged_buffers_.begin();
128 itr != merged_buffers_.end(); 128 itr != merged_buffers_.end();
129 ++itr) { 129 ++itr) {
130 if (itr != merged_buffers_.begin()) 130 if (itr != merged_buffers_.begin())
131 results_stream << " "; 131 results_stream << " ";
132 const StreamParserBuffer& buffer = *(*itr); 132 const StreamParserBuffer& buffer = *(itr->get());
133 if (include_type_and_text_track) { 133 if (include_type_and_text_track) {
134 switch (buffer.type()) { 134 switch (buffer.type()) {
135 case DemuxerStream::AUDIO: 135 case DemuxerStream::AUDIO:
136 results_stream << "A"; 136 results_stream << "A";
137 break; 137 break;
138 case DemuxerStream::VIDEO: 138 case DemuxerStream::VIDEO:
139 results_stream << "V"; 139 results_stream << "V";
140 break; 140 break;
141 case DemuxerStream::TEXT: 141 case DemuxerStream::TEXT:
142 results_stream << "T"; 142 results_stream << "T";
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 VerifyMergeSuccess(expected, true); 372 VerifyMergeSuccess(expected, true);
373 373
374 // But appending something with a lower timestamp than the last timestamp 374 // But appending something with a lower timestamp than the last timestamp
375 // in the pre-existing merge result should fail. 375 // in the pre-existing merge result should fail.
376 int more_audio_timestamps[] = { 106, kEnd }; 376 int more_audio_timestamps[] = { 106, kEnd };
377 GenerateAudioBuffers(more_audio_timestamps); 377 GenerateAudioBuffers(more_audio_timestamps);
378 VerifyMergeFailure(); 378 VerifyMergeFailure();
379 } 379 }
380 380
381 } // namespace media 381 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698