-
Notifications
You must be signed in to change notification settings - Fork 443
Expand file tree
/
Copy pathagora_base.dart
More file actions
8111 lines (6512 loc) · 254 KB
/
Copy pathagora_base.dart
File metadata and controls
8111 lines (6512 loc) · 254 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import '/src/_serializable.dart';
import '/src/binding_forward_export.dart';
part 'agora_base.g.dart';
/// Channel profile.
@JsonEnum(alwaysCreate: true)
enum ChannelProfileType {
/// 0: Communication profile. Agora recommends using the live broadcasting profile for a better audio and video experience.
@JsonValue(0)
channelProfileCommunication,
/// 1: (Default) Live broadcasting profile.
@JsonValue(1)
channelProfileLiveBroadcasting,
/// 2: Gaming profile. Deprecated: Use channelProfileLiveBroadcasting instead.
@JsonValue(2)
channelProfileGame,
/// 3: Interactive profile. This profile is optimized for low latency. If your scenario involves frequent interactions among users, this profile is recommended. Deprecated: Use channelProfileLiveBroadcasting instead.
@JsonValue(3)
channelProfileCloudGaming,
/// @nodoc
@JsonValue(4)
channelProfileCommunication1v1,
}
/// @nodoc
extension ChannelProfileTypeExt on ChannelProfileType {
/// @nodoc
static ChannelProfileType fromValue(int value) {
return $enumDecode(_$ChannelProfileTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$ChannelProfileTypeEnumMap[this]!;
}
}
/// @nodoc
@JsonEnum(alwaysCreate: true)
enum WarnCodeType {
/// @nodoc
@JsonValue(8)
warnInvalidView,
/// @nodoc
@JsonValue(16)
warnInitVideo,
/// @nodoc
@JsonValue(20)
warnPending,
/// @nodoc
@JsonValue(103)
warnNoAvailableChannel,
/// @nodoc
@JsonValue(104)
warnLookupChannelTimeout,
/// @nodoc
@JsonValue(105)
warnLookupChannelRejected,
/// @nodoc
@JsonValue(106)
warnOpenChannelTimeout,
/// @nodoc
@JsonValue(107)
warnOpenChannelRejected,
/// @nodoc
@JsonValue(111)
warnSwitchLiveVideoTimeout,
/// @nodoc
@JsonValue(118)
warnSetClientRoleTimeout,
/// @nodoc
@JsonValue(121)
warnOpenChannelInvalidTicket,
/// @nodoc
@JsonValue(122)
warnOpenChannelTryNextVos,
/// @nodoc
@JsonValue(131)
warnChannelConnectionUnrecoverable,
/// @nodoc
@JsonValue(132)
warnChannelConnectionIpChanged,
/// @nodoc
@JsonValue(133)
warnChannelConnectionPortChanged,
/// @nodoc
@JsonValue(134)
warnChannelSocketError,
/// @nodoc
@JsonValue(701)
warnAudioMixingOpenError,
/// @nodoc
@JsonValue(1014)
warnAdmRuntimePlayoutWarning,
/// @nodoc
@JsonValue(1016)
warnAdmRuntimeRecordingWarning,
/// @nodoc
@JsonValue(1019)
warnAdmRecordAudioSilence,
/// @nodoc
@JsonValue(1020)
warnAdmPlayoutMalfunction,
/// @nodoc
@JsonValue(1021)
warnAdmRecordMalfunction,
/// @nodoc
@JsonValue(1031)
warnAdmRecordAudioLowlevel,
/// @nodoc
@JsonValue(1032)
warnAdmPlayoutAudioLowlevel,
/// @nodoc
@JsonValue(1040)
warnAdmWindowsNoDataReadyEvent,
/// @nodoc
@JsonValue(1051)
warnApmHowling,
/// @nodoc
@JsonValue(1052)
warnAdmGlitchState,
/// @nodoc
@JsonValue(1053)
warnAdmImproperSettings,
/// @nodoc
@JsonValue(1055)
warnAdmPopState,
/// @nodoc
@JsonValue(1322)
warnAdmWinCoreNoRecordingDevice,
/// @nodoc
@JsonValue(1323)
warnAdmWinCoreNoPlayoutDevice,
/// @nodoc
@JsonValue(1324)
warnAdmWinCoreImproperCaptureRelease,
}
/// @nodoc
extension WarnCodeTypeExt on WarnCodeType {
/// @nodoc
static WarnCodeType fromValue(int value) {
return $enumDecode(_$WarnCodeTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$WarnCodeTypeEnumMap[this]!;
}
}
/// Error codes.
///
/// Error codes indicate that the SDK has encountered an unrecoverable error requiring application intervention. For example, an error is returned when the camera fails to open, and the app needs to notify the user that the camera cannot be used.
@JsonEnum(alwaysCreate: true)
enum ErrorCodeType {
/// 0: No error.
@JsonValue(0)
errOk,
/// 1: General error (uncategorized error cause). Please try calling the method again.
@JsonValue(1)
errFailed,
/// 2: Invalid parameter set in the method. For example, the specified channel name contains illegal characters. Please reset the parameters.
@JsonValue(2)
errInvalidArgument,
/// 3: SDK is not ready. Possible reasons include: RtcEngine initialization failed. Please reinitialize RtcEngine.
/// User has not joined the channel when calling the method. Please check the method call logic.
/// User has not left the channel when calling rate or complain. Please check the method call logic.
/// Audio module is not enabled.
/// Incomplete assembly.
@JsonValue(3)
errNotReady,
/// 4: The current state of RtcEngine does not support this operation. Possible reasons include:
/// When using built-in encryption, the encryption mode is incorrect or loading the external encryption library failed. Please check whether the encryption enum value is correct or reload the external encryption library.
@JsonValue(4)
errNotSupported,
/// 5: This method call was rejected. Possible reasons include: RtcEngine initialization failed. Please reinitialize RtcEngine.
/// An empty string "" was set as the channel name when joining the channel. Please reset the channel name.
/// In multi-channel scenarios, the specified channel name already exists when calling joinChannelEx to join a channel. Please reset the channel name.
@JsonValue(5)
errRefused,
/// 6: Buffer size is insufficient to hold the returned data.
@JsonValue(6)
errBufferTooSmall,
/// 7: Method is called before RtcEngine is initialized. Please ensure that the RtcEngine object is created and initialized before calling this method.
@JsonValue(7)
errNotInitialized,
/// 8: Invalid current state.
@JsonValue(8)
errInvalidState,
/// 9: No permission to operate. Please check whether the user has granted the app permission to use audio and video devices.
@JsonValue(9)
errNoPermission,
/// 10: Method call timed out. Some method calls require a result from the SDK. If the SDK takes too long to process the event and does not return within 10 seconds, this error occurs.
@JsonValue(10)
errTimedout,
/// @nodoc
@JsonValue(11)
errCanceled,
/// @nodoc
@JsonValue(12)
errTooOften,
/// @nodoc
@JsonValue(13)
errBindSocket,
/// @nodoc
@JsonValue(14)
errNetDown,
/// 17: Joining the channel was rejected. Possible reasons include:
/// The user is already in the channel. It is recommended to determine whether the user is in the channel via the onConnectionStateChanged callback. Do not call this method again to join the channel unless receiving the connectionStateDisconnected (1) state.
/// After calling startEchoTest for a call test, the user attempts to join the channel without calling stopEchoTest to end the current test. After starting the call test, you must call stopEchoTest to end the test before joining the channel.
@JsonValue(17)
errJoinChannelRejected,
/// 18: Failed to leave the channel. Possible reasons include:
/// The user has already left the channel before calling leaveChannel. Stop calling this method.
/// The user calls leaveChannel to exit the channel without having joined it. No further action is needed in this case.
@JsonValue(18)
errLeaveChannelRejected,
/// 19: The resource is already in use and cannot be reused.
@JsonValue(19)
errAlreadyInUse,
/// 20: SDK aborted the request, possibly due to too many requests.
@JsonValue(20)
errAborted,
/// 21: Specific firewall settings on Windows caused RtcEngine initialization to fail and crash.
@JsonValue(21)
errInitNetEngine,
/// 22: SDK failed to allocate resources, possibly because the app is using too many resources or system resources are exhausted.
@JsonValue(22)
errResourceLimited,
/// @nodoc
@JsonValue(23)
errFuncIsProhibited,
/// 101: Invalid App ID. Please use a valid App ID to rejoin the channel.
@JsonValue(101)
errInvalidAppId,
/// 102: Invalid channel name. Possible reason is incorrect data type set for the parameter. Please use a valid channel name to rejoin the channel.
@JsonValue(102)
errInvalidChannelName,
/// 103: Unable to obtain server resources in the current region. Try specifying a different region when initializing RtcEngine.
@JsonValue(103)
errNoServerResources,
/// 109: The current Token has expired and is no longer valid. Please request a new Token from the server and call renewToken to update it. Deprecated: This enum is deprecated. Use connectionChangedTokenExpired (9) in the onConnectionStateChanged callback instead.
@JsonValue(109)
errTokenExpired,
/// Deprecated: This enum is deprecated. Use connectionChangedInvalidToken (8) in the onConnectionStateChanged callback instead. 110: Invalid Token. Common reasons include:
/// App certificate is enabled in the console, but App ID + Token authentication is not used. When the project enables the App certificate, Token authentication must be used.
/// The uid field used when generating the Token does not match the uid used when the user joins the channel.
@JsonValue(110)
errInvalidToken,
/// 111: Network connection interrupted. SDK lost network connection for more than 4 seconds after establishing a connection with the server.
@JsonValue(111)
errConnectionInterrupted,
/// 112: Network connection lost. The network was interrupted and the SDK could not reconnect to the server within 10 seconds.
@JsonValue(112)
errConnectionLost,
/// 113: User is not in the channel when calling the sendStreamMessage method.
@JsonValue(113)
errNotInChannel,
/// 114: The data length exceeds 1 KB when calling sendStreamMessage.
@JsonValue(114)
errSizeTooLarge,
/// 115: The data sending frequency exceeds the limit (6 KB/s) when calling sendStreamMessage.
@JsonValue(115)
errBitrateLimit,
/// 116: The number of data streams created exceeds the limit (5) when calling createDataStream.
@JsonValue(116)
errTooManyDataStreams,
/// 117: Data stream sending timed out.
@JsonValue(117)
errStreamMessageTimeout,
/// 119: Failed to switch user role. Please try rejoining the channel.
@JsonValue(119)
errSetClientRoleNotAuthorized,
/// 120: Media stream decryption failed. Possibly due to an incorrect key used when the user joined the channel. Please check the key entered when joining the channel or guide the user to try rejoining.
@JsonValue(120)
errDecryptionFailed,
/// 121: Invalid user ID.
@JsonValue(121)
errInvalidUserId,
/// 122: Data stream decryption failed. Possibly due to an incorrect key used when the user joined the channel. Please check the key entered when joining the channel or guide the user to try rejoining.
@JsonValue(122)
errDatastreamDecryptionFailed,
/// 123: The user is banned by the server.
@JsonValue(123)
errClientIsBannedByServer,
/// 130: The SDK does not support pushing encrypted streams to CDN.
@JsonValue(130)
errEncryptedStreamNotAllowedPublish,
/// @nodoc
@JsonValue(131)
errLicenseCredentialInvalid,
/// 134: Invalid user account, possibly due to invalid parameters.
@JsonValue(134)
errInvalidUserAccount,
/// @nodoc
@JsonValue(157)
errModuleNotFound,
/// @nodoc
@JsonValue(157)
errCertRaw,
/// @nodoc
@JsonValue(158)
errCertJsonPart,
/// @nodoc
@JsonValue(159)
errCertJsonInval,
/// @nodoc
@JsonValue(160)
errCertJsonNomem,
/// @nodoc
@JsonValue(161)
errCertCustom,
/// @nodoc
@JsonValue(162)
errCertCredential,
/// @nodoc
@JsonValue(163)
errCertSign,
/// @nodoc
@JsonValue(164)
errCertFail,
/// @nodoc
@JsonValue(165)
errCertBuf,
/// @nodoc
@JsonValue(166)
errCertNull,
/// @nodoc
@JsonValue(167)
errCertDuedate,
/// @nodoc
@JsonValue(168)
errCertRequest,
/// 200: Unsupported PCM format.
@JsonValue(200)
errPcmsendFormat,
/// 201: Buffer overflow, PCM sending rate is too fast.
@JsonValue(201)
errPcmsendBufferoverflow,
/// @nodoc
@JsonValue(250)
errRdtUserNotExist,
/// @nodoc
@JsonValue(251)
errRdtUserNotReady,
/// @nodoc
@JsonValue(252)
errRdtDataBlocked,
/// @nodoc
@JsonValue(253)
errRdtCmdExceedLimit,
/// @nodoc
@JsonValue(254)
errRdtDataExceedLimit,
/// @nodoc
@JsonValue(255)
errRdtEncryption,
/// @nodoc
@JsonValue(428)
errLoginAlreadyLogin,
/// 1001: Failed to load media engine.
@JsonValue(1001)
errLoadMediaEngine,
/// 1005: Audio device error (unspecified). Please check whether the audio device is occupied by another application, or try rejoining the channel.
@JsonValue(1005)
errAdmGeneralError,
/// 1008: Error initializing playback device. Please check whether the playback device is occupied by another application, or try rejoining the channel.
@JsonValue(1008)
errAdmInitPlayout,
/// 1009: Error starting playback device. Please check whether the playback device is functioning properly.
@JsonValue(1009)
errAdmStartPlayout,
/// 1010: Error stopping playback device.
@JsonValue(1010)
errAdmStopPlayout,
/// 1011: Error initializing recording device. Please check whether the recording device is functioning properly, or try rejoining the channel.
@JsonValue(1011)
errAdmInitRecording,
/// 1012: Error starting recording device. Please check whether the recording device is functioning properly.
@JsonValue(1012)
errAdmStartRecording,
/// 1013: Error stopping recording device.
@JsonValue(1013)
errAdmStopRecording,
/// 1501: No permission to use the camera. Please check whether camera permission is enabled.
@JsonValue(1501)
errVdmCameraNotAuthorized,
}
/// @nodoc
extension ErrorCodeTypeExt on ErrorCodeType {
/// @nodoc
static ErrorCodeType fromValue(int value) {
return $enumDecode(_$ErrorCodeTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$ErrorCodeTypeEnumMap[this]!;
}
}
/// @nodoc
@JsonEnum(alwaysCreate: true)
enum LicenseErrorType {
/// @nodoc
@JsonValue(1)
licenseErrInvalid,
/// @nodoc
@JsonValue(2)
licenseErrExpire,
/// @nodoc
@JsonValue(3)
licenseErrMinutesExceed,
/// @nodoc
@JsonValue(4)
licenseErrLimitedPeriod,
/// @nodoc
@JsonValue(5)
licenseErrDiffDevices,
/// @nodoc
@JsonValue(99)
licenseErrInternal,
}
/// @nodoc
extension LicenseErrorTypeExt on LicenseErrorType {
/// @nodoc
static LicenseErrorType fromValue(int value) {
return $enumDecode(_$LicenseErrorTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$LicenseErrorTypeEnumMap[this]!;
}
}
/// SDK's operation permissions for Audio Session.
@JsonEnum(alwaysCreate: true)
enum AudioSessionOperationRestriction {
/// 0: No restriction. SDK can modify the Audio Session.
@JsonValue(0)
audioSessionOperationRestrictionNone,
/// 1: SDK cannot change the Audio Session category.
@JsonValue(1)
audioSessionOperationRestrictionSetCategory,
/// 2: SDK cannot change the Audio Session category, mode, or categoryOptions.
@JsonValue(1 << 1)
audioSessionOperationRestrictionConfigureSession,
/// 4: When leaving the channel, the SDK keeps the Audio Session active, for example, to continue audio playback in the background.
@JsonValue(1 << 2)
audioSessionOperationRestrictionDeactivateSession,
/// 128: Fully restricts the SDK's operation permissions for Audio Session. SDK cannot make any changes to the Audio Session.
@JsonValue(1 << 7)
audioSessionOperationRestrictionAll,
}
extension AudioSessionOperationRestrictionExt
on AudioSessionOperationRestriction {
/// @nodoc
static AudioSessionOperationRestriction fromValue(int value) {
return $enumDecode(_$AudioSessionOperationRestrictionEnumMap, value);
}
/// @nodoc
int value() {
return _$AudioSessionOperationRestrictionEnumMap[this]!;
}
}
/// Reason for user going offline.
@JsonEnum(alwaysCreate: true)
enum UserOfflineReasonType {
/// 0: User left voluntarily.
@JsonValue(0)
userOfflineQuit,
/// 1: Timed out due to not receiving packets from the peer for a long time. Since the SDK uses an unreliable channel, it is also possible that the peer left the channel voluntarily, but the local side did not receive the leave message and mistakenly judged it as a timeout.
@JsonValue(1)
userOfflineDropped,
/// 2: User switched role from host to audience.
@JsonValue(2)
userOfflineBecomeAudience,
}
/// @nodoc
extension UserOfflineReasonTypeExt on UserOfflineReasonType {
/// @nodoc
static UserOfflineReasonType fromValue(int value) {
return $enumDecode(_$UserOfflineReasonTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$UserOfflineReasonTypeEnumMap[this]!;
}
}
/// Interface class.
@JsonEnum(alwaysCreate: true)
enum InterfaceIdType {
/// 1: AudioDeviceManager interface class.
@JsonValue(1)
agoraIidAudioDeviceManager,
/// 2: VideoDeviceManager interface class.
@JsonValue(2)
agoraIidVideoDeviceManager,
/// 3: This interface class is deprecated.
@JsonValue(3)
agoraIidParameterEngine,
/// 4: MediaEngine interface class.
@JsonValue(4)
agoraIidMediaEngine,
/// @nodoc
@JsonValue(5)
agoraIidAudioEngine,
/// @nodoc
@JsonValue(6)
agoraIidVideoEngine,
/// @nodoc
@JsonValue(7)
agoraIidRtcConnection,
/// 8: This interface class is deprecated.
@JsonValue(8)
agoraIidSignalingEngine,
/// @nodoc
@JsonValue(9)
agoraIidMediaEngineRegulator,
/// 11: LocalSpatialAudioEngine interface class.
@JsonValue(11)
agoraIidLocalSpatialAudio,
/// @nodoc
@JsonValue(13)
agoraIidStateSync,
/// @nodoc
@JsonValue(14)
agoraIidMetaService,
/// 15: MusicContentCenter interface class.
@JsonValue(15)
agoraIidMusicContentCenter,
/// @nodoc
@JsonValue(16)
agoraIidH265Transcoder,
}
/// @nodoc
extension InterfaceIdTypeExt on InterfaceIdType {
/// @nodoc
static InterfaceIdType fromValue(int value) {
return $enumDecode(_$InterfaceIdTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$InterfaceIdTypeEnumMap[this]!;
}
}
/// Network quality.
@JsonEnum(alwaysCreate: true)
enum QualityType {
/// 0: Network quality is unknown.
@JsonValue(0)
qualityUnknown,
/// 1: Excellent network quality.
@JsonValue(1)
qualityExcellent,
/// 2: Subjectively similar to excellent, but bitrate may be slightly lower.
@JsonValue(2)
qualityGood,
/// 3: Slightly impaired user experience but still allows communication.
@JsonValue(3)
qualityPoor,
/// 4: Barely communicable but not smooth.
@JsonValue(4)
qualityBad,
/// 5: Very poor network quality, communication is almost impossible.
@JsonValue(5)
qualityVbad,
/// 6: Communication is completely impossible.
@JsonValue(6)
qualityDown,
/// @nodoc
@JsonValue(7)
qualityUnsupported,
/// 8: Network quality detection in progress.
@JsonValue(8)
qualityDetecting,
}
/// @nodoc
extension QualityTypeExt on QualityType {
/// @nodoc
static QualityType fromValue(int value) {
return $enumDecode(_$QualityTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$QualityTypeEnumMap[this]!;
}
}
/// @nodoc
@JsonEnum(alwaysCreate: true)
enum FitModeType {
/// @nodoc
@JsonValue(1)
modeCover,
/// @nodoc
@JsonValue(2)
modeContain,
}
/// @nodoc
extension FitModeTypeExt on FitModeType {
/// @nodoc
static FitModeType fromValue(int value) {
return $enumDecode(_$FitModeTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$FitModeTypeEnumMap[this]!;
}
}
/// Video clockwise rotation information.
@JsonEnum(alwaysCreate: true)
enum VideoOrientation {
/// 0: (Default) Rotates 0 degrees clockwise.
@JsonValue(0)
videoOrientation0,
/// 90: Rotates 90 degrees clockwise.
@JsonValue(90)
videoOrientation90,
/// 180: Rotates 180 degrees clockwise.
@JsonValue(180)
videoOrientation180,
/// 270: Rotates 270 degrees clockwise.
@JsonValue(270)
videoOrientation270,
}
/// @nodoc
extension VideoOrientationExt on VideoOrientation {
/// @nodoc
static VideoOrientation fromValue(int value) {
return $enumDecode(_$VideoOrientationEnumMap, value);
}
/// @nodoc
int value() {
return _$VideoOrientationEnumMap[this]!;
}
}
/// Video frame rate.
@JsonEnum(alwaysCreate: true)
enum FrameRate {
/// 1: 1 fps.
@JsonValue(1)
frameRateFps1,
/// 7: 7 fps.
@JsonValue(7)
frameRateFps7,
/// 10: 10 fps.
@JsonValue(10)
frameRateFps10,
/// 15: 15 fps.
@JsonValue(15)
frameRateFps15,
/// 24: 24 fps.
@JsonValue(24)
frameRateFps24,
/// 30: 30 fps.
@JsonValue(30)
frameRateFps30,
/// 60: 60 fps. (Windows and macOS only)
@JsonValue(60)
frameRateFps60,
}
/// @nodoc
extension FrameRateExt on FrameRate {
/// @nodoc
static FrameRate fromValue(int value) {
return $enumDecode(_$FrameRateEnumMap, value);
}
/// @nodoc
int value() {
return _$FrameRateEnumMap[this]!;
}
}
/// @nodoc
@JsonEnum(alwaysCreate: true)
enum FrameWidth {
/// @nodoc
@JsonValue(960)
frameWidth960,
}
/// @nodoc
extension FrameWidthExt on FrameWidth {
/// @nodoc
static FrameWidth fromValue(int value) {
return $enumDecode(_$FrameWidthEnumMap, value);
}
/// @nodoc
int value() {
return _$FrameWidthEnumMap[this]!;
}
}
/// @nodoc
@JsonEnum(alwaysCreate: true)
enum FrameHeight {
/// @nodoc
@JsonValue(540)
frameHeight540,
}
/// @nodoc
extension FrameHeightExt on FrameHeight {
/// @nodoc
static FrameHeight fromValue(int value) {
return $enumDecode(_$FrameHeightEnumMap, value);
}
/// @nodoc
int value() {
return _$FrameHeightEnumMap[this]!;
}
}
/// Video frame type.
@JsonEnum(alwaysCreate: true)
enum VideoFrameType {
/// 0: Black frame.
@JsonValue(0)
videoFrameTypeBlankFrame,
/// 3: Key frame.
@JsonValue(3)
videoFrameTypeKeyFrame,
/// 4: Delta frame.
@JsonValue(4)
videoFrameTypeDeltaFrame,
/// 5: B frame.
@JsonValue(5)
videoFrameTypeBFrame,
/// 6: Droppable frame.
@JsonValue(6)
videoFrameTypeDroppableFrame,
/// Unknown frame.
@JsonValue(7)
videoFrameTypeUnknow,
}
/// @nodoc
extension VideoFrameTypeExt on VideoFrameType {
/// @nodoc
static VideoFrameType fromValue(int value) {
return $enumDecode(_$VideoFrameTypeEnumMap, value);
}
/// @nodoc
int value() {
return _$VideoFrameTypeEnumMap[this]!;
}
}
/// Orientation mode for video encoding.
@JsonEnum(alwaysCreate: true)
enum OrientationMode {
/// 0: (Default) In this mode, the SDK outputs video with the same orientation as the captured video. The receiving end rotates the video based on the received rotation info. This mode is suitable when the receiver can adjust video orientation.
/// If the captured video is landscape, the output video is also landscape.
/// If the captured video is portrait, the output video is also portrait.
@JsonValue(0)
orientationModeAdaptive,
/// 1: In this mode, the SDK outputs video in fixed landscape mode. If the captured video is portrait, the encoder crops it. This mode is suitable when the receiver cannot adjust video orientation, such as in CDN streaming scenarios.
@JsonValue(1)
orientationModeFixedLandscape,
/// 2: In this mode, the SDK outputs video in fixed portrait mode. If the captured video is landscape, the encoder crops it. This mode is suitable when the receiver cannot adjust video orientation, such as in CDN streaming scenarios.
@JsonValue(2)
orientationModeFixedPortrait,
}
/// @nodoc
extension OrientationModeExt on OrientationMode {
/// @nodoc
static OrientationMode fromValue(int value) {
return $enumDecode(_$OrientationModeEnumMap, value);
}
/// @nodoc
int value() {
return _$OrientationModeEnumMap[this]!;
}
}
/// Video encoding degradation preference when bandwidth is limited.
@JsonEnum(alwaysCreate: true)
enum DegradationPreference {
/// -1: (Default) Auto mode. The SDK automatically selects maintainFramerate, maintainBalanced, or maintainResolution based on your video scenario settings to achieve optimal overall quality experience (QoE).
@JsonValue(-1)
maintainAuto,
/// 0: When bandwidth is limited, prioritize reducing video frame rate while maintaining resolution. This preference is suitable for scenarios prioritizing image quality. Deprecated: This enumeration is deprecated. Use other enumerations instead.
@JsonValue(0)
maintainQuality,
/// 1: When bandwidth is limited, prioritize reducing video resolution while maintaining frame rate. This preference is suitable for scenarios prioritizing smoothness and allowing reduced image quality.
@JsonValue(1)
maintainFramerate,
/// 2: When bandwidth is limited, reduce both video frame rate and resolution. The degradation level of maintainBalanced is lower than maintainQuality and maintainFramerate, suitable for scenarios with limited smoothness and image quality. The resolution of the locally sent video may change. Remote users must be able to handle this situation. See onVideoSizeChanged.
@JsonValue(2)
maintainBalanced,
/// 3: When bandwidth is limited, prioritize reducing video frame rate while keeping resolution unchanged. This preference is suitable for scenarios prioritizing image quality.
@JsonValue(3)
maintainResolution,
/// @nodoc
@JsonValue(100)
disabled,
}
/// @nodoc
extension DegradationPreferenceExt on DegradationPreference {
/// @nodoc
static DegradationPreference fromValue(int value) {
return $enumDecode(_$DegradationPreferenceEnumMap, value);
}
/// @nodoc
int value() {
return _$DegradationPreferenceEnumMap[this]!;
}
}