Skip to content

Commit

Permalink
feat: upgrade native sdk dependencies 20240929 (#2039)
Browse files Browse the repository at this point in the history
Update native dependencies 20240929
native dependencies:
```

```

> This pull request is trigger by bot, DO NOT MODIFY BY HAND.

Co-authored-by: littleGnAl <[email protected]>
  • Loading branch information
littleGnAl and littleGnAl authored Sep 29, 2024
1 parent d5a4555 commit 281fd1c
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 40 deletions.
4 changes: 4 additions & 0 deletions lib/src/agora_base.dart
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,10 @@ extension OrientationModeExt on OrientationMode {
/// Video degradation preferences when the bandwidth is a constraint.
@JsonEnum(alwaysCreate: true)
enum DegradationPreference {
/// @nodoc
@JsonValue(-1)
maintainAuto,

/// 0: (Default) Prefers to reduce the video frame rate while maintaining video resolution during video encoding under limited bandwidth. This degradation preference is suitable for scenarios where video quality is prioritized.
@JsonValue(0)
maintainQuality,
Expand Down
1 change: 1 addition & 0 deletions lib/src/agora_base.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion lib/src/agora_rtc_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ enum AudioMixingReasonType {
@JsonValue(724)
audioMixingReasonStoppedByUser,

/// @nodoc
@JsonValue(726)
audioMixingReasonResumedByUser,

/// 0: The SDK opens music file successfully.
@JsonValue(0)
audioMixingReasonOk,
Expand Down Expand Up @@ -5475,7 +5479,7 @@ abstract class RtcEngine {
Future<List<FocalLengthInfo>> queryCameraFocalLengthCapability();

/// @nodoc
Future<int> setExternalMediaProjection();
Future<void> setExternalMediaProjection(int mediaProjection);

/// Sets the screen sharing scenario.
///
Expand Down
1 change: 1 addition & 0 deletions lib/src/agora_rtc_engine.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions lib/src/binding/agora_rtc_engine_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3983,10 +3983,10 @@ class RtcEngineImpl implements RtcEngine {
}

@override
Future<int> setExternalMediaProjection() async {
Future<void> setExternalMediaProjection(int mediaProjection) async {
final apiType =
'${isOverrideClassName ? className : 'RtcEngine'}_setExternalMediaProjection_f337cbf';
final param = createParams({});
final param = createParams({'mediaProjection': mediaProjection});
final callApiResult = await irisMethodChannel.invokeMethod(
IrisMethodCall(apiType, jsonEncode(param), buffers: null));
if (callApiResult.irisReturnCode < 0) {
Expand All @@ -3997,9 +3997,6 @@ class RtcEngineImpl implements RtcEngine {
if (result < 0) {
throw AgoraRtcException(code: result);
}
final setExternalMediaProjectionJson =
RtcEngineSetExternalMediaProjectionJson.fromJson(rm);
return setExternalMediaProjectionJson.mediaProjection;
}

@override
Expand Down
15 changes: 0 additions & 15 deletions lib/src/binding/call_api_impl_params_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -360,21 +360,6 @@ class RtcEngineQueryCameraFocalLengthCapabilityJson {
_$RtcEngineQueryCameraFocalLengthCapabilityJsonToJson(this);
}

@JsonSerializable(explicitToJson: true, includeIfNull: false)
class RtcEngineSetExternalMediaProjectionJson {
const RtcEngineSetExternalMediaProjectionJson(this.mediaProjection);

@JsonKey(name: 'mediaProjection', readValue: readIntPtr)
final int mediaProjection;

factory RtcEngineSetExternalMediaProjectionJson.fromJson(
Map<String, dynamic> json) =>
_$RtcEngineSetExternalMediaProjectionJsonFromJson(json);

Map<String, dynamic> toJson() =>
_$RtcEngineSetExternalMediaProjectionJsonToJson(this);
}

@JsonSerializable(explicitToJson: true, includeIfNull: false)
class RtcEngineGetCallIdJson {
const RtcEngineGetCallIdJson(this.callId);
Expand Down
13 changes: 0 additions & 13 deletions lib/src/binding/call_api_impl_params_json.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/src/binding/event_handler_param_json.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,7 @@ void rtcEngineSmokeTestCases() {
OrientationMode configOrientationMode =
OrientationMode.orientationModeAdaptive;
DegradationPreference configDegradationPreference =
DegradationPreference.maintainQuality;
DegradationPreference.maintainAuto;
VideoMirrorModeType configMirrorMode =
VideoMirrorModeType.videoMirrorModeAuto;
EncodingPreference advanceOptionsEncodingPreference =
Expand Down Expand Up @@ -7461,7 +7461,10 @@ void rtcEngineSmokeTestCases() {
await rtcEngine.setParameters('{"rtc.enable_debug_log": true}');

try {
await rtcEngine.setExternalMediaProjection();
int mediaProjection = 5;
await rtcEngine.setExternalMediaProjection(
mediaProjection,
);
} catch (e) {
if (e is! AgoraRtcException) {
debugPrint(
Expand Down Expand Up @@ -7885,7 +7888,7 @@ void rtcEngineSmokeTestCases() {
OrientationMode videoOutputConfigurationOrientationMode =
OrientationMode.orientationModeAdaptive;
DegradationPreference videoOutputConfigurationDegradationPreference =
DegradationPreference.maintainQuality;
DegradationPreference.maintainAuto;
VideoMirrorModeType videoOutputConfigurationMirrorMode =
VideoMirrorModeType.videoMirrorModeAuto;
EncodingPreference advanceOptionsEncodingPreference =
Expand Down Expand Up @@ -7967,7 +7970,7 @@ void rtcEngineSmokeTestCases() {
OrientationMode videoOutputConfigurationOrientationMode =
OrientationMode.orientationModeAdaptive;
DegradationPreference videoOutputConfigurationDegradationPreference =
DegradationPreference.maintainQuality;
DegradationPreference.maintainAuto;
VideoMirrorModeType videoOutputConfigurationMirrorMode =
VideoMirrorModeType.videoMirrorModeAuto;
EncodingPreference advanceOptionsEncodingPreference =
Expand Down Expand Up @@ -9897,7 +9900,7 @@ void rtcEngineSmokeTestCases() {
OrientationMode configOrientationMode =
OrientationMode.orientationModeAdaptive;
DegradationPreference configDegradationPreference =
DegradationPreference.maintainQuality;
DegradationPreference.maintainAuto;
VideoMirrorModeType configMirrorMode =
VideoMirrorModeType.videoMirrorModeAuto;
EncodingPreference advanceOptionsEncodingPreference =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void rtcEngineExSmokeTestCases() {
OrientationMode configOrientationMode =
OrientationMode.orientationModeAdaptive;
DegradationPreference configDegradationPreference =
DegradationPreference.maintainQuality;
DegradationPreference.maintainAuto;
VideoMirrorModeType configMirrorMode =
VideoMirrorModeType.videoMirrorModeAuto;
EncodingPreference advanceOptionsEncodingPreference =
Expand Down

0 comments on commit 281fd1c

Please sign in to comment.