Skip to content

Commit a1c97bf

Browse files
author
Xia Ning
committed
upgrade sdk to 3.2.1
1 parent 2decc0f commit a1c97bf

11 files changed

Lines changed: 2835 additions & 819 deletions

File tree

Android/APIExample/lib-component/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ dependencies {
3535
// api 'io.agora.rtc:full-sdk:3.0.0'
3636
// api 'io.agora.rtc:full-sdk:3.1.2'
3737

38-
api 'io.agora.rtc:full-sdk:3.2.0'
38+
api 'io.agora.rtc:full-sdk:3.2.1'
3939
api 'io.agora:agoraplayer:1.1.2'
4040

4141
}

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

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,18 @@ enum WARN_CODE_TYPE
159159
/** 122: Try connecting to another server.
160160
*/
161161
WARN_OPEN_CHANNEL_TRY_NEXT_VOS = 122,
162-
/** 131: The channel connection cannot be recovered. */
162+
/** 131: The channel connection cannot be recovered.
163+
*/
163164
WARN_CHANNEL_CONNECTION_UNRECOVERABLE = 131,
165+
/** 132: The IP address has changed.
166+
*/
164167
WARN_CHANNEL_CONNECTION_IP_CHANGED = 132,
168+
/** 133: The port has changed.
169+
*/
165170
WARN_CHANNEL_CONNECTION_PORT_CHANGED = 133,
171+
/** 134: The socket error occurs, try to rejoin channel.
172+
*/
173+
WARN_CHANNEL_SOCKET_ERROR = 134,
166174
/** 701: An error occurs in opening the audio mixing file.
167175
*/
168176
WARN_AUDIO_MIXING_OPEN_ERROR = 701,
@@ -235,13 +243,13 @@ enum WARN_CODE_TYPE
235243
* - Update the sound card drive.
236244
*/
237245
WARN_ADM_WIN_CORE_IMPROPER_CAPTURE_RELEASE = 1324,
238-
/** 1610: Super-resolution warning: The original video dimensions of the remote user exceed 640 * 480.
246+
/** 1610: The origin resolution of the remote video is beyond the range where the super-resolution algorithm can be applied.
239247
*/
240248
WARN_SUPER_RESOLUTION_STREAM_OVER_LIMITATION = 1610,
241-
/** 1611: Super-resolution warning: Another user is using super resolution.
249+
/** 1611: Another user is already using the super-resolution algorithm.
242250
*/
243251
WARN_SUPER_RESOLUTION_USER_COUNT_OVER_LIMITATION = 1611,
244-
/** 1612: The device is not supported.
252+
/** 1612: The device does not support the super-resolution algorithm.
245253
*/
246254
WARN_SUPER_RESOLUTION_DEVICE_NOT_SUPPORTED = 1612,
247255
/// @cond
@@ -306,8 +314,13 @@ enum ERROR_CODE_TYPE
306314
ERR_NET_NOBUFS = 15,
307315
/** 17: The request to join the channel is rejected.
308316
*
309-
* - This error usually occurs when the user is already in the channel, and still calls the method to join the channel, for example, \ref agora::rtc::IRtcEngine::joinChannel "joinChannel".
310-
* - This error usually occurs when the user tries to join a channel during a call test (\ref agora::rtc::IRtcEngine::startEchoTest "startEchoTest"). Once you call \ref agora::rtc::IRtcEngine::startEchoTest "startEchoTest", you need to call \ref agora::rtc::IRtcEngine::stopEchoTest "stopEchoTest" before joining a channel.
317+
* - This error usually occurs when the user is already in the channel, and still calls the method to join the
318+
* channel, for example, \ref agora::rtc::IRtcEngine::joinChannel "joinChannel".
319+
* - This error usually occurs when the user tries to join a channel
320+
* during \ref agora::rtc::IRtcEngine::startEchoTest "startEchoTest". Once you
321+
* call \ref agora::rtc::IRtcEngine::startEchoTest "startEchoTest", you need to
322+
* call \ref agora::rtc::IRtcEngine::stopEchoTest "stopEchoTest" before joining a channel.
323+
* - The user tries to join the channel with a token that is expired.
311324
*/
312325
ERR_JOIN_CHANNEL_REJECTED = 17,
313326
/** 18: The request to leave the channel is rejected.
@@ -382,7 +395,7 @@ enum ERROR_CODE_TYPE
382395
/** 120: Decryption fails. The user may have used a different encryption password to join the channel. Check your settings or try rejoining the channel.
383396
*/
384397
ERR_DECRYPTION_FAILED = 120,
385-
/** 123: The client is banned by the server.
398+
/** 123: The user is banned by the server. This error occurs when the user is kicked off the channel from the server.
386399
*/
387400
ERR_CLIENT_IS_BANNED_BY_SERVER = 123,
388401
/** 124: Incorrect watermark file parameter.
@@ -589,27 +602,27 @@ enum ERROR_CODE_TYPE
589602
* session category is not compatible with the settings of the Audio Unit.
590603
*/
591604
ERR_ADM_IOS_VPIO_RESTART_FAIL = 1214,
592-
/// @cond
605+
593606
ERR_ADM_IOS_SET_RENDER_CALLBACK_FAIL = 1219,
594-
/// @endcond
607+
595608
/** **DEPRECATED** */
596609
ERR_ADM_IOS_SESSION_SAMPLERATR_ZERO = 1221,
597-
/** 1301: Audio device module: An audio driver abnomality or a
610+
/** 1301: Audio device module: An audio driver abnormality or a
598611
* compatibility issue occurs. Solutions: Disable and restart the audio
599612
* device, or reboot the system.*/
600613
ERR_ADM_WIN_CORE_INIT = 1301,
601-
/** 1303: Audio device module: A recording driver abnomality or a
614+
/** 1303: Audio device module: A recording driver abnormality or a
602615
* compatibility issue occurs. Solutions: Disable and restart the audio
603616
* device, or reboot the system. */
604617
ERR_ADM_WIN_CORE_INIT_RECORDING = 1303,
605-
/** 1306: Audio device module: A playout driver abnomality or a
618+
/** 1306: Audio device module: A playout driver abnormality or a
606619
* compatibility issue occurs. Solutions: Disable and restart the audio
607620
* device, or reboot the system. */
608621
ERR_ADM_WIN_CORE_INIT_PLAYOUT = 1306,
609622
/** 1307: Audio device module: No audio device is available. Solutions:
610623
* Plug in a proper audio device. */
611624
ERR_ADM_WIN_CORE_INIT_PLAYOUT_NULL = 1307,
612-
/** 1309: Audio device module: An audio driver abnomality or a
625+
/** 1309: Audio device module: An audio driver abnormality or a
613626
* compatibility issue occurs. Solutions: Disable and restart the audio
614627
* device, or reboot the system. */
615628
ERR_ADM_WIN_CORE_START_RECORDING = 1309,

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

100755100644
Lines changed: 41 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class IAudioFrameObserver {
4848
The size of the data buffer is as follows: `buffer` = `samples` × `channels` × `bytesPerSample`.
4949
*/
5050
void* buffer; //data buffer
51-
/** The timestamp of the external audio frame. You can use this parameter for the following purposes:
51+
/** The timestamp (ms) of the external audio frame. You can use this parameter for the following purposes:
5252
- Restore the order of the captured audio frame.
5353
- Synchronize audio and video frames in video-related scenarios, including where external video sources are used.
5454
*/
@@ -124,7 +124,7 @@ class IAudioFrameObserver {
124124
/** Gets the before-mixing playback audio frame from multiple channels.
125125
126126
After you successfully register the audio frame observer, if you set the return
127-
value of isMultipleChannelFrameWanted as true, the SDK triggers this callback each
127+
value of \ref IAudioFrameObserver::isMultipleChannelFrameWanted "isMultipleChannelFrameWanted" as true, the SDK triggers this callback each
128128
time it receives a before-mixing audio frame from any of the channel.
129129
130130
@param channelId The channel ID of this audio frame.
@@ -207,7 +207,7 @@ class IVideoFrameObserver {
207207
/** Set the rotation of this frame before rendering the video. Supports 0, 90, 180, 270 degrees clockwise.
208208
*/
209209
int rotation; // rotation of this frame (0, 90, 180, 270)
210-
/** The timestamp of the external audio frame. It is mandatory. You can use this parameter for the following purposes:
210+
/** The timestamp (ms) of the external audio frame. It is mandatory. You can use this parameter for the following purposes:
211211
- Restore the order of the captured audio frame.
212212
- Synchronize audio and video frames in video-related scenarios, including scenarios where external video sources are used.
213213
@note This timestamp is for rendering the video stream, and not for capturing the video stream.
@@ -225,7 +225,8 @@ class IVideoFrameObserver {
225225
* After pre-processing, you can send the processed video data back to the SDK by setting the `videoFrame` parameter in this callback.
226226
*
227227
* @note
228-
* This callback does not support sending processed RGBA video data back to the SDK.
228+
* - This callback does not support sending processed RGBA video data back to the SDK.
229+
* - The video data that this callback gets has not been pre-processed, without the watermark, the cropped content, the rotation, and the image enhancement.
229230
*
230231
* @param videoFrame Pointer to VideoFrame.
231232
* @return Whether or not to ignore the current video frame if the pre-processing fails:
@@ -352,12 +353,12 @@ class IVideoFrameObserver {
352353
353354
In the multi-channel scenario, if you want to get video data from multiple channels,
354355
set the return value of this callback as true. After that, the SDK triggers the
355-
onRenderVideoFrameEx callback to send you
356+
\ref IVideoFrameObserver::onRenderVideoFrameEx "onRenderVideoFrameEx" callback to send you
356357
the video data from various channels. You can also get the channel ID of each video frame.
357358
358359
@note
359360
- Once you set the return value of this callback as true, the SDK triggers only the `onRenderVideoFrameEx` callback to
360-
send the video frame. onRenderVideoFrame will not be triggered. In the multi-channel scenario, Agora recommends setting the return value as true.
361+
send the video frame. \ref IVideoFrameObserver::onRenderVideoFrame "onRenderVideoFrame" will not be triggered. In the multi-channel scenario, Agora recommends setting the return value as true.
361362
- If you set the return value of this callback as false, the SDK triggers only the `onRenderVideoFrame` callback to send the video data.
362363
@return
363364
- `true`: Receive video data from multiple channels.
@@ -368,7 +369,7 @@ class IVideoFrameObserver {
368369
/** Gets the video frame from multiple channels.
369370
370371
After you successfully register the video frame observer, if you set the return value of
371-
isMultipleChannelFrameWanted as true, the SDK triggers this callback each time it receives a video frame
372+
\ref IVideoFrameObserver::isMultipleChannelFrameWanted "isMultipleChannelFrameWanted" as true, the SDK triggers this callback each time it receives a video frame
372373
from any of the channel.
373374
374375
You can process the video data retrieved from this callback according to your scenario, and send the
@@ -456,7 +457,7 @@ class IVideoFrame {
456457
/** Retrieves the height of the frame.
457458
*/
458459
virtual int height() const = 0;
459-
/** Retrieves the timestamp (90 ms) of the frame.
460+
/** Retrieves the timestamp (ms) of the frame.
460461
*/
461462
virtual unsigned int timestamp() const = 0;
462463
/** Retrieves the render time (ms).
@@ -540,6 +541,8 @@ struct ExternalVideoFrame
540541
};
541542

542543
/** The video pixel format.
544+
*
545+
* @note The SDK does not support the alpha channel, and discards any alpha value passed to the SDK.
543546
*/
544547
enum VIDEO_PIXEL_FORMAT
545548
{
@@ -602,9 +605,17 @@ struct ExternalVideoFrame
602605
/** [Raw data related parameter] The clockwise rotation of the video frame. You can set the rotation angle as 0, 90, 180, or 270. The default value is 0.
603606
*/
604607
int rotation;
605-
/** Timestamp of the incoming video frame (ms). An incorrect timestamp results in frame loss or unsynchronized audio and video.
608+
/** Timestamp (ms) of the incoming video frame. An incorrect timestamp results in frame loss or unsynchronized audio and video.
606609
*/
607610
long long timestamp;
611+
612+
ExternalVideoFrame()
613+
:cropLeft(0)
614+
,cropTop(0)
615+
,cropRight(0)
616+
,cropBottom(0)
617+
,rotation(0)
618+
{}
608619
};
609620

610621
class IMediaEngine {
@@ -615,6 +626,8 @@ class IMediaEngine {
615626
616627
This method is used to register an audio frame observer object (register a callback). This method is required to register callbacks when the engine is required to provide an \ref IAudioFrameObserver::onRecordAudioFrame "onRecordAudioFrame" or \ref IAudioFrameObserver::onPlaybackAudioFrame "onPlaybackAudioFrame" callback.
617628
629+
@note Ensure that you call this method before joining a channel.
630+
618631
@param observer Audio frame observer object instance. See IAudioFrameObserver. Set the value as NULL to release the
619632
audio observer object. Agora recommends calling `registerAudioFrameObserver(NULL)` after receiving the \ref agora::rtc::IRtcEngineEventHandler::onLeaveChannel "onLeaveChannel" callback.
620633
@@ -624,19 +637,21 @@ class IMediaEngine {
624637
*/
625638
virtual int registerAudioFrameObserver(IAudioFrameObserver* observer) = 0;
626639
/** Registers a video frame observer object.
627-
628-
You need to implement the IVideoFrameObserver class in this method, and register callbacks according to your scenarios.
629-
630-
After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
631-
632-
@note When handling the video data returned in the callbacks, pay attention to the changes in the `width` and `height` parameters,
633-
which may be adapted under the following circumstances:
634-
- When the network condition deteriorates, the video resolution decreases incrementally.
635-
- If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes.
636-
@param observer Video frame observer object instance. If NULL is passed in, the registration is canceled.
637-
@return
638-
- 0: Success.
639-
- < 0: Failure.
640+
*
641+
* You need to implement the IVideoFrameObserver class in this method, and register callbacks according to your scenarios.
642+
*
643+
* After you successfully register the video frame observer, the SDK triggers the registered callbacks each time a video frame is received.
644+
*
645+
* @note
646+
* - When handling the video data returned in the callbacks, pay attention to the changes in the `width` and `height` parameters,
647+
* which may be adapted under the following circumstances:
648+
* - When the network condition deteriorates, the video resolution decreases incrementally.
649+
* - If the user adjusts the video profile, the resolution of the video returned in the callbacks also changes.
650+
* - Ensure that you call this method before joining a channel.
651+
* @param observer Video frame observer object instance. If NULL is passed in, the registration is canceled.
652+
* @return
653+
* - 0: Success.
654+
* - < 0: Failure.
640655
*/
641656
virtual int registerVideoFrameObserver(IVideoFrameObserver* observer) = 0;
642657
/** **DEPRECATED** */
@@ -688,9 +703,8 @@ class IMediaEngine {
688703
* "onPlaybackAudioFrame" callback and the
689704
* \ref agora::media::IMediaEngine::pullAudioFrame "pullAudioFrame" method is as
690705
* follows:
691-
* - `onPlaybackAudioFrame`: The SDK sends the audio data to the app once
692-
* every 10 ms. Any delay in processing the audio frames may result in audio
693-
* jitter.
706+
* - `onPlaybackAudioFrame`: The SDK sends the audio data to the app through this callback.
707+
* Any delay in processing the audio frames may result in audio jitter.
694708
* - `pullAudioFrame`: The app pulls the remote audio data. After setting the
695709
* audio data parameters, the SDK adjusts the frame buffer and avoids
696710
* problems caused by jitter in the external audio playback.
@@ -705,6 +719,8 @@ class IMediaEngine {
705719
virtual int pullAudioFrame(IAudioFrameObserver::AudioFrame* frame) = 0;
706720
/** Configures the external video source.
707721
722+
@note Ensure that you call this method before joining a channel.
723+
708724
@param enable Sets whether to use the external video source:
709725
- true: Use the external video source.
710726
- false: (Default) Do not use the external video source.

0 commit comments

Comments
 (0)