Skip to content

Commit 8393594

Browse files
author
xianing
committed
adjust project structure
1 parent 1e1b3ac commit 8393594

11 files changed

Lines changed: 22 additions & 44 deletions

File tree

Android/APIExample/agora-simple-filter/src/main/cpp/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.4.1)
88
project(agora-simple-filter)
99

1010
#link agora so
11-
set(agora-lib-so ${PROJECT_SOURCE_DIR}/../agoraLibs/${CMAKE_ANDROID_ARCH_ABI}/libagora-rtc-sdk-jni.so)
11+
set(agora-lib-so ${PROJECT_SOURCE_DIR}/../jniLibs/${CMAKE_ANDROID_ARCH_ABI}/libagora-rtc-sdk-jni.so)
1212
link_libraries(${agora-lib-so})
1313

1414
#link opencv so

Android/APIExample/app/src/main/java/io/agora/api/example/examples/advanced/ProcessAudioRawData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ public boolean onMixedAudioFrame(int i, int i1, int i2, int i3, int i4, ByteBuff
334334
}
335335

336336
@Override
337-
public boolean onPlaybackAudioFrameBeforeMixing(int i, int i1, int i2, int i3, int i4, int i5, ByteBuffer byteBuffer, long l, int i6) {
337+
public boolean onPlaybackAudioFrameBeforeMixing(String s, int i, int i1, int i2, int i3, int i4, ByteBuffer byteBuffer, long l, int i5) {
338338
return false;
339339
}
340340

iOS/APIExample.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@
336336
57FE7C4926B2D103002D9043 /* CircularBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CircularBuffer.h; sourceTree = "<group>"; };
337337
57FE7C4A26B2D103002D9043 /* AgoraScreenShareSourcePush.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AgoraScreenShareSourcePush.m; sourceTree = "<group>"; };
338338
57FE7C4D26B2D1A4002D9043 /* NetworkExtension.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = NetworkExtension.framework; path = System/Library/Frameworks/NetworkExtension.framework; sourceTree = SDKROOT; };
339-
57FE7C4F26B2D1E2002D9043 /* APIExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = APIExample.entitlements; sourceTree = "<group>"; };
340339
5A45F3A50A20714335E46364 /* Pods_Agora_ScreenShare_Extension_Socket_.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Agora_ScreenShare_Extension_Socket_.framework; sourceTree = BUILT_PRODUCTS_DIR; };
341340
5B3A20457BD332886F0CC52F /* Pods-SimpleAudioFilter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SimpleAudioFilter.debug.xcconfig"; path = "Target Support Files/Pods-SimpleAudioFilter/Pods-SimpleAudioFilter.debug.xcconfig"; sourceTree = "<group>"; };
342341
6F2725A37161C72C3445F0D7 /* Pods-Agora-ScreenShare-Extension(Socket).debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Agora-ScreenShare-Extension(Socket).debug.xcconfig"; path = "Target Support Files/Pods-Agora-ScreenShare-Extension(Socket)/Pods-Agora-ScreenShare-Extension(Socket).debug.xcconfig"; sourceTree = "<group>"; };
@@ -371,6 +370,7 @@
371370
8BA5459026AFEC8D00ED4295 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/SimpleFilter.strings"; sourceTree = "<group>"; };
372371
8BA5459226AFEC8D00ED4295 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/SimpleFilter.storyboard; sourceTree = "<group>"; };
373372
8BA5459326AFEC8D00ED4295 /* SimpleFilter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SimpleFilter.swift; sourceTree = "<group>"; };
373+
8BAEA7B426C253FC0006B0F1 /* APIExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = APIExample.entitlements; sourceTree = "<group>"; };
374374
92577CFC05C5519F5AF5591C /* Pods-audioFilter.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-audioFilter.release.xcconfig"; path = "Target Support Files/Pods-audioFilter/Pods-audioFilter.release.xcconfig"; sourceTree = "<group>"; };
375375
92EACE913B50B28F1588FE03 /* Pods-Agora-ScreenShare-Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Agora-ScreenShare-Extension.release.xcconfig"; path = "Target Support Files/Pods-Agora-ScreenShare-Extension/Pods-Agora-ScreenShare-Extension.release.xcconfig"; sourceTree = "<group>"; };
376376
A7847F912458062900469187 /* StatisticsInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatisticsInfo.swift; sourceTree = "<group>"; };
@@ -732,7 +732,7 @@
732732
03D13BCE2448758900B599B3 /* APIExample */ = {
733733
isa = PBXGroup;
734734
children = (
735-
57FE7C4F26B2D1E2002D9043 /* APIExample.entitlements */,
735+
8BAEA7B426C253FC0006B0F1 /* APIExample.entitlements */,
736736
03D13BD52448758900B599B3 /* Main.storyboard */,
737737
A7CA48C224553CF600507435 /* Popover.storyboard */,
738738
03D13BD32448758900B599B3 /* ViewController.swift */,
@@ -1618,7 +1618,7 @@
16181618
CLANG_ENABLE_MODULES = YES;
16191619
CODE_SIGN_IDENTITY = "Apple Development";
16201620
CODE_SIGN_STYLE = Automatic;
1621-
DEVELOPMENT_TEAM = JDPG69R49Z;
1621+
DEVELOPMENT_TEAM = T3RCD6CX8B;
16221622
FRAMEWORK_SEARCH_PATHS = (
16231623
"$(inherited)",
16241624
"$(PROJECT_DIR)/APIExample",

iOS/APIExample/Common/VideoViewMetal.xib

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="18122" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
77
<capability name="Named colors" minToolsVersion="9.0"/>
88
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
99
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -55,7 +55,6 @@
5555
<connections>
5656
<outlet property="infolabel" destination="2sO-zb-ccE" id="HQi-ln-8x0"/>
5757
<outlet property="placeholder" destination="jNO-yh-cWz" id="3n3-sG-STN"/>
58-
<outlet property="videoView" destination="z6G-aL-Ut4" id="Jfc-RP-ol4"/>
5958
</connections>
6059
<point key="canvasLocation" x="261" y="208"/>
6160
</view>

iOS/APIExample/Examples/Advanced/CustomVideoRender/CustomVideoRender.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class CustomVideoRenderMain: BaseViewController {
7878
// agoraKit.setLocalVideoRenderer(customRender)
7979
// }
8080

81-
8281
// Set audio route to speaker
8382
agoraKit.setDefaultAudioRouteToSpeakerphone(true)
8483

iOS/APIExample/ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ViewController: AGViewController {
3737
MenuItem(name: "Custom Audio Source(PCM)".localized, storyboard: "CustomPcmAudioSource", controller: "CustomPcmAudioSource"),
3838
MenuItem(name: "Custom Audio Render".localized, storyboard: "CustomAudioRender", controller: "CustomAudioRender"),
3939
MenuItem(name: "Custom Video Source(Push)".localized, storyboard: "CustomVideoSourcePush", controller: "CustomVideoSourcePush"),
40-
MenuItem(name: "Custom Video Render".localized, storyboard: "CustomVideoRender", controller: "CustomVideoRender"),
40+
// MenuItem(name: "Custom Video Render".localized, storyboard: "CustomVideoRender", controller: "CustomVideoRender"),
4141
MenuItem(name: "Raw Media Data".localized, storyboard: "RawMediaData", controller: "RawMediaData"),
4242
MenuItem(name: "Simple Filter Extension".localized, storyboard: "SimpleFilter", controller: "SimpleFilter"),
4343
MenuItem(name: "Quick Switch Channel".localized, controller: "QuickSwitchChannel"),
@@ -47,7 +47,7 @@ class ViewController: AGViewController {
4747
MenuItem(name: "Precall Test".localized, storyboard: "PrecallTest", controller: ""),
4848
MenuItem(name: "Media Player".localized, storyboard: "MediaPlayer", controller: ""),
4949
MenuItem(name: "Screen Share".localized, storyboard: "ScreenShare", controller: ""),
50-
MenuItem(name: "Screen Share + Camera".localized, storyboard: "ScreenShare+Socket", controller: ""),
50+
// MenuItem(name: "Screen Share + Camera".localized, storyboard: "ScreenShare+Socket", controller: ""),
5151
MenuItem(name: "Media Channel Relay".localized, storyboard: "MediaChannelRelay", controller: "")
5252
]),
5353
]

macOS/APIExample.xcodeproj/project.pbxproj

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@
167167
03896D3624F8A011008593CD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
168168
03896D3824F8A011008593CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
169169
03896D3924F8A011008593CD /* APIExample.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = APIExample.entitlements; sourceTree = "<group>"; };
170-
03896D4224F8A011008593CD /* APIExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIExampleTests.swift; sourceTree = "<group>"; };
171-
03896D4424F8A011008593CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
172-
03896D4D24F8A011008593CD /* APIExampleUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIExampleUITests.swift; sourceTree = "<group>"; };
173-
03896D4F24F8A011008593CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
174170
03B12DA3250E8F7F00E55818 /* AgoraExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AgoraExtension.swift; sourceTree = "<group>"; };
175171
4C8551EF6F12F734D8F7C1F5 /* Pods-APIExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-APIExample.release.xcconfig"; path = "Target Support Files/Pods-APIExample/Pods-APIExample.release.xcconfig"; sourceTree = "<group>"; };
176172
576459FF259B1C22007B1E30 /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/CreateDataStream.strings"; sourceTree = "<group>"; };
@@ -421,8 +417,6 @@
421417
isa = PBXGroup;
422418
children = (
423419
03896D2E24F8A00F008593CD /* APIExample */,
424-
03896D4124F8A011008593CD /* APIExampleTests */,
425-
03896D4C24F8A011008593CD /* APIExampleUITests */,
426420
03896D2D24F8A00F008593CD /* Products */,
427421
72510F6AF209B24C1F66A819 /* Pods */,
428422
E8D399FF8F860CE7DAAA9D91 /* Frameworks */,
@@ -457,24 +451,6 @@
457451
path = APIExample;
458452
sourceTree = "<group>";
459453
};
460-
03896D4124F8A011008593CD /* APIExampleTests */ = {
461-
isa = PBXGroup;
462-
children = (
463-
03896D4224F8A011008593CD /* APIExampleTests.swift */,
464-
03896D4424F8A011008593CD /* Info.plist */,
465-
);
466-
path = APIExampleTests;
467-
sourceTree = "<group>";
468-
};
469-
03896D4C24F8A011008593CD /* APIExampleUITests */ = {
470-
isa = PBXGroup;
471-
children = (
472-
03896D4D24F8A011008593CD /* APIExampleUITests.swift */,
473-
03896D4F24F8A011008593CD /* Info.plist */,
474-
);
475-
path = APIExampleUITests;
476-
sourceTree = "<group>";
477-
};
478454
03896D5B24F8D437008593CD /* Commons */ = {
479455
isa = PBXGroup;
480456
children = (
@@ -1058,7 +1034,7 @@
10581034
"$(inherited)",
10591035
"@executable_path/../Frameworks",
10601036
);
1061-
PRODUCT_BUNDLE_IDENTIFIER = io.agora.api.example.APIExample;
1037+
PRODUCT_BUNDLE_IDENTIFIER = io.agora.api.example;
10621038
PRODUCT_NAME = "$(TARGET_NAME)";
10631039
PROVISIONING_PROFILE_SPECIFIER = "";
10641040
SWIFT_OBJC_BRIDGING_HEADER = "APIExample/APIExample-Bridging-Header.h";
@@ -1086,7 +1062,7 @@
10861062
"$(inherited)",
10871063
"@executable_path/../Frameworks",
10881064
);
1089-
PRODUCT_BUNDLE_IDENTIFIER = io.agora.api.example.APIExample;
1065+
PRODUCT_BUNDLE_IDENTIFIER = io.agora.api.example;
10901066
PRODUCT_NAME = "$(TARGET_NAME)";
10911067
PROVISIONING_PROFILE_SPECIFIER = "";
10921068
SWIFT_OBJC_BRIDGING_HEADER = "APIExample/APIExample-Bridging-Header.h";

macOS/APIExample/Commons/ExternalAudio/ExternalAudio.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ virtual bool onPlaybackAudioFrame(AudioFrame& audioFrame) override
211211

212212
}
213213

214-
virtual bool onPlaybackAudioFrameBeforeMixing(unsigned int uid, AudioFrame& audioFrame) override { return true; }
214+
virtual bool onPlaybackAudioFrameBeforeMixing(agora::media::base::user_id_t uid, AudioFrame& audioFrame) override { return true; }
215215

216216
virtual bool onMixedAudioFrame(AudioFrame& audioFrame) override { return true; }
217217
};

macOS/APIExample/Commons/RawDataApi/AgoraMediaDataPlugin.mm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ virtual bool onPlaybackAudioFrame(AudioFrame& audioFrame) override
214214
return true;
215215
}
216216

217-
virtual bool onPlaybackAudioFrameBeforeMixing(unsigned int uid, AudioFrame& audioFrame) override
217+
virtual bool onPlaybackAudioFrameBeforeMixing(agora::media::base::user_id_t uid, AudioFrame& audioFrame) override
218218
{
219219
if (!mediaDataPlugin && ((mediaDataPlugin.observerAudioType >> 2) == 0)) return true;
220220
@autoreleasepool {
221221
if ([mediaDataPlugin.audioDelegate respondsToSelector:@selector(mediaDataPlugin:willPlaybackBeforeMixingAudioRawData:ofUid:)]) {
222222
AgoraAudioRawData *data = getAudioRawDataWithAudioFrame(audioFrame);
223-
AgoraAudioRawData *newData = [mediaDataPlugin.audioDelegate mediaDataPlugin:mediaDataPlugin willPlaybackBeforeMixingAudioRawData:data ofUid:uid];
223+
AgoraAudioRawData *newData = [mediaDataPlugin.audioDelegate mediaDataPlugin:mediaDataPlugin willPlaybackBeforeMixingAudioRawData:data ofUid:std::atoi( uid )];
224224
modifiedAudioFrameWithNewAudioRawData(audioFrame, newData);
225225
}
226226
}

macOS/APIExample/Examples/Advanced/RawAudioData/RawAudioData.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,8 @@ extension RawAudioData: AgoraAudioFrameDelegate {
329329
func onPlaybackAudioFrame(beforeMixing frame: AgoraAudioFrame, uid: UInt) -> Bool {
330330
return true
331331
}
332+
333+
func onPlaybackAudioFrame(beforeMixing frame: AgoraAudioFrame, userId: String?) -> Bool {
334+
return true
335+
}
332336
}

0 commit comments

Comments
 (0)