Overte C++ Documentation
WebRTC.h
1 //
2 // WebRTC.h
3 // libraries/shared/src/shared/
4 //
5 // Copyright 2019 High Fidelity, Inc.
6 // Copyright 2021 Vircadia contributors.
7 // Copyright 2023 Overte e.V.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 // SPDX-License-Identifier: Apache-2.0
12 //
13 
14 #ifndef hifi_WebRTC_h
15 #define hifi_WebRTC_h
16 
17 #ifndef QSYSTEMDETECTION_H
18 #include <qsystemdetection.h>
19 #endif
20 
21 // WEBRTC_AUDIO: WebRTC audio features, e.g., echo canceling.
22 // WEBRTC_DATA_CHANNELS: WebRTC client-server connections in parallel with UDP.
23 
24 #if defined(Q_OS_MAC)
25 # define WEBRTC_AUDIO 1
26 # define WEBRTC_POSIX 1
27 # define WEBRTC_LEGACY 1
28 #elif defined(Q_OS_WIN)
29 # define WEBRTC_AUDIO 1
30 # define WEBRTC_DATA_CHANNELS 1
31 # define WEBRTC_WIN 1
32 # define NOMINMAX 1
33 # define WIN32_LEAN_AND_MEAN 1
34 #elif defined(Q_OS_ANDROID)
35 // I don't yet have a working libwebrtc for android
36 // # define WEBRTC_AUDIO 1
37 // # define WEBRTC_POSIX 1
38 // # define WEBRTC_LEGACY 1
39 #elif defined(Q_OS_LINUX) && defined(Q_PROCESSOR_X86_64)
40 # ifndef DISABLE_WEBRTC
41 # define WEBRTC_AUDIO 1
42 # define WEBRTC_POSIX 1
43 # define WEBRTC_DATA_CHANNELS 1
44 # endif
45 #elif defined(Q_OS_LINUX) && defined(Q_PROCESSOR_ARM)
46 // WebRTC is basically impossible to build on aarch64 Linux.
47 // I am looking at https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing for an alternative.
48 // # define WEBRTC_AUDIO 1
49 // # define WEBRTC_POSIX 1
50 // # define WEBRTC_LEGACY 1
51 #endif
52 
53 #endif // hifi_WebRTC_h