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

Side by Side Diff: chromecast/media/cma/test/frame_generator_for_test.cc

Issue 1875623002: Convert //chromecast 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 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 "chromecast/media/cma/test/frame_generator_for_test.h" 5 #include "chromecast/media/cma/test/frame_generator_for_test.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 char key_id[] = { 92 char key_id[] = {
93 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 93 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7,
94 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf }; 94 0x8, 0x9, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf };
95 95
96 char iv[] = { 96 char iv[] = {
97 0x0, 0x2, 0x1, 0x3, 0x5, 0x4, 0x7, 0x6, 97 0x0, 0x2, 0x1, 0x3, 0x5, 0x4, 0x7, 0x6,
98 0x9, 0x8, 0xb, 0xa, 0xd, 0xc, 0xf, 0xe }; 98 0x9, 0x8, 0xb, 0xa, 0xd, 0xc, 0xf, 0xe };
99 99
100 scoped_ptr< ::media::DecryptConfig> decrypt_config( 100 std::unique_ptr<::media::DecryptConfig> decrypt_config(
101 new ::media::DecryptConfig( 101 new ::media::DecryptConfig(std::string(key_id, arraysize(key_id)),
102 std::string(key_id, arraysize(key_id)), 102 std::string(iv, arraysize(iv)), subsamples));
103 std::string(iv, arraysize(iv)),
104 subsamples));
105 buffer->set_decrypt_config(std::move(decrypt_config)); 103 buffer->set_decrypt_config(std::move(decrypt_config));
106 } 104 }
107 105
108 return scoped_refptr<DecoderBufferBase>(new DecoderBufferAdapter(buffer)); 106 return scoped_refptr<DecoderBufferBase>(new DecoderBufferAdapter(buffer));
109 } 107 }
110 108
111 size_t FrameGeneratorForTest::RemainingFrameCount() const { 109 size_t FrameGeneratorForTest::RemainingFrameCount() const {
112 size_t count = frame_specs_.size() - frame_idx_; 110 size_t count = frame_specs_.size() - frame_idx_;
113 return count; 111 return count;
114 } 112 }
115 113
116 } // namespace media 114 } // namespace media
117 } // namespace chromecast 115 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cma/pipeline/video_pipeline_impl.cc ('k') | chromecast/media/cma/test/frame_segmenter_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698