Skip to content

Commit

Permalink
Auto generate codes for native sdk (#1706)
Browse files Browse the repository at this point in the history
Auto generate codes for native sdk version 

*This pull request is opened by bot*

Co-authored-by: littleGnAl <[email protected]>
  • Loading branch information
github-actions[bot] and littleGnAl committed Apr 21, 2024
1 parent 44c490e commit 2c9394f
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

/// ProcessVideoRawData Example
///
///
/// This example demonstrates how to create a `RtcEngine` (Android)/`AgoraRtcEngineKit` (iOS)
/// and share the native handle with the Flutter side. By doing so, the `agora_rtc_engine`
/// and share the native handle with the Flutter side. By doing so, the `agora_rtc_engine`
/// acts as a proxy, allowing you to invoke the functions of the `RtcEngine` (Android)/`AgoraRtcEngineKit` (iOS).
///
///
/// The key point of how to use it:
/// * Initializes the `RtcEngine` (Android)/`AgoraRtcEngineKit` (iOS) on the native side.
/// * Retrieves the native handle through the `RtcEngine.getNativeHandle`(Android)/`AgoraRtcEngineKit.getNativeHandle`(iOS)
/// * Retrieves the native handle through the `RtcEngine.getNativeHandle`(Android)/`AgoraRtcEngineKit.getNativeHandle`(iOS)
/// function on the native side, and passes it to the Flutter side through the Flutter `MethodChannel`.
/// * Passes the native handle to the `createAgoraRtcEngine`(Flutter) on the Flutter side,
/// * Passes the native handle to the `createAgoraRtcEngine`(Flutter) on the Flutter side,
/// then the `RtcEngine`(Flutter) can call the functions through the shared native handle.
///
///
/// This example creates a `RtcEngine` (Android)/`AgoraRtcEngineKit` (iOS) on the native side
/// and registers the video frame observer to modify the video raw data. It makes the local
/// and registers the video frame observer to modify the video raw data. It makes the local
/// preview appear in gray for demonstration purposes.
///
///
/// The native side implementation can be found at:
/// - Android: `example/android/app/src/main/kotlin/io/agora/agora_rtc_flutter_example/VideoRawDataController.kt`
/// - iOS: `example/ios/Runner/VideoRawDataController.m`
Expand Down Expand Up @@ -75,7 +75,7 @@ class _State extends State<ProcessVideoRawData> {
}

Future<void> _initEngine() async {
// Initializes the `RtcEngine`(Android)/`AgoraRtcEngineKit`(iOS) on native side,
// Initializes the `RtcEngine`(Android)/`AgoraRtcEngineKit`(iOS) on native side,
// and retrieves the native handle of `RtcEngine`(Android)/`AgoraRtcEngineKit`(iOS).
//
// See native side implementation:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/agora_log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class LogConfig {
/// @nodoc
const LogConfig({this.filePath, this.fileSizeInKB, this.level});

/// The complete path of the log files. Ensure that the path for the log file exists and is writable. You can use this parameter to rename the log files.
/// The complete path of the log files. Agora recommends using the default log directory. If you need to modify the default directory, ensure that the directory you specify exists and is writable.
@JsonKey(name: 'filePath')
final String? filePath;

Expand Down
13 changes: 5 additions & 8 deletions lib/src/agora_media_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ enum AudioRoute {
@JsonValue(5)
routeBluetoothDeviceHfp,

/// 7: The audio route is a USB peripheral device. (For macOS only)
/// 6: The audio route is a USB peripheral device. (For macOS only)
@JsonValue(6)
routeUsb,

/// 6: The audio route is an HDMI peripheral device. (For macOS only)
/// 7: The audio route is an HDMI peripheral device. (For macOS only)
@JsonValue(7)
routeHdmi,

Expand Down Expand Up @@ -916,15 +916,15 @@ class VideoFrame {
@JsonKey(name: 'height')
final int? height;

/// For YUV data, the line span of the Y buffer; for RGBA data, the total data length.
/// For YUV data, the line span of the Y buffer; for RGBA data, the total data length. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
@JsonKey(name: 'yStride')
final int? yStride;

/// For YUV data, the line span of the U buffer; for RGBA data, the value is 0.
/// For YUV data, the line span of the U buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
@JsonKey(name: 'uStride')
final int? uStride;

/// For YUV data, the line span of the V buffer; for RGBA data, the value is 0.
/// For YUV data, the line span of the V buffer; for RGBA data, the value is 0. When dealing with video data, it is necessary to process the offset between each line of pixel data based on this parameter, otherwise it may result in image distortion.
@JsonKey(name: 'vStride')
final int? vStride;

Expand Down Expand Up @@ -1413,9 +1413,6 @@ class VideoEncodedFrameObserver {
/// * [imageBuffer] The encoded video image buffer.
/// * [length] The data length of the video image.
/// * [videoEncodedFrameInfo] For the information of the encoded video frame, see EncodedVideoFrameInfo.
///
/// Returns
/// Without practical meaning.
final void Function(int uid, Uint8List imageBuffer, int length,
EncodedVideoFrameInfo videoEncodedFrameInfo)? onEncodedVideoFrameReceived;
}
Expand Down
Loading

0 comments on commit 2c9394f

Please sign in to comment.