From owner-freebsd-gecko@FreeBSD.ORG Tue Feb 12 21:33:49 2013 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 30F617A7 for ; Tue, 12 Feb 2013 21:33:49 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 74D462DE for ; Tue, 12 Feb 2013 21:33:48 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id r1CLXkHW086680 for ; Tue, 12 Feb 2013 21:33:46 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id r1CLXfkt085041 for freebsd-gecko@freebsd.org; Tue, 12 Feb 2013 21:33:41 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Tue, 12 Feb 2013 21:33:41 GMT Message-Id: <201302122133.r1CLXfkt085041@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r1170 - in trunk/www: firefox firefox-nightly firefox-nightly/files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 21:33:49 -0000 Author: jbeich Date: Tue Feb 12 21:33:41 2013 New Revision: 1170 Log: update Modified: trunk/www/firefox-nightly/Makefile.hgrev trunk/www/firefox-nightly/distinfo trunk/www/firefox-nightly/files/patch-bug807492 trunk/www/firefox-nightly/files/patch-bug826985 trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc trunk/www/firefox/Makefile trunk/www/firefox/distinfo Modified: trunk/www/firefox-nightly/Makefile.hgrev ============================================================================== --- trunk/www/firefox-nightly/Makefile.hgrev Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/Makefile.hgrev Tue Feb 12 21:33:41 2013 (r1170) @@ -1 +1 @@ -HGREV= 121270:fcf79680a057 +HGREV= 121606:161a347bda5b Modified: trunk/www/firefox-nightly/distinfo ============================================================================== --- trunk/www/firefox-nightly/distinfo Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/distinfo Tue Feb 12 21:33:41 2013 (r1170) @@ -1,2 +1,2 @@ -SHA256 (firefox-nightly/fcf79680a057.tar.bz2) = 53c3eaa80f8b685bcfa38d7c25ee0616ca614b67038e6ff619d21dab84c09d9d -SIZE (firefox-nightly/fcf79680a057.tar.bz2) = 102320811 +SHA256 (firefox-nightly/161a347bda5b.tar.bz2) = 852b4c60b1494098079db5bbb7a244f88539736b93b1776473aa4933ace77f28 +SIZE (firefox-nightly/161a347bda5b.tar.bz2) = 102510472 Modified: trunk/www/firefox-nightly/files/patch-bug807492 ============================================================================== --- trunk/www/firefox-nightly/files/patch-bug807492 Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/files/patch-bug807492 Tue Feb 12 21:33:41 2013 (r1170) @@ -64,7 +64,7 @@ ;; esac fi -@@ -8996,16 +9008,21 @@ elif test "${OS_TARGET}" = "Android"; th +@@ -8997,16 +9008,21 @@ elif test "${OS_TARGET}" = "Android"; th EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android " if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then EXTRA_GYP_DEFINES+=" -D armv7=0 " @@ -83,7 +83,7 @@ dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries dnl so that regeneration via dependencies works correctly - WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi" + WEBRTC_CONFIG="-D build_with_mozilla=1 -D build_with_chromium=0 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi" GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}" diff --git js/src/config/system-headers js/src/config/system-headers @@ -553,25 +553,6 @@ index a30e330..cfbd8a3 100644 --- media/webrtc/signaling/test/Makefile.in +++ media/webrtc/signaling/test/Makefile.in -@@ -22,17 +22,17 @@ LIBS = \ - $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \ - $(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \ - $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \ - $(DEPTH)/media/webrtc/trunk/testing/gtest_gtest/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \ - $(DEPTH)/netwerk/srtp/src/$(LIB_PREFIX)nksrtp_s.$(LIB_SUFFIX) \ - $(NULL) - - ifdef MOZ_SYDNEYAUDIO --ifeq ($(OS_TARGET),Linux) -+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET))) - LIBS += \ - $(MOZ_ALSA_LIBS) \ - $(NULL) - endif - endif - - ifeq ($(OS_TARGET),Android) - LIBS += \ @@ -65,17 +65,17 @@ endif ifeq (qt,$(MOZ_WIDGET_TOOLKIT)) LIBS += \ @@ -691,18 +672,18 @@ # Flags to use X11 on non-Mac POSIX platforms ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', { 'use_glib%': 0, -diff --git media/webrtc/trunk/src/build/common.gypi media/webrtc/trunk/src/build/common.gypi +diff --git media/webrtc/trunk/webrtc/build/common.gypi media/webrtc/trunk/webrtc/build/common.gypi index 9ca9f7c..d5c4ab9 100644 ---- media/webrtc/trunk/src/build/common.gypi -+++ media/webrtc/trunk/src/build/common.gypi -@@ -101,16 +101,23 @@ - 'enable_protobuf%': 1, - 'include_tests%': 1, - - # TODO(andrew): For now, disable the Chrome plugins, which causes a +--- media/webrtc/trunk/webrtc/build/common.gypi ++++ media/webrtc/trunk/webrtc/build/common.gypi +@@ -119,16 +119,23 @@ # flood of chromium-style warnings. Investigate enabling them: # http://code.google.com/p/webrtc/issues/detail?id=163 'clang_use_chrome_plugins%': 0, + + # Switch between Android audio device OpenSL ES implementation + # and Java Implementation + 'enable_android_opensl%': 0, }], + ['OS=="linux" or OS=="solaris" or os_bsd==1', { + 'include_alsa_audio%': 1, @@ -711,21 +692,21 @@ + 'include_alsa_audio%': 0, + 'include_v4l2_video_capture%': 0, + }], - ], # conditions - }, - 'target_defaults': { - 'include_dirs': [ - # TODO(andrew): we should be able to just use <(webrtc_root) here. - '..','../..', - ], - 'defines': [ -@@ -174,16 +181,28 @@ - 'defines': [ - 'WEBRTC_LINUX', - 'WEBRTC_THREAD_RR', - # TODO(andrew): can we select this automatically? - # Define this if the Linux system does not support CLOCK_MONOTONIC. - #'WEBRTC_CLOCK_TYPE_REALTIME', + ['OS=="ios"', { + 'enable_video%': 0, + 'enable_protobuf%': 0, + 'build_libjpeg%': 0, + 'build_libyuv%': 0, + 'build_libvpx%': 0, + 'include_tests%': 0, + }], +@@ -205,16 +210,28 @@ + 'defines': ['WEBRTC_ARCH_ARM_NEON',], + }, { + 'defines': ['WEBRTC_DETECT_ARM_NEON',], + }], + ], + }], ], }], + ['os_bsd==1', { @@ -740,19 +721,19 @@ + 'WEBRTC_CLOCK_TYPE_REALTIME', + ], + }], - ['OS=="mac"', { + ['OS=="ios"', { 'defines': [ 'WEBRTC_MAC', - 'WEBRTC_MAC_INTEL', # TODO(andrew): remove this. + 'WEBRTC_IOS', 'WEBRTC_THREAD_RR', 'WEBRTC_CLOCK_TYPE_REALTIME', ], }], -diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi +diff --git media/webrtc/trunk/src/modules/audio_device/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/audio_device.gypi index 8457737..4d0f322 100644 ---- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -+++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi -@@ -41,21 +41,25 @@ +--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi ++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi +@@ -40,21 +40,25 @@ 'audio_device_utility.h', 'audio_device_impl.cc', 'audio_device_impl.h', @@ -772,21 +753,21 @@ + 'WEBRTC_LINUX', + ], + }], # include_alsa_audio==1 + ['OS=="ios"', { + 'include_dirs': [ + 'ios', + ], + }], # OS==ios ['OS=="mac"', { - 'include_dirs': [ - 'mac', - ], - }], # OS==mac - ['OS=="win"', { - 'include_dirs': [ - 'win', -@@ -111,24 +115,26 @@ - 'link_settings': { - 'libraries': [ - '-llog', - '-lOpenSLES', - ], - }, + 'include_dirs': [ + 'mac', +@@ -129,24 +133,26 @@ + 'sources': [ + 'android/audio_device_jni_android.cc', + 'android/audio_device_jni_android.h', + ], + }], + ], }], ['OS=="linux"', { - 'defines': [ @@ -810,10 +791,10 @@ 'sources': [ 'linux/audio_device_pulse_linux.cc', 'linux/audio_device_pulse_linux.h', -diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc +diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc index 203f09a..0b0b70e 100644 ---- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc -+++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc +--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc ++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc @@ -41,17 +41,17 @@ bool AudioDeviceUtility::StringCompare( const char* str1 , const char* str2, const WebRtc_UWord32 length) @@ -846,10 +827,10 @@ +#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) -diff --git media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc +diff --git media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc index bdad224..39e1132 100644 ---- media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc -+++ media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc +--- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc ++++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc @@ -7,16 +7,17 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. @@ -868,10 +849,10 @@ #include "system_wrappers/interface/trace.h" namespace webrtc { -diff --git media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc +diff --git media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc index 298d479..37b70c9 100644 ---- media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc -+++ media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc +--- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc ++++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc @@ -13,17 +13,17 @@ #include #include // ceil @@ -967,10 +948,10 @@ #if !defined(WEBRTC_LITTLE_ENDIAN) && !defined(WEBRTC_BIG_ENDIAN) #error Either WEBRTC_LITTLE_ENDIAN or WEBRTC_BIG_ENDIAN must be defined -diff --git media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc +diff --git media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc index e50db5d..70ad8a8 100644 ---- media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc -+++ media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc +--- media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc ++++ media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc @@ -13,60 +13,62 @@ #include #include @@ -994,7 +975,7 @@ -#include #include #include - #ifndef MAC_IPHONE + #ifndef WEBRTC_IOS #include #endif #endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) @@ -1115,10 +1096,10 @@ ptrNumericIP = &(address._sockaddr_in.sin_addr); } else if(ipFamily == AF_INET6) -diff --git media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc +diff --git media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc index 69a52ec..7ac226c 100644 ---- media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc -+++ media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc +--- media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc ++++ media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc @@ -14,17 +14,17 @@ #include @@ -1157,10 +1138,10 @@ val = tv.tv_sec * 1000 + tv.tv_usec / 1000; return val; #else -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc +diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc index 653ee16..8d6fd68 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc -+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc @@ -14,17 +14,23 @@ #include #include @@ -1185,10 +1166,10 @@ namespace webrtc { namespace videocapturemodule -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc +diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc index 12df1b3..424ea0a 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc -+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc @@ -7,22 +7,30 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. @@ -1221,10 +1202,10 @@ #include "critical_section_wrapper.h" #include "video_capture_linux.h" -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc +diff --git media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc index e3f7bb5..882cede 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc -+++ media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc +--- media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc @@ -49,17 +49,17 @@ WebRtc_Word32 DeviceInfoImpl::NumberOfCapabilities( if (!deviceUniqueIdUTF8) return -1; @@ -1234,8 +1215,8 @@ if (_lastUsedDeviceNameLength == strlen((char*) deviceUniqueIdUTF8)) { // Is it the same device that is asked for again. --#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) +-#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) ++#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) if(strncasecmp((char*)_lastUsedDeviceName, (char*) deviceUniqueIdUTF8, _lastUsedDeviceNameLength)==0) @@ -1253,8 +1234,8 @@ ReadLockScoped cs(_apiLock); if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8)) --#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) +-#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) ++#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || (strncasecmp((char*)_lastUsedDeviceName, (char*) deviceUniqueIdUTF8, _lastUsedDeviceNameLength)!=0)) @@ -1272,8 +1253,8 @@ ReadLockScoped cs(_apiLock); if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8)) --#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) -+#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) +-#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) ++#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || (strncasecmp((char*)_lastUsedDeviceName, (char*) deviceUniqueIdUTF8, _lastUsedDeviceNameLength)!=0)) @@ -1282,38 +1263,38 @@ (char*) deviceUniqueIdUTF8, _lastUsedDeviceNameLength) != 0)) #endif -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi +diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi index 0a9765e..8d4bbf4 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi -+++ media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi -@@ -50,17 +50,17 @@ +--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi ++++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi +@@ -43,17 +43,17 @@ + 'conditions': [ ['include_internal_video_capture==0', { 'sources': [ - 'External/device_info_external.cc', - 'External/video_capture_external.cc', + 'external/device_info_external.cc', + 'external/video_capture_external.cc', ], - },{ # include_internal_video_capture == 1 + }, { # include_internal_video_capture == 1 'conditions': [ - # DEFINE PLATFORM SPECIFIC SOURCE FILES - ['OS=="linux"', { + ['include_v4l2_video_capture==1', { 'include_dirs': [ - 'Linux', + 'linux', ], 'sources': [ - 'Linux/device_info_linux.h', - 'Linux/video_capture_linux.h', - 'Linux/device_info_linux.cc', - 'Linux/video_capture_linux.cc', -@@ -157,31 +157,35 @@ - '../interface', + 'linux/device_info_linux.cc', + 'linux/device_info_linux.h', + 'linux/video_capture_linux.cc', + 'linux/video_capture_linux.h', +@@ -152,31 +152,35 @@ + 'include_dirs': [ + 'include', ], 'sources': [ - '../test/video_capture_unittest.cc', - '../test/video_capture_main_mac.mm', + 'test/video_capture_unittest.cc', + 'test/video_capture_main_mac.mm', ], 'conditions': [ - # DEFINE PLATFORM SPECIFIC INCLUDE AND CFLAGS - ['OS=="mac" or OS=="linux"', { + ['OS!="win" and OS!="android"', { 'cflags': [ @@ -1344,176 +1325,167 @@ 'xcode_settings': { # TODO(andrew): CoreAudio and AudioToolbox shouldn't be needed. 'OTHER_LDFLAGS': [ -diff --git media/webrtc/trunk/src/system_wrappers/interface/tick_util.h media/webrtc/trunk/src/system_wrappers/interface/tick_util.h +diff --git media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h index 0cd85d0..45591be 100644 ---- media/webrtc/trunk/src/system_wrappers/interface/tick_util.h -+++ media/webrtc/trunk/src/system_wrappers/interface/tick_util.h -@@ -161,17 +161,17 @@ inline TickTime TickTime::Now() - // so it must have been a wrap around. - if(old > 0xf0000000 && now < 0x0fffffff) - { - numWrapTimeGetTime++; - } - } - result._ticks = now + (numWrapTimeGetTime<<32); - #endif +--- media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h ++++ media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h +@@ -6,17 +6,17 @@ + * 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. + */ + + #ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_ + #define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_ + +-#if defined(__linux__) && defined(__ELF__) ++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__) + .section .note.GNU-stack,"",%progbits + #endif + + // Define the macros used in ARM assembly code, so that for Mac or iOS builds + // we add leading underscores for the function names. + #ifdef __APPLE__ + .macro GLOBAL_FUNCTION name + .global _\name +diff --git media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h +index 0cd85d0..45591be 100644 +--- media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h ++++ media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h +@@ -189,17 +189,17 @@ inline WebRtc_Word64 TickTime::QueryOsFo + // 0x0fffffff ~3.1 days, the code will not take that long to execute + // so it must have been a wrap around. + if (old > 0xf0000000 && now < 0x0fffffff) { + num_wrap_time_get_time++; + } + } + result.ticks_ = now + (num_wrap_time_get_time << 32); + #endif -#elif defined(WEBRTC_LINUX) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) - struct timespec ts; - // TODO(wu): Remove CLOCK_REALTIME implementation. - #ifdef WEBRTC_CLOCK_TYPE_REALTIME - clock_gettime(CLOCK_REALTIME, &ts); - #else - clock_gettime(CLOCK_MONOTONIC, &ts); - #endif - result._ticks = 1000000000LL * static_cast(ts.tv_sec) + static_cast(ts.tv_nsec); -@@ -203,17 +203,17 @@ inline WebRtc_Word64 TickTime::MillisecondTimestamp() + struct timespec ts; + // TODO(wu): Remove CLOCK_REALTIME implementation. + #ifdef WEBRTC_CLOCK_TYPE_REALTIME + clock_gettime(CLOCK_REALTIME, &ts); + #else + clock_gettime(CLOCK_MONOTONIC, &ts); + #endif + result.ticks_ = 1000000000LL * static_cast(ts.tv_sec) + +@@ -236,34 +236,34 @@ inline WebRtc_Word64 TickTime::Milliseco #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (now._ticks * 1000) / qpfreq.QuadPart; - #else - return now._ticks; - #endif + #ifdef USE_QUERY_PERFORMANCE_COUNTER + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return (ticks * 1000) / qpfreq.QuadPart; + #else + return ticks; + #endif -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return now._ticks / 1000000LL; + return ticks / 1000000LL; #else - return now._ticks / 1000LL; + return ticks / 1000LL; #endif } - inline WebRtc_Word64 TickTime::MicrosecondTimestamp() - { -@@ -222,17 +222,17 @@ inline WebRtc_Word64 TickTime::MicrosecondTimestamp() + inline WebRtc_Word64 TickTime::MicrosecondTimestamp() { + WebRtc_Word64 ticks = TickTime::Now().Ticks(); #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (now._ticks * 1000) / (qpfreq.QuadPart/1000); - #else - return now._ticks *1000LL; - #endif + #ifdef USE_QUERY_PERFORMANCE_COUNTER + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return (ticks * 1000) / (qpfreq.QuadPart / 1000); + #else + return ticks * 1000LL; + #endif -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return now._ticks / 1000LL; + return ticks / 1000LL; #else - return now._ticks; + return ticks; #endif } - inline WebRtc_Word64 TickTime::Ticks() const - { -@@ -244,34 +244,34 @@ inline WebRtc_Word64 TickTime::MillisecondsToTicks(const WebRtc_Word64 ms) + inline WebRtc_Word64 TickTime::Ticks() const { + return ticks_; +@@ -273,33 +273,33 @@ inline WebRtc_Word64 TickTime::Milliseco #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (qpfreq.QuadPart * ms) / 1000; - #else - return ms; - #endif + #ifdef USE_QUERY_PERFORMANCE_COUNTER + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return (qpfreq.QuadPart * ms) / 1000; + #else + return ms; + #endif -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ms * 1000000LL; + return ms * 1000000LL; #else - return ms * 1000LL; + return ms * 1000LL; #endif } - inline WebRtc_Word64 TickTime::TicksToMilliseconds(const WebRtc_Word64 ticks) - { + inline WebRtc_Word64 TickTime::TicksToMilliseconds(const WebRtc_Word64 ticks) { #if _WIN32 - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (ticks * 1000) / qpfreq.QuadPart; - #else - return ticks; - #endif + #ifdef USE_QUERY_PERFORMANCE_COUNTER + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return (ticks * 1000) / qpfreq.QuadPart; + #else + return ticks; + #endif -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - return ticks / 1000000LL; + return ticks / 1000000LL; #else - return ticks / 1000LL; + return ticks / 1000LL; #endif } - inline TickTime& TickTime::operator+=(const WebRtc_Word64& ticks) - { -@@ -294,17 +294,17 @@ inline WebRtc_Word64 TickInterval::Milliseconds() const - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (_interval * 1000) / qpfreq.QuadPart; - #else - // _interval is in ms - return _interval; - #endif + inline TickTime& TickTime::operator+=(const WebRtc_Word64& ticks) { + ticks_ += ticks; +@@ -318,17 +318,17 @@ inline WebRtc_Word64 TickInterval::Milli + #ifdef USE_QUERY_PERFORMANCE_COUNTER + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return (interval_ * 1000) / qpfreq.QuadPart; + #else + // interval_ is in ms + return interval_; + #endif -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - // _interval is in ns - return _interval / 1000000; + // interval_ is in ns + return interval_ / 1000000; #else - // _interval is usecs - return _interval / 1000; + // interval_ is usecs + return interval_ / 1000; #endif } -@@ -314,17 +314,17 @@ inline WebRtc_Word64 TickInterval::Microseconds() const - #ifdef USE_QUERY_PERFORMANCE_COUNTER - LARGE_INTEGER qpfreq; - QueryPerformanceFrequency(&qpfreq); - return (_interval * 1000000) / qpfreq.QuadPart; - #else - // _interval is in ms - return _interval *1000LL; - #endif +@@ -337,17 +337,17 @@ inline WebRtc_Word64 TickInterval::Micro + #ifdef USE_QUERY_PERFORMANCE_COUNTER + LARGE_INTEGER qpfreq; + QueryPerformanceFrequency(&qpfreq); + return (interval_ * 1000000) / qpfreq.QuadPart; + #else + // interval_ is in ms + return interval_ * 1000LL; + #endif -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) - // _interval is in ns - return _interval / 1000; + // interval_ is in ns + return interval_ / 1000; #else - // _interval is usecs - return _interval; + // interval_ is usecs + return interval_; #endif } -diff --git media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc -index bb10c6b..4878d71 100644 ---- media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc -+++ media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc -@@ -7,24 +7,21 @@ - * in the file PATENTS. All contributing project authors may - * be found in the AUTHORS file in the root of the source tree. - */ - - #include "aligned_malloc.h" - - #include - #include -- --#ifdef WEBRTC_ANDROID - #include --#endif - - #if WEBRTC_MAC - #include --#else -+#elif WEBRTC_WIN - #include - #endif - - #if _WIN32 - #include - #else - #include - #endif -diff --git media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc +diff --git media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc index 05b0e57..993456c 100644 ---- media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc -+++ media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc +--- media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc ++++ media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc @@ -7,17 +7,16 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. @@ -1529,14 +1501,14 @@ namespace webrtc { - Atomic32::Atomic32(WebRtc_Word32 initialValue) : _value(initialValue) - { - assert(Is32bitAligned()); -diff --git media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc + Atomic32::Atomic32(WebRtc_Word32 initial_value) + : value_(initial_value) { + assert(Is32bitAligned()); +diff --git media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc index b37d037..fcea221 100644 ---- media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc -+++ media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc -@@ -3,35 +3,33 @@ +--- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc ++++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc +@@ -3,31 +3,33 @@ * * 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 @@ -1548,113 +1520,108 @@ +#include "condition_variable_wrapper.h" + #if defined(_WIN32) - #include -- #include "condition_variable_wrapper.h" - #include "condition_variable_win.h" --#elif defined(WEBRTC_LINUX) -- #include -- #include "condition_variable_wrapper.h" -- #include "condition_variable_posix.h" --#elif defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL) - #include -- #include "condition_variable_wrapper.h" - #include "condition_variable_posix.h" + #include + #include "condition_variable_win.h" +-#include "condition_variable_wrapper.h" +-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) + #include + #include "condition_variable_posix.h" +-#include "condition_variable_wrapper.h" +#else -+ #include // for NULL ++#include // for NULL #endif namespace webrtc { - ConditionVariableWrapper* - ConditionVariableWrapper::CreateConditionVariable() - { + + ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() { #if defined(_WIN32) - return new ConditionVariableWindows; --#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL) -+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL) - return ConditionVariablePosix::Create(); + return new ConditionVariableWindows; +-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) ++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) + return ConditionVariablePosix::Create(); #else - return NULL; + return NULL; #endif } + } // namespace webrtc -diff --git media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc +diff --git media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc index 48835ab..16c6033 100644 ---- media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc -+++ media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc -@@ -90,17 +90,17 @@ void ConditionVariablePosix::SleepCS(CriticalSectionWrapper& critSect) - bool - ConditionVariablePosix::SleepCS( - CriticalSectionWrapper& critSect, - unsigned long maxTimeInMS) - { - const unsigned long INFINITE = 0xFFFFFFFF; +--- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc ++++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc +@@ -74,17 +74,17 @@ void ConditionVariablePosix::SleepCS(Cri + &crit_sect); + pthread_cond_wait(&cond_, &cs->mutex_); + } - const int MILLISECONDS_PER_SECOND = 1000; + bool ConditionVariablePosix::SleepCS(CriticalSectionWrapper& crit_sect, + unsigned long max_time_inMS) { + const unsigned long INFINITE = 0xFFFFFFFF; + const int MILLISECONDS_PER_SECOND = 1000; -#ifndef WEBRTC_LINUX +#if !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD) - const int MICROSECONDS_PER_MILLISECOND = 1000; + const int MICROSECONDS_PER_MILLISECOND = 1000; #endif - const int NANOSECONDS_PER_SECOND = 1000000000; - const int NANOSECONDS_PER_MILLISECOND = 1000000; + const int NANOSECONDS_PER_SECOND = 1000000000; + const int NANOSECONDS_PER_MILLISECOND = 1000000; - CriticalSectionPosix* cs = reinterpret_cast( - &critSect); + CriticalSectionPosix* cs = reinterpret_cast( + &crit_sect); -diff --git media/webrtc/trunk/src/system_wrappers/source/cpu.cc media/webrtc/trunk/src/system_wrappers/source/cpu.cc +diff --git media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc index 3df5d18..4cd3ddf 100644 ---- media/webrtc/trunk/src/system_wrappers/source/cpu.cc -+++ media/webrtc/trunk/src/system_wrappers/source/cpu.cc -@@ -11,28 +11,28 @@ - #include "cpu_wrapper.h" +--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc ++++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc +@@ -9,28 +9,28 @@ + */ + + #include "system_wrappers/interface/cpu_wrapper.h" #if defined(_WIN32) - #include "cpu_win.h" + #include "cpu_win.h" #elif defined(WEBRTC_MAC) - #include "cpu_mac.h" - #elif defined(WEBRTC_MAC_INTEL) - #include "cpu_mac.h" + #include "cpu_mac.h" -#elif defined(WEBRTC_ANDROID) +#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - // Not implemented yet, might be possible to use Linux implementation + // Not implemented yet, might be possible to use Linux implementation #else // defined(WEBRTC_LINUX) - #include "cpu_linux.h" + #include "cpu_linux.h" #endif namespace webrtc { - CpuWrapper* CpuWrapper::CreateCpu() - { + CpuWrapper* CpuWrapper::CreateCpu() { #if defined(_WIN32) - return new CpuWindows(); - #elif (defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)) - return new CpuWrapperMac(); + return new CpuWindows(); + #elif defined(WEBRTC_MAC) + return new CpuWrapperMac(); -#elif defined(WEBRTC_ANDROID) +#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) - return 0; + return 0; #else - return new CpuLinux(); + return new CpuLinux(); #endif } - } // namespace webrtc -diff --git media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc + + } // namespace webrtc +diff --git media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc index e367abf..e14d7af 100644 ---- media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc -+++ media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc -@@ -7,25 +7,27 @@ +--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc ++++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc +@@ -7,23 +7,25 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ - #include "cpu_info.h" + #include "system_wrappers/interface/cpu_info.h" #if defined(_WIN32) #include -#elif defined(WEBRTC_MAC) +-#include +#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) #include - #include - #elif defined(WEBRTC_MAC_INTEL) - // Intentionally empty ++#include #elif defined(WEBRTC_ANDROID) // Not implemented yet, might be possible to use Linux implementation -#else // defined(WEBRTC_LINUX) @@ -1668,65 +1635,63 @@ namespace webrtc { - WebRtc_UWord32 CpuInfo::_numberOfCores = 0; + WebRtc_UWord32 CpuInfo::number_of_cores_ = 0; -@@ -40,31 +42,40 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCores() - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", _numberOfCores); +@@ -36,29 +38,38 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCo + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Available number of cores:%d", number_of_cores_); #elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) - _numberOfCores = get_nprocs(); - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", _numberOfCores); - --#elif (defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)) -- int name[] = {CTL_HW, HW_AVAILCPU}; -+#elif (defined(WEBRTC_BSD) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)) -+ int name[] = { -+ CTL_HW, + number_of_cores_ = get_nprocs(); + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Available number of cores:%d", number_of_cores_); + +-#elif defined(WEBRTC_MAC) +- int name[] = {CTL_HW, HW_AVAILCPU}; ++#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC) ++ int name[] = { ++ CTL_HW, +#ifdef HW_AVAILCPU -+ HW_AVAILCPU, ++ HW_AVAILCPU, +#else -+ HW_NCPU, ++ HW_NCPU, +#endif -+ }; - int ncpu; - size_t size = sizeof(ncpu); - if(0 == sysctl(name, 2, &ncpu, &size, NULL, 0)) - { - _numberOfCores = static_cast(ncpu); - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Available number of cores:%d", _numberOfCores); - } else - { - WEBRTC_TRACE(kTraceError, kTraceUtility, -1, - "Failed to get number of cores"); - _numberOfCores = 1; ++ }; + int ncpu; + size_t size = sizeof(ncpu); + if (0 == sysctl(name, 2, &ncpu, &size, NULL, 0)) { + number_of_cores_ = static_cast(ncpu); + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Available number of cores:%d", number_of_cores_); + } else { + WEBRTC_TRACE(kTraceError, kTraceUtility, -1, + "Failed to get number of cores"); + number_of_cores_ = 1; } +#elif defined(_SC_NPROCESSORS_ONLN) -+ _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN); ++ _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN); #else - WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1, - "No function to get number of cores"); - _numberOfCores = 1; + WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1, + "No function to get number of cores"); + number_of_cores_ = 1; #endif - } - return _numberOfCores; + } + return number_of_cores_; } -diff --git media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc +diff --git media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc index 6334490..852ebaa 100644 ---- media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc -+++ media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc -@@ -53,16 +53,25 @@ +--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc ++++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc +@@ -54,16 +54,27 @@ + #ifdef WEBRTC_LINUX + #include #include #include #include #include #endif - #if defined(WEBRTC_MAC) - #include -+#elif defined(__NetBSD__) ++#if defined(__NetBSD__) +#include +#elif defined(__FreeBSD__) +#include @@ -1735,23 +1700,25 @@ + +#if defined(WEBRTC_BSD) && !defined(__NetBSD__) +#include - #endif - - #include "system_wrappers/interface/critical_section_wrapper.h" - #include "system_wrappers/interface/event_wrapper.h" - #include "system_wrappers/interface/trace.h" ++#endif ++ + #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" + #include "webrtc/system_wrappers/interface/event_wrapper.h" + #include "webrtc/system_wrappers/interface/trace.h" namespace webrtc { - extern "C" -@@ -116,16 +125,28 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj, - } + + int ConvertToSystemPriority(ThreadPriority priority, int min_prio, + int max_prio) { +@@ -136,16 +147,28 @@ ThreadPosix::ThreadPosix(ThreadRunFuncti + } } uint32_t ThreadWrapper::GetThreadId() { #if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX) return static_cast(syscall(__NR_gettid)); - #elif defined(WEBRTC_MAC) - return static_cast(mach_thread_self()); + #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS) + return pthread_mach_thread_np(pthread_self()); +#elif defined(__NetBSD__) + return _lwp_self(); +#elif defined(__DragonFly__) @@ -1769,41 +1736,42 @@ #endif } - int ThreadPosix::Construct() - { - int result = 0; -@@ -154,16 +175,17 @@ ThreadPosix::~ThreadPosix() - { - pthread_attr_destroy(&_attr); - delete _event; - delete _crit_state; + int ThreadPosix::Construct() { + int result = 0; + #if !defined(WEBRTC_ANDROID) +@@ -190,17 +196,17 @@ int ThreadPosix::Construct() { } - #define HAS_THREAD_ID !defined(MAC_IPHONE) && !defined(MAC_IPHONE_SIM) && \ - !defined(WEBRTC_MAC) && !defined(WEBRTC_MAC_INTEL) && \ -+ !defined(WEBRTC_BSD) && \ - !defined(MAC_DYLIB) && !defined(MAC_INTEL_DYLIB) - #if HAS_THREAD_ID - bool ThreadPosix::Start(unsigned int& threadID) - #else - bool ThreadPosix::Start(unsigned int& /*threadID*/) - #endif + ThreadPosix::~ThreadPosix() { + pthread_attr_destroy(&attr_); + delete event_; + delete crit_state_; + } + +-#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) ++#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD) + + bool ThreadPosix::Start(unsigned int& thread_id) { - if (!_runFunction) -@@ -229,31 +251,39 @@ bool ThreadPosix::Start(unsigned int& /*threadID*/) - { - return false; - } - return true; + if (!run_function_) { + return false; + } + int result = pthread_attr_setdetachstate(&attr_, PTHREAD_CREATE_DETACHED); + // Set the stack stack size to 1M. +@@ -232,31 +255,39 @@ bool ThreadPosix::Start(unsigned int& th + WEBRTC_TRACE(kTraceError, kTraceUtility, -1, + "unable to set thread priority"); + } + return true; } // CPU_ZERO and CPU_SET are not available in NDK r7, so disable // SetAffinity on Android for now. -#if (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID))) +#if defined(__FreeBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID))) - bool ThreadPosix::SetAffinity(const int* processorNumbers, - const unsigned int amountOfProcessors) { - if (!processorNumbers || (amountOfProcessors == 0)) { + bool ThreadPosix::SetAffinity(const int* processor_numbers, + const unsigned int amount_of_processors) { + if (!processor_numbers || (amount_of_processors == 0)) { return false; } +#if defined(__FreeBSD__) @@ -1814,49 +1782,72 @@ CPU_ZERO(&mask); for (unsigned int processor = 0; - processor < amountOfProcessors; - processor++) { - CPU_SET(processorNumbers[processor], &mask); + processor < amount_of_processors; + ++processor) { + CPU_SET(processor_numbers[processor], &mask); } -#if defined(WEBRTC_ANDROID) +#if defined(__FreeBSD__) -+ const int result = pthread_setaffinity_np(_thread, ++ const int result = pthread_setaffinity_np(thread_, + sizeof(mask), + &mask); +#elif defined(WEBRTC_ANDROID) // Android. const int result = syscall(__NR_sched_setaffinity, - _pid, + pid_, sizeof(mask), &mask); #else // "Normal" Linux. - const int result = sched_setaffinity(_pid, -@@ -340,16 +370,20 @@ void ThreadPosix::Run() + const int result = sched_setaffinity(pid_, +@@ -320,16 +351,20 @@ void ThreadPosix::Run() { + pid_ = GetThreadId(); #endif - // The event the Start() is waiting for. - _event->Set(); + // The event the Start() is waiting for. + event_->Set(); - if (_setThreadName) - { + if (set_thread_name_) { #ifdef WEBRTC_LINUX - prctl(PR_SET_NAME, (unsigned long)_name, 0, 0, 0); + prctl(PR_SET_NAME, (unsigned long)name_, 0, 0, 0); +#elif defined(__NetBSD__) -+ pthread_setname_np(pthread_self(), "%s", (void *)_name); ++ pthread_setname_np(pthread_self(), "%s", (void *)name_); +#elif defined(WEBRTC_BSD) -+ pthread_set_name_np(pthread_self(), _name); ++ pthread_set_name_np(pthread_self(), name_); #endif - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility,-1, - "Thread with name:%s started ", _name); - } else - { - WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, - "Thread without name started"); - } -diff --git media/webrtc/trunk/src/video_engine/vie_defines.h media/webrtc/trunk/src/video_engine/vie_defines.h + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Thread with name:%s started ", name_); + } else { + WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, + "Thread without name started"); + } + bool alive = true; +diff --git media/webrtc/trunk/webrtc/typedefs.h media/webrtc/trunk/webrtc/typedefs.h +index 6334490..852ebaa 100644 +--- media/webrtc/trunk/webrtc/typedefs.h ++++ media/webrtc/trunk/webrtc/typedefs.h +@@ -16,17 +16,17 @@ + + // Reserved words definitions + // TODO(andrew): Remove this. + #define G_CONST const + + // For access to standard POSIXish features, use WEBRTC_POSIX instead of a + // more specific macro. + #if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || \ +- defined(WEBRTC_ANDROID) ++ defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD) + #define WEBRTC_POSIX + #endif + + // Processor architecture detection. For more info on what's defined, see: + // http://msdn.microsoft.com/en-us/library/b0084kay.aspx + // http://www.agner.org/optimize/calling_conventions.pdf + // or with gcc, run: "echo | gcc -E -dM -" + // TODO(andrew): replace WEBRTC_LITTLE_ENDIAN with WEBRTC_ARCH_LITTLE_ENDIAN. +diff --git media/webrtc/trunk/webrtc/video_engine/vie_defines.h media/webrtc/trunk/webrtc/video_engine/vie_defines.h index 2cc18cc7..2c042a0 100644 ---- media/webrtc/trunk/src/video_engine/vie_defines.h -+++ media/webrtc/trunk/src/video_engine/vie_defines.h +--- media/webrtc/trunk/webrtc/video_engine/vie_defines.h ++++ media/webrtc/trunk/webrtc/video_engine/vie_defines.h @@ -168,17 +168,17 @@ inline int ChannelId(const int moduleId) { // Example: "Oct 10 2002 12:05:30 r". @@ -1876,10 +1867,10 @@ #elif defined(NDEBUG) #define BUILDMODE "r" #else -diff --git media/webrtc/trunk/src/voice_engine/voe_network_impl.cc media/webrtc/trunk/src/voice_engine/voe_network_impl.cc +diff --git media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc index 174abca..f8a2b2d 100644 ---- media/webrtc/trunk/src/voice_engine/voe_network_impl.cc -+++ media/webrtc/trunk/src/voice_engine/voe_network_impl.cc +--- media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc ++++ media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc @@ -467,17 +467,17 @@ int VoENetworkImpl::SetSendTOS(int channel, int DSCP, int priority, @@ -1937,11 +1928,11 @@ if (!_shared->statistics().Initialized()) { _shared->SetLastError(VE_NOT_INITED, kTraceError); -diff --git media/webrtc/trunk/src/voice_engine/voice_engine_defines.h media/webrtc/trunk/src/voice_engine/voice_engine_defines.h +diff --git media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h index 7d4c729..4104719 100644 ---- media/webrtc/trunk/src/voice_engine/voice_engine_defines.h -+++ media/webrtc/trunk/src/voice_engine/voice_engine_defines.h -@@ -434,41 +434,44 @@ namespace webrtc +--- media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h ++++ media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h +@@ -409,41 +409,43 @@ namespace webrtc #else #define ANDROID_NOT_SUPPORTED(stat) @@ -1968,17 +1959,16 @@ #include #include #include -+ -+#ifdef WEBRTC_MAC ++#if !defined(WEBRTC_BSD) #include - #if !defined(MAC_IPHONE) && !defined(MAC_IPHONE_SIM) + #if !defined(WEBRTC_IOS) #include #include #include #include #include #endif -+#endif // WEBRTC_MAC ++#endif #define DWORD unsigned long int #define WINAPI @@ -1987,15 +1977,15 @@ #define TRUE 1 #define SOCKADDR_IN struct sockaddr_in #define UINT unsigned int -@@ -576,13 +579,13 @@ namespace webrtc +@@ -526,13 +528,13 @@ namespace webrtc // Defines // ---------------------------------------------------------------------------- - #define IPHONE_NOT_SUPPORTED() + #define IPHONE_NOT_SUPPORTED(stat) #endif #else - #define IPHONE_NOT_SUPPORTED() + #define IPHONE_NOT_SUPPORTED(stat) -#endif // #ifdef WEBRTC_MAC +#endif // #if defined(WEBRTC_BSD) || defined(WEBRTC_MAC) @@ -2021,10 +2011,10 @@ { 'target_name': 'libyuv', 'type': 'static_library', + # 'type': 'shared_library', 'conditions': [ ['use_system_libjpeg==0', { - 'dependencies': [ -@@ -43,16 +44,21 @@ +@@ -45,16 +46,21 @@ ], 'direct_dependent_settings': { 'include_dirs': [ Modified: trunk/www/firefox-nightly/files/patch-bug826985 ============================================================================== --- trunk/www/firefox-nightly/files/patch-bug826985 Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/files/patch-bug826985 Tue Feb 12 21:33:41 2013 (r1170) @@ -5,9 +5,9 @@ Bug 826985 - Support more video formats for WebRTC via libv4l2 on Linux. --- configure.in | 13 ++++++ - .../main/source/Linux/device_info_linux.cc | 30 ++++++++------ - .../main/source/Linux/video_capture_linux.cc | 47 ++++++++++++---------- - .../video_capture/main/source/video_capture.gypi | 1 + + .../linux/device_info_linux.cc | 30 ++++++++------ + .../linux/video_capture_linux.cc | 47 ++++++++++++---------- + .../video_capture/video_capture.gypi | 1 + toolkit/library/Makefile.in | 3 ++ 5 files changed, 60 insertions(+), 34 deletions(-) @@ -42,10 +42,10 @@ AC_SUBST(MOZ_WEBRTC_IN_LIBXUL) AC_SUBST(MOZ_SCTP) AC_SUBST(MOZ_SRTP) -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc +diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc index 653ee16..270f064 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc -+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc @@ -26,6 +26,7 @@ #else #include @@ -156,10 +156,10 @@ { if ((video_fmt.fmt.pix.width == size[i][0]) && (video_fmt.fmt.pix.height == size[i][1])) -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc +diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc index 12df1b3..4ddc9d4 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc -+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc +--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc ++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc @@ -25,6 +25,7 @@ #else #include @@ -343,10 +343,10 @@ { WEBRTC_TRACE(webrtc::kTraceWarning, webrtc::kTraceVideoCapture, _id, "Failed to enqueue capture buffer"); -diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi +diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi index 8d38102..3e8f76b 100644 ---- media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi -+++ media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi +--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi ++++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi @@ -179,6 +179,7 @@ 'libraries': [ '-lXext', Modified: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc ============================================================================== --- trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc Tue Feb 12 21:33:41 2013 (r1170) @@ -1,5 +1,5 @@ ---- media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~ -+++ media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc +--- media/webrtc/trunk/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc~ ++++ media/webrtc/trunk/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc @@ -31,6 +31,10 @@ #include #endif Modified: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp ============================================================================== --- trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp Tue Feb 12 21:33:41 2013 (r1170) @@ -1,5 +1,5 @@ ---- media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp~ -+++ media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp +--- media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp~ ++++ media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp @@ -21,6 +21,13 @@ Scott McMurray #include "constants.hpp" #include Modified: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc ============================================================================== --- trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc Tue Feb 12 21:33:41 2013 (r1170) @@ -1,5 +1,5 @@ ---- media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~ -+++ media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc +--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc~ ++++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc @@ -62,7 +62,13 @@ #include #elif defined(__FreeBSD__) Modified: trunk/www/firefox/Makefile ============================================================================== --- trunk/www/firefox/Makefile Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox/Makefile Tue Feb 12 21:33:41 2013 (r1170) @@ -2,11 +2,12 @@ # $FreeBSD: head/www/firefox/Makefile 310227 2013-01-11 10:22:40Z ehaupt $ PORTNAME= firefox -DISTVERSION= 19.0b5 +DISTVERSION= 19.0b6 PORTEPOCH= 1 CATEGORIES= www ipv6 MASTER_SITES= ${MASTER_SITE_MOZILLA} -MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source +#MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source +MASTER_SITE_SUBDIR= ${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source DISTNAME= ${PORTNAME}-${DISTVERSION}.source MAINTAINER= gecko@FreeBSD.org Modified: trunk/www/firefox/distinfo ============================================================================== --- trunk/www/firefox/distinfo Sat Feb 9 20:57:46 2013 (r1169) +++ trunk/www/firefox/distinfo Tue Feb 12 21:33:41 2013 (r1170) @@ -1,2 +1,2 @@ -SHA256 (firefox-19.0b5.source.tar.bz2) = fe854061dadbca306f5138895a63d4d7a41f58400b8e72f3998a978ac17aa6c9 -SIZE (firefox-19.0b5.source.tar.bz2) = 98843314 +SHA256 (firefox-19.0b6.source.tar.bz2) = 36889bdc66eb4318784beb28941bfd56d6b4dc24216059ea74792e86f898d554 +SIZE (firefox-19.0b6.source.tar.bz2) = 98945707