Skip to content

Commit

Permalink
feat: upgrade native sdk dependencies 20240409
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl authored Apr 9, 2024
1 parent af111e0 commit f6b0a78
Show file tree
Hide file tree
Showing 12 changed files with 158 additions and 46 deletions.
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ dependencies {
if (isDev(project)) {
api fileTree(dir: "libs", include: ["*.jar"])
} else {
api 'io.agora.rtc:iris-rtc:4.3.1-dev.9'
api 'io.agora.rtc:agora-full-preview:4.3.1-dev.9'
api 'io.agora.rtc:full-screen-sharing-special:4.3.1-dev.9'
api 'io.agora.rtc:iris-rtc:4.3.1-dev.12'
api 'io.agora.rtc:agora-full-preview:4.3.1-dev.12'
api 'io.agora.rtc:full-screen-sharing-special:4.3.1-dev.12'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1172,8 +1172,9 @@ enum VIDEO_CODEC_TYPE {
*/
VIDEO_CODEC_GENERIC_H264 = 7,
/**
* 12: AV1.
*/
* 12: AV1.
* @technical preview
*/
VIDEO_CODEC_AV1 = 12,
/**
* 13: VP9.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2887,6 +2887,7 @@ class IRtcEngineEventHandler {
* @param uid ID of the remote user.
* @param metadata The pointer of metadata
* @param length Size of metadata
* @technical preview
*/
virtual void onAudioMetadataReceived(uid_t uid, const char* metadata, size_t length) {
(void)uid;
Expand Down Expand Up @@ -8396,6 +8397,7 @@ class IRtcEngine : public agora::base::IEngineBase {
* @return
* - 0: success
* - <0: failure
* @technical preview
*/
virtual int sendAudioMetadata(const char* metadata, size_t length) = 0;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ class IRtcEngineEventHandlerEx : public IRtcEngineEventHandler {
* @param uid ID of the remote user.
* @param metadata The pointer of metadata
* @param length Size of metadata
* @technical preview
*/
virtual void onAudioMetadataReceived(const RtcConnection& connection, uid_t uid, const char* metadata, size_t length) {
(void)metadata;
Expand Down Expand Up @@ -1998,6 +1999,7 @@ class IRtcEngineEx : public IRtcEngine {
* @return
* - 0: success
* - <0: failure
* @technical preview
*/
virtual int sendAudioMetadataEx(const RtcConnection& connection, const char* metadata, size_t length) = 0;
};
Expand Down
29 changes: 0 additions & 29 deletions android/src/main/cpp/third_party/include/iris/iris_media_base_c.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,106 @@ struct IrisSpatialAudioZone {
float audioAttenuation;
};

EXTERN_C_ENTER
struct IrisAudioFrame {
//The audio frame type: #AUDIO_FRAME_TYPE.
int type;
//The number of samples per channel in this frame.
int samplesPerChannel;
//The number of bytes per sample: #BYTES_PER_SAMPLE
int bytesPerSample;
//The number of audio channels (data is interleaved, if stereo).
int channels;
//The sample rate
int samplesPerSec;
//The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved.
void *buffer;
// The timestamp to render the audio data.
int64_t renderTimeMs;
// A reserved parameter.
int avsync_type;
// The pts timestamp of this audio frame.
int64_t presentationMs;
// The number of the audio track.
int audioTrackNumber;
// RTP timestamp of the first sample in the audio frame
uint32_t rtpTimestamp;
};

struct IrisExternalVideoFrame {
//The buffer type: #VIDEO_BUFFER_TYPE.
int type;
// The pixel format: #VIDEO_PIXEL_FORMAT
int format;
// The video buffer.
void *buffer;
// The line spacing of the incoming video frame (px). For texture, it is the width of the texture.
int stride;
// The height of the incoming video frame.
int height;
// [Raw data related parameter] The number of pixels trimmed from the left. The default value is 0.
int cropLeft;
// [Raw data related parameter] The number of pixels trimmed from the top. The default value is 0.
int cropTop;
//[Raw data related parameter] The number of pixels trimmed from the right. The default value is
int cropRight;
// [Raw data related parameter] The number of pixels trimmed from the bottom. The default value
int cropBottom;
// [Raw data related parameter] The clockwise rotation information of the video frame. You can set the
// rotation angle as 0, 90, 180, or 270. The default value is 0.
int rotation;
// The timestamp (ms) of the incoming video frame. An incorrect timestamp results in a frame loss or
// unsynchronized audio and video.
long long timestamp;
// [Texture-related parameter]
// When using the OpenGL interface (javax.microedition.khronos.egl.*) defined by Khronos, set EGLContext to this field.
// When using the OpenGL interface (android.opengl.*) defined by Android, set EGLContext to this field.
void *eglContext;
// [Texture related parameter] Texture ID used by the video frame.
int eglType;
// [Texture related parameter] Incoming 4 &times; 4 transformational matrix. The typical value is a unit matrix.
int textureId;
// [Texture related parameter] Incoming 4 &times; 4 transformational matrix. The typical value is a unit matrix.
float matrix[16];
// [Texture related parameter] The MetaData buffer. The default value is NULL
uint8_t *metadata_buffer;
// [Texture related parameter] The MetaData size.The default value is 0
int metadata_size;
// Indicates the alpha channel of current frame, which is consistent with the dimension of the video frame.
uint8_t *alphaBuffer;
// Extract alphaBuffer from bgra or rgba data. Set it true if you do not explicitly specify the alphabuffer.
bool fillAlphaBuffer;
//[For Windows only] The pointer of ID3D11Texture2D used by the video frame.
void *d3d11_texture_2d;
// [For Windows only] The index of ID3D11Texture2D array used by the video frame.
int texture_slice_index;
};

struct IrisEncodedVideoFrameInfo {
// ID of the user that pushes the the external encoded video frame..
unsigned int uid;
// The codec type of the local video stream. See #VIDEO_CODEC_TYPE. The default value is `VIDEO_CODEC_H265 (3)`.
int codecType;
// The width (px) of the video frame.
int width;
// The height (px) of the video frame.
int height;
// The number of video frames per second.
int framesPerSecond;
// The video frame type: #VIDEO_FRAME_TYPE.
int frameType;
// The rotation information of the video frame: #VIDEO_ORIENTATION.
int rotation;
// The track ID of the video frame.
int trackId;
// This is a input parameter which means the timestamp for capturing the video.
int64_t captureTimeMs;
// The timestamp for decoding the video.
int64_t decodeTimeMs;
// The stream type of video frame.
int streamType;
// @technical preview
int64_t presentationMs;
};

IRIS_API int IRIS_CALL ILocalSpatialAudioEngine_SetMaxAudioRecvCount(
IrisApiEnginePtr enginePtr, int maxCount);
Expand Down Expand Up @@ -95,4 +194,18 @@ IRIS_API int IRIS_CALL ILocalSpatialAudioEngine_SetRemoteAudioAttenuation(
IrisApiEnginePtr enginePtr, unsigned int uid, double attenuation,
bool forceSet);

EXTERN_C_LEAVE
IRIS_API int IRIS_CALL IMediaEngine_PushAudioFrame(IrisApiEnginePtr enginePtr,
IrisAudioFrame *frame,
unsigned int trackId);

IRIS_API int IRIS_CALL IMediaEngine_PullAudioFrame(IrisApiEnginePtr enginePtr,
IrisAudioFrame *frame);

IRIS_API int IRIS_CALL IMediaEngine_PushVideoFrame(
IrisApiEnginePtr enginePtr, IrisExternalVideoFrame *frame,
unsigned int videoTrackId);

IRIS_API int IRIS_CALL IMediaEngine_PushEncodedVideoImage(
IrisApiEnginePtr enginePtr, const unsigned char *imageBuffer,
unsigned long long length, IrisEncodedVideoFrameInfo &videoEncodedFrameInfo,
unsigned int videoTrackId);
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ typedef struct IrisRtcVideoFrameConfig {

/// int value of agora::rtc::VIDEO_VIEW_SETUP_MODE.
int video_view_setup_mode;

/// int value of agora::media::base::VIDEO_MODULE_POSITION.
/// Default value is
/// `agora::media::base::VIDEO_MODULE_POSITION::POSITION_PRE_ENCODER | agora::media::base::VIDEO_MODULE_POSITION::POSITION_PRE_RENDERER`
uint32_t observed_frame_position;
} IrisRtcVideoFrameConfig;

/// Export an empty `IrisRtcVideoFrameConfig` with initialized value.
Expand Down
18 changes: 18 additions & 0 deletions internal/deps_summary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Iris:
https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Android_Video_20240408_0324_464.zip
https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_iOS_Video_20240408_0324_373.zip
https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Mac_Video_20240408_0324_371.zip
https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Windows_Video_20240408_0324_406.zip
implementation 'io.agora.rtc:iris-rtc:4.3.1-dev.12'
pod 'AgoraIrisRTC_iOS', '4.3.1-dev.12'
pod 'AgoraIrisRTC_macOS', '4.3.1-dev.12'

Native:
<NATIVE_CDN_URL_ANDROID>
<NATIVE_CDN_URL_IOS>
<NATIVE_CDN_URL_MACOS>
<NATIVE_CDN_URL_WINDOWS>
implementation 'io.agora.rtc:agora-full-preview:4.3.1-dev.12'
implementation 'io.agora.rtc:full-screen-sharing-special:4.3.1-dev.12'
pod 'AgoraRtcEngine_iOS_Preview', '4.3.1-dev.12'
pod 'AgoraRtcEngine_macOS_Preview', '4.3.1-dev.12'
4 changes: 2 additions & 2 deletions ios/agora_rtc_engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Pod::Spec.new do |s|
puts '[plugin_dev] Found .plugin_dev file, use vendored_frameworks instead.'
s.vendored_frameworks = 'libs/*.xcframework'
else
s.dependency 'AgoraIrisRTC_iOS', '4.3.1-dev.9'
s.dependency 'AgoraRtcEngine_iOS_Preview', '4.3.1-dev.9'
s.dependency 'AgoraIrisRTC_iOS', '4.3.1-dev.12'
s.dependency 'AgoraRtcEngine_iOS_Preview', '4.3.1-dev.12'
end

s.platform = :ios, '9.0'
Expand Down
4 changes: 2 additions & 2 deletions macos/agora_rtc_engine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ A new flutter plugin project.
puts '[plugin_dev] Found .plugin_dev file, use vendored_frameworks instead.'
s.vendored_frameworks = 'libs/*.xcframework', 'libs/*.framework'
else
s.dependency 'AgoraRtcEngine_macOS_Preview', '4.3.1-dev.9'
s.dependency 'AgoraIrisRTC_macOS', '4.3.1-dev.9'
s.dependency 'AgoraRtcEngine_macOS_Preview', '4.3.1-dev.12'
s.dependency 'AgoraIrisRTC_macOS', '4.3.1-dev.12'
end

s.platform = :osx, '10.11'
Expand Down
8 changes: 4 additions & 4 deletions scripts/artifacts_version.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set -e

export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.3.1-dev.9_DCG_Android_Video_20240326_0429_445.zip"
export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.3.1-dev.9_DCG_iOS_Video_20240326_0430_353.zip"
export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.3.1-dev.9_DCG_Mac_Video_20240326_0430_351.zip"
export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.3.1-dev.9_DCG_Windows_Video_20240326_0430_388.zip"
export IRIS_CDN_URL_ANDROID="https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Android_Video_20240408_0324_464.zip"
export IRIS_CDN_URL_IOS="https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_iOS_Video_20240408_0324_373.zip"
export IRIS_CDN_URL_MACOS="https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Mac_Video_20240408_0324_371.zip"
export IRIS_CDN_URL_WINDOWS="https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Windows_Video_20240408_0324_406.zip"
4 changes: 2 additions & 2 deletions windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ project(${PROJECT_NAME} LANGUAGES CXX)
# not be changed
set(PLUGIN_NAME "agora_rtc_engine_plugin")

set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.3.1-dev.9_DCG_Windows_Video_20240326_0430_388.zip")
set(IRIS_SDK_DOWNLOAD_NAME "iris_4.3.1-dev.9_DCG_Windows")
set(IRIS_SDK_DOWNLOAD_URL "https://download.agora.io/sdk/release/iris_4.3.1-dev.12_DCG_Windows_Video_20240408_0324_406.zip")
set(IRIS_SDK_DOWNLOAD_NAME "iris_4.3.1-dev.12_DCG_Windows")
set(RTC_SDK_DOWNLOAD_NAME "Agora_Native_SDK_for_Windows_FULL")
set(IRIS_SDK_VERSION "v3_6_2_fix.1")

Expand Down

0 comments on commit f6b0a78

Please sign in to comment.