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

Side by Side Diff: media/filters/source_buffer_stream_unittest.cc

Issue 1904213003: Convert //media/filters from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove include 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 | « media/filters/pipeline_controller_unittest.cc ('k') | media/filters/stream_parser_factory.h » ('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 #include "media/filters/source_buffer_stream.h" 5 #include "media/filters/source_buffer_stream.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 415
416 void CheckAudioConfig(const AudioDecoderConfig& config) { 416 void CheckAudioConfig(const AudioDecoderConfig& config) {
417 const AudioDecoderConfig& actual = stream_->GetCurrentAudioDecoderConfig(); 417 const AudioDecoderConfig& actual = stream_->GetCurrentAudioDecoderConfig();
418 EXPECT_TRUE(actual.Matches(config)) 418 EXPECT_TRUE(actual.Matches(config))
419 << "Expected: " << config.AsHumanReadableString() 419 << "Expected: " << config.AsHumanReadableString()
420 << "\nActual: " << actual.AsHumanReadableString(); 420 << "\nActual: " << actual.AsHumanReadableString();
421 } 421 }
422 422
423 base::TimeDelta frame_duration() const { return frame_duration_; } 423 base::TimeDelta frame_duration() const { return frame_duration_; }
424 424
425 scoped_ptr<SourceBufferStream> stream_; 425 std::unique_ptr<SourceBufferStream> stream_;
426 VideoDecoderConfig video_config_; 426 VideoDecoderConfig video_config_;
427 AudioDecoderConfig audio_config_; 427 AudioDecoderConfig audio_config_;
428 scoped_refptr<StrictMock<MockMediaLog>> media_log_; 428 scoped_refptr<StrictMock<MockMediaLog>> media_log_;
429 429
430 private: 430 private:
431 base::TimeDelta ConvertToFrameDuration(int frames_per_second) { 431 base::TimeDelta ConvertToFrameDuration(int frames_per_second) {
432 return base::TimeDelta::FromMicroseconds( 432 return base::TimeDelta::FromMicroseconds(
433 base::Time::kMicrosecondsPerSecond / frames_per_second); 433 base::Time::kMicrosecondsPerSecond / frames_per_second);
434 } 434 }
435 435
(...skipping 4359 matching lines...) Expand 10 before | Expand all | Expand 10 after
4795 CheckNoNextBuffer(); 4795 CheckNoNextBuffer();
4796 } 4796 }
4797 4797
4798 // TODO(vrk): Add unit tests where keyframes are unaligned between streams. 4798 // TODO(vrk): Add unit tests where keyframes are unaligned between streams.
4799 // (crbug.com/133557) 4799 // (crbug.com/133557)
4800 4800
4801 // TODO(vrk): Add unit tests with end of stream being called at interesting 4801 // TODO(vrk): Add unit tests with end of stream being called at interesting
4802 // times. 4802 // times.
4803 4803
4804 } // namespace media 4804 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/pipeline_controller_unittest.cc ('k') | media/filters/stream_parser_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698