Skip to content

Commit

Permalink
chore: optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Jan 22, 2024
1 parent fdf5140 commit dfe0a49
Show file tree
Hide file tree
Showing 18 changed files with 74 additions and 153 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
api 'io.agora.rtc:agora-full-preview:4.3.0-dev.17'
implementation 'io.agora.rtc:full-screen-sharing-special:4.3.0-dev.17'
implementation 'io.agora.rtc:iris-rtc:4.3.0-dev.11'
api 'io.agora.rtc:agora-full-preview:4.3.0-dev.18'
implementation 'io.agora.rtc:full-screen-sharing-special:4.3.0-dev.18'
implementation 'io.agora.rtc:iris-rtc:4.3.0-dev.18'
}

if (isNewArchitectureEnabled()) {
Expand Down
2 changes: 2 additions & 0 deletions example/ios/AgoraRtcNgExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -775,6 +775,7 @@
OTHER_LDFLAGS = (
"$(inherited)",
" ",
"-Wl -ld_classic ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -848,6 +849,7 @@
OTHER_LDFLAGS = (
"$(inherited)",
" ",
"-Wl -ld_classic ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ target 'AgoraRtcNgExample' do
end

target 'ScreenShare' do
pod 'AgoraRtcEngine_iOS_Preview', '4.3.0-dev.17'
pod 'AgoraRtcEngine_iOS_Preview', '4.3.0-dev.18'
end
18 changes: 9 additions & 9 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PODS:
- AgoraIrisRTC_iOS (4.3.0-dev.11)
- AgoraRtcEngine_iOS_Preview (4.3.0-dev.9)
- AgoraIrisRTC_iOS (4.3.0-dev.18)
- AgoraRtcEngine_iOS_Preview (4.3.0-dev.18)
- boost (1.76.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
Expand Down Expand Up @@ -378,8 +378,8 @@ PODS:
- React-logger (0.72.5):
- glog
- react-native-agora (4.2.6):
- AgoraIrisRTC_iOS (= 4.3.0-dev.11)
- AgoraRtcEngine_iOS_Preview (= 4.3.0-dev.9)
- AgoraIrisRTC_iOS (= 4.3.0-dev.18)
- AgoraRtcEngine_iOS_Preview (= 4.3.0-dev.18)
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-agora-rawdata (0.1.0):
Expand Down Expand Up @@ -519,7 +519,7 @@ PODS:
- Yoga (~> 1.14)

DEPENDENCIES:
- AgoraRtcEngine_iOS_Preview (= 4.3.0-dev.9)
- AgoraRtcEngine_iOS_Preview (= 4.3.0-dev.18)
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
Expand Down Expand Up @@ -718,8 +718,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
AgoraIrisRTC_iOS: 73cd7e1eeb4d8fa3125bc4f917c13deb3e119d24
AgoraRtcEngine_iOS_Preview: 77fa8deb0c7ff3ac7ed37a039284688ad5af8353
AgoraIrisRTC_iOS: f931bcc21681b0ce808624f32f861778c25316bf
AgoraRtcEngine_iOS_Preview: 44a75f17849d5793b0b2dab6f34d87697385c9da
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
Expand Down Expand Up @@ -753,7 +753,7 @@ SPEC CHECKSUMS:
React-jsiexecutor: ff70a72027dea5cc7d71cfcc6fad7f599f63987a
React-jsinspector: aef73cbd43b70675f572214d10fa438c89bf11ba
React-logger: 2e4aee3e11b3ec4fa6cfd8004610bbb3b8d6cca4
react-native-agora: f6ac99157284ba22e4e42474b395db56c7982175
react-native-agora: 6e8876f5ea0ca5adc7932a13837058b10e68847a
react-native-agora-rawdata: 097895cdccd8fcf3cff5dffe23372f5d3c89fd31
react-native-image-tools: 88218449791389bbf550a2c475a3b564c8233c8b
react-native-safe-area-context: 7aa8e6d9d0f3100a820efb1a98af68aa747f9284
Expand Down Expand Up @@ -785,6 +785,6 @@ SPEC CHECKSUMS:
Yoga: 86fed2e4d425ee4c6eab3813ba1791101ee153c6
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 8b9b42e8cf1e5dd000f102cb40a615802d190f72
PODFILE CHECKSUM: 932d1fe54a221af20b75983d33966199a7455f73

COCOAPODS: 1.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
Music,
MusicChartInfo,
MusicCollection,
MusicContentCenterStatusCode,
PreloadStatusCode,
MusicContentCenterStateReason,
PreloadState,
createAgoraRtcEngine,
} from 'react-native-agora';

Expand Down Expand Up @@ -251,7 +251,7 @@ export default class MusicContentCenter
onMusicChartsResult(
requestId: string,
result: MusicChartInfo[],
errorCode: MusicContentCenterStatusCode
errorCode: MusicContentCenterStateReason
) {
this.info('onMusicChartsResult', requestId, result, errorCode);
this.setState({ musicChartInfos: result });
Expand All @@ -260,7 +260,7 @@ export default class MusicContentCenter
onMusicCollectionResult(
requestId: string,
result: MusicCollection,
errorCode: MusicContentCenterStatusCode
errorCode: MusicContentCenterStateReason
) {
this.info('onMusicCollectionResult', requestId, result, errorCode);
this.setState({
Expand All @@ -276,8 +276,8 @@ export default class MusicContentCenter
songCode: number,
percent: number,
lyricUrl: string,
status: PreloadStatusCode,
errorCode: MusicContentCenterStatusCode
status: PreloadState,
errorCode: MusicContentCenterStateReason
) {
this.info(
'onPreLoadEvent',
Expand All @@ -290,7 +290,7 @@ export default class MusicContentCenter
);
if (songCode === this.state.songCode) {
this.setState({
preload: status === PreloadStatusCode.KPreloadStatusCompleted,
preload: status === PreloadState.KPreloadStateCompleted,
});
}
}
Expand All @@ -299,7 +299,7 @@ export default class MusicContentCenter
requestId: string,
songCode: number,
lyricUrl: string,
errorCode: MusicContentCenterStatusCode
errorCode: MusicContentCenterStateReason
) {
this.info('onLyricResult', requestId, songCode, lyricUrl, errorCode);
}
Expand Down
5 changes: 5 additions & 0 deletions ios/AgoraRtcNg.mm
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ - (void)dealloc {
std::smatch output;
std::regex pattern = std::regex("^.*(Observer|Handler|Callback|Receiver|DirectCdnStreaming)$");
std::string name = funcName.UTF8String;
size_t first_ = name.find('_');
size_t second_ = name.find('_', first_ + 1);
if (first_ != std::string::npos && second_ != std::string::npos) {
name = name.substr(first_ + 1, second_ - first_ - 1);
}
if (std::regex_match(name, output, pattern)) {
param.buffer = handler;
param.buffer_count = 1;
Expand Down
2 changes: 1 addition & 1 deletion ios/AgoraRtcSurfaceViewManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#import <React/RCTUIManager.h>
#import "RCTBridge.h"
#import "AgoraRtcNg.h"
#import <AgoraRtcWrapper/iris_rtc_base.h>
#import <AgoraRtcWrapper/iris_engine_base.h>

@interface AgoraRtcSurfaceViewManager : RCTViewManager
@end
Expand Down
4 changes: 2 additions & 2 deletions react-native-agora.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Pod::Spec.new do |s|
end
end

s.dependency 'AgoraRtcEngine_iOS_Preview', '4.3.0-dev.17'
s.dependency 'AgoraIrisRTC_iOS', '4.3.0-dev.17'
s.dependency 'AgoraRtcEngine_iOS_Preview', '4.3.0-dev.18'
s.dependency 'AgoraIrisRTC_iOS', '4.3.0-dev.18'
s.libraries = 'stdc++'
s.framework = 'ReplayKit'
end
1 change: 1 addition & 0 deletions scripts/terra/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.0.1.cjs
httpsProxy: 'http://127.0.0.1:7890'
6 changes: 3 additions & 3 deletions scripts/terra/generate-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ set -x
MY_PATH=$(realpath $(dirname "$0"))
PROJECT_ROOT=$(realpath ${MY_PATH}/../..)

rm -rf node_modules
rm -rf .terra
yarn
# rm -rf node_modules
# rm -rf .terra
# yarn

npm exec terra -- run \
--config ${PROJECT_ROOT}/scripts/terra/config/types_config.yaml \
Expand Down
5 changes: 4 additions & 1 deletion scripts/terra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.2"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"resolutions": {
"@agoraio-extensions/terra_shared_configs": "portal:/Users/guoxianzhe/agora/terra_shared_configs"
}
}
9 changes: 4 additions & 5 deletions scripts/terra/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@ __metadata:
languageName: node
linkType: hard

"@agoraio-extensions/terra_shared_configs@[email protected]:AgoraIO-Extensions/terra_shared_configs.git#head=main":
version: 1.0.2
resolution: "@agoraio-extensions/terra_shared_configs@[email protected]:AgoraIO-Extensions/terra_shared_configs.git#commit=7220001a85053a26a55921a37abf6f51e6410af0"
"@agoraio-extensions/terra_shared_configs@portal:/Users/guoxianzhe/agora/terra_shared_configs::locator=terra%40workspace%3A.":
version: 0.0.0-use.local
resolution: "@agoraio-extensions/terra_shared_configs@portal:/Users/guoxianzhe/agora/terra_shared_configs::locator=terra%40workspace%3A."
dependencies:
"@agoraio-extensions/cxx-parser": "[email protected]:AgoraIO-Extensions/terra.git#head=main&workspace=cxx-parser"
"@agoraio-extensions/terra-core": "[email protected]:AgoraIO-Extensions/terra.git#head=main&workspace=terra-core"
mustache: "npm:^4.2.0"
checksum: 75837ec96cb3347407b52c9776f3e05f9f14b2dd33c049272fe8857165da484aad5674f832decd0ef3b9f22534b8c76856e86460049ebbdf17126d8101e15bb5
languageName: node
linkType: hard
linkType: soft

"@cspotcode/source-map-support@npm:^0.8.0":
version: 0.8.1
Expand Down
6 changes: 3 additions & 3 deletions src/impl/IAgoraMediaPlayerImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ export class IMediaPlayerImpl implements IMediaPlayer {
observer: IAudioPcmFrameSink,
mode: RawAudioFrameOpModeType = RawAudioFrameOpModeType.RawAudioFrameOpModeReadOnly
): string {
return 'MediaPlayer_registerAudioFrameObserver';
return 'MediaPlayer_registerAudioFrameObserver_a5b510b';
}

unregisterAudioFrameObserver(observer: IAudioPcmFrameSink): number {
Expand Down Expand Up @@ -575,7 +575,7 @@ export class IMediaPlayerImpl implements IMediaPlayer {
protected getApiTypeFromRegisterVideoFrameObserver(
observer: IMediaPlayerVideoFrameObserver
): string {
return 'MediaPlayer_registerVideoFrameObserver';
return 'MediaPlayer_registerVideoFrameObserver_833bd8d';
}

unregisterVideoFrameObserver(
Expand All @@ -595,7 +595,7 @@ export class IMediaPlayerImpl implements IMediaPlayer {
protected getApiTypeFromUnregisterVideoFrameObserver(
observer: IMediaPlayerVideoFrameObserver
): string {
return 'MediaPlayer_unregisterVideoFrameObserver';
return 'MediaPlayer_unregisterVideoFrameObserver_5165d4c';
}

registerMediaPlayerAudioSpectrumObserver(
Expand Down
2 changes: 1 addition & 1 deletion src/impl/IAgoraMusicContentCenterImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ export class IMusicContentCenterImpl implements IMusicContentCenter {
}

protected getApiTypeFromPreload(songCode: number): string {
return 'MusicContentCenter_preload';
return 'MusicContentCenter_preload_d3baeab';
}

removeCache(songCode: number): number {
Expand Down
4 changes: 2 additions & 2 deletions src/impl/IAgoraRtcEngineExImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx {
connection: RtcConnection,
options?: LeaveChannelOptions
): string {
return 'RtcEngineEx_leaveChannelEx';
return 'RtcEngineEx_leaveChannelEx_b03ee9a';
}

updateChannelMediaOptionsEx(
Expand Down Expand Up @@ -854,7 +854,7 @@ export class IRtcEngineExImpl extends IRtcEngineImpl implements IRtcEngineEx {
config: DataStreamConfig,
connection: RtcConnection
): string {
return 'RtcEngineEx_createDataStreamEx';
return 'RtcEngineEx_createDataStreamEx_9f641b6';
}

sendStreamMessageEx(
Expand Down
Loading

0 comments on commit dfe0a49

Please sign in to comment.