diff --git a/android/build.gradle b/android/build.gradle index 643bf9fb8..223ecc2f1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -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' } } diff --git a/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h b/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h index 6f4e23880..486b2a913 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/AgoraBase.h @@ -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. diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h index 18fb7b16e..e075cc363 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngine.h @@ -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; @@ -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; }; diff --git a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h index c4d2d1a2c..8d21e8f97 100644 --- a/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h +++ b/android/src/main/cpp/third_party/include/agora_rtc/IAgoraRtcEngineEx.h @@ -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; @@ -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; }; diff --git a/android/src/main/cpp/third_party/include/iris/iris_media_base_c.h b/android/src/main/cpp/third_party/include/iris/iris_media_base_c.h deleted file mode 100644 index 202c84fbb..000000000 --- a/android/src/main/cpp/third_party/include/iris/iris_media_base_c.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Created by LXH on 2021/7/20. -// - -#ifndef IRIS_MEDIA_BASE_C_H_ -#define IRIS_MEDIA_BASE_C_H_ - -#include "iris_base.h" -#include - -EXTERN_C_ENTER -typedef struct IrisMetadata { - unsigned int uid; - - unsigned int size; - - unsigned char *buffer; - - long long timeStampMs; -} IrisMetadata; - -typedef struct IrisPacket { - const unsigned char *buffer; - unsigned int size; -} IrisPacket; - -EXTERN_C_LEAVE - -#endif//IRIS_MEDIA_BASE_C_H_ diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h index ba8d08dee..6d0621fe6 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h +++ b/android/src/main/cpp/third_party/include/iris/iris_rtc_high_performance_c_api.h @@ -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 × 4 transformational matrix. The typical value is a unit matrix. + int textureId; + // [Texture related parameter] Incoming 4 × 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); @@ -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); \ No newline at end of file diff --git a/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h b/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h index d2e74cc8e..cf2997eb6 100644 --- a/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h +++ b/android/src/main/cpp/third_party/include/iris/iris_rtc_rendering_c.h @@ -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. diff --git a/internal/deps_summary.txt b/internal/deps_summary.txt new file mode 100644 index 000000000..8bdf79b6b --- /dev/null +++ b/internal/deps_summary.txt @@ -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: + + + + +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' \ No newline at end of file diff --git a/ios/agora_rtc_engine.podspec b/ios/agora_rtc_engine.podspec index b55bc5738..bbe3a7589 100644 --- a/ios/agora_rtc_engine.podspec +++ b/ios/agora_rtc_engine.podspec @@ -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' diff --git a/macos/agora_rtc_engine.podspec b/macos/agora_rtc_engine.podspec index 80af47c21..8284fbe5e 100644 --- a/macos/agora_rtc_engine.podspec +++ b/macos/agora_rtc_engine.podspec @@ -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' diff --git a/scripts/artifacts_version.sh b/scripts/artifacts_version.sh index 34a17cb36..3daf17d59 100644 --- a/scripts/artifacts_version.sh +++ b/scripts/artifacts_version.sh @@ -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" diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 70c2fa82c..f2a0e24d6 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -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")