diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-26 01:49:32 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-26 01:49:32 +0000 |
commit | a651b74d09d8f96d6dbb488dde3c494d97544886 (patch) | |
tree | 30c6280d152e13b42e38d1ceed96759ce65db15b | |
parent | 673590a92d94c9fac62a3984f31e89461bde5054 (diff) | |
download | chromium_src-a651b74d09d8f96d6dbb488dde3c494d97544886.zip chromium_src-a651b74d09d8f96d6dbb488dde3c494d97544886.tar.gz chromium_src-a651b74d09d8f96d6dbb488dde3c494d97544886.tar.bz2 |
Refactor some code that depends on FFmpeg
Some FFmpeg header and source files are misplaced:
media/filters/ffmpeg_common.{cc, h} -> media/ffmpeg
media/tools/media_bench/file_protocol.{cc, h} -> media/ffmpeg
And the necessary refactoring for the new location is done.
Review URL: http://codereview.chromium.org/555087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37080 0039d316-1c4b-4281-b951-d872f2087c98
24 files changed, 60 insertions, 60 deletions
diff --git a/media/base/mock_ffmpeg.cc b/media/base/mock_ffmpeg.cc index 2422dd9..0d872068 100644 --- a/media/base/mock_ffmpeg.cc +++ b/media/base/mock_ffmpeg.cc @@ -5,7 +5,7 @@ #include "media/base/mock_ffmpeg.h" #include "base/logging.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" using ::testing::_; using ::testing::AtMost; diff --git a/media/base/mock_ffmpeg.h b/media/base/mock_ffmpeg.h index 99c9c086..a4a9f1a 100644 --- a/media/base/mock_ffmpeg.h +++ b/media/base/mock_ffmpeg.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -6,7 +6,7 @@ #define MEDIA_BASE_MOCK_FFMPEG_H_ // TODO(scherkus): See if we can remove ffmpeg_common from this file. -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "testing/gmock/include/gmock/gmock.h" namespace media { diff --git a/media/filters/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc index d1c1103..5100b31 100644 --- a/media/filters/ffmpeg_common.cc +++ b/media/ffmpeg/ffmpeg_common.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" namespace media { diff --git a/media/filters/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h index 19c8fcf..9be245f 100644 --- a/media/filters/ffmpeg_common.h +++ b/media/ffmpeg/ffmpeg_common.h @@ -1,9 +1,9 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. -#ifndef MEDIA_FILTERS_FFMPEG_COMMON_H_ -#define MEDIA_FILTERS_FFMPEG_COMMON_H_ +#ifndef MEDIA_FFMPEG_FFMPEG_COMMON_H_ +#define MEDIA_FFMPEG_FFMPEG_COMMON_H_ // Used for FFmpeg error codes. #include <cerrno> @@ -79,4 +79,4 @@ extern const char kFFmpegVideo[]; } // namespace media -#endif // MEDIA_FILTERS_FFMPEG_COMMON_H_ +#endif // MEDIA_FFMPEG_FFMPEG_COMMON_H_ diff --git a/media/ffmpeg/ffmpeg_util.cc b/media/ffmpeg/ffmpeg_util.cc index 1be3b12..aa9f7a27 100644 --- a/media/ffmpeg/ffmpeg_util.cc +++ b/media/ffmpeg/ffmpeg_util.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2009 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. +// 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/ffmpeg/ffmpeg_util.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" namespace media { diff --git a/media/tools/media_bench/file_protocol.cc b/media/ffmpeg/file_protocol.cc index f85fe33..2d1bd1d 100644 --- a/media/tools/media_bench/file_protocol.cc +++ b/media/ffmpeg/file_protocol.cc @@ -1,8 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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/tools/media_bench/file_protocol.h" +#include "media/ffmpeg/file_protocol.h" #include "build/build_config.h" @@ -16,7 +16,7 @@ #include "base/compiler_specific.h" #include "base/file_util.h" #include "base/logging.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" // warning C4996: 'open': The POSIX name for this item is deprecated. MSVC_PUSH_DISABLE_WARNING(4996) diff --git a/media/tools/media_bench/file_protocol.h b/media/ffmpeg/file_protocol.h index d4df2d3..ed37467 100644 --- a/media/tools/media_bench/file_protocol.h +++ b/media/ffmpeg/file_protocol.h @@ -1,14 +1,14 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. // // Implements a basic file I/O URLProtocol for FFmpeg. Since we don't build // FFmpeg binaries with protocols, we have to write our own. -#ifndef MEDIA_TOOLS_MEDIA_BENCH_FILE_PROTOCOL_H_ -#define MEDIA_TOOLS_MEDIA_BENCH_FILE_PROTOCOL_H_ +#ifndef MEDIA_FFMPEG_FILE_PROTOCOL_H_ +#define MEDIA_FFMPEG_FILE_PROTOCOL_H_ struct URLProtocol; extern URLProtocol kFFmpegFileProtocol; -#endif // MEDIA_TOOLS_MEDIA_BENCH_FILE_PROTOCOL_H_ +#endif // MEDIA_FFMPEG_FILE_PROTOCOL_H_ diff --git a/media/filters/bitstream_converter.cc b/media/filters/bitstream_converter.cc index c8ec355..0818caf 100644 --- a/media/filters/bitstream_converter.cc +++ b/media/filters/bitstream_converter.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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/filters/bitstream_converter.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" namespace media { diff --git a/media/filters/bitstream_converter_unittest.cc b/media/filters/bitstream_converter_unittest.cc index 007becb..85ca34e 100644 --- a/media/filters/bitstream_converter_unittest.cc +++ b/media/filters/bitstream_converter_unittest.cc @@ -1,12 +1,12 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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 <deque> #include "media/base/mock_ffmpeg.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/bitstream_converter.h" -#include "media/filters/ffmpeg_common.h" #include "testing/gtest/include/gtest/gtest.h" using ::testing::DoAll; diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc index 884cde9..b7a828b 100644 --- a/media/filters/ffmpeg_audio_decoder.cc +++ b/media/filters/ffmpeg_audio_decoder.cc @@ -1,13 +1,13 @@ -// Copyright (c) 2009 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. +// 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/filters/ffmpeg_audio_decoder.h" #include "media/base/callback.h" #include "media/base/data_buffer.h" #include "media/base/limits.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_demuxer.h" namespace media { diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index 5b48cbd..e53efc2 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -9,9 +9,9 @@ #include "base/time.h" #include "media/base/filter_host.h" #include "media/base/media_switches.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/ffmpeg/ffmpeg_util.h" #include "media/filters/bitstream_converter.h" -#include "media/filters/ffmpeg_common.h" #include "media/filters/ffmpeg_demuxer.h" #include "media/filters/ffmpeg_glue.h" diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h index 97fbfc8..b10c3ed 100644 --- a/media/filters/ffmpeg_demuxer.h +++ b/media/filters/ffmpeg_demuxer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc index 4fa0647..e8f6461 100644 --- a/media/filters/ffmpeg_demuxer_unittest.cc +++ b/media/filters/ffmpeg_demuxer_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -10,7 +10,7 @@ #include "media/base/mock_filter_host.h" #include "media/base/mock_filters.h" #include "media/base/mock_reader.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_demuxer.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/media/filters/ffmpeg_glue.cc b/media/filters/ffmpeg_glue.cc index 77b1f33..0b2ee4b 100644 --- a/media/filters/ffmpeg_glue.cc +++ b/media/filters/ffmpeg_glue.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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 "base/string_util.h" #include "media/base/filters.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_glue.h" namespace { diff --git a/media/filters/ffmpeg_glue_unittest.cc b/media/filters/ffmpeg_glue_unittest.cc index 303a8ba..7c6f2a0 100644 --- a/media/filters/ffmpeg_glue_unittest.cc +++ b/media/filters/ffmpeg_glue_unittest.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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/base/mock_ffmpeg.h" #include "media/base/mock_filters.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_glue.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/media/filters/ffmpeg_video_decode_engine.cc b/media/filters/ffmpeg_video_decode_engine.cc index 976e9ab..b6adec2 100644 --- a/media/filters/ffmpeg_video_decode_engine.cc +++ b/media/filters/ffmpeg_video_decode_engine.cc @@ -1,14 +1,14 @@ -// Copyright (c) 2009 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. +// 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/filters/ffmpeg_video_decode_engine.h" #include "base/task.h" #include "media/base/callback.h" #include "media/base/video_frame_impl.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/ffmpeg/ffmpeg_util.h" -#include "media/filters/ffmpeg_common.h" #include "media/filters/ffmpeg_demuxer.h" namespace media { diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc index 453eda2..0ccbd48 100644 --- a/media/filters/ffmpeg_video_decoder.cc +++ b/media/filters/ffmpeg_video_decoder.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2009 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. +// 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/filters/ffmpeg_video_decoder.h" #include "media/base/media_format.h" -#include "media/filters/ffmpeg_common.h" // For kFFmpegVideo. +#include "media/ffmpeg/ffmpeg_common.h" // For kFFmpegVideo. #include "media/filters/ffmpeg_video_decode_engine.h" namespace media { diff --git a/media/filters/omx_video_decode_engine.cc b/media/filters/omx_video_decode_engine.cc index 95209d7..faa31a5 100644 --- a/media/filters/omx_video_decode_engine.cc +++ b/media/filters/omx_video_decode_engine.cc @@ -21,7 +21,7 @@ #include "base/message_loop.h" #include "media/base/callback.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" namespace media { diff --git a/media/filters/omx_video_decoder.cc b/media/filters/omx_video_decoder.cc index 87baed7..d239b6f 100644 --- a/media/filters/omx_video_decoder.cc +++ b/media/filters/omx_video_decoder.cc @@ -1,11 +1,11 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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/filters/omx_video_decoder.h" #include "base/waitable_event.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/omx_video_decode_engine.h" namespace media { diff --git a/media/filters/video_decoder_impl.cc b/media/filters/video_decoder_impl.cc index 8390671..870e160 100644 --- a/media/filters/video_decoder_impl.cc +++ b/media/filters/video_decoder_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -8,7 +8,7 @@ #include "media/base/filters.h" #include "media/base/limits.h" #include "media/base/video_frame_impl.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_interfaces.h" #include "media/filters/video_decode_engine.h" #include "media/ffmpeg/ffmpeg_util.h" diff --git a/media/filters/video_decoder_impl_unittest.cc b/media/filters/video_decoder_impl_unittest.cc index a9164b1..95a4507 100644 --- a/media/filters/video_decoder_impl_unittest.cc +++ b/media/filters/video_decoder_impl_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -12,7 +12,7 @@ #include "media/base/mock_filter_host.h" #include "media/base/mock_filters.h" #include "media/base/mock_task.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" #include "media/filters/ffmpeg_interfaces.h" #include "media/filters/ffmpeg_video_decoder.h" #include "media/filters/video_decode_engine.h" diff --git a/media/media.gyp b/media/media.gyp index 07d5271..af218a1 100644 --- a/media/media.gyp +++ b/media/media.gyp @@ -87,8 +87,12 @@ 'base/yuv_row_mac.cc', 'base/yuv_row_linux.cc', 'base/yuv_row.h', + 'ffmpeg/ffmpeg_common.cc', + 'ffmpeg/ffmpeg_common.h', 'ffmpeg/ffmpeg_util.cc', 'ffmpeg/ffmpeg_util.h', + 'ffmpeg/file_protocol.cc', + 'ffmpeg/file_protocol.h', 'filters/audio_renderer_algorithm_base.cc', 'filters/audio_renderer_algorithm_base.h', 'filters/audio_renderer_algorithm_default.cc', @@ -104,8 +108,6 @@ 'filters/decoder_base.h', 'filters/ffmpeg_audio_decoder.cc', 'filters/ffmpeg_audio_decoder.h', - 'filters/ffmpeg_common.cc', - 'filters/ffmpeg_common.h', 'filters/ffmpeg_demuxer.cc', 'filters/ffmpeg_demuxer.h', 'filters/ffmpeg_glue.cc', @@ -243,8 +245,6 @@ '../third_party/ffmpeg/ffmpeg.gyp:ffmpeg', ], 'sources': [ - 'tools/media_bench/file_protocol.cc', - 'tools/media_bench/file_protocol.h', 'tools/media_bench/media_bench.cc', ], }, @@ -273,7 +273,7 @@ '../base/base.gyp:base', ], 'sources': [ - 'omx/omx_test.cc', + 'tools/omx_test/omx_test.cc', ], }, { diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc index 1a18ec8..5e1b844 100644 --- a/media/tools/media_bench/media_bench.cc +++ b/media/tools/media_bench/media_bench.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// 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. @@ -29,9 +29,9 @@ #include "base/time.h" #include "media/base/djb2.h" #include "media/base/media.h" -#include "media/filters/ffmpeg_common.h" +#include "media/ffmpeg/ffmpeg_common.h" +#include "media/ffmpeg/file_protocol.h" #include "media/filters/ffmpeg_video_decoder.h" -#include "media/tools/media_bench/file_protocol.h" namespace switches { const char kStream[] = "stream"; diff --git a/media/omx/omx_test.cc b/media/tools/omx_test/omx_test.cc index a86f6a6..a86f6a6 100644 --- a/media/omx/omx_test.cc +++ b/media/tools/omx_test/omx_test.cc |