Skip to content

Commit a1de895

Browse files
authored
Merge pull request #144 from AgoraIO/dev/android
fix android sdk version
2 parents 3d2fe00 + 892e18a commit a1de895

File tree

10 files changed

+2681
-1174
lines changed

10 files changed

+2681
-1174
lines changed

Android/APIExample/app/src/main/java/io/agora/api/example/MainApplication.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ private void initExamples() {
2626
try {
2727
Set<String> packageName = ClassUtils.getFileNameByPackageName(this, "io.agora.api.example.examples");
2828
for (String name : packageName) {
29+
if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.N && name.contains("io.agora.api.example.examples.advanced.ARCore")) {
30+
continue;
31+
}
2932
Class<?> aClass = Class.forName(name);
3033
Annotation[] declaredAnnotations = aClass.getAnnotations();
3134
for (Annotation annotation : declaredAnnotations) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public void onCaptureVideoFrame(byte[] data, int frameType, int width, int heigh
403403
return;
404404
}
405405
Bitmap bitmap = YUVUtils.i420ToBitmap(width, height, rotation, bufferLength, data, yStride, uStride, vStride);
406-
Bitmap bmp = YUVUtils.blur(getContext(), bitmap, 4);
406+
Bitmap bmp = YUVUtils.blur(getContext(), bitmap, 8f);
407407
System.arraycopy(YUVUtils.bitmapToI420(width, height, bmp), 0, data, 0, bufferLength);
408408
}
409409

@@ -412,7 +412,7 @@ public void onRenderVideoFrame(int uid, byte[] data, int frameType, int width, i
412412
if (blur) {
413413
return;
414414
}
415-
Bitmap bmp = YUVUtils.blur(getContext(), YUVUtils.i420ToBitmap(width, height, rotation, bufferLength, data, yStride, uStride, vStride), 4);
415+
Bitmap bmp = YUVUtils.blur(getContext(), YUVUtils.i420ToBitmap(width, height, rotation, bufferLength, data, yStride, uStride, vStride), 8f);
416416
System.arraycopy(YUVUtils.bitmapToI420(width, height, bmp), 0, data, 0, bufferLength);
417417
}
418418

Android/APIExample/lib-raw-data/src/main/cpp/include/AgoraBase.h

Lines changed: 54 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ enum WARN_CODE_TYPE
150150
/** 111: A timeout occurs when switching to the live video.
151151
*/
152152
WARN_SWITCH_LIVE_VIDEO_TIMEOUT = 111,
153-
/** 118: A timeout occurs when setting the client role in the live interactive streaming profile.
153+
/** 118: A timeout occurs when setting the client role in the interactive live streaming profile.
154154
*/
155155
WARN_SET_CLIENT_ROLE_TIMEOUT = 118,
156156
/** 121: The ticket to open the channel is invalid.
@@ -177,19 +177,19 @@ enum WARN_CODE_TYPE
177177
/** 1014: Audio Device Module: A warning occurs in the playback device.
178178
*/
179179
WARN_ADM_RUNTIME_PLAYOUT_WARNING = 1014,
180-
/** 1016: Audio Device Module: a warning occurs in the recording device.
180+
/** 1016: Audio Device Module: A warning occurs in the audio capturing device.
181181
*/
182182
WARN_ADM_RUNTIME_RECORDING_WARNING = 1016,
183-
/** 1019: Audio Device Module: no valid audio data is recorded.
183+
/** 1019: Audio Device Module: No valid audio data is captured.
184184
*/
185185
WARN_ADM_RECORD_AUDIO_SILENCE = 1019,
186186
/** 1020: Audio device module: The audio playback frequency is abnormal, which may cause audio freezes. This abnormality is caused by high CPU usage. Agora recommends stopping other apps.
187187
*/
188188
WARN_ADM_PLAYOUT_MALFUNCTION = 1020,
189-
/** 1021: Audio device module: the audio recording frequency is abnormal, which may cause audio freezes. This abnormality is caused by high CPU usage. Agora recommends stopping other apps.
189+
/** 1021: Audio device module: the audio capturing frequency is abnormal, which may cause audio freezes. This abnormality is caused by high CPU usage. Agora recommends stopping other apps.
190190
*/
191191
WARN_ADM_RECORD_MALFUNCTION = 1021,
192-
/** 1025: The audio playback or recording is interrupted by system events (such as a phone call).
192+
/** 1025: The audio playback or capturing is interrupted by system events (such as a phone call).
193193
*/
194194
WARN_ADM_CALL_INTERRUPTION = 1025,
195195
/** 1029: During a call, the audio session category should be set to
@@ -199,13 +199,13 @@ enum WARN_CODE_TYPE
199199
* AVAudioSessionCategoryPlayAndRecord.
200200
*/
201201
WARN_ADM_IOS_CATEGORY_NOT_PLAYANDRECORD = 1029,
202-
/** 1031: Audio Device Module: The recorded audio voice is too low.
202+
/** 1031: Audio Device Module: The captured audio voice is too low.
203203
*/
204204
WARN_ADM_RECORD_AUDIO_LOWLEVEL = 1031,
205205
/** 1032: Audio Device Module: The playback audio voice is too low.
206206
*/
207207
WARN_ADM_PLAYOUT_AUDIO_LOWLEVEL = 1032,
208-
/** 1033: Audio device module: The audio recording device is occupied.
208+
/** 1033: Audio device module: The audio capturing device is occupied.
209209
*/
210210
WARN_ADM_RECORD_AUDIO_IS_ACTIVE = 1033,
211211
/** 1040: Audio device module: An exception occurs with the audio drive.
@@ -215,12 +215,12 @@ enum WARN_CODE_TYPE
215215
* - Update the sound card drive.
216216
*/
217217
WARN_ADM_WINDOWS_NO_DATA_READY_EVENT = 1040,
218-
/** 1042: Audio device module: The audio recording device is different from the audio playback device,
219-
* which may cause echoes problem. Agora recommends using the same audio device to record and playback
218+
/** 1042: Audio device module: The audio capturing device is different from the audio playback device,
219+
* which may cause echoes problem. Agora recommends using the same audio device to capture and playback
220220
* audio.
221221
*/
222222
WARN_ADM_INCONSISTENT_AUDIO_DEVICE = 1042,
223-
/** 1051: (Communication profile only) Audio processing module: A howling sound is detected when recording the audio data.
223+
/** 1051: (Communication profile only) Audio processing module: A howling sound is detected when capturing the audio data.
224224
*/
225225
WARN_APM_HOWLING = 1051,
226226
/** 1052: Audio Device Module: The device is in the glitch state.
@@ -300,7 +300,7 @@ enum ERROR_CODE_TYPE
300300
/** 11: The request is canceled. This is for internal SDK use only, and it does not return to the application through any method or callback.
301301
*/
302302
ERR_CANCELED = 11,
303-
/** 12: The method is called too often. This is for internal SDK use only, and it does not return to the application through any method or callback.
303+
/** 12: The method is called too often.
304304
*/
305305
ERR_TOO_OFTEN = 12,
306306
/** 13: The SDK fails to bind to the network socket. This is for internal SDK use only, and it does not return to the application through any method or callback.
@@ -395,7 +395,7 @@ enum ERROR_CODE_TYPE
395395
/** 120: Decryption fails. The user may have used a different encryption password to join the channel. Check your settings or try rejoining the channel.
396396
*/
397397
ERR_DECRYPTION_FAILED = 120,
398-
/** 123: The user is banned by the server. This error occurs when the user is kicked off the channel from the server.
398+
/** 123: The user is banned by the server. This error occurs when the user is kicked out the channel from the server.
399399
*/
400400
ERR_CLIENT_IS_BANNED_BY_SERVER = 123,
401401
/** 124: Incorrect watermark file parameter.
@@ -437,9 +437,23 @@ enum ERROR_CODE_TYPE
437437
/** 155: The server fails to find the stream.
438438
*/
439439
ERR_PUBLISH_STREAM_NOT_FOUND = 155,
440-
/** 156: The format of the RTMP stream URL is not supported. Check whether the URL format is correct.
440+
/** 156: The format of the RTMP or RTMPS stream URL is not supported. Check whether the URL format is correct.
441441
*/
442442
ERR_PUBLISH_STREAM_FORMAT_NOT_SUPPORTED = 156,
443+
/** 157: The necessary dynamical library is not integrated. For example, if you call
444+
* the \ref agora::rtc::IRtcEngine::enableDeepLearningDenoise "enableDeepLearningDenoise" but do not integrate the dynamical
445+
* library for the deep-learning noise reduction into your project, the SDK reports this error code.
446+
*
447+
*/
448+
ERR_MODULE_NOT_FOUND = 157,
449+
/// @cond
450+
/** 158: The dynamical library for the super-resolution algorithm is not integrated.
451+
* When you call the \ref agora::rtc::IRtcEngine::enableRemoteSuperResolution "enableRemoteSuperResolution" method but
452+
* do not integrate the dynamical library for the super-resolution algorithm
453+
* into your project, the SDK reports this error code.
454+
*/
455+
ERR_MODULE_SUPER_RESOLUTION_NOT_FOUND = 158,
456+
/// @endcond
443457

444458
//signaling: 400~600
445459
ERR_LOGOUT_OTHER = 400, //
@@ -512,19 +526,19 @@ enum ERROR_CODE_TYPE
512526
/** 1010: Audio Device Module: An error occurs in stopping the playback device.
513527
*/
514528
ERR_ADM_STOP_PLAYOUT = 1010,
515-
/** 1011: Audio Device Module: An error occurs in initializing the recording device.
529+
/** 1011: Audio Device Module: An error occurs in initializing the capturing device.
516530
*/
517531
ERR_ADM_INIT_RECORDING = 1011,
518-
/** 1012: Audio Device Module: An error occurs in starting the recording device.
532+
/** 1012: Audio Device Module: An error occurs in starting the capturing device.
519533
*/
520534
ERR_ADM_START_RECORDING = 1012,
521-
/** 1013: Audio Device Module: An error occurs in stopping the recording device.
535+
/** 1013: Audio Device Module: An error occurs in stopping the capturing device.
522536
*/
523537
ERR_ADM_STOP_RECORDING = 1013,
524538
/** 1015: Audio Device Module: A playback error occurs. Check your playback device and try rejoining the channel.
525539
*/
526540
ERR_ADM_RUNTIME_PLAYOUT_ERROR = 1015,
527-
/** 1017: Audio Device Module: A recording error occurs.
541+
/** 1017: Audio Device Module: A capturing error occurs.
528542
*/
529543
ERR_ADM_RUNTIME_RECORDING_ERROR = 1017,
530544
/** 1018: Audio Device Module: Fails to record.
@@ -548,8 +562,8 @@ enum ERROR_CODE_TYPE
548562
/** 1101: Audio device module: A fatal exception occurs.
549563
*/
550564
ERR_ADM_ANDROID_JNI_JAVA_RESOURCE = 1101,
551-
/** 1108: Audio device module: The recording frequency is lower than 50.
552-
* 0 indicates that the recording is not yet started. We recommend
565+
/** 1108: Audio device module: The capturing frequency is lower than 50.
566+
* 0 indicates that the capturing is not yet started. We recommend
553567
* checking your recording permission.
554568
*/
555569
ERR_ADM_ANDROID_JNI_NO_RECORD_FREQUENCY = 1108,
@@ -646,7 +660,7 @@ enum ERROR_CODE_TYPE
646660
* - Replace the device. */
647661
ERR_ADM_WIN_CORE_RENDER_NOT_STARTUP = 1320,
648662
/** 1322: Audio device module: No audio sampling device is available.
649-
* Solutions: Plug in a proper recording device. */
663+
* Solutions: Plug in a proper capturing device. */
650664
ERR_ADM_WIN_CORE_NO_RECORDING_DEVICE = 1322,
651665
/** 1323: Audio device module: No audio playout device is available.
652666
* Solutions: Plug in a proper playback device.*/
@@ -693,7 +707,7 @@ enum ERROR_CODE_TYPE
693707
* - Reboot the system.
694708
* - Upgrade your audio card driver.*/
695709
ERR_ADM_WIN_WAVE_START_PLAYOUT = 1358,
696-
/** 1359: Audio Device Module: No recording device exists.
710+
/** 1359: Audio Device Module: No capturing device exists.
697711
*/
698712
ERR_ADM_NO_RECORDING_DEVICE = 1359,
699713
/** 1360: Audio Device Module: No playback device exists.
@@ -727,7 +741,7 @@ enum ERROR_CODE_TYPE
727741
ERR_VCM_ENCODER_SET_ERROR = 1603,
728742
};
729743

730-
/** Output log filter level. */
744+
/** Output log filter level. */
731745
enum LOG_FILTER_TYPE
732746
{
733747
/** 0: Do not output any log information. */
@@ -750,6 +764,24 @@ enum LOG_FILTER_TYPE
750764
LOG_FILTER_MASK = 0x80f,
751765
/// @endcond
752766
};
767+
/** The output log level of the SDK.
768+
*
769+
* @since v3.3.0
770+
*/
771+
enum class LOG_LEVEL {
772+
/** 0: Do not output any log. */
773+
LOG_LEVEL_NONE = 0x0000,
774+
/** 0x0001: (Default) Output logs of the FATAL, ERROR, WARN and INFO level. We recommend setting your log filter as this level.
775+
*/
776+
LOG_LEVEL_INFO = 0x0001,
777+
/** 0x0002: Output logs of the FATAL, ERROR and WARN level.
778+
*/
779+
LOG_LEVEL_WARN = 0x0002,
780+
/** 0x0004: Output logs of the FATAL and ERROR level. */
781+
LOG_LEVEL_ERROR = 0x0004,
782+
/** 0x0008: Output logs of the FATAL level. */
783+
LOG_LEVEL_FATAL = 0x0008,
784+
};
753785
} // namespace agora
754786

755787
#endif

Android/APIExample/lib-raw-data/src/main/cpp/include/IAgoraMediaEngine.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ class IAudioFrameObserver {
5959
};
6060

6161
public:
62-
/** Retrieves the recorded audio frame.
62+
/** Retrieves the captured audio frame.
6363
6464
@param audioFrame Pointer to AudioFrame.
6565
@return
66-
- true: Valid buffer in AudioFrame, and the recorded audio frame is sent out.
67-
- false: Invalid buffer in AudioFrame, and the recorded audio frame is discarded.
66+
- true: Valid buffer in AudioFrame, and the captured audio frame is sent out.
67+
- false: Invalid buffer in AudioFrame, and the captured audio frame is discarded.
6868
*/
6969
virtual bool onRecordAudioFrame(AudioFrame& audioFrame) = 0;
7070
/** Retrieves the audio playback frame for getting the audio.
@@ -75,15 +75,15 @@ class IAudioFrameObserver {
7575
- false: Invalid buffer in AudioFrame, and the audio playback frame is discarded.
7676
*/
7777
virtual bool onPlaybackAudioFrame(AudioFrame& audioFrame) = 0;
78-
/** Retrieves the mixed recorded and playback audio frame.
78+
/** Retrieves the mixed captured and playback audio frame.
7979
8080
8181
@note This callback only returns the single-channel data.
8282
8383
@param audioFrame Pointer to AudioFrame.
8484
@return
85-
- true: Valid buffer in AudioFrame and the mixed recorded and playback audio frame is sent out.
86-
- false: Invalid buffer in AudioFrame and the mixed recorded and playback audio frame is discarded.
85+
- true: Valid buffer in AudioFrame and the mixed captured and playback audio frame is sent out.
86+
- false: Invalid buffer in AudioFrame and the mixed captured and playback audio frame is discarded.
8787
*/
8888
virtual bool onMixedAudioFrame(AudioFrame& audioFrame) = 0;
8989
/** Retrieves the audio frame of a specified user before mixing.
@@ -93,8 +93,8 @@ class IAudioFrameObserver {
9393
@param uid The user ID
9494
@param audioFrame Pointer to AudioFrame.
9595
@return
96-
- true: Valid buffer in AudioFrame, and the mixed recorded and playback audio frame is sent out.
97-
- false: Invalid buffer in AudioFrame, and the mixed recorded and playback audio frame is discarded.
96+
- true: Valid buffer in AudioFrame, and the mixed captured and playback audio frame is sent out.
97+
- false: Invalid buffer in AudioFrame, and the mixed captured and playback audio frame is discarded.
9898
*/
9999
virtual bool onPlaybackAudioFrameBeforeMixing(unsigned int uid,
100100
AudioFrame& audioFrame) = 0;

0 commit comments

Comments
 (0)