Giter Site home page Giter Site logo

signalapp / ringrtc Goto Github PK

View Code? Open in Web Editor NEW
520.0 32.0 121.0 4.92 MB

License: GNU Affero General Public License v3.0

Shell 1.21% Python 3.59% Java 5.64% HTML 6.91% Rust 65.51% Makefile 0.13% Ruby 0.15% Swift 11.81% Objective-C 0.02% JavaScript 0.24% TypeScript 4.55% Jupyter Notebook 0.03% Dockerfile 0.10% Handlebars 0.11%

ringrtc's Introduction

RingRTC

RingRTC is a middleware library providing Signal Messenger applications with video and voice calling services built on top of WebRTC.

Building

For building RingRTC see BUILDING.md.

Contributing

Contributions to this project are welcome. Pull requests should be tested across all supported platforms.

For larger changes and feature ideas, we ask that you propose it on the unofficial Community Forum for a high-level discussion with the wider community before implementation.

Signing a CLA (Contributor License Agreement) is required for all contributions.

Legal things

Cryptography Notice

This distribution includes cryptographic software. The country in which you currently reside may have restrictions on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check your country's laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted. See http://www.wassenaar.org/ for more information.

The U.S. Government Department of Commerce, Bureau of Industry and Security (BIS), has classified this software as Export Commodity Control Number (ECCN) 5D002.C.1, which includes information security software using or performing cryptographic functions with asymmetric algorithms. The form and manner of this distribution makes it eligible for export under the License Exception ENC Technology Software Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Section 740.13) for both object code and source code.

License

Copyright 2019-2021 Signal Messenger, LLC

Licensed under AGPLv3 only.

ringrtc's People

Contributors

adel-signal avatar akonradi-signal avatar alan-signal avatar cbrune-signal avatar dennisameling avatar ehrenkret-signal avatar evanhahn-signal avatar ewouth avatar imperiopolis avatar imperiopolis-signal avatar inaqui-signal avatar indutny-signal avatar jim-signal avatar jrose-signal avatar marissa-signal avatar michaelmcdonnell avatar moiseev-signal avatar peter-signal avatar rashad-signal avatar rex4539 avatar richard-signal avatar vlad-signal avatar wcampbell0x2a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ringrtc's Issues

Error $ make android on Ubuntu 18.04

Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Linux_x64/clang-n332890-c2443155-1.tgz .......... Done.
Hook 'vpython src/tools/clang/scripts/update.py' took 46.36 secs
________ running 'vpython src/build/util/lastchange.py -o src/build/util/LASTCHANGE' in '/ok/dev/ringrtc-25jan/out/webrtc'
________ running 'download_from_google_storage --no_resume --platform=linux* --no_auth --bucket chromium-clang-format -s src/buildtools/linux64/clang-format.sha1' in '/ok/dev/ringrtc-25jan/out/webrtc'
0> Downloading src/buildtools/linux64/clang-format...
Downloading 1 files took 4.835494 second(s)
________ running 'vpython src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-instrumented-libraries -s src/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1' in '/ok/dev/ringrtc-25jan/out/webrtc'
Failed to fetch file gs://chromium-instrumented-libraries/92ab0ac3915bc2b50e6a8d7a990522d7355d1ef0 for src/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz. [Err: [E2020-01-25T13:39:42.185840+07:00 25562 0 annotate.go:241] original error: no such package
[E2020-01-25T13:39:42.186337+07:00 25562 0 annotate.go:241] 
[E2020-01-25T13:39:42.186387+07:00 25562 0 annotate.go:241] goroutine 38:
[E2020-01-25T13:39:42.186414+07:00 25562 0 annotate.go:241] #0 go.chromium.org/luci/cipd/client/cipd/client.go:1684 - cipd.humanErr()
[E2020-01-25T13:39:42.186442+07:00 25562 0 annotate.go:241] #1 go.chromium.org/luci/cipd/client/cipd/client.go:741 - cipd.(*clientImpl).ResolveVersion()
[E2020-01-25T13:39:42.186472+07:00 25562 0 annotate.go:241] #2 go.chromium.org/luci/cipd/client/cipd/resolver.go:176 - cipd.(*Resolver).resolveVersion.func1()
[E2020-01-25T13:39:42.186530+07:00 25562 0 annotate.go:241] #3 go.chromium.org/luci/common/sync/promise/promise.go:84 - promise.(*Promise).runGen()
[E2020-01-25T13:39:42.186562+07:00 25562 0 annotate.go:241] #4 runtime/asm_amd64.s:1357 - runtime.goexit()

Linking ringrtc build result to signal-android project

Hello, I tried to build ringrtc manually following the https://github.com/signalapp/ringrtc/blob/master/BUILDING.md file. I then tried changing the ring-rtc dependency in signal-android project at app/build.gradle from implementation 'org.signal:ringrtc-android:2.10.7' to implementation fileTree(dir:'ringrtc-master/out/release/libs', include :['*.jar']).

After that I tried to build and run the application. The build process was successful and the .jar file was registered as external libraries but when it was installed on the device, the program experienced a force close. After looking at the log, it shows that the program failed to load the libringrtc.so library, even though in the file structure, the libringrtc.so library is available and only differs by 1 subfolder.

In the out/release/libs alone I can't find the .aar file and only find .jar .

The following is a log of the errors that appear.

E/AndroidRuntime: FATAL EXCEPTION: main
Process: my.new.SignalTesting20, PID: 11912
java.lang.AssertionError: Unable to load ringrtc library
at org.thoughtcrime.securesms.ApplicationContext.initializeRingRtc(ApplicationContext.java:346)
at org.thoughtcrime.securesms.ApplicationContext.lambda$QaXC_yGYxWOey7BnguyExwrBRyw(Unknown Source:0)
at org.thoughtcrime.securesms.-$$Lambda$ApplicationContext$QaXC_yGYxWOey7BnguyExwrBRyw.run(Unknown Source:2)
at org.thoughtcrime.securesms.util.AppStartup.execute(AppStartup.java:142)
at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationContext.java:178)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7253)
at android.app.ActivityThread.access$1500(ActivityThread.java:302)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2144)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:260)
at android.app.ActivityThread.main(ActivityThread.java:8258)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libringrtc.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at org.signal.ringrtc.CallManager.(CallManager.java:76)
at org.signal.ringrtc.CallManager.initialize(CallManager.java:91)
at org.thoughtcrime.securesms.ApplicationContext.initializeRingRtc(ApplicationContext.java:344)
at org.thoughtcrime.securesms.ApplicationContext.lambda$QaXC_yGYxWOey7BnguyExwrBRyw(Unknown Source:0) 
at org.thoughtcrime.securesms.-$$Lambda$ApplicationContext$QaXC_yGYxWOey7BnguyExwrBRyw.run(Unknown Source:2) 
at org.thoughtcrime.securesms.util.AppStartup.execute(AppStartup.java:142) 
at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationContext.java:178) 
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7253) 
at android.app.ActivityThread.access$1500(ActivityThread.java:302) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2144) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:260) 
at android.app.ActivityThread.main(ActivityThread.java:8258) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) 
E/SignalUncaughtException: java.lang.AssertionError: Unable to load ringrtc library
at org.thoughtcrime.securesms.ApplicationContext.initializeRingRtc(ApplicationContext.java:346)
at org.thoughtcrime.securesms.ApplicationContext.lambda$QaXC_yGYxWOey7BnguyExwrBRyw(Unknown Source:0)
at org.thoughtcrime.securesms.-$$Lambda$ApplicationContext$QaXC_yGYxWOey7BnguyExwrBRyw.run(Unknown Source:2)
at org.thoughtcrime.securesms.util.AppStartup.execute(AppStartup.java:142)
at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationContext.java:178)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7253)
at android.app.ActivityThread.access$1500(ActivityThread.java:302)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2144)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:260)
at android.app.ActivityThread.main(ActivityThread.java:8258)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libringrtc.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at org.signal.ringrtc.CallManager.(CallManager.java:76)
at org.signal.ringrtc.CallManager.initialize(CallManager.java:91)
at org.thoughtcrime.securesms.ApplicationContext.initializeRingRtc(ApplicationContext.java:344)
at org.thoughtcrime.securesms.ApplicationContext.lambda$QaXC_yGYxWOey7BnguyExwrBRyw(Unknown Source:0) 
at org.thoughtcrime.securesms.-$$Lambda$ApplicationContext$QaXC_yGYxWOey7BnguyExwrBRyw.run(Unknown Source:2) 
at org.thoughtcrime.securesms.util.AppStartup.execute(AppStartup.java:142) 
at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationContext.java:178) 
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193) 
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7253) 
at android.app.ActivityThread.access$1500(ActivityThread.java:302) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2144) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:260) 
at android.app.ActivityThread.main(ActivityThread.java:8258) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1006) 

Anybody can help ? Thanks before.

JNI: calling method failed. Method: getTurnServerInfo

After taking AAR file and linked to the project. while running i got the following exception.

JNI: calling method failed. Method: getTurnServerInfo, Sig: ()Lorg/whispersystems/signalservice/api/messages/calls/TurnServerInfo; caused by java exception:
java.lang.NoSuchMethodError: no non-static method "Lorg/whispersystems/signalservice/api/SignalServiceAccountManager;.getTurnServerInfo()Lorg/whispersystems/signalservice/api/messages/calls/TurnServerInfo;"

webrtc fork does not compile with gcc 13

ninja: job failed: clang++ -MMD -MF obj/api/rtc_event_log_output_file/rtc_event_log_output_file.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../../../webrtc-5481c -Igen -I../../../webrtc-5481c/third_party/abseil-cpp -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../../webrtc-5481c/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shadow -Wctad-maybe-unsupported -Wc++11-narrowing -Wundef -Wunused-lambda-capture -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Os -fomit-frame-pointer -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -Os -fomit-frame-pointer -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -c ../../../webrtc-5481c/api/rtc_event_log_output_file.cc -o obj/api/rtc_event_log_output_file/rtc_event_log_output_file.o
In file included from ../../../webrtc-5481c/api/rtc_event_log_output_file.cc:11:
In file included from ../../../webrtc-5481c/api/rtc_event_log_output_file.h:20:
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:84:21: error: unknown type name 'int64_t'
  bool SeekRelative(int64_t offset);
                    ^
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:86:15: error: unknown type name 'int64_t'
  bool SeekTo(int64_t position);
              ^
2 errors generated.
ninja: job failed: clang++ -MMD -MF obj/rtc_base/third_party/base64/base64/base64.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../../../webrtc-5481c -Igen -I../../../webrtc-5481c/third_party/abseil-cpp -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../../webrtc-5481c/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shadow -Wctad-maybe-unsupported -Wc++11-narrowing -Wundef -Wunused-lambda-capture -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Os -fomit-frame-pointer -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -Os -fomit-frame-pointer -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -c ../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc -o obj/rtc_base/third_party/base64/base64/base64.o
In file included from ../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc:17:
../../../webrtc-5481c/rtc_base/third_party/base64/base64.h:78:43: error: unknown type name 'uint8_t'; did you mean 'wint_t'?
                              std::vector<uint8_t>* result,
                                          ^~~~~~~
                                          wint_t
/usr/include/bits/alltypes.h:198:18: note: 'wint_t' declared here
typedef unsigned wint_t;
                 ^
../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc:213:14: error: out-of-line definition of 'DecodeFromArray' does not match any declaration in 'rtc::Base64'
bool Base64::DecodeFromArray(const char* data,
             ^~~~~~~~~~~~~~~
../../../webrtc-5481c/rtc_base/third_party/base64/base64.cc:207:30: note: type of 4th parameter of member declaration does not match definition ('vector<char> *' vs 'vector<uint8_t> *' (aka 'vector<unsigned char> *'))
                             vector<char>* result,
                             ^
../../../webrtc-5481c/rtc_base/third_party/base64/base64.h:78:31: note: type of 4th parameter of member declaration does not match definition ('std::vector<wint_t> *' (aka 'vector<unsigned int> *') vs 'vector<uint8_t> *' (aka 'vector<unsigned char> *'))
                              std::vector<uint8_t>* result,
                              ^
2 errors generated.
ninja: job failed: clang++ -MMD -MF obj/rtc_base/system/file_wrapper/file_wrapper.o.d -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_OZONE=1 -DOFFICIAL_BUILD -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_USE_H264 -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_LINUX -DABSL_ALLOCATOR_NOTHROW=1 -I../../../webrtc-5481c -Igen -I../../../webrtc-5481c/third_party/abseil-cpp -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../../webrtc-5481c/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -flto=thin -fsplit-lto-unit -fwhole-program-vtables -m64 -msse3 -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fdata-sections -ffunction-sections -fno-unique-section-names -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shadow -Wctad-maybe-unsupported -Wc++11-narrowing -Wundef -Wunused-lambda-capture -std=c++20 -Wno-trigraphs -gsimple-template-names -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -Wnon-virtual-dtor -Woverloaded-virtual -Os -fomit-frame-pointer -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__= -Os -fomit-frame-pointer -O2 -Wno-error -Wno-deprecated-builtins -Wno-unknown-warning-option -Wno-builtin-macro-redefined -Wno-deprecated-declarations -c ../../../webrtc-5481c/rtc_base/system/file_wrapper.cc -o obj/rtc_base/system/file_wrapper/file_wrapper.o
In file included from ../../../webrtc-5481c/rtc_base/system/file_wrapper.cc:11:
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:84:21: error: unknown type name 'int64_t'
  bool SeekRelative(int64_t offset);
                    ^
../../../webrtc-5481c/rtc_base/system/file_wrapper.h:86:15: error: unknown type name 'int64_t'
  bool SeekTo(int64_t position);
              ^
../../../webrtc-5481c/rtc_base/system/file_wrapper.cc:70:19: error: out-of-line definition of 'SeekRelative' does not match any declaration in 'webrtc::FileWrapper'
bool FileWrapper::SeekRelative(int64_t offset) {
                  ^~~~~~~~~~~~
../../../webrtc-5481c/rtc_base/system/file_wrapper.cc:75:19: error: out-of-line definition of 'SeekTo' does not match any declaration in 'webrtc::FileWrapper'
bool FileWrapper::SeekTo(int64_t position) {
                  ^~~~~~
4 errors generated.
ninja: subcommands failed

Voice Call Encryption

hello again, I'm trying to understand the workflow of voice calls encryption on the signal app. After trying to find out on the signal-android project, I was directed to this repository (ringrtc).
I then looked for the encrypt module which was most likely used to encrypt the voice call that occurred. I searched the file using the keyword encrypt( which should refer to the existing encryption function using vscode.
Here are the results of the existing search.

- src/rffi/src/peer_connection_observer.cc line 166
- src/rust/src/core/crypto.rs line 188
- src/rust/src/core/group_call.rs line 2140

In the three modules, I added a simple log but after it was built and run on Android, the entered log was never called when a voice call was made.

Previously, this method was successfully used to find out and find the encryption function for the part of sending text messages.

What I want to ask is, is it true that the encrypt voice call module is in the crypto.rs file? If not, where is the location of the encrypt module for this voice call and what module in the ringrtc project is the bridge in calling the encrypt module?

Cannot build ringrtc with Xcode 12.3

I cannot build ringrtc 2.8.8 for iOS devices when I set Xcode 12.3 path in command "sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer". But if I set Xcode 11.7 url in this command everything works fine.

Specs of system:
Model Name: MacBook Pro
Model Identifier: MacBookPro16,1
Processor Name: 6-Core Intel Core i7
Processor Speed: 2,6 GHz
Number of Processors: 1
Total Number of Cores: 6
L2 Cache (per Core): 256 KB
L3 Cache: 12 MB
Hyper-Threading Technology: Enabled
Memory: 16 GB
System Firmware Version: 1554.60.15.0.0 (iBridge: 18.16.13030.0.0,0)
Activation Lock Status: Enabled

This is the error I get:

ERROR at //build/config/mac/mac_sdk.gni:106:7: Script returned non-zero exit code.
exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines")
^----------
Current dir: /Users/cem/Desktop/ringrtc/out/release/arm64_libs/
Command: python /Users/cem/Desktop/ringrtc/src/webrtc/src/build/mac/find_sdk.py --print_sdk_path --print_bin_path 10.12.1
Returned 1.
stderr:

Traceback (most recent call last):
File "/Users/cem/Desktop/ringrtc/src/webrtc/src/build/mac/find_sdk.py", line 97, in
print(main())
File "/Users/cem/Desktop/ringrtc/src/webrtc/src/build/mac/find_sdk.py", line 80, in main
raise Exception('No %s+ SDK found' % min_sdk_version)
Exception: No 10.12.1+ SDK found

See //build/toolchain/mac/BUILD.gn:15:1: whence it was imported.
import("//build/config/mac/mac_sdk.gni")
^--------------------------------------
See //BUILD.gn:29:3: which caused the file to be included.
group("default") {
^-----------------
Traceback (most recent call last):
File "./tools_webrtc/ios/build_ios_libs.py", line 238, in
sys.exit(main())
File "./tools_webrtc/ios/build_ios_libs.py", line 169, in main
args.use_goma, gn_args)
File "./tools_webrtc/ios/build_ios_libs.py", line 130, in BuildWebRTC
_RunCommand(cmd)
File "./tools_webrtc/ios/build_ios_libs.py", line 76, in _RunCommand
subprocess.check_call(cmd, cwd=SRC_DIR)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python', '/Users/cem/Desktop/ringrtc/src/webrtc/src/third_party/depot_tools/gn.py', 'gen', '/Users/cem/Desktop/ringrtc/out/release/arm64_libs', '--args=target_os="ios" ios_enable_code_signing=false use_xcode_clang=true is_component_build=false is_debug=false target_cpu="arm64" ios_deployment_target="11.0" rtc_libvpx_build_vp9=false enable_ios_bitcode=false use_goma=false enable_dsyms=true enable_stripping=true']' returned non-zero exit status 1
make: *** [ios/release] Error 1

Failed to download 'SignalRingRTC' when pod install

Pre-downloading: SignalRingRTC from https://github.com/signalapp/ringrtc, tag v2.26.3
[!] Failed to download 'SignalRingRTC': [!] /opt/homebrew/bin/bash -c
set -e
bin/set-up-for-cocoapods

WebRTC : 5481c
RingRTC: 2.26.3
using /Users/Mac/Library/Caches/org.signal.ringrtc/prebuild-2.26.3 as cache directory
downloading webrtc-5481c-ios-release.tar.bz2...
Traceback (most recent call last):
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1038, in _send_output
self.send(msg)
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 976, in send
self.connect()
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1448, in connect
super().connect()
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 942, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 851, in create_connection
raise exceptions[0]
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/socket.py", line 836, in create_connection
sock.connect(sa)
TimeoutError: [Errno 60] Operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/Mac/Library/Caches/CocoaPods/Pods/External/SignalRingRTC/cae679f3b46e4793b1a24e31913083ca/bin/fetch-artifact.py", line 153, in
main()
File "/Users/Mac/Library/Caches/CocoaPods/Pods/External/SignalRingRTC/cae679f3b46e4793b1a24e31913083ca/bin/fetch-artifact.py", line 143, in main
open_archive = download_if_needed(archive_file, url, checksum, archive_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/Mac/Library/Caches/CocoaPods/Pods/External/SignalRingRTC/cae679f3b46e4793b1a24e31913083ca/bin/fetch-artifact.py", line 102, in download_if_needed
with urllib.request.urlopen(url) as response:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1391, in https_open
return self.do_open(http.client.HTTPSConnection, req,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/urllib/request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 60] Operation timed out>

make build on windows Error?

In the beginning, I was unable to build ringrtc on windows successfully following the guide, because there were something wrong with the path in windows while using the make command. I then modified the makefile trying to compiling on windows. now i have the new issue with generating vs project for webrtc.

the wrong is below:
image

The directory can be identified correctly on Mac or Linux, but it's wrong on windows. How can i fix that? Anyone who built it on windows successfully?

Rust remote code execution

@jim-signal, @jrose-signal and the rest of the Sign team I would like to thank you for the great work regarding the rust implementation for Signals signaling and by replacing the C library with a memory safe language, this vastly reduces the attack surface for memory corruption vulnerabilities.

Signal has since prevented a webrtc connection from being performed prior to a user being registered in the contacts list. Additionally, @peter-signal has contributed in the removal of SDP and SCTP to reduce the number of API's to make matters secure. Nonetheless, Signal does not prevent the caller from sending the signaling message despite the user not being registered in the contact list.
Therefore, despite the use of Rust to limit remote code executions, there are still vulnerabilies in the memory safe language.

However, here are some general techniques that attackers may employ to exploit input validation vulnerabilities in Rust:

  1. Injection Attacks: Attackers may attempt to inject malicious code or payloads into input fields that are not properly validated or sanitized. This can lead to code execution vulnerabilities, enabling them to deliver and execute malware within the signaling system.

  2. Input Validation: Input validation ensures that the data received by a system meets the expected format, structure, and constraints. Failure to adequately validate input can lead to various security vulnerabilities, including those that could potentially be leveraged for RCE. For

  3. Buffer Overflows: Insufficient input validation or boundary checks can lead to buffer overflow vulnerabilities. Attackers can exploit these vulnerabilities by crafting input that exceeds the buffer's capacity, potentially overwriting adjacent memory areas with malicious code, leading to malware execution.

  4. Deserialization Vulnerabilities: If the signaling system involves deserializing data received from external sources, inadequate input validation during deserialization can result in deserialization vulnerabilities. Attackers may craft specially crafted input to trigger deserialization flaws, allowing them to execute arbitrary code or deliver malware.

  5. Command Injection: In scenarios where the signaling system interacts with external processes or executes shell commands, inadequate input validation can enable command injection attacks. Attackers can manipulate input to inject malicious commands that get executed by the system, potentially leading to malware delivery.

  6. Path Traversal Attacks: If the signaling system deals with file or path operations, insufficient validation of user-controlled input can lead to path traversal vulnerabilities. Attackers can exploit these vulnerabilities to access unauthorized files or directories, potentially delivering malware.

To mitigate these risks and protect against input validation vulnerabilities in Rust, it is crucial to follow secure coding practices such as:

  1. Implement strict input validation and sanitization routines for all user-supplied data.
  2. Enforce proper input and data validation at every layer of the signaling system.
  3. Utilize safe Rust constructs, such as option types, error handling, and proper memory management, to minimize the risk of memory-related vulnerabilities.

In doing so, this effectively prevents RCE to be used in Rust coding. Additionally, it would be better to prevent a non registered contact from being to send the protobuf messages in v4, or any signaling messages without being registered in the contacts list.

Thank you

Opus audio quality poor for music

Hey,
for testing and experimentation purpose I wanted to see how could audio quality is in case of streaming music or similar non-speech audio. I tried to set higher bitrates / max_bitrates in src/rust/src/webrtc/media.rs b/src/rust/src/webrtc/media.rs but the sound quality was still choppy and "metallic".
Is it possible in the future to have better audio quality in Signal for such use cases?

Best regards
Jonas

No call waiting support

Issue description:
While on a Signal call every other call (Signal or otherwise) would be simply missed/dropped.

Build ringrtc aar file

Hi there
I have successful build last "make android" command
But there is no *.aar file generated,
Please help with this issue! Thanks!!!

STUN network injections

Understandably, STUN is used to address the IP of the clients used to establish the webrtc stream which could be used to deliver Advanced persistence threats since connections to stun servers are not secured over UDP (through network injections). Even if they are owned by signal, ISPs, governments etc can inject malware packets within the STUN-client communication in order to execute arbitrary code and effectively install sophisticated malware on the device.

Does signal provide a mitigation for this such as packet authentication (because even this can be bypassed) or is the connection to the STUN encrypted? Because if not this actively renders a very large attack vector for signal exploitable by advanced threat actors.

TLS twillio turnserver config with RingRTC

I am not able to connect call with my own tls based turnserver configuration of the video call.
Below is the error i am getting in log in Signal-Android.


2021-10-29 17:59:52.322 13687-13687/org.thoughtcrime.securesms W/ConstraintSet: id unknown call_screen_incoming_ring_status
2021-10-29 17:59:52.638 13687-13687/org.thoughtcrime.securesms W/ConstraintSet: id unknown call_screen_incoming_ring_status
2021-10-29 17:59:55.475 13687-22177/org.thoughtcrime.securesms W/CallManager: Unable to create Peer Connection with native call
    org.signal.ringrtc.CallException: Creating JNI PeerConnection failed caused by java exception:
    unknown -- unable to decode exception
        at org.signal.ringrtc.CallManager.ringrtcCreatePeerConnection(Native Method)
        at org.signal.ringrtc.CallManager.createConnection(CallManager.java:986)
2021-10-29 17:59:55.476 13687-22177/org.thoughtcrime.securesms E/ringrtc::core::call: Proceed Future failed: Creating JNI Connection failed

Several functions in src/rust/src/core/util.rs are not sound

Specifically:

  • get_object_from_cpp
  • get_arc_from_ptr
  • ArcPtr::new
  • get_object_ref_from_ptr
  • get_object_from_ptr

These functions all dereference a raw-pointer, but are not marked unsafe. The result of this is that it is possible for callers of these functions can introduce memory unsafety by passing an invalid pointer, without introducing an unsafe block.

Functions which admit memory unsafety via misuses in Rust should always be unsafe fn.

Output of LOG Function in .cc file

hello, in the ringrtc folder I found a lot of native code in the .cc extension which contains functions such as DLOG, RTC_LOG, RTC_DLOG, etc.

What I understand is that all of these functions work as loggers and will issue an info or error or something. This is the same as the info!() command in an .rs file. When the ringrtc project is built as .aar and linked as dependency of the signal-android project, in a file with .rs extension, the info function will display the parameters in the run tab when the project is built.
So what I want to ask, where will the output of the DLOG, RTC_LOG, etc. functions in the .cc enhanced file be displayed?

Error while execute $ make android

________ running 'cipd ensure -log-level error -root /var/www/html/Android/RingRtcNew/out/webrtc -ensure-file /tmp/tmpg_pCqy.ensure' in '.'
curl: (60) Peer's Certificate issuer is not recognized.
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
Error: Command 'cipd ensure -log-level error -root /var/www/html/Android/RingRtcNew/out/webrtc -ensure-file /tmp/tmpg_pCqy.ensure' returned non-zero exit status 60
make: *** [out/android.env] Error 1

Video Call with low luminosity with green screens

I founded the correlation with luminosity and movment and green screens problems.

By my tests luminosity greater than 1000 lx is no problem. below 1000 lx there are many cuts with green screens. But if camera is stablish, not exist green screens.

I believe this is WebRtc bug. This bug happen too with Google Duo and Telegram.

This is not problem with Smartphone because works properly with WhatsApp, Skype, Zoom and Messenger Facebook.

Thanks you

IMG_20210217_023300_095.mp4

Cannot Build RingRTC with Software Encoding/Decoding, also SW Encoding/Decoding RingRTC

I was trying to build RingRTC with Software encoding, only, and this error had popped up:

../../../src/webrtc/src/ringrtc/android/api/org/signal/ringrtc/CallManager.java:765: error: constructor SoftwareVideoEncoderFactory in class SoftwareVideoEncoderFactory cannot be applied to given types;
VideoEncoderFactory encoderFactory = new SoftwareVideoEncoderFactory(eglBase.getEglBaseContext(),
^
required: no arguments
found: Context,boolean,boolean
reason: actual and formal argument lists differ in length
1 error

The biggest problem with the whole Signal App is that many phones such as Samsung or Huawei phones, and many other types, have a big issue whilst they use the camera, and especially when a person is trying to video call, the phone would just go dark and so the receiver of the call would just see a black screen.

Here is the issue tracker:
signalapp/Signal-Android#8685

And one of the developers at jitsi-meet, saghul, Had suggested that Signal should use Software encoding to solve the issue. With this:

signalapp/Signal-Android#8685 (comment)
Here:

VideoEncoderFactory encoderFactory = new DefaultVideoEncoderFactory(eglBase.getEglBaseContext(),
replace DefaultVideoEncoderFactory with SoftwareVideoEncoderFactory (it takes no parameters).

There has been an update as many users on the jitsi meet app were having issues, they also had made Decoding and Encoding using Software only:
jitsi/jitsi-meet@b0e7471
I have also tested the app, and it has fixed the issue of the camera not working.

Is there a way to switch RingRTC to use Software encoding or decoding?, and so I would be able to build the app, with such a feature built in and so test out if the Video calling has been fixed. And so if it does work then could it be pushed to the main repo which would fix a lot of people phones which have been experiencing this issue for months now.

If anyone would be able to help me out with Signal having Software encoding and decoding to fix this issue I have been having for a very long time now, your help would be greatly appreciated.

Error: build desktop app failed on mac m1

mac os version: 13.3.1 (a) (22E772610a)

xcode version: 14.3(14E222b)

Command: make electron PLATFORM=mac NODEJS_ARCH=arm64

Error content

ninja: Entering directory `/Users/david/project-work/ringrtc/out/release'
[17/1876] OBJCXX obj/modules/desktop_capture/desktop_capture_objc/screen_capturer_mac.o
FAILED: obj/modules/desktop_capture/desktop_capture_objc/screen_capturer_mac.o 
../../src/webrtc/src/third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/modules/desktop_capture/desktop_capture_objc/screen_capturer_mac.o.d -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCR_XCODE_VERSION=1430 -DCR_CLANG_REVISION=\"llvmorg-17-init-4759-g547e3456-1\" -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS -DCR_LIBCXX_REVISION=abad4bb576d98d81c2d5861c3862cc87145f7dad -D_LIBCPP_ENABLE_ASSERTIONS=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DWEBRTC_ENABLE_PROTOBUF=0 -DWEBRTC_STRICT_FIELD_TRIALS=0 -DWEBRTC_INCLUDE_INTERNAL_AUDIO_DEVICE -DRTC_ENABLE_VP9 -DWEBRTC_ARCH_ARM64 -DWEBRTC_HAS_NEON -DWEBRTC_LIBRARY_IMPL -DWEBRTC_ENABLE_AVX2 -DWEBRTC_NON_STATIC_TRACE_EVENT_HANDLERS=0 -DWEBRTC_POSIX -DWEBRTC_MAC -DABSL_ALLOCATOR_NOTHROW=1 -I../../src/webrtc/src -Igen -I../../src/webrtc/src/buildtools/third_party/libc++ -I../../src/webrtc/src/third_party/abseil-cpp -I../../src/webrtc/src/third_party/libyuv/include -I../../src/webrtc/src/sdk/objc -I../../src/webrtc/src/sdk/objc/base  -Wall -Werror -Wextra -Wimplicit-fallthrough -Wextra-semi -Wunreachable-code-aggressive -Wthread-safety -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-psabi -Wloop-analysis -Wno-unneeded-internal-declaration -Wenum-compare-conditional -Wno-ignored-pragma-optimize -Wno-deprecated-builtins -Wno-bitfield-constant-conversion -Wno-deprecated-this-capture -Wshadow -fno-delete-null-pointer-checks -fno-ident -fno-strict-aliasing -fstack-protector -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../src/webrtc/src/tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -ffp-contract=off -fcomplete-member-pointers -arch arm64 -fno-global-isel -mno-outline -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -ffile-compilation-dir=. -no-canonical-prefixes -ftrivial-auto-var-init=pattern -O2 -fno-omit-frame-pointer -gdwarf-4 -g1 -gdwarf-aranges -isysroot ../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -mmacos-version-min=10.13 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wexit-time-destructors -Wglobal-constructors -Wno-shadow -Wctad-maybe-unsupported -Wc++11-narrowing -Wundef -Wunused-lambda-capture -Wimplicit-retain-self -Wstrict-overflow -Wmissing-field-initializers -Wobjc-missing-property-synthesis -std=c++20 -Wno-trigraphs -fobjc-call-cxx-cdtors -fno-exceptions -fno-rtti -nostdinc++ -isystem../../src/webrtc/src/buildtools/third_party/libc++/trunk/include -isystem../../src/webrtc/src/buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -fobjc-arc -c ../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm -o obj/modules/desktop_capture/desktop_capture_objc/screen_capturer_mac.o
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:462:11: error: 'CGDisplayStreamUpdateGetRects' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
          CGDisplayStreamUpdateGetRects(updateRef, kCGDisplayStreamUpdateDirtyRects, &count);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:106:37: note: 'CGDisplayStreamUpdateGetRects' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.13.0
CG_EXTERN const CGRect * __nullable CGDisplayStreamUpdateGetRects(CGDisplayStreamUpdateRef __nullable updateRef, 
                                    ^
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:462:11: note: enclose 'CGDisplayStreamUpdateGetRects' in an @available check to silence this warning
          CGDisplayStreamUpdateGetRects(updateRef, kCGDisplayStreamUpdateDirtyRects, &count);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:472:45: error: 'kCGDisplayStreamShowCursor' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
                           (const void* []){kCGDisplayStreamShowCursor},
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:195:30: note: 'kCGDisplayStreamShowCursor' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.13.0
CG_EXTERN const CFStringRef  kCGDisplayStreamShowCursor CG_AVAILABLE_BUT_DEPRECATED(13.0, 14.0, "Please use ScreenCaptureKit API's SCStreamConfiguration showsCursor property instead");  /* CFBoolean - defaults to false */
                             ^
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:472:45: note: enclose 'kCGDisplayStreamShowCursor' in an @available check to silence this warning
                           (const void* []){kCGDisplayStreamShowCursor},
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:478:41: error: 'CGDisplayStreamCreate' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
    CGDisplayStreamRef display_stream = CGDisplayStreamCreate(
                                        ^~~~~~~~~~~~~~~~~~~~~
../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:243:41: note: 'CGDisplayStreamCreate' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.13.0
CG_EXTERN CGDisplayStreamRef __nullable CGDisplayStreamCreate(CGDirectDisplayID display, 
                                        ^
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:478:41: note: enclose 'CGDisplayStreamCreate' in an @available check to silence this warning
    CGDisplayStreamRef display_stream = CGDisplayStreamCreate(
                                        ^~~~~~~~~~~~~~~~~~~~~
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:482:23: error: 'CGDisplayStreamStart' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
      CGError error = CGDisplayStreamStart(display_stream);
                      ^~~~~~~~~~~~~~~~~~~~
../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:273:19: note: 'CGDisplayStreamStart' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.13.0
CG_EXTERN CGError CGDisplayStreamStart(CGDisplayStreamRef cg_nullable displayStream)
                  ^
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:482:23: note: enclose 'CGDisplayStreamStart' in an @available check to silence this warning
      CGError error = CGDisplayStreamStart(display_stream);
                      ^~~~~~~~~~~~~~~~~~~~
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:485:35: error: 'CGDisplayStreamGetRunLoopSource' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
      CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(display_stream);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../../../Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDisplayStream.h:295:41: note: 'CGDisplayStreamGetRunLoopSource' has been marked as being introduced in macOS 13.0 here, but the deployment target is macOS 10.13.0
CG_EXTERN CFRunLoopSourceRef __nullable CGDisplayStreamGetRunLoopSource(CGDisplayStreamRef cg_nullable displayStream)
                                        ^
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:485:35: note: enclose 'CGDisplayStreamGetRunLoopSource' in an @available check to silence this warning
      CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(display_stream);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/webrtc/src/modules/desktop_capture/mac/screen_capturer_mac.mm:498:33: error: 'CGDisplayStreamGetRunLoopSource' is only available on macOS 13.0 or newer [-Werror,-Wunguarded-availability-new]
    CFRunLoopSourceRef source = CGDisplayStreamGetRunLoopSource(stream);

Make ringrtc buildable on ARM64

Hey signal team!

I'm trying to get ringrtc to build on ARM64, but I run into some issues! I don't think the scripts know what to do if it's discovering it's a non-standard Linux system that isn't x86_64. But I think I know how I would make a distinction in the scripts between linux_x64 and linux_aarch64.

I'm happy to provide patches and do the work if that's something you're interested in?

Have problem when try to switch to another tags or branches

Have problem when try to switch to another tags or branches

$ make android
$ Preparing Android workspace
$ Downloading WebRTC dependencies to /home/muhammad/projects/android_webrtc/ringrtc/src/webrtc from version 4896
$ /home/muhammad/projects/android_webrtc/ringrtc/bin/gsync-webrtc: 33: gclient: not found
$ make: *** [Makefile:51: out/android.env] Error 127

How to fix it?

Unable to build aar files

Hi. I try to make aar for android project.

"make android" command runs fine except for one warning - Unable to strip the following libraries, packaging them as they are libringrtc.so, libringrtc_rffi.so

no aar files being generated.

I've found a similar issue here and tried siggested command, but still no aar file appeared.

make ios build error?

"_Rust_setSendBitrates", referenced from:
ringrtc::webrtc::peer_connection::PeerConnection::set_send_rates::h63c4ac7f21f0befb in libringrtc.a(ringrtc.ringrtc.7utdne7g-cgu.14.rcgu.o)
ringrtc::core::connection::Connection$LT$T$GT$::apply_bandwidth_mode::h1f15f57deaa161a1 in libringrtc.a(ringrtc.ringrtc.7utdne7g-cgu.10.rcgu.o)
ringrtc::core::group_call::Client::set_send_rates_inner::h46acffb273a129f1 in libringrtc.a(ringrtc.ringrtc.7utdne7g-cgu.1.rcgu.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

build electron issues unix

$ bash -x bin/build-electron
+ set -e
+++ dirname bin/build-electron
++ realpath -e bin
+ BIN_DIR=/tmp/ringrtc/bin
+ . /tmp/ringrtc/bin/env.sh
++ '[' -d /tmp/ringrtc/bin ']'
+++ dirname /tmp/ringrtc/bin
++ PROJECT_DIR=/tmp/ringrtc
++ CONFIG_DIR=/tmp/ringrtc/config
++ PATCH_DIR=/tmp/ringrtc/patches/webrtc
++ RINGRTC_SRC_DIR=/tmp/ringrtc/src
++ OUTPUT_DIR=/tmp/ringrtc/out
++ PUBLISH_DIR=/tmp/ringrtc/publish
++ PATCH_HASH=/tmp/ringrtc/out/patch-hash
++ WEBRTC_DIR=/tmp/ringrtc/src/webrtc
++ WEBRTC_SRC_DIR=/tmp/ringrtc/src/webrtc/src
++ RINGRTC_WEBRTC_SRC_DIR=/tmp/ringrtc/src/webrtc/src/ringrtc
++ VERSION_INFO=/tmp/ringrtc/config/version.sh
++ '[' -f /tmp/ringrtc/config/version.sh ']'
++ . /tmp/ringrtc/config/version.sh
+++ WEBRTC_VERSION=4183
+++ RINGRTC_MAJOR_VERSION=2
+++ RINGRTC_MINOR_VERSION=7
+++ RINGRTC_REVISION=0
+++ RINGRTC_VERSION=2.7.0
+++ PROJECT_VERSION=2.7.0
++ '[' -f /tmp/ringrtc/out/webrtc-version.env ']'
++ WEBRTC_REVISION=branch-heads/4183
++ INTENDED_WEBRTC_PLATFORM=
++ '[' -f /tmp/ringrtc/out/platform.env ']'
++ '[' -n '' ']'
+ BUILD_TYPE=debug
+ '[' '' '!=' '' ']'
++ get_default_platform
++ hash rustup
++ case "$(rustup show active-toolchain)" in
+++ rustup show active-toolchain
++ echo linux
+ DEFAULT_PLATFORM=linux
+ '[' linux = unknown ']'
+ export MACOSX_DEPLOYMENT_TARGET=10.10
+ MACOSX_DEPLOYMENT_TARGET=10.10
+ cd src/rust/src/webrtc
+ '[' debug = debug ']'
+ gn gen -C out/Debug '--args=use_custom_libcxx=false rtc_build_examples=false rtc_build_tools=false rtc_include_tests=false rt
c_enable_protobuf=false rtc_use_x11=false'
ERROR Can't find source root.
I could not find a ".gn" file in the current directory or any parent,
and the --root command-line argument was not specified.

`inbound_call_drop_connecting_ice_failed_first` is flaky

The test inbound_call_drop_connecting_ice_failed_first is flaky on Linux, sometimes failing with:

[ 250s] ---- inbound_call_drop_connecting_ice_failed_first stdout ----
[ 250s] thread 'inbound_call_drop_connecting_ice_failed_first' panicked at src/rust/tests/incoming.rs:375:5:
[ 250s] assertion left == right failed
[ 250s] left: 1
[ 250s] right: 0

This is ringrtc version 2.39.0

Provide prebuilds for Windows + Linux arm64

Hi Signal team,

Would it be possible to add prebuilds for Windows + Linux arm64 to signal-ringrtc-node? I've been building them in my signal-native-deps repo for some months, but the dependencies are massive so I can't cache them properly. Therefore it takes about 1.5 hrs to build it for multiple architectures.

libsignal-client is already providing Windows and Linux arm64 prebuilds even though Signal itself doesn't officially support those. I think that's a good middle way for the time being.

Thanks in advance!

[Windows] Default communication device is picking a wrong output

Hello,

Disclaimer: I'm reporting this bug on behalf of someone else, but I hope I've collected enough information to make a good description - and I am able to arrange to run more tests if needed.

Issue

The latest Signal on Windows does not respect the default communication device, and seems to always use the first available one.

Setup

It's a Windows laptop, with a TV plugged in with a cable. In Sound settings, there are two output devices:

  1. TV, called in logs '1 - SAMSUNG (AMD High Definition Audio Device)'
  2. Internal speaker, called in logs 'Громкоговоритель и наушники (Realtek High Definition Audio)'

In the sound settings, it is possible to set either of these outputs as default media device and default communication device.

When internal speakers are set to be default everything, all applications respect this setting, and the sound is coming out of the speakers - all except Signal, who is always playing the sound out of the TV.

Restarting Signal doesn't help.

Repro steps

Here is a log performing the following test scenario:

https://debuglogs.org/4148a6154e8a945b562f0aa225ec8eb9a59c5c49b4aa00b00329b7854e877983

  1. Close Signal.
  2. Set Internal speakers to be the "default everything" device.
  3. Launch Signal and start an audio call.
  4. Audio is coming out of the TV ===> not the internal speakers.
  5. In the call settings, look at the currently used output device ===> Signal uses "Default".
  6. In the call settings, change the output device to TV ===> sound is still going out of TV (correct).
  7. In the call settings, change the output device to internal speaker ===> sound is now going out of the internal speaker (correct).
  8. In the call settings, change the output device back to "Default" ===> sound is going out of TV again (not internal speakers).

A subset of the logs of the final step:

MediaDevice: setPreferredSpeaker {"name":"Default","uniqueId":"Default","index":0,"i18nKey":"default_communication_device"}
"selectedSpeaker":{"name":"Default","uniqueId":"Default","index":0,"i18nKey":"default_communication_device"}
MediaDevice: selecting speaker {"name":"Default","uniqueId":"Default","index":0,"i18nKey":"default_communication_device"}
src\webrtc\peer_connection_factory.rs:379 PeerConnectionFactory::set_audio_playout_device(0)
src\webrtc\peer_connection_factory.rs:386 Picking default communication device (index 0)

Led me to 364fbfc, which I'm trying to analyze next.

In order for this block to print "index 0":

if let Ok(default_device) = self.get_default_playout_device_index() {
info!(
"Picking default communication device (index {})",
default_device
);

This block must have index equal to 1:

let default_device = self.get_audio_playout_device(DEFAULT_COMMUNICATION_DEVICE_INDEX)?;
let all_devices = self.get_audio_playout_devices()?;
if let Some(index) = all_devices.iter().position(|d| d == &default_device) {
Ok((index - 1) as u16)

And since all_devices contains a synthetic device in index 0, default_device must be a reference to TV, since this is where the sound is coming from, right?

That means when passed DEFAULT_COMMUNICATION_DEVICE_INDEX = 0xFFFF here:

let rc = pcf::Rust_getAudioPlayoutDeviceName(self.rffi, index, name, unique_id);

Returns incorrectly TV as the default device, and not the internal speaker.

If I understand this correctly, eventually the code goes here:

return audio_device_module_->PlayoutDeviceName(index, out_name, out_uuid);

And then here:

https://chromium.googlesource.com/external/webrtc/+/refs/heads/master/modules/audio_device/win/audio_device_core_win.cc#1500

Meaning that this might be a bug in WebRTC itself, and it e.g. just picks the first available output device, not the one marked as default?

What do you think, does the above tracing look correct?

I'm reasonably sure there is no mistake in configuring default device in Windows, I personally checked several places and everywhere internal speaker is set as default device (in Windows 10 settings, in tray > Sound internal speaker has green "default" icon next to it, no icon in front of TV), and all other apps (including call apps like Wire and Viber) do correctly use the internal speaker when it's set as default device, only Signal has this issue. (But I would be happy if you know a setting in Windows which I just need to adjust to fix this issue 😄 )

Especially since this is not my computer, I'm not sure what would be the best steps to move forward.

What would you suggest, would you be able to take this over, would you like me to gather some additional data / run more tests?

Thanks!

Precompiled ringrtc for swift 5.1.0

Hey guys! Do you have a precompiled RingRTC for swift 5.1.0?
Kinda want to use it for iOS 13.0, but compiling by myself seems to have an issues due to dependencies

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.