Skip to content

Commit

Permalink
Dev/4.3.1 (#375)
Browse files Browse the repository at this point in the history
* update podfile source to china

* update podfile source to china

* gitee sync test

* [Android] gitee sync >> use china repos.

* fix sync shell

* [Android]revert to use common repo url.

* update sync script.

* update sync script.

* update sync script.

* Add download agora SDK when executing pod install and modify dependencies

* gitee sync modify source url

* modify podfile file script

* modify podfile file script

* update download ijk and swiftlint

* update ijk download script

* iOS Adapt to RTC 4.3.1 version

* [windows] Adapt to 4.3.1 sdk and ajust examples.

* mac Adapt to RTC 4.3.1 version

* [windows]enable use_audio4

* [Android]Adapt to 4.3.1 sdk

* [Android][Audio]Adapt to 4.3.1 sdk

* Change way of using salt (#374)

* Change way of using salt

* Add macOS support

* [Windows]perfect screen parameter adjusting.

* [windows]change way of using salt.

* [Android]Renew beauty api and etc.

* add package_script

* [windows]fix case switch crash.

* [windows]fix release compile problem.

* [windows]change slider notify to NW_RELEASEDCAPTURE.

* [windows]show startCameraCapture error.

* [Android]Fix fragment back bug.

* [windows]fix original video bug (NMS-20350).

* fix  pip bug

* fix  crash  bug

* fix  volume bug

* fix  stutter bug

* [Android]Update beauty api and fix bug(NMS-20393)

* [Android]Fix beauty effect bug.

* [Android]Update gradle config.

* [Android]Update gradle config.

* [Android]Add pip mode demo.

* [windows]update ci.

* [windows]update ci.

* [windows]update ci.

* [windows]update ci 2.

* [windows]update ci 3.

* open audio4

* Adapt to the new api

* Adapt to the new api

* Use AVPictureInPictureVideoCallViewController implements the function of custom View picture-in-picture

* add package_script

* update package script

* fix crash bug

* update package

* update package script

* [iOS/mac] update rtc version.

* [Android]fix AgoraFocalLengthInfo params bug.

* [Android]perfect code.

* [windows] fix deviceId compile error.

* fix gitee sync scrip bug.

* fix gitee sync scrip bug.

* [windows] fix device id bug.

---------

Co-authored-by: zhaoyongqiang <[email protected]>
Co-authored-by: sync2gitee <[email protected]>
Co-authored-by: xucz <[email protected]>
Co-authored-by: Sihán Zhū <[email protected]>
  • Loading branch information
5 people authored Apr 29, 2024
1 parent 0ec9b44 commit b7ac81b
Show file tree
Hide file tree
Showing 157 changed files with 4,523 additions and 4,606 deletions.
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

0 comments on commit b7ac81b

Please sign in to comment.