Make handling of libyuv more flexible.

- Use gyp variable for libyuv path.
- Rename internal libyuv.h to webrtc_libyuv.h to avoid conflicts.
- Update affected includes.

BUG=none
TEST=trybots
Review URL: https://webrtc-codereview.appspot.com/711004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2534 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2012-07-27 18:21:16 +00:00
parent f5f69c7f5d
commit c1354bd768
28 changed files with 42 additions and 46 deletions

View File

@ -55,6 +55,7 @@
'build_libyuv%': 1, 'build_libyuv%': 1,
'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8', 'webrtc_vp8_dir%': '<(webrtc_root)/modules/video_coding/codecs/vp8',
'libyuv_dir%': '<(DEPTH)/third_party/libyuv',
'conditions': [ 'conditions': [
['OS=="android"', { ['OS=="android"', {

View File

@ -17,7 +17,7 @@
#include "common_video/jpeg/include/jpeg.h" #include "common_video/jpeg/include/jpeg.h"
#include "common_video/jpeg/data_manager.h" #include "common_video/jpeg/data_manager.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
extern "C" { extern "C" {
#if defined(USE_SYSTEM_LIBJPEG) #if defined(USE_SYSTEM_LIBJPEG)

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -15,7 +15,7 @@
#ifndef WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_ #ifndef WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_
#define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_ #define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_SCALER_H_
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "typedefs.h" #include "typedefs.h"
namespace webrtc { namespace webrtc {

View File

@ -9,11 +9,11 @@
*/ */
/* /*
* WebRTC's Wrapper to libyuv. * WebRTC's wrapper to libyuv.
*/ */
#ifndef WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_LIBYUV_H_ #ifndef WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_
#define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_LIBYUV_H_ #define WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_
#include "common_types.h" // RawVideoTypes. #include "common_types.h" // RawVideoTypes.
#include "typedefs.h" #include "typedefs.h"
@ -147,4 +147,4 @@ double I420SSIM(const uint8_t* ref_frame,
int width, int height); int width, int height);
} }
#endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_LIBYUV_H_ #endif // WEBRTC_COMMON_VIDEO_LIBYUV_INCLUDE_WEBRTC_LIBYUV_H_

View File

@ -18,18 +18,15 @@
], ],
}, { }, {
# Need to add a directory normally exported by libyuv.gyp. # Need to add a directory normally exported by libyuv.gyp.
'include_dirs': [ '<(DEPTH)/third_party/libyuv/include', ], 'include_dirs': [ '<(libyuv_dir)/include', ],
}], }],
], ],
'sources': [ 'sources': [
'include/libyuv.h', 'include/webrtc_libyuv.h',
'include/scaler.h', 'include/scaler.h',
'libyuv.cc', 'webrtc_libyuv.cc',
'scaler.cc', 'scaler.cc',
], ],
'include_dirs': [
'<(DEPTH)',
],
}, },
], # targets ], # targets
'conditions': [ 'conditions': [

View File

@ -11,7 +11,7 @@
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "system_wrappers/interface/tick_util.h" #include "system_wrappers/interface/tick_util.h"
#include "testsupport/fileutils.h" #include "testsupport/fileutils.h"

View File

@ -10,8 +10,7 @@
#include "common_video/libyuv/include/scaler.h" #include "common_video/libyuv/include/scaler.h"
// LibYuv #include "libyuv.h"
#include "third_party/libyuv/include/libyuv.h"
namespace webrtc { namespace webrtc {

View File

@ -8,12 +8,11 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include <assert.h> #include <assert.h>
// LibYuv includes #include "libyuv.h"
#include "third_party/libyuv/include/libyuv.h"
namespace webrtc { namespace webrtc {

View File

@ -10,7 +10,7 @@
#include "video_capture_impl.h" #include "video_capture_impl.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "critical_section_wrapper.h" #include "critical_section_wrapper.h"
#include "module_common_types.h" #include "module_common_types.h"
#include "ref_count.h" #include "ref_count.h"

View File

@ -18,7 +18,7 @@
#include "video_capture.h" #include "video_capture.h"
#include "video_capture_config.h" #include "video_capture_config.h"
#include "tick_util.h" #include "tick_util.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
namespace webrtc namespace webrtc
{ {

View File

@ -12,7 +12,7 @@
#include <string.h> #include <string.h>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
namespace webrtc namespace webrtc

View File

@ -13,7 +13,7 @@
#include <string> #include <string>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "common_video/libyuv/include/scaler.h" #include "common_video/libyuv/include/scaler.h"
#include "modules/interface/module_common_types.h" #include "modules/interface/module_common_types.h"
#include "modules/video_coding/codecs/interface/video_codec_interface.h" #include "modules/video_coding/codecs/interface/video_codec_interface.h"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -18,7 +18,7 @@
#include <windows.h> #include <windows.h>
#endif #endif
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "system_wrappers/interface/event_wrapper.h" #include "system_wrappers/interface/event_wrapper.h"
#include "modules/video_coding/codecs/test_framework/video_source.h" #include "modules/video_coding/codecs/test_framework/video_source.h"
#include "testsupport/fileutils.h" #include "testsupport/fileutils.h"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -12,7 +12,7 @@
#define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAMEWORK_VIDEO_SOURCE_H_ #define WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_FRAMEWORK_VIDEO_SOURCE_H_
#include <string> #include <string>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
enum VideoSize enum VideoSize
{ {

View File

@ -16,7 +16,7 @@
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "module_common_types.h" #include "module_common_types.h"
#include "reference_picture_selection.h" #include "reference_picture_selection.h"
#include "temporal_layers.h" #include "temporal_layers.h"

View File

@ -19,7 +19,7 @@
#include "test_callbacks.h" #include "test_callbacks.h"
#include "test_macros.h" #include "test_macros.h"
#include "testsupport/metrics/video_metrics.h" #include "testsupport/metrics/video_metrics.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
using namespace webrtc; using namespace webrtc;

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -11,7 +11,7 @@
#ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_VIDEO_SOURCE_H_ #ifndef WEBRTC_MODULES_VIDEO_CODING_TEST_VIDEO_SOURCE_H_
#define WEBRTC_MODULES_VIDEO_CODING_TEST_VIDEO_SOURCE_H_ #define WEBRTC_MODULES_VIDEO_CODING_TEST_VIDEO_SOURCE_H_
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "typedefs.h" #include "typedefs.h"
#include <string> #include <string>

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -20,7 +20,7 @@
#include "module_common_types.h" #include "module_common_types.h"
#include "video_processing_defines.h" #include "video_processing_defines.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "common_video/libyuv/include/scaler.h" #include "common_video/libyuv/include/scaler.h"
namespace webrtc { namespace webrtc {

View File

@ -12,7 +12,7 @@
#include <string> #include <string>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "system_wrappers/interface/tick_util.h" #include "system_wrappers/interface/tick_util.h"
#include "testsupport/fileutils.h" #include "testsupport/fileutils.h"

View File

@ -10,7 +10,7 @@
#include "video_render_android_surface_view.h" #include "video_render_android_surface_view.h"
#include "critical_section_wrapper.h" #include "critical_section_wrapper.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "tick_util.h" #include "tick_util.h"
#ifdef ANDROID_LOG #ifdef ANDROID_LOG

View File

@ -21,7 +21,7 @@
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/video_render/main/source/video_render_frames.h" #include "modules/video_render/main/source/video_render_frames.h"
#include "system_wrappers/interface/critical_section_wrapper.h" #include "system_wrappers/interface/critical_section_wrapper.h"
#include "system_wrappers/interface/event_wrapper.h" #include "system_wrappers/interface/event_wrapper.h"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -12,7 +12,7 @@
#define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_LINUX_VIDEO_X11_CHANNEL_H_ #define WEBRTC_MODULES_VIDEO_RENDER_MAIN_SOURCE_LINUX_VIDEO_X11_CHANNEL_H_
#include "video_render_defines.h" #include "video_render_defines.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include <sys/shm.h> #include <sys/shm.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>

View File

@ -19,7 +19,7 @@
#include "event_wrapper.h" #include "event_wrapper.h"
#include "trace.h" #include "trace.h"
#include "thread_wrapper.h" #include "thread_wrapper.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
namespace webrtc { namespace webrtc {

View File

@ -16,7 +16,7 @@
#include "event_wrapper.h" #include "event_wrapper.h"
#include "trace.h" #include "trace.h"
#include "thread_wrapper.h" #include "thread_wrapper.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
namespace webrtc { namespace webrtc {

View File

@ -19,7 +19,7 @@
#include "event_wrapper.h" #include "event_wrapper.h"
#include "trace.h" #include "trace.h"
#include "thread_wrapper.h" #include "thread_wrapper.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
namespace webrtc { namespace webrtc {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
* *
* Use of this source code is governed by a BSD-style license * Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source * that can be found in the LICENSE file in the root of the source
@ -13,7 +13,7 @@
#include "typedefs.h" #include "typedefs.h"
#include "i_video_render_win.h" #include "i_video_render_win.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "ddraw.h" #include "ddraw.h"
#include <Map> #include <Map>
@ -295,7 +295,7 @@ public:
bool DeliverInScreenType(); bool DeliverInScreenType();
int GetChannels(std::list<int>& channelList); int GetChannels(std::list<int>& channelList);
// code for getting graphics settings // code for getting graphics settings
int GetScreenResolution(int& screenWidth, int& screenHeight); int GetScreenResolution(int& screenWidth, int& screenHeight);
int UpdateSystemCPUUsage(int systemCPU); int UpdateSystemCPUUsage(int systemCPU);

View File

@ -14,7 +14,7 @@
#include <cassert> #include <cassert>
#include <cstdio> #include <cstdio>
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
namespace webrtc { namespace webrtc {
namespace test { namespace test {

View File

@ -10,7 +10,7 @@
#include "video_engine/vie_renderer.h" #include "video_engine/vie_renderer.h"
#include "common_video/libyuv/include/libyuv.h" #include "common_video/libyuv/include/webrtc_libyuv.h"
#include "modules/video_render/main/interface/video_render.h" #include "modules/video_render/main/interface/video_render.h"
#include "modules/video_render/main/interface/video_render_defines.h" #include "modules/video_render/main/interface/video_render_defines.h"
#include "video_engine/vie_render_manager.h" #include "video_engine/vie_render_manager.h"