Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/4.3.1 #375

Merged
merged 71 commits into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
54ecea1
update podfile source to china
Mar 8, 2024
24fde98
update podfile source to china
Mar 8, 2024
0e3d569
gitee sync test
Mar 8, 2024
2623b4b
[Android] gitee sync >> use china repos.
Mar 8, 2024
cb080da
fix sync shell
Mar 8, 2024
0289b30
[Android]revert to use common repo url.
xgfd3 Mar 8, 2024
a5bae8a
update sync script.
xgfd3 Mar 8, 2024
bbd4d66
update sync script.
xgfd3 Mar 8, 2024
9af882e
update sync script.
xgfd3 Mar 8, 2024
b6f4099
Add download agora SDK when executing pod install and modify dependen…
Mar 13, 2024
1d061ad
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
Mar 13, 2024
9495e16
gitee sync modify source url
Mar 14, 2024
c07d690
modify podfile file script
Mar 14, 2024
c2056f0
modify podfile file script
Mar 15, 2024
4f4852d
update download ijk and swiftlint
Mar 18, 2024
d07217f
update ijk download script
Mar 18, 2024
bb4c19d
iOS Adapt to RTC 4.3.1 version
Mar 27, 2024
1affca5
[windows] Adapt to 4.3.1 sdk and ajust examples.
xgfd3 Mar 27, 2024
bfd60a9
mac Adapt to RTC 4.3.1 version
Apr 1, 2024
7effca5
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
Apr 1, 2024
fd4626e
[windows]enable use_audio4
xgfd3 Apr 1, 2024
f6d627e
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Apr 1, 2024
8c63378
[Android]Adapt to 4.3.1 sdk
xgfd3 Apr 1, 2024
1e5604e
[Android][Audio]Adapt to 4.3.1 sdk
xgfd3 Apr 1, 2024
ebad539
Change way of using salt (#374)
zshbleaker Apr 1, 2024
c0ea5e7
[Windows]perfect screen parameter adjusting.
xgfd3 Apr 1, 2024
826996b
[windows]change way of using salt.
xgfd3 Apr 2, 2024
1f7adc4
[Android]Renew beauty api and etc.
xgfd3 Apr 2, 2024
1187fb5
add package_script
Apr 3, 2024
36a1ee0
[windows]fix case switch crash.
xgfd3 Apr 7, 2024
754fe64
[windows]fix release compile problem.
xgfd3 Apr 7, 2024
3656e3c
[windows]change slider notify to NW_RELEASEDCAPTURE.
xgfd3 Apr 7, 2024
2660ba2
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Apr 7, 2024
7aa8af7
[windows]show startCameraCapture error.
xgfd3 Apr 7, 2024
8e5e6c1
[Android]Fix fragment back bug.
xgfd3 Apr 8, 2024
48b0f29
Merge remote-tracking branch 'origin/dev/4.3.1' into dev/4.3.1
xgfd3 Apr 8, 2024
2135f5b
[windows]fix original video bug (NMS-20350).
xgfd3 Apr 8, 2024
f416809
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
xgfd3 Apr 8, 2024
7cc7845
fix pip bug
Apr 8, 2024
cf39cf7
fix crash bug
Apr 8, 2024
ff47ef9
fix volume bug
Apr 8, 2024
efebcc0
fix stutter bug
Apr 8, 2024
c756a39
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
Apr 8, 2024
13641d7
[Android]Update beauty api and fix bug(NMS-20393)
xgfd3 Apr 8, 2024
3ba2dcd
Merge remote-tracking branch 'origin/dev/4.3.1' into dev/4.3.1
xgfd3 Apr 8, 2024
df32365
[Android]Fix beauty effect bug.
xgfd3 Apr 9, 2024
9a948f0
[Android]Update gradle config.
xgfd3 Apr 9, 2024
6a3a382
[Android]Update gradle config.
xgfd3 Apr 9, 2024
d3fbbeb
[Android]Add pip mode demo.
xgfd3 Apr 10, 2024
e79cded
[windows]update ci.
xgfd3 Apr 11, 2024
e161b2b
[windows]update ci.
xgfd3 Apr 11, 2024
2afd0e3
[windows]update ci.
xgfd3 Apr 11, 2024
a6f3765
[windows]update ci 2.
xgfd3 Apr 11, 2024
b7ed7d3
[windows]update ci 3.
xgfd3 Apr 11, 2024
24189dc
open audio4
Apr 12, 2024
9a51d35
Merge branch 'dev/4.3.1' of github.com:AgoraIO/API-Examples into dev/…
Apr 12, 2024
7dee89f
Adapt to the new api
Apr 12, 2024
f673b9c
Adapt to the new api
Apr 12, 2024
dd3ce1f
Use AVPictureInPictureVideoCallViewController implements the function…
Apr 12, 2024
82bcf72
add package_script
Apr 12, 2024
8588d21
update package script
Apr 12, 2024
f576b83
fix crash bug
Apr 17, 2024
72e8318
update package
Apr 18, 2024
ac851a5
update package script
Apr 23, 2024
84910ee
[iOS/mac] update rtc version.
xgfd3 Apr 28, 2024
459f8b6
[Android]fix AgoraFocalLengthInfo params bug.
xgfd3 Apr 28, 2024
49277a4
[Android]perfect code.
xgfd3 Apr 28, 2024
a12ee33
[windows] fix deviceId compile error.
xgfd3 Apr 28, 2024
7bda27b
fix gitee sync scrip bug.
xgfd3 Apr 28, 2024
bd5476b
fix gitee sync scrip bug.
xgfd3 Apr 28, 2024
40ca0b0
[windows] fix device id bug.
xgfd3 Apr 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/ci/build/build_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,11 @@ echo zip_name: %zip_name%

dir

echo off
REM curl --silent %sdk_url% ./
python %WORKSPACE%\\artifactory_utils.py --action=download_file --file=%sdk_url%
curl %sdk_url% -o %zip_name%
REM python %WORKSPACE%\\artifactory_utils.py --action=download_file --file=%sdk_url%
7z x ./%zip_name% -y
echo on

dir

rmdir /S /Q Agora_Native_SDK_for_Windows_FULL\demo
del /F /Q Agora_Native_SDK_for_Windows_FULL\commits
del /F /Q Agora_Native_SDK_for_Windows_FULL\package_size_report.txt
Expand Down
6 changes: 4 additions & 2 deletions .github/ci/build/modify_podfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ def modfiy(path):
contents = []
for num, line in enumerate(file):
if "pod 'Agora" in line:
line = '\t'+"pod 'sdk', :path => '../../sdk.podspec'"
line = '\t'+"pod 'sdk', :path => '../../sdk.podspec'" + "\n"
elif "pod 'sdk" in line:
line = ""
elif 'sh .download_script' in line:
line = line.replace('true', 'false') + "\n"
contents.append(line)
file.close()

with open(path, 'w', encoding='utf-8') as fw:
for content in contents:
fw.write(content + "\n")
fw.write(content)
fw.close()


Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/gitee-sync-shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ sed -ie "s#https://services.gradle.org/distributions#https://mirrors.cloud.tence
git add Android/APIExample/settings.gradle Android/APIExample/gradle/wrapper/gradle-wrapper.properties Android/APIExample-Audio/settings.gradle Android/APIExample-Audio/gradle/wrapper/gradle-wrapper.properties
git commit -m '[Android] gitee sync >> use china repos.'

# change iOS Podfile to china repos
python3 .github/workflows/modify_podfile.py iOS/APIExample/Podfile
python3 .github/workflows/modify_podfile.py iOS/APIExample-Audio/Podfile
python3 .github/workflows/modify_podfile.py iOS/APIExample-OC/Podfile
python3 .github/workflows/modify_podfile.py macOS/Podfile

# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample-Audio/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' iOS/APIExample-OC/Podfile
# sed -ie '1s#^#source "https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git"\n#' macOS/Podfile
git add iOS/APIExample/Podfile iOS/APIExample-Audio/Podfile iOS/APIExample-OC/Podfile macOS/Podfile
git commit -m '[iOS] gitee sync >> use china repos.'

git branch
git status
git push gitee
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/gitee-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
if: github.actor != 'dependabot[bot]'
steps:
- name: Gitee sync repo
uses: xgfd3/hub-mirror-action@v1.0
uses: xgfd3/hub-mirror-action@v1.4
with:
src: github/AgoraIO
dst: gitee/agoraio-community
Expand All @@ -25,4 +25,5 @@ jobs:
dst_token: ${{ secrets.GITEE_PRIVATE_TOKEN }}
force_update: true
account_type: org
shell_path: ./.github/workflows/gitee-sync-shell.sh
shell_path: ./.github/workflows/gitee-sync-shell.sh
github_ref: ${{ github.ref }}
34 changes: 34 additions & 0 deletions .github/workflows/modify_podfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import os, sys

def modfiy(path):
with open(path, 'r', encoding='utf-8') as file:
contents = []
for num, line in enumerate(file):
if "pod 'Agora" in line:
line = '\t'+"pod 'sdk', :path => 'sdk.podspec'" + "\n"
elif "pod 'sdk" in line:
line = ""
elif "pod 'Floaty" in line:
line = '\t'+"pod 'Floaty', :git => 'https://gitee.com/shengwang-dependencies/Floaty.git'" + "\n"
elif "pod 'AGEVideoLayout" in line:
line = '\t'+"pod 'AGEVideoLayout', :git => 'https://gitee.com/shengwang-dependencies/AGEVideoLayout.git'" + "\n"
elif "pod 'CocoaAsyncSocket" in line:
line = '\t'+"pod 'CocoaAsyncSocket', :git => 'https://gitee.com/shengwang-dependencies/CocoaAsyncSocket.git'" + "\n"
elif "pod 'SwiftLint" in line:
line = '\t'+"pod 'SwiftLint', :git => 'https://gitee.com/shengwang-dependencies/SwiftLint', :commit => '1067113303c134ef472a71b30d21e5350de7889d'" + "\n"
elif "pod 'ijkplayer" in line:
line = '\t'+"pod 'ijkplayer', :path => 'ijkplayer.podspec'" + "\n"
elif 'sh .download_script' in line:
line = line.replace('#', '').replace('false', 'true')
contents.append(line)
file.close()

with open(path, 'w', encoding='utf-8') as fw:
for content in contents:
fw.write(content)
fw.close()


if __name__ == '__main__':
path = sys.argv[1:][0]
modfiy(path.strip())
2 changes: 1 addition & 1 deletion Android/APIExample-Audio/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dependencies {
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
}
else{
def agora_sdk_version = "4.3.0"
def agora_sdk_version = "4.3.1"
// case 1: full single lib with voice only
implementation "io.agora.rtc:voice-sdk:${agora_sdk_version}"
// case 2: partial libs with voice only
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ protected void onCreate(Bundle savedInstanceState) {

@Override
public boolean onSupportNavigateUp() {
NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment);
return NavigationUI.navigateUp(navController, appBarConfiguration)
|| super.onSupportNavigateUp();
onBackPressed();
return false;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void handleOnBackPressed() {
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
handler = new Handler(Looper.getMainLooper());
requireActivity().getOnBackPressedDispatcher().addCallback(onBackPressedCallback);
requireActivity().getOnBackPressedDispatcher().addCallback(this, onBackPressedCallback);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ public boolean onEarMonitoringAudioFrame(int type, int samplesPerChannel, int by
}

@Override
public boolean onPlaybackAudioFrameBeforeMixing(String channel, int uid, int audioFrameType, int samples, int bytesPerSample, int channels, int samplesPerSec, ByteBuffer byteBuffer, long renderTimeMs, int bufferLength) {
public boolean onPlaybackAudioFrameBeforeMixing(String channelId, int uid, int type, int samplesPerChannel, int bytesPerSample, int channels, int samplesPerSec, ByteBuffer buffer, long renderTimeMs, int avsync_type, int rtpTimestamp) {
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-7.3.3-bin.zip
2 changes: 2 additions & 0 deletions Android/APIExample-Audio/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pluginManagement {
repositories {
maven { url "https://maven.aliyun.com/repository/public" }
google()
mavenCentral()
gradlePluginPortal()
Expand All @@ -8,6 +9,7 @@ pluginManagement {
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url "https://maven.aliyun.com/repository/public" }
google()
mavenCentral()
maven { url "https://jitpack.io" }
Expand Down
51 changes: 31 additions & 20 deletions Android/APIExample/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "${rootDir.absolutePath}/git-hooks.gradle"
apply from: 'vendors.gradle'

def agoraSdkVersion = "4.3.1"
def localSdkPath= "${rootProject.projectDir.absolutePath}/../../sdk"


android {
compileSdkVersion 32
buildToolsVersion "32.0.0"
Expand Down Expand Up @@ -54,6 +57,14 @@ android {
viewBinding true
}

applicationVariants.all {
variant ->
variant.outputs.all { output ->
outputFileName = new File(rootProject.name
+ "_" + agoraSdkVersion
+ "_" + new Date().format("yyyyMMddHHmm") + ".apk")
}
}
}

dependencies {
Expand All @@ -62,26 +73,26 @@ dependencies {
if(new File("${localSdkPath}").exists()){
implementation fileTree(dir: "${localSdkPath}", include: ['*.jar', '*.aar'])
}
else{
def agora_sdk_version = "4.3.0"
else {

// case 1: full libs
implementation "io.agora.rtc:full-sdk:${agora_sdk_version}"
implementation "io.agora.rtc:full-screen-sharing:${agora_sdk_version}"
implementation "io.agora.rtc:full-sdk:${agoraSdkVersion}"
implementation "io.agora.rtc:full-screen-sharing:${agoraSdkVersion}"
// case 2: partial libs
// implementation "io.agora.rtc:full-rtc-basic:${agora_sdk_version}"
// implementation "io.agora.rtc:ains:${agora_sdk_version}"
// implementation "io.agora.rtc:full-content-inspect:${agora_sdk_version}"
// implementation "io.agora.rtc:full-virtual-background:${agora_sdk_version}"
// implementation "io.agora.rtc:full-super-resolution:${agora_sdk_version}"
// implementation "io.agora.rtc:spatial-audio:${agora_sdk_version}"
// implementation "io.agora.rtc:audio-beauty:${agora_sdk_version}"
// implementation "io.agora.rtc:clear-vision:${agora_sdk_version}"
// implementation "io.agora.rtc:pvc:${agora_sdk_version}"
// implementation "io.agora.rtc:screen-capture:${agora_sdk_version}"
// implementation "io.agora.rtc:aiaec:${agora_sdk_version}"
// implementation "io.agora.rtc:drm-loader:${agora_sdk_version}"
// implementation "io.agora.rtc:drm:${agora_sdk_version}"
// implementation "io.agora.rtc:full-vqa:${agora_sdk_version}"
// implementation "io.agora.rtc:full-rtc-basic:${agoraSdkVersion}"
// implementation "io.agora.rtc:ains:${agoraSdkVersion}"
// implementation "io.agora.rtc:full-content-inspect:${agoraSdkVersion}"
// implementation "io.agora.rtc:full-virtual-background:${agoraSdkVersion}"
// implementation "io.agora.rtc:full-super-resolution:${agoraSdkVersion}"
// implementation "io.agora.rtc:spatial-audio:${agoraSdkVersion}"
// implementation "io.agora.rtc:audio-beauty:${agoraSdkVersion}"
// implementation "io.agora.rtc:clear-vision:${agoraSdkVersion}"
// implementation "io.agora.rtc:pvc:${agoraSdkVersion}"
// implementation "io.agora.rtc:screen-capture:${agoraSdkVersion}"
// implementation "io.agora.rtc:aiaec:${agoraSdkVersion}"
// implementation "io.agora.rtc:drm-loader:${agoraSdkVersion}"
// implementation "io.agora.rtc:drm:${agoraSdkVersion}"
// implementation "io.agora.rtc:full-vqa:${agoraSdkVersion}"
}


Expand Down Expand Up @@ -111,8 +122,8 @@ dependencies {
implementation "com.squareup.okhttp3:okhttp:4.10.0"
implementation "com.squareup.okhttp3:logging-interceptor:4.10.0"

implementation 'com.faceunity:core:8.3.0'
implementation 'com.faceunity:model:8.3.0'
implementation 'com.faceunity:core:8.7.0'
implementation 'com.faceunity:model:8.7.0'

implementation 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
implementation 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'
Expand Down
Binary file not shown.
Binary file removed Android/APIExample/app/libs/STMobileJNI-release.aar
Binary file not shown.
Binary file not shown.
Binary file removed Android/APIExample/app/libs/effectAAR-release.aar
Binary file not shown.
4 changes: 3 additions & 1 deletion Android/APIExample/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" />

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />

<!-- <permission-group android:name="io.agora.api.example.andpermission"/>-->
<permission-group android:name="${AppId}.andpermission"/>
Expand All @@ -34,10 +35,11 @@

<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|screenSize|orientation"
android:configChanges="keyboardHidden|screenSize|orientation|smallestScreenSize|screenLayout"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:launchMode="singleTop"
android:supportsPictureInPicture="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void handleOnBackPressed() {
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
handler = new Handler(Looper.getMainLooper());
requireActivity().getOnBackPressedDispatcher().addCallback(onBackPressedCallback);
requireActivity().getOnBackPressedDispatcher().addCallback(this, onBackPressedCallback);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

import android.content.Context;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.SurfaceView;
Expand All @@ -28,7 +29,6 @@
import com.yanzhenjie.permission.runtime.Permission;

import java.lang.reflect.Method;
import java.nio.charset.StandardCharsets;

import io.agora.api.example.MainApplication;
import io.agora.api.example.R;
Expand Down Expand Up @@ -255,7 +255,10 @@ private void enablePacketProcessor(boolean enable) {
}

private byte[] getKdfSaltFromServer() {
return "EncryptionKdfSaltInBase64Strings".getBytes(StandardCharsets.UTF_8);
// Salt string should be the output of the following command:
// openssl rand -base64 32
String saltBase64String = "NiIeJ08AbtcQVjvV+oOEvF/4Dz5dy1CIwa805C8J2w0=";
return Base64.decode(saltBase64String, Base64.DEFAULT);
}

private void joinChannel(String channelId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ public void onDrawFrame(GL10 gl) {
renderMatrix.preRotate(lastI420Frame.getRotation());
renderMatrix.preTranslate(-0.5f, -0.5f);
try {
drawer.drawYuv(yuvUploader.getYuvTextures(),
drawer.drawYuv(yuvUploader.getYuvTextures(), 0,
RendererCommon.convertMatrixFromAndroidGraphicsMatrix(renderMatrix), lastI420Frame.getRotatedWidth(),
lastI420Frame.getRotatedHeight(), 0, 0, viewportWidth, viewportHeight);
} catch (NullPointerException exception) {
Expand Down
Loading