diff options
author | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 23:55:08 +0000 |
---|---|---|
committer | nsylvain@chromium.org <nsylvain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-11 23:55:08 +0000 |
commit | 997c7122e88f4420a822324f48b9ef731a130d87 (patch) | |
tree | db9c62485678c7904342fa3067a41c65cce2e80f /media | |
parent | cb65ab439b9ed8b66d9eeeb165fd17862255b315 (diff) | |
download | chromium_src-997c7122e88f4420a822324f48b9ef731a130d87.zip chromium_src-997c7122e88f4420a822324f48b9ef731a130d87.tar.gz chromium_src-997c7122e88f4420a822324f48b9ef731a130d87.tar.bz2 |
Revert the "out-of-lining of test code" change within src/media
to see if it fixes the gmock crashes we've been seeing since the
change has been made.
The original change was split between r74660, r74168, r74059
Review URL: http://codereview.chromium.org/6473006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r-- | media/media.gyp | 2 | ||||
-rw-r--r-- | media/tools/omx_test/file_reader_util.cc | 4 | ||||
-rw-r--r-- | media/tools/omx_test/file_reader_util.h | 3 | ||||
-rw-r--r-- | media/tools/omx_test/file_sink.cc | 13 | ||||
-rw-r--r-- | media/tools/omx_test/file_sink.h | 14 | ||||
-rw-r--r-- | media/video/mock_objects.h (renamed from media/video/video_mock_objects.h) | 8 | ||||
-rw-r--r-- | media/video/video_mock_objects.cc | 18 |
7 files changed, 15 insertions, 47 deletions
diff --git a/media/media.gyp b/media/media.gyp index 2e6e613..b2d8990 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -419,8 +419,6 @@ 'base/mock_filter_host.h', 'base/mock_filters.cc', 'base/mock_filters.h', - 'video/video_mock_objects.cc', - 'video/video_mock_objects.h', ], }, { diff --git a/media/tools/omx_test/file_reader_util.cc b/media/tools/omx_test/file_reader_util.cc index a599d2f..1ba7cea 100644 --- a/media/tools/omx_test/file_reader_util.cc +++ b/media/tools/omx_test/file_reader_util.cc @@ -46,8 +46,6 @@ YuvFileReader::YuvFileReader(const FilePath& path, output_nv21_(enable_csc) { } -YuvFileReader::~YuvFileReader() {} - void YuvFileReader::Read(uint8** output, int* size) { if (!file()) { *size = 0; @@ -232,8 +230,6 @@ H264FileReader::H264FileReader(const FilePath& path) used_(0) { } -H264FileReader::~H264FileReader() {} - void H264FileReader::Read(uint8** output, int *size) { // Fill the buffer when it's less than half full. int read = 0; diff --git a/media/tools/omx_test/file_reader_util.h b/media/tools/omx_test/file_reader_util.h index 01216e8..4bd028f 100644 --- a/media/tools/omx_test/file_reader_util.h +++ b/media/tools/omx_test/file_reader_util.h @@ -61,8 +61,6 @@ class YuvFileReader : public BasicFileReader { int height, int loop_count, bool output_nv21); - virtual ~YuvFileReader(); - virtual void Read(uint8** output, int* size); private: @@ -107,7 +105,6 @@ class FFmpegFileReader : public FileReader { class H264FileReader : public BasicFileReader { public: explicit H264FileReader(const FilePath& path); - virtual ~H264FileReader(); virtual void Read(uint8** output, int* size); private: diff --git a/media/tools/omx_test/file_sink.cc b/media/tools/omx_test/file_sink.cc index 5e92b02..98766ab 100644 --- a/media/tools/omx_test/file_sink.cc +++ b/media/tools/omx_test/file_sink.cc @@ -10,19 +10,6 @@ namespace media { -FileSink::FileSink(const FilePath& output_path, - bool simulate_copy, - bool enable_csc) - : output_path_(output_path), - simulate_copy_(simulate_copy), - enable_csc_(enable_csc), - width_(0), - height_(0), - copy_buf_size_(0), - csc_buf_size_(0) { -} - -FileSink::~FileSink() {} void FileSink::BufferReady(int size, uint8* buffer) { if (size > copy_buf_size_) { diff --git a/media/tools/omx_test/file_sink.h b/media/tools/omx_test/file_sink.h index 5703600..69907031 100644 --- a/media/tools/omx_test/file_sink.h +++ b/media/tools/omx_test/file_sink.h @@ -21,9 +21,17 @@ class FileSink { public: FileSink(const FilePath& output_path, bool simulate_copy, - bool enable_csc); - - virtual ~FileSink(); + bool enable_csc) + : output_path_(output_path), + simulate_copy_(simulate_copy), + enable_csc_(enable_csc), + width_(0), + height_(0), + copy_buf_size_(0), + csc_buf_size_(0) { + } + + virtual ~FileSink() {} virtual void BufferReady(int size, uint8* buffer); diff --git a/media/video/video_mock_objects.h b/media/video/mock_objects.h index 1a9592c..c0f3dd9 100644 --- a/media/video/video_mock_objects.h +++ b/media/video/mock_objects.h @@ -13,8 +13,8 @@ namespace media { class MockVideoDecodeEngine : public VideoDecodeEngine { public: - MockVideoDecodeEngine(); - virtual ~MockVideoDecodeEngine(); + MockVideoDecodeEngine() {} + virtual ~MockVideoDecodeEngine() {} MOCK_METHOD4(Initialize, void(MessageLoop* message_loop, EventHandler* event_handler, @@ -32,8 +32,8 @@ class MockVideoDecodeEngine : public VideoDecodeEngine { class MockVideoDecodeContext : public VideoDecodeContext { public: - MockVideoDecodeContext(); - virtual ~MockVideoDecodeContext(); + MockVideoDecodeContext() {} + virtual ~MockVideoDecodeContext() {} MOCK_METHOD0(GetDevice, void*()); MOCK_METHOD6(AllocateVideoFrames, void( diff --git a/media/video/video_mock_objects.cc b/media/video/video_mock_objects.cc deleted file mode 100644 index 5873b59..0000000 --- a/media/video/video_mock_objects.cc +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "media/video/video_mock_objects.h" - -namespace media { - -MockVideoDecodeEngine::MockVideoDecodeEngine() {} - -MockVideoDecodeEngine::~MockVideoDecodeEngine() {} - -MockVideoDecodeContext::MockVideoDecodeContext() {} - -MockVideoDecodeContext::~MockVideoDecodeContext() {} - - -} // namespace media |