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

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

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 years 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 (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 <list> 5 #include <list>
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 class FFmpegVideoDecoderTest : public testing::Test { 49 class FFmpegVideoDecoderTest : public testing::Test {
50 public: 50 public:
51 FFmpegVideoDecoderTest() 51 FFmpegVideoDecoderTest()
52 : decoder_(new FFmpegVideoDecoder()), 52 : decoder_(new FFmpegVideoDecoder()),
53 decode_cb_(base::Bind(&FFmpegVideoDecoderTest::DecodeDone, 53 decode_cb_(base::Bind(&FFmpegVideoDecoderTest::DecodeDone,
54 base::Unretained(this))) { 54 base::Unretained(this))) {
55 FFmpegGlue::InitializeFFmpeg(); 55 FFmpegGlue::InitializeFFmpeg();
56 56
57 // Initialize various test buffers. 57 // Initialize various test buffers.
58 frame_buffer_.reset(new uint8[kCodedSize.GetArea()]); 58 frame_buffer_.reset(new uint8_t[kCodedSize.GetArea()]);
59 end_of_stream_buffer_ = DecoderBuffer::CreateEOSBuffer(); 59 end_of_stream_buffer_ = DecoderBuffer::CreateEOSBuffer();
60 i_frame_buffer_ = ReadTestDataFile("vp8-I-frame-320x240"); 60 i_frame_buffer_ = ReadTestDataFile("vp8-I-frame-320x240");
61 corrupt_i_frame_buffer_ = ReadTestDataFile("vp8-corrupt-I-frame"); 61 corrupt_i_frame_buffer_ = ReadTestDataFile("vp8-corrupt-I-frame");
62 } 62 }
63 63
64 virtual ~FFmpegVideoDecoderTest() { 64 virtual ~FFmpegVideoDecoderTest() {
65 Destroy(); 65 Destroy();
66 } 66 }
67 67
68 void Initialize() { 68 void Initialize() {
(...skipping 287 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

Powered by Google App Engine
This is Rietveld 408576698