Add winsdk_samples to provide directshow_baseclasses.
Builds locally on Windows (and passes try), and a gyp run succeeds with
include_internal_video_capture=0. This should ensure it won't impact
Chromium.
Review URL: https://webrtc-codereview.appspot.com/937026
git-svn-id: http://webrtc.googlecode.com/svn/trunk@3146 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/DEPS b/DEPS
index f84fd38..563a233 100644
--- a/DEPS
+++ b/DEPS
@@ -95,6 +95,9 @@
"third_party/cygwin":
(Var("googlecode_url") % "webrtc") + "/deps/third_party/cygwin@2672",
+ "third_party/winsdk_samples/src":
+ (Var("googlecode_url") % "webrtc") + "/deps/third_party/winsdk_samples_v71@3145",
+
# Used by libjpeg-turbo.
"third_party/yasm/binaries":
From("chromium_deps", "src/third_party/yasm/binaries"),
diff --git a/third_party/winsdk_samples/README.webrtc b/third_party/winsdk_samples/README.webrtc
new file mode 100644
index 0000000..ee8c185
--- /dev/null
+++ b/third_party/winsdk_samples/README.webrtc
@@ -0,0 +1,15 @@
+Name: winsdk_samples
+URL: http://www.microsoft.com/en-us/download/details.aspx?id=8279
+Version: 7.1
+License: Microsoft Windows SDK license
+License File: src/License/License.htm
+Security Critical: yes
+
+Description:
+This contains a copy of a portion of the Microsoft Windows SDK 7.1 sample
+code. It is covered by the "Sample Code" section of the license.
+
+This would typically be installed to:
+C:\Program Files\Microsoft SDKs\Windows\v7.1
+
+It is used by WebRTC to capture video from a camera on Windows.
diff --git a/third_party/winsdk_samples/winsdk_samples.gyp b/third_party/winsdk_samples/winsdk_samples.gyp
new file mode 100644
index 0000000..a9b8598
--- /dev/null
+++ b/third_party/winsdk_samples/winsdk_samples.gyp
@@ -0,0 +1,90 @@
+# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
+#
+# 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
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'directshow_baseclasses',
+ 'type': 'static_library',
+ 'variables': {
+ 'baseclasses_dir%':
+ 'src/Samples/multimedia/directshow/baseclasses',
+ },
+ 'defines!': [
+ 'NOMINMAX',
+ ],
+ 'include_dirs': ['<(baseclasses_dir)',],
+ 'direct_dependent_settings': {
+ 'include_dirs': ['<(baseclasses_dir)',],
+ },
+ 'sources': [
+ '<(baseclasses_dir)/amextra.cpp',
+ '<(baseclasses_dir)/amextra.h',
+ '<(baseclasses_dir)/amfilter.cpp',
+ '<(baseclasses_dir)/amfilter.h',
+ '<(baseclasses_dir)/amvideo.cpp',
+ '<(baseclasses_dir)/cache.h',
+ '<(baseclasses_dir)/combase.cpp',
+ '<(baseclasses_dir)/combase.h',
+ '<(baseclasses_dir)/cprop.cpp',
+ '<(baseclasses_dir)/cprop.h',
+ '<(baseclasses_dir)/ctlutil.cpp',
+ '<(baseclasses_dir)/ctlutil.h',
+ '<(baseclasses_dir)/ddmm.cpp',
+ '<(baseclasses_dir)/ddmm.h',
+ '<(baseclasses_dir)/dllentry.cpp',
+ '<(baseclasses_dir)/dllsetup.cpp',
+ '<(baseclasses_dir)/dllsetup.h',
+ '<(baseclasses_dir)/fourcc.h',
+ '<(baseclasses_dir)/measure.h',
+ '<(baseclasses_dir)/msgthrd.h',
+ '<(baseclasses_dir)/mtype.cpp',
+ '<(baseclasses_dir)/mtype.h',
+ '<(baseclasses_dir)/outputq.cpp',
+ '<(baseclasses_dir)/outputq.h',
+ '<(baseclasses_dir)/pstream.cpp',
+ '<(baseclasses_dir)/pstream.h',
+ '<(baseclasses_dir)/pullpin.cpp',
+ '<(baseclasses_dir)/pullpin.h',
+ '<(baseclasses_dir)/refclock.cpp',
+ '<(baseclasses_dir)/refclock.h',
+ '<(baseclasses_dir)/reftime.h',
+ '<(baseclasses_dir)/renbase.cpp',
+ '<(baseclasses_dir)/renbase.h',
+ '<(baseclasses_dir)/schedule.cpp',
+ '<(baseclasses_dir)/seekpt.cpp',
+ '<(baseclasses_dir)/seekpt.h',
+ '<(baseclasses_dir)/source.cpp',
+ '<(baseclasses_dir)/source.h',
+ '<(baseclasses_dir)/streams.h',
+ '<(baseclasses_dir)/strmctl.cpp',
+ '<(baseclasses_dir)/strmctl.h',
+ '<(baseclasses_dir)/sysclock.cpp',
+ '<(baseclasses_dir)/sysclock.h',
+ '<(baseclasses_dir)/transfrm.cpp',
+ '<(baseclasses_dir)/transfrm.h',
+ '<(baseclasses_dir)/transip.cpp',
+ '<(baseclasses_dir)/transip.h',
+ '<(baseclasses_dir)/videoctl.cpp',
+ '<(baseclasses_dir)/videoctl.h',
+ '<(baseclasses_dir)/vtrans.cpp',
+ '<(baseclasses_dir)/vtrans.h',
+ '<(baseclasses_dir)/winctrl.cpp',
+ '<(baseclasses_dir)/winctrl.h',
+ '<(baseclasses_dir)/winutil.cpp',
+ '<(baseclasses_dir)/winutil.h',
+ '<(baseclasses_dir)/wxdebug.cpp',
+ '<(baseclasses_dir)/wxdebug.h',
+ '<(baseclasses_dir)/wxlist.cpp',
+ '<(baseclasses_dir)/wxlist.h',
+ '<(baseclasses_dir)/wxutil.cpp',
+ '<(baseclasses_dir)/wxutil.h',
+ ],
+ },
+ ],
+}
diff --git a/webrtc/modules/video_capture/video_capture.gypi b/webrtc/modules/video_capture/video_capture.gypi
index b7eefc5..5ee04bf 100644
--- a/webrtc/modules/video_capture/video_capture.gypi
+++ b/webrtc/modules/video_capture/video_capture.gypi
@@ -39,7 +39,7 @@
'external/device_info_external.cc',
'external/video_capture_external.cc',
],
- },{ # include_internal_video_capture == 1
+ }, { # include_internal_video_capture == 1
'conditions': [
['OS=="linux"', {
'include_dirs': [
@@ -80,7 +80,7 @@
}], # mac
['OS=="win"', {
'dependencies': [
- '<(webrtc_root)/modules/video_capture/windows/direct_show_base_classes.gyp:direct_show_base_classes',
+ '<(DEPTH)/third_party/winsdk_samples/winsdk_samples.gyp:directshow_baseclasses',
],
'include_dirs': [
'windows',
diff --git a/webrtc/modules/video_capture/windows/direct_show_base_classes.gyp b/webrtc/modules/video_capture/windows/direct_show_base_classes.gyp
deleted file mode 100644
index 1eb2127..0000000
--- a/webrtc/modules/video_capture/windows/direct_show_base_classes.gyp
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# 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
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-
-# This target is broken out into its own gyp file in order to be treated as
-# third party code. (Since src/build/common.gypi is not included,
-# chromium_code is disabled).
-#
-# We can't place this in third_party/ because Chromium parses
-# video_capture.gypi and would fail to find it in the Chromium third_party/.
-{
- 'targets': [
- {
- 'target_name': 'direct_show_base_classes',
- 'type': 'static_library',
- 'variables': {
- # Path needed to build the Direct Show base classes on Windows. The
- # code is included in the Windows SDK.
- 'direct_show_dir%':
- 'C:/Program Files/Microsoft SDKs/Windows/v7.1/Samples/multimedia/directshow/baseclasses/',
- },
- 'defines!': [
- 'NOMINMAX',
- ],
- 'include_dirs': [
- '<(direct_show_dir)',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '<(direct_show_dir)',
- ],
- },
- 'sources': [
- '<(direct_show_dir)amextra.cpp',
- '<(direct_show_dir)amextra.h',
- '<(direct_show_dir)amfilter.cpp',
- '<(direct_show_dir)amfilter.h',
- '<(direct_show_dir)amvideo.cpp',
- '<(direct_show_dir)cache.h',
- '<(direct_show_dir)combase.cpp',
- '<(direct_show_dir)combase.h',
- '<(direct_show_dir)cprop.cpp',
- '<(direct_show_dir)cprop.h',
- '<(direct_show_dir)ctlutil.cpp',
- '<(direct_show_dir)ctlutil.h',
- '<(direct_show_dir)ddmm.cpp',
- '<(direct_show_dir)ddmm.h',
- '<(direct_show_dir)dllentry.cpp',
- '<(direct_show_dir)dllsetup.cpp',
- '<(direct_show_dir)dllsetup.h',
- '<(direct_show_dir)fourcc.h',
- '<(direct_show_dir)measure.h',
- '<(direct_show_dir)msgthrd.h',
- '<(direct_show_dir)mtype.cpp',
- '<(direct_show_dir)mtype.h',
- '<(direct_show_dir)outputq.cpp',
- '<(direct_show_dir)outputq.h',
- '<(direct_show_dir)pstream.cpp',
- '<(direct_show_dir)pstream.h',
- '<(direct_show_dir)pullpin.cpp',
- '<(direct_show_dir)pullpin.h',
- '<(direct_show_dir)refclock.cpp',
- '<(direct_show_dir)refclock.h',
- '<(direct_show_dir)reftime.h',
- '<(direct_show_dir)renbase.cpp',
- '<(direct_show_dir)renbase.h',
- '<(direct_show_dir)schedule.cpp',
- '<(direct_show_dir)seekpt.cpp',
- '<(direct_show_dir)seekpt.h',
- '<(direct_show_dir)source.cpp',
- '<(direct_show_dir)source.h',
- '<(direct_show_dir)streams.h',
- '<(direct_show_dir)strmctl.cpp',
- '<(direct_show_dir)strmctl.h',
- '<(direct_show_dir)sysclock.cpp',
- '<(direct_show_dir)sysclock.h',
- '<(direct_show_dir)transfrm.cpp',
- '<(direct_show_dir)transfrm.h',
- '<(direct_show_dir)transip.cpp',
- '<(direct_show_dir)transip.h',
- '<(direct_show_dir)videoctl.cpp',
- '<(direct_show_dir)videoctl.h',
- '<(direct_show_dir)vtrans.cpp',
- '<(direct_show_dir)vtrans.h',
- '<(direct_show_dir)winctrl.cpp',
- '<(direct_show_dir)winctrl.h',
- '<(direct_show_dir)winutil.cpp',
- '<(direct_show_dir)winutil.h',
- '<(direct_show_dir)wxdebug.cpp',
- '<(direct_show_dir)wxdebug.h',
- '<(direct_show_dir)wxlist.cpp',
- '<(direct_show_dir)wxlist.h',
- '<(direct_show_dir)wxutil.cpp',
- '<(direct_show_dir)wxutil.h',
- ],
- },
- ],
-}