Hello community,
here is the log from the commit of package webrtc-audio-processing for
openSUSE:Factory checked in at 2020-09-01 20:01:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/webrtc-audio-processing (Old)
and /work/SRC/openSUSE:Factory/.webrtc-audio-processing.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "webrtc-audio-processing"
Tue Sep 1 20:01:35 2020 rev:12 rq:828514 version:0.3.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/webrtc-audio-processing/webrtc-audio-processing.changes
2019-09-05 12:03:00.455934788 +0200
+++
/work/SRC/openSUSE:Factory/.webrtc-audio-processing.new.3399/webrtc-audio-processing.changes
2020-09-01 20:01:42.640433654 +0200
@@ -1,0 +2,8 @@
+Mon Aug 17 15:30:03 UTC 2020 - Dirk Mueller <[email protected]>
+
+- update to 0.3.1:
+ * doc: file invalid reference to pulseaudio mailing list
+ * various build system fixes
+- spec-cleaner run
+
+-------------------------------------------------------------------
Old:
----
webrtc-audio-processing-0.3.tar.xz
New:
----
webrtc-audio-processing-0.3.1.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ webrtc-audio-processing.spec ++++++
--- /var/tmp/diff_new_pack.6yjW2W/_old 2020-09-01 20:01:44.252434408 +0200
+++ /var/tmp/diff_new_pack.6yjW2W/_new 2020-09-01 20:01:44.252434408 +0200
@@ -2,7 +2,7 @@
#
# spec file for package webrtc-audio-processing
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2012 Pascal Bleser <[email protected]>
#
# All modifications and additions to the file contributed by third parties
@@ -21,12 +21,12 @@
%define soname 1
# Please submit bugfixes or comments via http://bugs.opensuse.org/
Name: webrtc-audio-processing
-Version: 0.3
+Version: 0.3.1
Release: 0
Summary: Real-Time Communication Library for Web Browsers
License: BSD-3-Clause
Group: System/Libraries
-Url:
http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
+URL:
https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
Source:
http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-%{version}.tar.xz
Source1: baselibs.conf
# PATCH-FIX-UPSTREAN big_endian_support.patch
https://bugs.freedesktop.org/show_bug.cgi?id=95738
@@ -44,7 +44,6 @@
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: xz
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
WebRTC is an open source project that enables web browsers with Real-Time
@@ -100,31 +99,28 @@
%build
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
%configure
-make %{?_smp_mflags} V=1
+%make_build
%install
-%makeinstall
+%make_install
-rm -f "%{buildroot}%{_libdir}"/*.la
+find %{buildroot} -type f -name "*.la" -delete -print
%post -n libwebrtc_audio_processing%{soname} -p /sbin/ldconfig
-
%postun -n libwebrtc_audio_processing%{soname} -p /sbin/ldconfig
%files -n libwebrtc_audio_processing%{soname}
-%defattr(-,root,root)
-%doc AUTHORS COPYING NEWS README.md UPDATING.md
+%license COPYING
+%doc AUTHORS NEWS README.md UPDATING.md
%{_libdir}/libwebrtc_audio_processing.so.%{soname}
%{_libdir}/libwebrtc_audio_processing.so.%{soname}.*.*
%files -n libwebrtc_audio_processing-devel
-%defattr(-,root,root)
%{_includedir}/webrtc_audio_processing
%{_libdir}/libwebrtc_audio_processing.so
%{_libdir}/pkgconfig/webrtc-audio-processing.pc
%files -n libwebrtc_audio_processing-devel-static
-%defattr(-,root,root)
%{_libdir}/libwebrtc_audio_processing.a
%changelog
++++++ webrtc-audio-processing-0.3.tar.xz ->
webrtc-audio-processing-0.3.1.tar.xz ++++++
++++ 3487 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/README.md
new/webrtc-audio-processing-0.3.1/README.md
--- old/webrtc-audio-processing-0.3/README.md 2015-11-04 08:41:30.000000000
+0100
+++ new/webrtc-audio-processing-0.3.1/README.md 2016-08-10 17:07:31.000000000
+0200
@@ -18,7 +18,7 @@
========
Patches, suggestions welcome. You can send them to the PulseAudio mailing
-list[2] or to me at the address below.
+list[3] or to me at the address below.
-- Arun Raghavan <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/compile
new/webrtc-audio-processing-0.3.1/compile
--- old/webrtc-audio-processing-0.3/compile 2015-10-13 08:28:16.000000000
+0200
+++ new/webrtc-audio-processing-0.3.1/compile 2018-07-23 16:05:46.000000000
+0200
@@ -1,9 +1,9 @@
-#! /bin/sh
+#!/bin/sh
# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
# Written by Tom Tromey <[email protected]>.
#
# This program is free software; you can redistribute it and/or modify
@@ -255,7 +255,8 @@
echo "compile $scriptversion"
exit $?
;;
- cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
@@ -342,6 +343,6 @@
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/configure.ac
new/webrtc-audio-processing-0.3.1/configure.ac
--- old/webrtc-audio-processing-0.3/configure.ac 2016-06-22
08:46:41.000000000 +0200
+++ new/webrtc-audio-processing-0.3.1/configure.ac 2018-07-23
16:02:57.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([webrtc-audio-processing], [0.3])
+AC_INIT([webrtc-audio-processing], [0.3.1])
AM_INIT_AUTOMAKE([dist-xz subdir-objects tar-ustar])
AC_SUBST(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO, [1:0:0])
@@ -20,12 +20,27 @@
AC_ARG_WITH([ns-mode],
AS_HELP_STRING([--with-ns-mode=float|fixed], [Noise suppresion mode
to use. Default is float]))
-AS_CASE(["x${with_ns_mode}"],
+AS_CASE(["${with_ns_mode}"],
["fixed"], [NS_FIXED=1],
["float"], [NS_FIXED=0],
[NS_FIXED=0])
AM_CONDITIONAL(NS_FIXED, [test "x${NS_FIXED}" = "x1"])
+AC_ARG_WITH(
+ gnustl,
+ AC_HELP_STRING(
+ [--with-gnustl],
+ [use gnustl @<:@default=no@:>@]),
+ [AS_CASE(
+ [$withval], [no], [], [yes], [],
+ [AC_MSG_ERROR([bad value "$withval" for --with-gnustl])])],
+ [with_gnustl=no])
+if test "x$with_gnustl" != "xno"; then
+ PKG_CHECK_MODULES(GNUSTL, gnustl)
+fi
+AC_SUBST(GNUSTL_LIBS)
+AC_SUBST(GNUSTL_CFLAGS)
+
# Borrowed from gst-plugins-bad
AC_CHECK_HEADER(MobileCoreServices/MobileCoreServices.h, HAVE_IOS="yes",
HAVE_IOS="no", [-])
@@ -36,43 +51,49 @@
AS_CASE(["${host}"],
[*android*],
[
- OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX"
+ OS_CFLAGS="-DWEBRTC_ANDROID -DWEBRTC_LINUX -DWEBRTC_THREAD_RR
-DWEBRTC_CLOCK_TYPE_REALTIME"
+ OS_LDFLAGS="-llog"
PLATFORM_CFLAGS="-DWEBRTC_POSIX"
+ HAVE_POSIX=1
],
[*-*linux*],
[
- OS_CFLAGS="-DWEBRTC_LINUX"
+ OS_CFLAGS="-DWEBRTC_LINUX -DWEBRTC_THREAD_RR"
PLATFORM_CFLAGS="-DWEBRTC_POSIX"
+ OS_LDFLAGS="-lrt -lpthread"
+ HAVE_POSIX=1
],
[*-*darwin*],
[
+ OS_CFLAGS="-DWEBRTC_MAC -DWEBRTC_THREAD_RR
-DWEBRTC_CLOCK_TYPE_REALTIME"
AS_IF([test "$HAVE_IOS" = "yes"],
- [OS_FLAGS="-DWEBRTC_MAC -DWEBRTC_IOS"],
- [OS_FLAGS="-DWEBRTC_MAC"])
+ [OS_CFLAGS+=" -DWEBRTC_IOS"])
PLATFORM_CFLAGS="-DWEBRTC_POSIX"
- ]
- # FIXME: Add Windows support
-)
-AC_SUBST(PLATFORM_CFLAGS)
-
-AS_CASE(["${host_cpu}"],
- [i?86|x86_64],
- [
- HAVE_X86=1
+ HAVE_POSIX=1
],
- [armv7*|armv8*],
+ [*-mingw32*],
[
- HAVE_ARM=1
- HAVE_ARMV7=1
- ARCH_CFLAGS="-DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7"
+ OS_LDFLAGS="-lwinmm"
+ PLATFORM_CFLAGS="-DWEBRTC_WIN -D_WIN32 -U__STRICT_ANSI__"
+ HAVE_WIN=1
],
- [arm*],
- [
- HAVE_ARM=1
- ARCH_CFLAGS="-DWEBRTC_ARCH_ARM"
- ]
- # FIXME: Add MIPS support, see webrtc/BUILD.gn for defines
+ [AC_MSG_ERROR([Unsupported host $host])]
)
+AC_SUBST(PLATFORM_CFLAGS)
+AM_CONDITIONAL(HAVE_POSIX, [test "x${HAVE_POSIX}" = "x1"])
+AM_CONDITIONAL(HAVE_WIN, [test "x${HAVE_WIN}" = "x1"])
+
+# Testing __ARM_ARCH_ISA_ARM since the code contains ARM instructions,
+# which don't work on Thumb-2 only platforms (ARMv7-M).
+AC_CHECK_DECLS([__ARM_ARCH_ISA_ARM],
+ [HAVE_ARM=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM"])
+AC_CHECK_DECLS([__ARM_ARCH_7A__],
+ [HAVE_ARMV7=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_ARCH_ARM_V7"])
+AC_CHECK_DECLS([__aarch64__],
+ [HAVE_NEON=1; ARCH_CFLAGS="${ARCH_CFLAGS} -DWEBRTC_HAS_NEON
-DWEBRTC_ARCH_ARM64"])
+AC_CHECK_DECLS([__i386__], [HAVE_X86=1])
+AC_CHECK_DECLS([__x86_64__], [HAVE_X86=1])
+
AM_CONDITIONAL(HAVE_X86, [test "x${HAVE_X86}" = "x1"])
AM_CONDITIONAL(HAVE_ARM, [test "x${HAVE_ARM}" = "x1"])
AM_CONDITIONAL(HAVE_ARMV7, [test "x${HAVE_ARMV7}" = "x1"])
@@ -104,9 +125,11 @@
AM_CONDITIONAL([HAVE_NEON], [test "x$HAVE_NEON" = "x1"])
COMMON_CFLAGS="-DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD ${PLATFORM_CFLAGS}
${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
-COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD
${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} -DNDEBUG -I\$(top_srcdir)"
+COMMON_CXXFLAGS="-std=c++11 -DWEBRTC_AUDIO_PROCESSING_ONLY_BUILD
${PLATFORM_CFLAGS} ${OS_CFLAGS} ${ARCH_CFLAGS} ${GNUSTL_CFLAGS} -DNDEBUG
-I\$(top_srcdir)"
+COMMON_LDFLAGS="${OS_LDFLAGS}"
AC_SUBST([COMMON_CFLAGS])
AC_SUBST([COMMON_CXXFLAGS])
+AC_SUBST([COMMON_LDFLAGS])
AC_CONFIG_FILES([
webrtc-audio-processing.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/missing
new/webrtc-audio-processing-0.3.1/missing
--- old/webrtc-audio-processing-0.3/missing 2015-10-13 08:28:16.000000000
+0200
+++ new/webrtc-audio-processing-0.3.1/missing 2018-07-23 16:05:46.000000000
+0200
@@ -1,9 +1,9 @@
-#! /bin/sh
+#!/bin/sh
# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2016-01-11.22; # UTC
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <[email protected]>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -210,6 +210,6 @@
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/modules/audio_processing/Makefile.am
new/webrtc-audio-processing-0.3.1/webrtc/modules/audio_processing/Makefile.am
--- old/webrtc-audio-processing-0.3/webrtc/modules/audio_processing/Makefile.am
2016-06-21 13:15:34.000000000 +0200
+++
new/webrtc-audio-processing-0.3.1/webrtc/modules/audio_processing/Makefile.am
2018-07-23 16:02:57.000000000 +0200
@@ -173,9 +173,9 @@
$(top_builddir)/webrtc/common_audio/libcommon_audio.la \
$(top_builddir)/webrtc/modules/audio_coding/libaudio_coding.la \
$(LIBWEBRTC_PRIVATEARCH) \
- -lpthread
-libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) \
- -Wl,--no-undefined \
+ $(GNUSTL_LIBS)
+libwebrtc_audio_processing_la_LDFLAGS = $(AM_LDFLAGS) $(COMMON_LDFLAGS) \
+ -no-undefined \
-version-info
$(LIBWEBRTC_AUDIO_PROCESSING_VERSION_INFO)
# FIXME: The MIPS optimisations need to be hooked up once we have the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/Makefile.am
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/Makefile.am
--- old/webrtc-audio-processing-0.3/webrtc/system_wrappers/Makefile.am
2015-11-19 13:41:44.000000000 +0100
+++ new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/Makefile.am
2018-07-23 16:02:57.000000000 +0200
@@ -2,6 +2,7 @@
noinst_HEADERS = include/aligned_array.h \
include/asm_defines.h \
+ include/condition_variable_wrapper.h \
include/compile_assert_c.h \
include/event_wrapper.h \
include/scoped_vector.h \
@@ -42,19 +43,49 @@
source/trace_impl.h \
source/trace_posix.h \
source/trace_win.h
-# This assumes that we want the POSIX implementation -- should eventually be
-# converted to a conditional to include Windows support
+
+EXTRA_DIST = BUILD.gn
+
+if HAVE_POSIX
libsystem_wrappers_la_SOURCES += source/critical_section_posix.cc \
source/event_timer_posix.cc \
source/rw_lock_posix.cc \
source/thread_posix.cc \
source/trace_posix.cc
-libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS)
+else
+EXTRA_DIST += source/critical_section_posix.cc \
+ source/event_timer_posix.cc \
+ source/rw_lock_posix.cc \
+ source/thread_posix.cc \
+ source/trace_posix.cc
+endif
-EXTRA_DIST = BUILD.gn \
- source/critical_section_win.cc \
- source/event_timer_win.cc \
- source/rw_lock_generic.cc \
- source/rw_lock_win.cc \
- source/thread_win.cc \
- source/trace_win.cc
+if HAVE_WIN
+libsystem_wrappers_la_SOURCES +=
include/fix_interlocked_exchange_pointer_win.h \
+ source/critical_section_win.cc \
+ source/condition_variable.cc \
+ source/condition_variable_event_win.cc \
+ source/condition_variable_event_win.h \
+ source/condition_variable_native_win.cc \
+ source/condition_variable_native_win.h \
+ source/event_timer_win.cc \
+ source/rw_lock_win.cc \
+ source/rw_lock_generic.cc \
+ source/thread_win.cc \
+ source/trace_win.cc
+else
+EXTRA_DIST += include/fix_interlocked_exchange_pointer_win.h \
+ source/critical_section_win.cc \
+ source/condition_variable.cc \
+ source/condition_variable_event_win.cc \
+ source/condition_variable_event_win.h \
+ source/condition_variable_native_win.cc \
+ source/condition_variable_native_win.h \
+ source/event_timer_win.cc \
+ source/rw_lock_generic.cc \
+ source/rw_lock_win.cc \
+ source/thread_win.cc \
+ source/trace_win.cc
+endif
+
+libsystem_wrappers_la_CXXFLAGS = $(AM_CXXFLAGS) $(COMMON_CXXFLAGS)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/include/condition_variable_wrapper.h
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/include/condition_variable_wrapper.h
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/include/condition_variable_wrapper.h
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/include/condition_variable_wrapper.h
2018-07-23 16:02:57.000000000 +0200
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2011 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.
+ */
+
+#ifndef WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CONDITION_VARIABLE_WRAPPER_H_
+#define WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CONDITION_VARIABLE_WRAPPER_H_
+
+namespace webrtc {
+
+class CriticalSectionWrapper;
+
+class ConditionVariableWrapper {
+ public:
+ // Factory method, constructor disabled.
+ static ConditionVariableWrapper* CreateConditionVariable();
+
+ virtual ~ConditionVariableWrapper() {}
+
+ // Calling thread will atomically release crit_sect and wait until next
+ // some other thread calls Wake() or WakeAll().
+ virtual void SleepCS(CriticalSectionWrapper& crit_sect) = 0;
+
+ // Same as above but with a timeout.
+ virtual bool SleepCS(CriticalSectionWrapper& crit_sect,
+ unsigned long max_time_in_ms) = 0;
+
+ // Wakes one thread calling SleepCS().
+ virtual void Wake() = 0;
+
+ // Wakes all threads calling SleepCS().
+ virtual void WakeAll() = 0;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_SYSTEM_WRAPPERS_INCLUDE_CONDITION_VARIABLE_WRAPPER_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/include/fix_interlocked_exchange_pointer_win.h
2015-11-19 13:41:44.000000000 +0100
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2013 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.
+ */
+
+// Various inline functions and macros to fix compilation of 32 bit target
+// on MSVC with /Wp64 flag enabled.
+
+// The original code can be found here:
+// http://src.chromium.org/svn/trunk/src/base/fix_wp64.h
+
+#ifndef
WEBRTC_SYSTEM_WRAPPERS_SOURCE_FIX_INTERLOCKED_EXCHANGE_POINTER_WINDOWS_H_
+#define
WEBRTC_SYSTEM_WRAPPERS_SOURCE_FIX_INTERLOCKED_EXCHANGE_POINTER_WINDOWS_H_
+
+#include <windows.h>
+
+// Platform SDK fixes when building with /Wp64 for a 32 bits target.
+#if !defined(_WIN64) && defined(_Wp64)
+
+#ifdef InterlockedExchangePointer
+#undef InterlockedExchangePointer
+// The problem is that the macro provided for InterlockedExchangePointer() is
+// doing a (LONG) C-style cast that triggers invariably the warning C4312 when
+// building on 32 bits.
+inline void* InterlockedExchangePointer(void* volatile* target, void* value) {
+ return reinterpret_cast<void*>(static_cast<LONG_PTR>(InterlockedExchange(
+ reinterpret_cast<volatile LONG*>(target),
+ static_cast<LONG>(reinterpret_cast<LONG_PTR>(value)))));
+}
+#endif // #ifdef InterlockedExchangePointer
+
+#endif // #if !defined(_WIN64) && defined(_Wp64)
+
+#endif //
WEBRTC_SYSTEM_WRAPPERS_SOURCE_FIX_INTERLOCKED_EXCHANGE_POINTER_WINDOWS_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable.cc
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable.cc
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable.cc
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable.cc
2018-07-23 16:02:57.000000000 +0200
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2011 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.
+ */
+
+#include "webrtc/system_wrappers/include/condition_variable_wrapper.h"
+
+#if defined(_WIN32)
+#include <windows.h>
+#include "webrtc/system_wrappers/source/condition_variable_event_win.h"
+#include "webrtc/system_wrappers/source/condition_variable_native_win.h"
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#include <pthread.h>
+#include "webrtc/system_wrappers/source/condition_variable_posix.h"
+#endif
+
+namespace webrtc {
+
+ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() {
+#if defined(_WIN32)
+ // Try to create native condition variable implementation.
+ ConditionVariableWrapper* ret_val = ConditionVariableNativeWin::Create();
+ if (!ret_val) {
+ // Native condition variable implementation does not exist. Create generic
+ // condition variable based on events.
+ ret_val = new ConditionVariableEventWin();
+ }
+ return ret_val;
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+ return ConditionVariablePosix::Create();
+#else
+ return NULL;
+#endif
+}
+
+} // namespace webrtc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_event_win.cc
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_event_win.cc
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_event_win.cc
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_event_win.cc
2018-07-23 16:02:57.000000000 +0200
@@ -0,0 +1,195 @@
+/*
+Source:
+http://www1.cse.wustl.edu/~schmidt/ACE-copying.html
+
+License:
+Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM),
+and CoSMIC(TM)
+
+ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred to
+as "DOC software") are copyrighted by Douglas C. Schmidt and his research
+group at Washington University, University of California, Irvine, and
+Vanderbilt University, Copyright (c) 1993-2009, all rights reserved. Since DOC
+software is open-source, freely available software, you are free to use,
+modify, copy, and distribute--perpetually and irrevocably--the DOC software
+source code and object code produced from the source, as well as copy and
+distribute modified versions of this software. You must, however, include this
+copyright statement along with any code built using DOC software that you
+release. No copyright statement needs to be provided if you just ship binary
+executables of your software products.
+You can use DOC software in commercial and/or binary software releases and are
+under no obligation to redistribute any of your source code that is built
+using DOC software. Note, however, that you may not misappropriate the DOC
+software code, such as copyrighting it yourself or claiming authorship of the
+DOC software code, in a way that will prevent DOC software from being
+distributed freely using an open-source development model. You needn't inform
+anyone that you're using DOC software in your software, though we encourage
+you to let us know so we can promote your project in the DOC software success
+stories.
+
+The ACE, TAO, CIAO, DAnCE, and CoSMIC web sites are maintained by the DOC
+Group at the Institute for Software Integrated Systems (ISIS) and the Center
+for Distributed Object Computing of Washington University, St. Louis for the
+development of open-source software as part of the open-source software
+community. Submissions are provided by the submitter ``as is'' with no
+warranties whatsoever, including any warranty of merchantability,
+noninfringement of third party intellectual property, or fitness for any
+particular purpose. In no event shall the submitter be liable for any direct,
+indirect, special, exemplary, punitive, or consequential damages, including
+without limitation, lost profits, even if advised of the possibility of such
+damages. Likewise, DOC software is provided as is with no warranties of any
+kind, including the warranties of design, merchantability, and fitness for a
+particular purpose, noninfringement, or arising from a course of dealing,
+usage or trade practice. Washington University, UC Irvine, Vanderbilt
+University, their employees, and students shall have no liability with respect
+to the infringement of copyrights, trade secrets or any patents by DOC
+software or any part thereof. Moreover, in no event will Washington
+University, UC Irvine, or Vanderbilt University, their employees, or students
+be liable for any lost revenue or profits or other special, indirect and
+consequential damages.
+
+DOC software is provided with no support and without any obligation on the
+part of Washington University, UC Irvine, Vanderbilt University, their
+employees, or students to assist in its use, correction, modification, or
+enhancement. A number of companies around the world provide commercial support
+for DOC software, however. DOC software is Y2K-compliant, as long as the
+underlying OS platform is Y2K-compliant. Likewise, DOC software is compliant
+with the new US daylight savings rule passed by Congress as "The Energy Policy
+Act of 2005," which established new daylight savings times (DST) rules for the
+United States that expand DST as of March 2007. Since DOC software obtains
+time/date and calendaring information from operating systems users will not be
+affected by the new DST rules as long as they upgrade their operating systems
+accordingly.
+
+The names ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), CoSMIC(TM), Washington
+University, UC Irvine, and Vanderbilt University, may not be used to endorse
+or promote products or services derived from this source without express
+written permission from Washington University, UC Irvine, or Vanderbilt
+University. This license grants no permission to call products or services
+derived from this source ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), or CoSMIC(TM),
+nor does it grant permission for the name Washington University, UC Irvine, or
+Vanderbilt University to appear in their names.
+*/
+
+/*
+ * This source code contain modifications to the original source code
+ * which can be found here:
+ * http://www.cs.wustl.edu/~schmidt/win32-cv-1.html (section 3.2).
+ * Modifications:
+ * 1) Dynamic detection of native support for condition variables.
+ * 2) Use of WebRTC defined types and classes. Renaming of some functions.
+ * 3) Introduction of a second event for wake all functionality. This prevents
+ * a thread from spinning on the same condition variable, preventing other
+ * threads from waking up.
+ */
+
+#include "webrtc/system_wrappers/source/condition_variable_event_win.h"
+#include "webrtc/system_wrappers/source/critical_section_win.h"
+
+namespace webrtc {
+
+ConditionVariableEventWin::ConditionVariableEventWin() : eventID_(WAKEALL_0) {
+ memset(&num_waiters_[0], 0, sizeof(num_waiters_));
+
+ InitializeCriticalSection(&num_waiters_crit_sect_);
+
+ events_[WAKEALL_0] = CreateEvent(NULL, // no security attributes
+ TRUE, // manual-reset, sticky event
+ FALSE, // initial state non-signaled
+ NULL); // no name for event
+
+ events_[WAKEALL_1] = CreateEvent(NULL, // no security attributes
+ TRUE, // manual-reset, sticky event
+ FALSE, // initial state non-signaled
+ NULL); // no name for event
+
+ events_[WAKE] = CreateEvent(NULL, // no security attributes
+ FALSE, // auto-reset, sticky event
+ FALSE, // initial state non-signaled
+ NULL); // no name for event
+}
+
+ConditionVariableEventWin::~ConditionVariableEventWin() {
+ CloseHandle(events_[WAKE]);
+ CloseHandle(events_[WAKEALL_1]);
+ CloseHandle(events_[WAKEALL_0]);
+
+ DeleteCriticalSection(&num_waiters_crit_sect_);
+}
+
+void ConditionVariableEventWin::SleepCS(CriticalSectionWrapper& crit_sect) {
+ SleepCS(crit_sect, INFINITE);
+}
+
+bool ConditionVariableEventWin::SleepCS(CriticalSectionWrapper& crit_sect,
+ unsigned long max_time_in_ms) {
+ EnterCriticalSection(&num_waiters_crit_sect_);
+
+ // Get the eventID for the event that will be triggered by next
+ // WakeAll() call and start waiting for it.
+ const EventWakeUpType eventID =
+ (WAKEALL_0 == eventID_) ? WAKEALL_1 : WAKEALL_0;
+
+ ++(num_waiters_[eventID]);
+ LeaveCriticalSection(&num_waiters_crit_sect_);
+
+ CriticalSectionWindows* cs =
+ static_cast<CriticalSectionWindows*>(&crit_sect);
+ LeaveCriticalSection(&cs->crit);
+ HANDLE events[2];
+ events[0] = events_[WAKE];
+ events[1] = events_[eventID];
+ const DWORD result = WaitForMultipleObjects(2, // Wait on 2 events.
+ events,
+ FALSE, // Wait for either.
+ max_time_in_ms);
+
+ const bool ret_val = (result != WAIT_TIMEOUT);
+
+ EnterCriticalSection(&num_waiters_crit_sect_);
+ --(num_waiters_[eventID]);
+
+ // Last waiter should only be true for WakeAll(). WakeAll() correspond
+ // to position 1 in events[] -> (result == WAIT_OBJECT_0 + 1)
+ const bool last_waiter = (result == WAIT_OBJECT_0 + 1) &&
+ (num_waiters_[eventID] == 0);
+ LeaveCriticalSection(&num_waiters_crit_sect_);
+
+ if (last_waiter) {
+ // Reset/unset the WakeAll() event since all threads have been
+ // released.
+ ResetEvent(events_[eventID]);
+ }
+
+ EnterCriticalSection(&cs->crit);
+ return ret_val;
+}
+
+void ConditionVariableEventWin::Wake() {
+ EnterCriticalSection(&num_waiters_crit_sect_);
+ const bool have_waiters = (num_waiters_[WAKEALL_0] > 0) ||
+ (num_waiters_[WAKEALL_1] > 0);
+ LeaveCriticalSection(&num_waiters_crit_sect_);
+
+ if (have_waiters) {
+ SetEvent(events_[WAKE]);
+ }
+}
+
+void ConditionVariableEventWin::WakeAll() {
+ EnterCriticalSection(&num_waiters_crit_sect_);
+
+ // Update current WakeAll() event
+ eventID_ = (WAKEALL_0 == eventID_) ? WAKEALL_1 : WAKEALL_0;
+
+ // Trigger current event
+ const EventWakeUpType eventID = eventID_;
+ const bool have_waiters = num_waiters_[eventID] > 0;
+ LeaveCriticalSection(&num_waiters_crit_sect_);
+
+ if (have_waiters) {
+ SetEvent(events_[eventID]);
+ }
+}
+
+} // namespace webrtc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_event_win.h
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_event_win.h
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_event_win.h
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_event_win.h
2018-07-23 16:02:57.000000000 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2013 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.
+ */
+
+#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_
+#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_
+
+#include <windows.h>
+
+#include "webrtc/system_wrappers/include/condition_variable_wrapper.h"
+
+namespace webrtc {
+
+class ConditionVariableEventWin : public ConditionVariableWrapper {
+ public:
+ ConditionVariableEventWin();
+ virtual ~ConditionVariableEventWin();
+
+ void SleepCS(CriticalSectionWrapper& crit_sect);
+ bool SleepCS(CriticalSectionWrapper& crit_sect, unsigned long max_time_inMS);
+ void Wake();
+ void WakeAll();
+
+ private:
+ enum EventWakeUpType {
+ WAKEALL_0 = 0,
+ WAKEALL_1 = 1,
+ WAKE = 2,
+ EVENT_COUNT = 3
+ };
+
+ unsigned int num_waiters_[2];
+ EventWakeUpType eventID_;
+ CRITICAL_SECTION num_waiters_crit_sect_;
+ HANDLE events_[EVENT_COUNT];
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_EVENT_WIN_H_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_native_win.cc
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_native_win.cc
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_native_win.cc
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_native_win.cc
2018-07-23 16:02:57.000000000 +0200
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2013 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.
+ */
+
+#include "webrtc/system_wrappers/include/trace.h"
+#include "webrtc/system_wrappers/source/condition_variable_native_win.h"
+#include "webrtc/system_wrappers/source/critical_section_win.h"
+
+namespace webrtc {
+
+static HMODULE library = NULL;
+static bool win_support_condition_variables_primitive = false;
+
+PInitializeConditionVariable PInitializeConditionVariable_;
+PSleepConditionVariableCS PSleepConditionVariableCS_;
+PWakeConditionVariable PWakeConditionVariable_;
+PWakeAllConditionVariable PWakeAllConditionVariable_;
+
+typedef void (WINAPI *PInitializeConditionVariable)(PCONDITION_VARIABLE);
+typedef BOOL (WINAPI *PSleepConditionVariableCS)(PCONDITION_VARIABLE,
+ PCRITICAL_SECTION, DWORD);
+typedef void (WINAPI *PWakeConditionVariable)(PCONDITION_VARIABLE);
+typedef void (WINAPI *PWakeAllConditionVariable)(PCONDITION_VARIABLE);
+
+ConditionVariableNativeWin::ConditionVariableNativeWin() {
+}
+
+ConditionVariableNativeWin::~ConditionVariableNativeWin() {
+}
+
+ConditionVariableWrapper* ConditionVariableNativeWin::Create() {
+ ConditionVariableNativeWin* ret_val = new ConditionVariableNativeWin();
+ if (!ret_val->Init()) {
+ delete ret_val;
+ return NULL;
+ }
+ return ret_val;
+}
+
+bool ConditionVariableNativeWin::Init() {
+ if (!library) {
+ // Native implementation is supported on Vista+.
+ library = LoadLibrary(TEXT("Kernel32.dll"));
+ // TODO(henrike): this code results in an attempt to load the above dll
+ // every time the previous attempt failed. Only try to load once.
+ if (library) {
+ // TODO(henrike): not thread safe as reading and writing to library is
not
+ // serialized. Fix.
+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1, "Loaded Kernel.dll");
+
+ PInitializeConditionVariable_ =
+ (PInitializeConditionVariable) GetProcAddress(
+ library, "InitializeConditionVariable");
+ PSleepConditionVariableCS_ = (PSleepConditionVariableCS) GetProcAddress(
+ library, "SleepConditionVariableCS");
+ PWakeConditionVariable_ = (PWakeConditionVariable) GetProcAddress(
+ library, "WakeConditionVariable");
+ PWakeAllConditionVariable_ = (PWakeAllConditionVariable) GetProcAddress(
+ library, "WakeAllConditionVariable");
+
+ if (PInitializeConditionVariable_ && PSleepConditionVariableCS_
+ && PWakeConditionVariable_ && PWakeAllConditionVariable_) {
+ WEBRTC_TRACE(
+ kTraceStateInfo, kTraceUtility, -1,
+ "Loaded native condition variables");
+ win_support_condition_variables_primitive = true;
+ }
+ }
+ }
+ if (!win_support_condition_variables_primitive) {
+ return false;
+ }
+ PInitializeConditionVariable_(&condition_variable_);
+ return true;
+}
+
+void ConditionVariableNativeWin::SleepCS(CriticalSectionWrapper& crit_sect) {
+ SleepCS(crit_sect, INFINITE);
+}
+
+bool ConditionVariableNativeWin::SleepCS(CriticalSectionWrapper& crit_sect,
+ unsigned long max_time_in_ms) {
+ CriticalSectionWindows* cs =
+ static_cast<CriticalSectionWindows*>(&crit_sect);
+ BOOL ret_val = PSleepConditionVariableCS_(&condition_variable_,
+ &(cs->crit), max_time_in_ms);
+ return ret_val != 0;
+}
+
+void ConditionVariableNativeWin::Wake() {
+ PWakeConditionVariable_(&condition_variable_);
+}
+
+void ConditionVariableNativeWin::WakeAll() {
+ PWakeAllConditionVariable_(&condition_variable_);
+}
+
+} // namespace webrtc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_native_win.h
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_native_win.h
---
old/webrtc-audio-processing-0.3/webrtc/system_wrappers/source/condition_variable_native_win.h
1970-01-01 01:00:00.000000000 +0100
+++
new/webrtc-audio-processing-0.3.1/webrtc/system_wrappers/source/condition_variable_native_win.h
2018-07-23 16:02:57.000000000 +0200
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2013 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.
+ */
+
+#ifndef WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_NATIVE_WIN_H_
+#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_NATIVE_WIN_H_
+
+#include <windows.h>
+
+#include "webrtc/system_wrappers/include/condition_variable_wrapper.h"
+
+namespace webrtc {
+
+#if !defined CONDITION_VARIABLE_INIT
+typedef struct RTL_CONDITION_VARIABLE_ {
+ void* Ptr;
+} RTL_CONDITION_VARIABLE, *PRTL_CONDITION_VARIABLE;
+
+typedef RTL_CONDITION_VARIABLE CONDITION_VARIABLE, *PCONDITION_VARIABLE;
+#endif
+
+typedef void (WINAPI* PInitializeConditionVariable)(PCONDITION_VARIABLE);
+typedef BOOL (WINAPI* PSleepConditionVariableCS)(PCONDITION_VARIABLE,
+ PCRITICAL_SECTION, DWORD);
+typedef void (WINAPI* PWakeConditionVariable)(PCONDITION_VARIABLE);
+typedef void (WINAPI* PWakeAllConditionVariable)(PCONDITION_VARIABLE);
+
+class ConditionVariableNativeWin : public ConditionVariableWrapper {
+ public:
+ static ConditionVariableWrapper* Create();
+ virtual ~ConditionVariableNativeWin();
+
+ void SleepCS(CriticalSectionWrapper& crit_sect);
+ bool SleepCS(CriticalSectionWrapper& crit_sect, unsigned long max_time_inMS);
+ void Wake();
+ void WakeAll();
+
+ private:
+ ConditionVariableNativeWin();
+
+ bool Init();
+
+ CONDITION_VARIABLE condition_variable_;
+};
+
+} // namespace webrtc
+
+#endif // WEBRTC_SYSTEM_WRAPPERS_SOURCE_CONDITION_VARIABLE_NATIVE_WIN_H_