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

Side by Side Diff: media/filters/frame_processor_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, 3 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 <map> 5 #include <map>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 const TextBufferQueueMap empty_text_buffers_; 242 const TextBufferQueueMap empty_text_buffers_;
243 243
244 // StoreStatusAndBuffer's most recent result. 244 // StoreStatusAndBuffer's most recent result.
245 DemuxerStream::Status last_read_status_; 245 DemuxerStream::Status last_read_status_;
246 scoped_refptr<DecoderBuffer> last_read_buffer_; 246 scoped_refptr<DecoderBuffer> last_read_buffer_;
247 bool read_callback_called_; 247 bool read_callback_called_;
248 248
249 private: 249 private:
250 void StoreStatusAndBuffer(DemuxerStream::Status status, 250 void StoreStatusAndBuffer(DemuxerStream::Status status,
251 const scoped_refptr<DecoderBuffer>& buffer) { 251 const scoped_refptr<DecoderBuffer>& buffer) {
252 if (status == DemuxerStream::kOk && buffer) { 252 if (status == DemuxerStream::kOk && buffer.get()) {
253 DVLOG(3) << __FUNCTION__ << "status: " << status << " ts: " 253 DVLOG(3) << __FUNCTION__ << "status: " << status << " ts: "
254 << buffer->timestamp().InSecondsF(); 254 << buffer->timestamp().InSecondsF();
255 } else { 255 } else {
256 DVLOG(3) << __FUNCTION__ << "status: " << status << " ts: n/a"; 256 DVLOG(3) << __FUNCTION__ << "status: " << status << " ts: n/a";
257 } 257 }
258 258
259 read_callback_called_ = true; 259 read_callback_called_ = true;
260 last_read_status_ = status; 260 last_read_status_ = status;
261 last_read_buffer_ = buffer; 261 last_read_buffer_ = buffer;
262 } 262 }
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 EXPECT_EQ(base::TimeDelta(), timestamp_offset_); 662 EXPECT_EQ(base::TimeDelta(), timestamp_offset_);
663 CheckExpectedRangesByTimestamp(audio_.get(), "{ [7,29) }"); 663 CheckExpectedRangesByTimestamp(audio_.get(), "{ [7,29) }");
664 CheckReadsThenReadStalls(audio_.get(), "7:0 19"); 664 CheckReadsThenReadStalls(audio_.get(), "7:0 19");
665 } 665 }
666 666
667 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true)); 667 INSTANTIATE_TEST_CASE_P(SequenceMode, FrameProcessorTest, Values(true));
668 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false)); 668 INSTANTIATE_TEST_CASE_P(SegmentsMode, FrameProcessorTest, Values(false));
669 669
670 } // namespace media 670 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698