Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
421e372
adapt 3.6.1 windows
Jan 9, 2022
a1bc08e
fix android mpk issues
Jan 10, 2022
95a0685
fix android readme
Jan 11, 2022
681746e
fix ios mpk issues
Jan 18, 2022
ed5ccc1
add feature video enhancement and virtual background base on v3.6.2
Jan 19, 2022
1007df1
win sdk version
sbd021 Jan 20, 2022
c321736
report nework data
sbd021 Jan 20, 2022
fdb1e20
beauty enhance
sbd021 Jan 20, 2022
0adf03f
volume test callback in channel
sbd021 Jan 20, 2022
4f6b29c
Merge branch 'staging' of github.com:AgoraIO/API-Examples into staging
sbd021 Jan 20, 2022
34a1e97
add feature video enhancement and virtual background base on v3.6.2 m…
Jan 21, 2022
0761472
Merge pull request #252 from AgoraIO/dev/3.6.2-vh-macos
Jan 23, 2022
402df94
Merge pull request #251 from AgoraIO/dev/3.6.2-vh-ios
Jan 23, 2022
788a59f
[Bug] : remove Thread sleep on change splitview and fix unowned objec…
Jan 28, 2022
dc4e051
import video process slider and adapt new api on v3.6.2 ios
Jan 28, 2022
70379e8
Merge pull request #257 from AgoraIO/dev/3.6.2-nosleep-macos
Jan 28, 2022
b182257
change AGEVideoLayout to v1.0.4 to avoid crash on macos
Jan 29, 2022
dfc4129
update 3.6.2 c++ header files
Feb 7, 2022
2ba5b9e
change api getChannelId to getId and adapt api startRtmpStream
Feb 11, 2022
58d0c80
support switch camera on SuperResolution
Feb 14, 2022
a7e3cee
Merge branch 'staging' of https://github.com/AgoraIO/API-Examples int…
Feb 22, 2022
a5f201b
3.6.1.1 windows x64
sbd021 Feb 21, 2022
08c043f
windows multiprocess 64 and update readme
sbd021 Feb 21, 2022
13d2849
android ready for 3.6.2
Feb 23, 2022
e9182df
Merge branch 'staging' of ssh://git.agoralab.co/aduc/api-examples int…
Feb 23, 2022
06c7b37
Merge branch 'master' of https://github.com/AgoraIO/API-Examples into…
Feb 23, 2022
9707408
new java video/audio raw data process
Feb 28, 2022
f37d4cb
fix camera permission issue
Mar 12, 2022
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
2 changes: 1 addition & 1 deletion Android/APIExample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The project uses a single app to combine a variety of functionalities. Each func

1. In Android Studio, open `/Android/APIExample`.
2. Sync the project with Gradle files.
3. Edit the `/Android/APIExample/app/src/main/res/values/string_config.xml` file.
3. Edit the `/Android/APIExample/app/src/main/res/values/string_configs.xml` file.

- Replace `YOUR APP ID` with your App ID.
- Replace `YOUR ACCESS TOKEN` with the Access Token.
Expand Down
2 changes: 1 addition & 1 deletion Android/APIExample/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {

defaultConfig {
applicationId "io.agora.api.example"
minSdkVersion 19
minSdkVersion 21
targetSdkVersion 29
versionCode 1
versionName "1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import io.agora.api.example.examples.advanced.MediaPlayerKit;
import io.agora.api.example.examples.advanced.PlayAudioFiles;
import io.agora.api.example.examples.advanced.PreCallTest;
import io.agora.api.example.examples.advanced.ProcessAudioRawData;
import io.agora.api.example.examples.advanced.ProcessRawData;
import io.agora.api.example.examples.advanced.PushExternalVideo;
import io.agora.api.example.examples.advanced.ScreenShare;
import io.agora.api.example.examples.advanced.SendDataStream;
import io.agora.api.example.examples.advanced.SetVideoProfile;
import io.agora.api.example.examples.advanced.SuperResolution;
Expand Down Expand Up @@ -156,12 +156,12 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
case R.id.action_mainFragment_senddatastream:
fragment = new SendDataStream();
break;
case R.id.action_mainFragment_raw_audio:
fragment = new ProcessAudioRawData();
break;
case R.id.action_mainFragment_video_enhancement:
fragment = new FaceBeauty();
break;
case R.id.action_mainFragment_to_screen_share:
fragment = new ScreenShare();
break;
default:
fragment = new JoinChannelAudio();
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import com.yanzhenjie.permission.AndPermission;
import com.yanzhenjie.permission.runtime.Permission;

import org.json.JSONException;

import io.agora.api.example.MainApplication;
import io.agora.api.example.R;
import io.agora.api.example.annotation.Example;
Expand All @@ -32,8 +34,12 @@
import io.agora.rtc.RtcEngineConfig;
import io.agora.rtc.models.ChannelMediaOptions;
import io.agora.rtc.video.BeautyOptions;
import io.agora.rtc.video.ColorEnhanceOptions;
import io.agora.rtc.video.LowLightEnhanceOptions;
import io.agora.rtc.video.VideoCanvas;
import io.agora.rtc.video.VideoDenoiserOptions;
import io.agora.rtc.video.VideoEncoderConfiguration;
import io.agora.rtc.video.VirtualBackgroundSource;

import static io.agora.api.example.common.model.Examples.ADVANCED;
import static io.agora.rtc.Constants.CHANNEL_PROFILE_LIVE_BROADCASTING;
Expand All @@ -56,13 +62,19 @@ public class FaceBeauty extends BaseFragment implements View.OnClickListener, Co
private FrameLayout fl_local, fl_remote;
private LinearLayout controlPanel;
private Button join;
private Switch beauty;
private SeekBar seek_lightness, seek_redness, seek_sharpness, seek_smoothness;
private Switch beauty, lightness, colorful, noiseReduce, virtualBackground;
private SeekBar seek_lightness, seek_redness, seek_sharpness, seek_smoothness, seek_strength, seek_skin;
private EditText et_channel;
private RtcEngine engine;
private int myUid;
private boolean joined = false;
private BeautyOptions beautyOptions = new BeautyOptions();
private LowLightEnhanceOptions lowLightEnhanceOptions = new LowLightEnhanceOptions();
private ColorEnhanceOptions colorEnhanceOptions = new ColorEnhanceOptions();
private VideoDenoiserOptions videoDenoiserOptions = new VideoDenoiserOptions();
private VirtualBackgroundSource virtualBackgroundSource = new VirtualBackgroundSource();
private float skinProtect = 1.0f;
private float strength = 0.5f;

@Nullable
@Override
Expand All @@ -84,6 +96,14 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
controlPanel = view.findViewById(R.id.controlPanel);
beauty = view.findViewById(R.id.switch_face_beautify);
beauty.setOnCheckedChangeListener(this);
lightness = view.findViewById(R.id.switch_lightness);
lightness.setOnCheckedChangeListener(this);
colorful = view.findViewById(R.id.switch_color);
colorful.setOnCheckedChangeListener(this);
virtualBackground = view.findViewById(R.id.switch_virtual_background);
virtualBackground.setOnCheckedChangeListener(this);
noiseReduce = view.findViewById(R.id.switch_video_noise_reduce);
noiseReduce.setOnCheckedChangeListener(this);
seek_lightness = view.findViewById(R.id.lightening);
seek_lightness.setOnSeekBarChangeListener(this);
seek_redness = view.findViewById(R.id.redness);
Expand All @@ -92,6 +112,12 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
seek_sharpness.setOnSeekBarChangeListener(this);
seek_smoothness = view.findViewById(R.id.smoothness);
seek_smoothness.setOnSeekBarChangeListener(this);
seek_strength = view.findViewById(R.id.strength);
seek_strength.setOnSeekBarChangeListener(this);
seek_skin = view.findViewById(R.id.skinProtect);
seek_skin.setOnSeekBarChangeListener(this);

virtualBackgroundSource.blur_degree = 2;
}

@Override
Expand Down Expand Up @@ -274,9 +300,22 @@ public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(buttonView.getId() == beauty.getId()){
engine.setBeautyEffectOptions(isChecked, beautyOptions);
}
else if(buttonView.getId() == lightness.getId()){
engine.setLowlightEnhanceOptions(isChecked, lowLightEnhanceOptions);
}
else if(buttonView.getId() == colorful.getId()){
colorEnhanceOptions.skinProtectLevel = skinProtect;
colorEnhanceOptions.strengthLevel = strength;
engine.setColorEnhanceOptions(isChecked, colorEnhanceOptions);
}
else if(buttonView.getId() == noiseReduce.getId()){
engine.setVideoDenoiserOptions(isChecked, videoDenoiserOptions);
}
else if(buttonView.getId() == virtualBackground.getId()){
engine.enableVirtualBackground(isChecked, virtualBackgroundSource);
}
}


@Override
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
float value = ((float) progress) / 10;
Expand All @@ -296,6 +335,14 @@ else if(seekBar.getId() == seek_smoothness.getId()){
beautyOptions.smoothnessLevel = value;
engine.setBeautyEffectOptions(beauty.isChecked(), beautyOptions);
}
else if(seekBar.getId() == seek_strength.getId()) {
colorEnhanceOptions.strengthLevel = value;
engine.setColorEnhanceOptions(colorful.isChecked(), colorEnhanceOptions);
}
else if(seekBar.getId() == seek_skin.getId()) {
colorEnhanceOptions.skinProtectLevel = value;
engine.setColorEnhanceOptions(colorful.isChecked(), colorEnhanceOptions);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,13 +564,15 @@ public void run() {
@Override
public void onDestroy() {
super.onDestroy();
/**leaveChannel and Destroy the RtcEngine instance*/
agoraMediaPlayerKit.destroy();
if (engine != null) {
engine.leaveChannel();
/**leaveChannel and Destroy the RtcEngine instance*/
if (joined) {
engine.leaveChannel();
}
agoraMediaPlayerKit.destroy();
handler.post(RtcEngine::destroy);
engine = null;
}
handler.post(RtcEngine::destroy);
engine = null;
}

}
Loading