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

Side by Side Diff: media/filters/vp9_parser_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: 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/files/memory_mapped_file.h" 7 #include "base/files/memory_mapped_file.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "media/base/test_data_util.h" 9 #include "media/base/test_data_util.h"
10 #include "media/filters/ivf_parser.h" 10 #include "media/filters/ivf_parser.h"
(...skipping 23 matching lines...) Expand all
34 34
35 const Vp9Segmentation& GetSegmentation() const { 35 const Vp9Segmentation& GetSegmentation() const {
36 return vp9_parser_.GetSegmentation(); 36 return vp9_parser_.GetSegmentation();
37 } 37 }
38 38
39 const Vp9LoopFilter& GetLoopFilter() const { 39 const Vp9LoopFilter& GetLoopFilter() const {
40 return vp9_parser_.GetLoopFilter(); 40 return vp9_parser_.GetLoopFilter();
41 } 41 }
42 42
43 IvfParser ivf_parser_; 43 IvfParser ivf_parser_;
44 scoped_ptr<base::MemoryMappedFile> stream_; 44 std::unique_ptr<base::MemoryMappedFile> stream_;
45 45
46 Vp9Parser vp9_parser_; 46 Vp9Parser vp9_parser_;
47 }; 47 };
48 48
49 bool Vp9ParserTest::ParseNextFrame(Vp9FrameHeader* fhdr) { 49 bool Vp9ParserTest::ParseNextFrame(Vp9FrameHeader* fhdr) {
50 while (1) { 50 while (1) {
51 Vp9Parser::Result res = vp9_parser_.ParseNextFrame(fhdr); 51 Vp9Parser::Result res = vp9_parser_.ParseNextFrame(fhdr);
52 if (res == Vp9Parser::kEOStream) { 52 if (res == Vp9Parser::kEOStream) {
53 IvfFrameHeader ivf_frame_header; 53 IvfFrameHeader ivf_frame_header;
54 const uint8_t* ivf_payload; 54 const uint8_t* ivf_payload;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 EXPECT_EQ(1, fhdr.frame_refs[1]); 152 EXPECT_EQ(1, fhdr.frame_refs[1]);
153 EXPECT_EQ(2, fhdr.frame_refs[2]); 153 EXPECT_EQ(2, fhdr.frame_refs[2]);
154 EXPECT_TRUE(fhdr.allow_high_precision_mv); 154 EXPECT_TRUE(fhdr.allow_high_precision_mv);
155 EXPECT_EQ(Vp9InterpFilter::EIGHTTAP, fhdr.interp_filter); 155 EXPECT_EQ(Vp9InterpFilter::EIGHTTAP, fhdr.interp_filter);
156 156
157 EXPECT_EQ(48u, fhdr.first_partition_size); 157 EXPECT_EQ(48u, fhdr.first_partition_size);
158 EXPECT_EQ(11u, fhdr.uncompressed_header_size); 158 EXPECT_EQ(11u, fhdr.uncompressed_header_size);
159 } 159 }
160 160
161 } // namespace media 161 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698