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

Side by Side Diff: media/filters/ffmpeg_video_decoder_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/ffmpeg_video_decoder.h ('k') | media/filters/frame_processor_unittest.cc » ('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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <list> 7 #include <list>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 191
192 void FrameReady(const scoped_refptr<VideoFrame>& frame) { 192 void FrameReady(const scoped_refptr<VideoFrame>& frame) {
193 DCHECK(!frame->metadata()->IsTrue(VideoFrameMetadata::END_OF_STREAM)); 193 DCHECK(!frame->metadata()->IsTrue(VideoFrameMetadata::END_OF_STREAM));
194 output_frames_.push_back(frame); 194 output_frames_.push_back(frame);
195 } 195 }
196 196
197 MOCK_METHOD1(DecodeDone, void(DecodeStatus)); 197 MOCK_METHOD1(DecodeDone, void(DecodeStatus));
198 198
199 base::MessageLoop message_loop_; 199 base::MessageLoop message_loop_;
200 scoped_ptr<FFmpegVideoDecoder> decoder_; 200 std::unique_ptr<FFmpegVideoDecoder> decoder_;
201 201
202 VideoDecoder::DecodeCB decode_cb_; 202 VideoDecoder::DecodeCB decode_cb_;
203 203
204 // Various buffers for testing. 204 // Various buffers for testing.
205 scoped_ptr<uint8_t[]> frame_buffer_; 205 std::unique_ptr<uint8_t[]> frame_buffer_;
206 scoped_refptr<DecoderBuffer> end_of_stream_buffer_; 206 scoped_refptr<DecoderBuffer> end_of_stream_buffer_;
207 scoped_refptr<DecoderBuffer> i_frame_buffer_; 207 scoped_refptr<DecoderBuffer> i_frame_buffer_;
208 scoped_refptr<DecoderBuffer> corrupt_i_frame_buffer_; 208 scoped_refptr<DecoderBuffer> corrupt_i_frame_buffer_;
209 209
210 OutputFrames output_frames_; 210 OutputFrames output_frames_;
211 211
212 private: 212 private:
213 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoderTest); 213 DISALLOW_COPY_AND_ASSIGN(FFmpegVideoDecoderTest);
214 }; 214 };
215 215
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 // Test destruction when decoder has hit end of stream. 357 // Test destruction when decoder has hit end of stream.
358 TEST_F(FFmpegVideoDecoderTest, Destroy_EndOfStream) { 358 TEST_F(FFmpegVideoDecoderTest, Destroy_EndOfStream) {
359 Initialize(); 359 Initialize();
360 EnterDecodingState(); 360 EnterDecodingState();
361 EnterEndOfStreamState(); 361 EnterEndOfStreamState();
362 Destroy(); 362 Destroy();
363 } 363 }
364 364
365 } // namespace media 365 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/ffmpeg_video_decoder.h ('k') | media/filters/frame_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698