| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |