Skip to content

Commit d52749c

Browse files
committed
Compile java layer of WebRTC
1 parent 52f608f commit d52749c

File tree

5 files changed

+94
-0
lines changed

5 files changed

+94
-0
lines changed

‎app/build.gradle.kts

+7
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ android {
6969

7070
sourceSets.getByName("main") {
7171
java.srcDirs("./src/google/java") // TODO: Huawei & FOSS editions
72+
java.srcDirs(
73+
"./jni/third_party/webrtc/rtc_base/java/src",
74+
"./jni/third_party/webrtc/modules/audio_device/android/java/src",
75+
"./jni/third_party/webrtc/sdk/android/api",
76+
"./jni/third_party/webrtc/sdk/android/src/java",
77+
"../thirdparty/WebRTC/src/java"
78+
)
7279
Config.EXOPLAYER_EXTENSIONS.forEach { module ->
7380
java.srcDirs("../thirdparty/ExoPlayer/extensions/${module}/src/main/java")
7481
}

‎app/jni/BuildTgCalls.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ set(TGCALLS_DIR "${THIRDPARTY_DIR}/tgcalls")
77

88
# Source files list:
99
# https://github.com/TelegramMessenger/Telegram-iOS/blob/930d1fcc46e39830e6d590986a6a838c3ff49e27/submodules/TgVoipWebrtc/BUILD
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
// Copyright 2022 The Chromium Authors. All rights reserved.
3+
// Use of this source code is governed by a BSD-style license that can be
4+
// found in the LICENSE file.
5+
6+
// This file is autogenerated by
7+
// java_cpp_enum.py
8+
// From
9+
// webrtc/rtc_base/network_monitor.h
10+
11+
package org.webrtc;
12+
13+
import androidx.annotation.IntDef;
14+
15+
import java.lang.annotation.Retention;
16+
import java.lang.annotation.RetentionPolicy;
17+
18+
@IntDef({
19+
NetworkPreference.NEUTRAL, NetworkPreference.NOT_PREFERRED
20+
})
21+
@Retention(RetentionPolicy.SOURCE)
22+
public @interface NetworkPreference {
23+
int NEUTRAL = 0;
24+
int NOT_PREFERRED = -1;
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
// Copyright 2022 The Chromium Authors. All rights reserved.
3+
// Use of this source code is governed by a BSD-style license that can be
4+
// found in the LICENSE file.
5+
6+
// This file is autogenerated by
7+
// java_cpp_enum.py
8+
// From
9+
// webrtc/api/priority.h
10+
11+
package org.webrtc;
12+
13+
import androidx.annotation.IntDef;
14+
15+
import java.lang.annotation.Retention;
16+
import java.lang.annotation.RetentionPolicy;
17+
18+
@IntDef({
19+
Priority.VERY_LOW, Priority.LOW,
20+
Priority.MEDIUM, Priority.HIGH
21+
})
22+
@Retention(RetentionPolicy.SOURCE)
23+
public @interface Priority {
24+
int VERY_LOW = 0;
25+
int LOW = 1;
26+
int MEDIUM = 2;
27+
int HIGH = 3;
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
// Copyright 2022 The Chromium Authors. All rights reserved.
3+
// Use of this source code is governed by a BSD-style license that can be
4+
// found in the LICENSE file.
5+
6+
// This file is autogenerated by
7+
// java_cpp_enum.py
8+
// From
9+
// webrtc/api/video/video_frame_buffer.h
10+
11+
package org.webrtc;
12+
13+
import androidx.annotation.IntDef;
14+
15+
import java.lang.annotation.Retention;
16+
import java.lang.annotation.RetentionPolicy;
17+
18+
@IntDef({
19+
VideoFrameBufferType.NATIVE, VideoFrameBufferType.I420, VideoFrameBufferType.I420A,
20+
VideoFrameBufferType.I422, VideoFrameBufferType.I444, VideoFrameBufferType.I010,
21+
VideoFrameBufferType.I210, VideoFrameBufferType.NV12
22+
})
23+
@Retention(RetentionPolicy.SOURCE)
24+
public @interface VideoFrameBufferType {
25+
int NATIVE = 0;
26+
int I420 = 1;
27+
int I420A = 2;
28+
int I422 = 3;
29+
int I444 = 4;
30+
int I010 = 5;
31+
int I210 = 6;
32+
int NV12 = 7;
33+
}

0 commit comments

Comments
 (0)