Index: third_party/openh264/openh264.gyp |
diff --git a/third_party/openh264/openh264.gyp b/third_party/openh264/openh264.gyp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4fb24ec3d76cd57a37dd3df9c0894bacc8e89fe3 |
--- /dev/null |
+++ b/third_party/openh264/openh264.gyp |
@@ -0,0 +1,176 @@ |
+# Copyright 2015 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. |
+ |
+{ |
+ 'conditions': [ |
+ ['use_openh264==1', { |
+ # Settings shared by all openh264 targets. |
+ 'target_defaults': { |
+ 'variables': { |
+ 'chromium_code': 0, |
+ 'conditions': [ |
+ ['OS!="win"', { |
+ # GCC flags |
+ 'openh264_cflags_add': [ |
+ '-Wno-macro-redefined', # due to VERSION_NUMBER workaround |
+ '-Wno-unused-value', |
+ ], |
+ 'openh264_cflags_remove': [ |
+ '-Wheader-hygiene', |
+ ], |
+ },{ |
+ # Windows uses 'msvs_disabled_warnings' instead, for MSVC flags. |
+ 'openh264_cflags_add': [], |
+ 'openh264_cflags_remove': [], |
+ }], |
+ ], |
+ }, |
+ 'cflags': [ '<@(openh264_cflags_add)' ], |
+ 'cflags!': [ '<@(openh264_cflags_remove)' ], |
+ 'xcode_settings': { |
+ 'WARNING_CFLAGS': [ '<@(openh264_cflags_add)' ], |
+ 'WARNING_CFLAGS!': [ '<@(openh264_cflags_remove)' ], |
+ }, |
+ 'msvs_disabled_warnings': [ |
+ 4005, # macro redefinition - due to VERSION_NUMBER workaround |
+ 4324, # structure was padded |
+ 4245, # signed/unsigned mismatch |
+ 4701, # uninitialized variable used |
+ 4702, # unreachable code |
+ ], |
+ |
+ # Platform-specific defines. |
+ 'conditions': [ |
+ ['OS=="android"', { |
+ 'defines': [ |
+ 'ANDROID_NDK', |
+ ], |
+ }], |
+ ], |
+ |
+ # Workaround relating to the VERSION_NUMBER macro in version.h. |
+ # TODO(hbos): Fix cause of the issue instead of this workaround. |
+ 'defines': [ |
+ # On some builds VERSION_NUMBER is not defined when including |
+ # version.h (probably another file is included named version.h, I have |
+ # not been able to reproduce the problem on a local machine). Since |
+ # the macro is only used for debug printing in wels[En/De]coderExt.cpp |
+ # we can get around the undeclared identifier error by giving it a |
+ # default value ourselves. |
+ 'VERSION_NUMBER="openh264 v.?.?"', |
+ ], |
+ }, |
+ 'includes': [ |
+ 'openh264.gypi', |
+ ], |
+ 'targets': [ |
+ { |
+ 'target_name': 'openh264_common', |
+ 'type': 'static_library', |
+ 'conditions': [ |
+ ['OS=="android"', { |
+ 'dependencies': [ |
+ # Defines "android_get/setCpu..." functions. The original |
+ # OpenH264 build files replaces these using macros for |
+ # "wels_..." versions of the same functions. We do not have |
+ # access to these and use the <cpu-features.h> ones instead. |
+ '<(DEPTH)/build/android/ndk.gyp:cpu_features', |
+ ], |
+ }], |
+ ], |
+ 'include_dirs': [ |
+ 'src/codec/api/svc', |
+ 'src/codec/common/inc', |
+ 'src/codec/common/src', |
+ ], |
+ 'sources': [ |
+ '<@(openh264_common_sources)', |
+ ], |
+ }, |
+ { |
+ 'target_name': 'openh264_processing', |
+ 'type': 'static_library', |
+ 'dependencies': [ |
+ 'openh264_common', |
+ ], |
+ 'include_dirs': [ |
+ 'src/codec/api/svc', |
+ 'src/codec/common/inc', |
+ 'src/codec/common/src', |
+ 'src/codec/processing/interface', |
+ 'src/codec/processing/interface/', |
+ 'src/codec/processing/src/adaptivequantization', |
+ 'src/codec/processing/src/backgrounddetection', |
+ 'src/codec/processing/src/common', |
+ 'src/codec/processing/src/complexityanalysis', |
+ 'src/codec/processing/src/denoise', |
+ 'src/codec/processing/src/downsample', |
+ 'src/codec/processing/src/imagerotate', |
+ 'src/codec/processing/src/scenechangedetection', |
+ 'src/codec/processing/src/scrolldetection', |
+ 'src/codec/processing/src/vaacalc', |
+ ], |
+ 'sources': [ |
+ '<@(openh264_processing_sources)', |
+ ], |
+ }, |
+ { |
+ 'target_name': 'openh264_encoder', |
+ 'type': 'static_library', |
+ 'dependencies': [ |
+ 'openh264_common', |
+ 'openh264_processing', |
+ ], |
+ 'include_dirs': [ |
+ 'src/codec/api/svc', |
+ 'src/codec/common/inc', |
+ 'src/codec/common/src', |
+ 'src/codec/encoder/core/inc', |
+ 'src/codec/encoder/core/src', |
+ 'src/codec/encoder/plus/inc', |
+ 'src/codec/encoder/plus/src', |
+ 'src/codec/processing/interface/', |
+ ], |
+ 'sources': [ |
+ '<@(openh264_encoder_sources)', |
+ ], |
+ }, |
+ { |
+ 'target_name': 'openh264_decoder', |
+ 'type': 'static_library', |
+ 'dependencies': [ |
+ 'openh264_common', |
+ 'openh264_processing', |
+ ], |
+ 'defines': [ |
+ # Disables decoder_core.cpp debug prints. |
+ 'CODEC_FOR_TESTBED', |
+ ], |
+ 'include_dirs': [ |
+ 'src/codec/api/svc', |
+ 'src/codec/common/inc', |
+ 'src/codec/common/src', |
+ 'src/codec/decoder/core/inc', |
+ 'src/codec/decoder/core/src', |
+ 'src/codec/decoder/plus/inc', |
+ 'src/codec/decoder/plus/src', |
+ 'src/codec/processing/interface/', |
+ ], |
+ 'sources': [ |
+ '<@(openh264_decoder_sources)', |
+ ], |
+ }, |
+ ], |
+ },{ |
+ # Building without OpenH264. Defining a dummy target because every build |
+ # file needs to have at least one target. |
+ 'targets': [ |
+ { |
+ 'target_name': 'openh264_dummy_target', |
+ 'type': 'none', |
+ } |
+ ], |
+ }], |
+ ], |
+} |