智慧保安互联网APP
liuyg
2021-08-03 937d71bdbe0ec3ab98ed2a0ac39e38d6238af9e1
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
//
//  ARRtcEngine SDK
//
//  Copyright (c) 2019 anyrtc.io. All rights reserved.
//
 
/**
 @defgroup createARRtcEngine Create an ARRtcEngine
 */
 
#ifndef __I_AR_RTC_ENGINE_H__
#define __I_AR_RTC_ENGINE_H__
#include "ArBase.h"
#include "IArService.h"
 
#if defined(_WIN32)
#include "IArMediaEngine.h"
#endif
 
#ifndef AR
#define AR ar::rtc
#endif
#ifndef AU
#define AU ar::util
#endif
 
namespace ar {
namespace rtc {
    typedef const char* uid_t;
    typedef void* view_t;
/** Maximum length of the device ID.
*/
enum MAX_DEVICE_ID_LENGTH_TYPE
{
  /** The maximum length of the device ID is 512 bytes.
  */
    MAX_DEVICE_ID_LENGTH = 512
};
/** Maximum length of user account.
 */
enum MAX_USER_ACCOUNT_LENGTH_TYPE
{
  /** The maximum length of user account is 255 bytes.
   */
  MAX_USER_ACCOUNT_LENGTH = 256
};
/** Maximum length of channel ID.
 */
enum MAX_CHANNEL_ID_LENGTH_TYPE
{
    /** The maximum length of channel id is 64 bytes.
     */
    MAX_CHANNEL_ID_LENGTH = 65
};
/** Formats of the quality report.
*/
enum QUALITY_REPORT_FORMAT_TYPE
{
  /** 0: The quality report in JSON format,
  */
    QUALITY_REPORT_JSON = 0,
    /** 1: The quality report in HTML format.
    */
    QUALITY_REPORT_HTML = 1,
};
 
enum MEDIA_ENGINE_EVENT_CODE_TYPE
{
    /** 0: For internal use only.
     */
    MEDIA_ENGINE_RECORDING_ERROR = 0,
    /** 1: For internal use only.
     */
    MEDIA_ENGINE_PLAYOUT_ERROR = 1,
    /** 2: For internal use only.
     */
    MEDIA_ENGINE_RECORDING_WARNING = 2,
    /** 3: For internal use only.
     */
    MEDIA_ENGINE_PLAYOUT_WARNING = 3,
    /** 10: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_FILE_MIX_FINISH = 10,
    /** 12: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_FAREND_MUSIC_BEGINS = 12,
    /** 13: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_FAREND_MUSIC_ENDS = 13,
    /** 14: For internal use only.
     */
    MEDIA_ENGINE_LOCAL_AUDIO_RECORD_ENABLED = 14,
    /** 15: For internal use only.
     */
    MEDIA_ENGINE_LOCAL_AUDIO_RECORD_DISABLED = 15,
    // media engine role changed
    /** 20: For internal use only.
     */
    MEDIA_ENGINE_ROLE_BROADCASTER_SOLO = 20,
    /** 21: For internal use only.
     */
    MEDIA_ENGINE_ROLE_BROADCASTER_INTERACTIVE = 21,
    /** 22: For internal use only.
     */
    MEDIA_ENGINE_ROLE_AUDIENCE = 22,
    /** 23: For internal use only.
     */
    MEDIA_ENGINE_ROLE_COMM_PEER = 23,
    /** 24: For internal use only.
     */
    MEDIA_ENGINE_ROLE_GAME_PEER = 24,
    // iOS adm sample rate changed
    /** 110: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ADM_REQUIRE_RESTART = 110,
    /** 111: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ADM_SPECIAL_RESTART = 111,
    /** 112: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ADM_USING_COMM_PARAMS = 112,
    /** 113: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ADM_USING_NORM_PARAMS = 113,
    // audio mix state
    /** 710: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_EVENT_MIXING_PLAY = 710,
    /** 711: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_EVENT_MIXING_PAUSED = 711,
    /** 712: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_EVENT_MIXING_RESTART         = 712,
    /** 713: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_EVENT_MIXING_STOPPED = 713,
    /** 714: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_EVENT_MIXING_ERROR = 714,
    //Mixing error codes
    /** 701: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ERROR_MIXING_OPEN = 701,
    /** 702: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ERROR_MIXING_TOO_FREQUENT = 702,
    /** 703: The audio mixing file playback is interrupted. For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ERROR_MIXING_INTERRUPTED_EOF = 703,
    /** 0: For internal use only.
     */
    MEDIA_ENGINE_AUDIO_ERROR_MIXING_NO_ERROR = 0,
};
 
/** The states of the local user's audio mixing file.
*/
enum AUDIO_MIXING_STATE_TYPE{
    /** 710: The audio mixing file is playing.
    */
    AUDIO_MIXING_STATE_PLAYING = 710,
    /** 711: The audio mixing file pauses playing.
    */
    AUDIO_MIXING_STATE_PAUSED = 711,
    /** 713: The audio mixing file stops playing.
    */
    AUDIO_MIXING_STATE_STOPPED = 713,
    /** 714: An exception occurs when playing the audio mixing file. See #AUDIO_MIXING_ERROR_TYPE.
    */
    AUDIO_MIXING_STATE_FAILED = 714,
};
 
/** The error codes of the local user's audio mixing file.
*/
enum AUDIO_MIXING_ERROR_TYPE{
    /** 701: The SDK cannot open the audio mixing file.
    */
    AUDIO_MIXING_ERROR_CAN_NOT_OPEN = 701,
    /** 702: The SDK opens the audio mixing file too frequently.
    */
    AUDIO_MIXING_ERROR_TOO_FREQUENT_CALL = 702,
    /** 703: The audio mixing file playback is interrupted.
     */
    AUDIO_MIXING_ERROR_INTERRUPTED_EOF = 703,
    /** 0: The SDK can open the audio mixing file.
    */
    AUDIO_MIXING_ERROR_OK = 0,
};
 
/** Media device states.
 */
enum MEDIA_DEVICE_STATE_TYPE
{
  /** 1: The device is active.
  */
    MEDIA_DEVICE_STATE_ACTIVE = 1,
    /** 2: The device is disabled.
    */
    MEDIA_DEVICE_STATE_DISABLED = 2,
    /** 4: The device is not present.
    */
    MEDIA_DEVICE_STATE_NOT_PRESENT = 4,
    /** 8: The device is unplugged.
    */
    MEDIA_DEVICE_STATE_UNPLUGGED = 8
};
 
/** Media device types.
 */
enum MEDIA_DEVICE_TYPE
{
  /** -1: Unknown device type.
  */
    UNKNOWN_AUDIO_DEVICE = -1,
    /** 0: Audio playback device.
    */
    AUDIO_PLAYOUT_DEVICE = 0,
    /** 1: Audio recording device.
    */
    AUDIO_RECORDING_DEVICE = 1,
    /** 2: Video renderer.
    */
    VIDEO_RENDER_DEVICE = 2,
    /** 3: Video capturer.
    */
    VIDEO_CAPTURE_DEVICE = 3,
    /** 4: Application audio playback device.
    */
    AUDIO_APPLICATION_PLAYOUT_DEVICE = 4,
};
 
/** Local video state types
 */
enum LOCAL_VIDEO_STREAM_STATE
{
    /** 0: Initial state */
    LOCAL_VIDEO_STREAM_STATE_STOPPED = 0,
    /** 1: The local video capturing device starts successfully.
     *
     * The SDK also reports this state when you share a maximized window by calling \ref IRtcEngine::startScreenCaptureByWindowId "startScreenCaptureByWindowId".
     */
    LOCAL_VIDEO_STREAM_STATE_CAPTURING = 1,
    /** 2: The first video frame is successfully encoded. */
    LOCAL_VIDEO_STREAM_STATE_ENCODING = 2,
    /** 3: The local video fails to start. */
    LOCAL_VIDEO_STREAM_STATE_FAILED = 3
};
 
/** Local video state error codes
 */
enum LOCAL_VIDEO_STREAM_ERROR {
    /** 0: The local video is normal. */
    LOCAL_VIDEO_STREAM_ERROR_OK = 0,
    /** 1: No specified reason for the local video failure. */
    LOCAL_VIDEO_STREAM_ERROR_FAILURE = 1,
    /** 2: No permission to use the local video capturing device. */
    LOCAL_VIDEO_STREAM_ERROR_DEVICE_NO_PERMISSION = 2,
    /** 3: The local video capturing device is in use. */
    LOCAL_VIDEO_STREAM_ERROR_DEVICE_BUSY = 3,
    /** 4: The local video capture fails. Check whether the capturing device is working properly. */
    LOCAL_VIDEO_STREAM_ERROR_CAPTURE_FAILURE = 4,
    /** 5: The local video encoding fails. */
    LOCAL_VIDEO_STREAM_ERROR_ENCODE_FAILURE = 5,
    /** 6: (iOS only) The application is in the background.
     *
     * @since v3.3.0
     */
    LOCAL_VIDEO_STREAM_ERROR_CAPTURE_INBACKGROUND = 6,
    /** 7: (iOS only) The application is running in Slide Over, Split View, or Picture in Picture mode.
     *
     * @since v3.3.0
     */
    LOCAL_VIDEO_STREAM_ERROR_CAPTURE_MULTIPLE_FOREGROUND_APPS = 7,
    /** 11: The shared window is minimized when you call \ref IRtcEngine::startScreenCaptureByWindowId "startScreenCaptureByWindowId" to share a window.
     */
    LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_MINIMIZED = 11,
    /** 12: The error code indicates that a window shared by the window ID has been closed, or a full-screen window
     * shared by the window ID has exited full-screen mode.
     * After exiting full-screen mode, remote users cannot see the shared window. To prevent remote users from seeing a
     * black screen, AR recommends that you immediately stop screen sharing.
     *
     * Common scenarios for reporting this error code:
     * - When the local user closes the shared window, the SDK reports this error code.
     * - The local user shows some slides in full-screen mode first, and then shares the windows of the slides. After
     * the user exits full-screen mode, the SDK reports this error code.
     * - The local user watches web video or reads web document in full-screen mode first, and then shares the window of
     * the web video or document. After the user exits full-screen mode, the SDK reports this error code.
     */
    LOCAL_VIDEO_STREAM_ERROR_SCREEN_CAPTURE_WINDOW_CLOSED = 12,
};
 
/** Local audio state types.
 */
enum LOCAL_AUDIO_STREAM_STATE
{
    /** 0: The local audio is in the initial state.
     */
    LOCAL_AUDIO_STREAM_STATE_STOPPED = 0,
    /** 1: The recording device starts successfully.
     */
    LOCAL_AUDIO_STREAM_STATE_RECORDING = 1,
    /** 2: The first audio frame encodes successfully.
     */
    LOCAL_AUDIO_STREAM_STATE_ENCODING = 2,
    /** 3: The local audio fails to start.
     */
    LOCAL_AUDIO_STREAM_STATE_FAILED = 3
};
 
/** Local audio state error codes.
 */
enum LOCAL_AUDIO_STREAM_ERROR
{
    /** 0: The local audio is normal.
     */
    LOCAL_AUDIO_STREAM_ERROR_OK = 0,
    /** 1: No specified reason for the local audio failure.
     */
    LOCAL_AUDIO_STREAM_ERROR_FAILURE = 1,
    /** 2: No permission to use the local audio device.
     */
    LOCAL_AUDIO_STREAM_ERROR_DEVICE_NO_PERMISSION = 2,
    /** 3: The microphone is in use.
     */
    LOCAL_AUDIO_STREAM_ERROR_DEVICE_BUSY = 3,
    /** 4: The local audio recording fails. Check whether the recording device
     * is working properly.
     */
    LOCAL_AUDIO_STREAM_ERROR_RECORD_FAILURE = 4,
    /** 5: The local audio encoding fails.
     */
    LOCAL_AUDIO_STREAM_ERROR_ENCODE_FAILURE = 5
};
 
/** Audio recording qualities.
*/
enum AUDIO_RECORDING_QUALITY_TYPE
{
    /** 0: Low quality. The sample rate is 32 kHz, and the file size is around
     * 1.2 MB after 10 minutes of recording.
    */
    AUDIO_RECORDING_QUALITY_LOW = 0,
    /** 1: Medium quality. The sample rate is 32 kHz, and the file size is
     * around 2 MB after 10 minutes of recording.
    */
    AUDIO_RECORDING_QUALITY_MEDIUM = 1,
    /** 2: High quality. The sample rate is 32 kHz, and the file size is
     * around 3.75 MB after 10 minutes of recording.
    */
    AUDIO_RECORDING_QUALITY_HIGH = 2,
};
 
/** Network quality types. */
enum QUALITY_TYPE
{
    /** 0: The network quality is unknown. */
    QUALITY_UNKNOWN = 0,
    /**  1: The network quality is excellent. */
    QUALITY_EXCELLENT = 1,
    /** 2: The network quality is quite good, but the bitrate may be slightly lower than excellent. */
    QUALITY_GOOD = 2,
    /** 3: Users can feel the communication slightly impaired. */
    QUALITY_POOR = 3,
    /** 4: Users cannot communicate smoothly. */
    QUALITY_BAD = 4,
    /** 5: The network is so bad that users can barely communicate. */
    QUALITY_VBAD = 5,
    /** 6: The network is down and users cannot communicate at all. */
    QUALITY_DOWN = 6,
    /** 7: Users cannot detect the network quality. (Not in use.) */
    QUALITY_UNSUPPORTED = 7,
    /** 8: Detecting the network quality. */
    QUALITY_DETECTING = 8,
};
 
/** Video display modes. */
enum RENDER_MODE_TYPE
{
  /**
1: Uniformly scale the video until it fills the visible boundaries (cropped). One dimension of the video may have clipped contents.
 */
    RENDER_MODE_HIDDEN = 1,
    /**
2: Uniformly scale the video until one of its dimension fits the boundary (zoomed to fit). Areas that are not filled due to disparity in the aspect ratio are filled with black.
 */
    RENDER_MODE_FIT = 2,
    /** **DEPRECATED** 3: This mode is deprecated.
     */
    RENDER_MODE_ADAPTIVE = 3,
    /**
    4: The fill mode. In this mode, the SDK stretches or zooms the video to fill the display window.
    */
    RENDER_MODE_FILL = 4,
};
 
/** Video mirror modes. */
enum VIDEO_MIRROR_MODE_TYPE
{
      /** 0: (Default) The SDK enables the mirror mode. 
       */
    VIDEO_MIRROR_MODE_AUTO = 0,//determined by SDK
        /** 1: Enable mirror mode. */
    VIDEO_MIRROR_MODE_ENABLED = 1,//enabled mirror
        /** 2: Disable mirror mode. */
    VIDEO_MIRROR_MODE_DISABLED = 2,//disable mirror
};
 
/** **DEPRECATED** Video profiles. */
enum VIDEO_PROFILE_TYPE
{
    /** 0: 160 * 120, frame rate 15 fps, bitrate 65 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_120P = 0,
    /** 2: 120 * 120, frame rate 15 fps, bitrate 50 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_120P_3 = 2,
    /** 10: 320*180, frame rate 15 fps, bitrate 140 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_180P = 10,
    /** 12: 180 * 180, frame rate 15 fps, bitrate 100 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_180P_3 = 12,
    /** 13: 240 * 180, frame rate 15 fps, bitrate 120 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_180P_4 = 13,
    /** 20: 320 * 240, frame rate 15 fps, bitrate 200 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_240P = 20,
    /** 22: 240 * 240, frame rate 15 fps, bitrate 140 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_240P_3 = 22,
    /** 23: 424 * 240, frame rate 15 fps, bitrate 220 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_240P_4 = 23,
    /** 30: 640 * 360, frame rate 15 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_360P = 30,
    /** 32: 360 * 360, frame rate 15 fps, bitrate 260 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_360P_3 = 32,
    /** 33: 640 * 360, frame rate 30 fps, bitrate 600 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_360P_4 = 33,
    /** 35: 360 * 360, frame rate 30 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_360P_6 = 35,
    /** 36: 480 * 360, frame rate 15 fps, bitrate 320 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_360P_7 = 36,
    /** 37: 480 * 360, frame rate 30 fps, bitrate 490 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_360P_8 = 37,
    /** 38: 640 * 360, frame rate 15 fps, bitrate 800 Kbps.
     @note `LIVE_BROADCASTING` profile only.
     */
    VIDEO_PROFILE_LANDSCAPE_360P_9 = 38,
    /** 39: 640 * 360, frame rate 24 fps, bitrate 800 Kbps.
     @note `LIVE_BROADCASTING` profile only.
     */
    VIDEO_PROFILE_LANDSCAPE_360P_10 = 39,
    /** 100: 640 * 360, frame rate 24 fps, bitrate 1000 Kbps.
     @note `LIVE_BROADCASTING` profile only.
     */
    VIDEO_PROFILE_LANDSCAPE_360P_11 = 100,
    /** 40: 640 * 480, frame rate 15 fps, bitrate 500 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P = 40,
    /** 42: 480 * 480, frame rate 15 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P_3 = 42,
    /** 43: 640 * 480, frame rate 30 fps, bitrate 750 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P_4 = 43,
    /** 45: 480 * 480, frame rate 30 fps, bitrate 600 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P_6 = 45,
    /** 47: 848 * 480, frame rate 15 fps, bitrate 610 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P_8 = 47,
    /** 48: 848 * 480, frame rate 30 fps, bitrate 930 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P_9 = 48,
    /** 49: 640 * 480, frame rate 10 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_480P_10 = 49,
    /** 50: 1280 * 720, frame rate 15 fps, bitrate 1130 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_720P = 50,
    /** 52: 1280 * 720, frame rate 30 fps, bitrate 1710 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_720P_3 = 52,
    /** 54: 960 * 720, frame rate 15 fps, bitrate 910 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_720P_5 = 54,
    /** 55: 960 * 720, frame rate 30 fps, bitrate 1380 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_720P_6 = 55,
    /** 60: 1920 * 1080, frame rate 15 fps, bitrate 2080 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_1080P = 60,
    /** 62: 1920 * 1080, frame rate 30 fps, bitrate 3150 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_1080P_3 = 62,
    /** 64: 1920 * 1080, frame rate 60 fps, bitrate 4780 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_1080P_5 = 64,
    /** 66: 2560 * 1440, frame rate 30 fps, bitrate 4850 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_1440P = 66,
    /** 67: 2560 * 1440, frame rate 60 fps, bitrate 6500 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_1440P_2 = 67,
    /** 70: 3840 * 2160, frame rate 30 fps, bitrate 6500 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_4K = 70,
    /** 72: 3840 * 2160, frame rate 60 fps, bitrate 6500 Kbps. */
    VIDEO_PROFILE_LANDSCAPE_4K_3 = 72,
    /** 1000: 120 * 160, frame rate 15 fps, bitrate 65 Kbps. */
    VIDEO_PROFILE_PORTRAIT_120P = 1000,
    /** 1002: 120 * 120, frame rate 15 fps, bitrate 50 Kbps. */
    VIDEO_PROFILE_PORTRAIT_120P_3 = 1002,
    /** 1010: 180 * 320, frame rate 15 fps, bitrate 140 Kbps. */
    VIDEO_PROFILE_PORTRAIT_180P = 1010,
    /** 1012: 180 * 180, frame rate 15 fps, bitrate 100 Kbps. */
    VIDEO_PROFILE_PORTRAIT_180P_3 = 1012,
    /** 1013: 180 * 240, frame rate 15 fps, bitrate 120 Kbps. */
    VIDEO_PROFILE_PORTRAIT_180P_4 = 1013,
    /** 1020: 240 * 320, frame rate 15 fps, bitrate 200 Kbps. */
    VIDEO_PROFILE_PORTRAIT_240P = 1020,
    /** 1022: 240 * 240, frame rate 15 fps, bitrate 140 Kbps. */
    VIDEO_PROFILE_PORTRAIT_240P_3 = 1022,
    /** 1023: 240 * 424, frame rate 15 fps, bitrate 220 Kbps. */
    VIDEO_PROFILE_PORTRAIT_240P_4 = 1023,
    /** 1030: 360 * 640, frame rate 15 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_PORTRAIT_360P = 1030,
    /** 1032: 360 * 360, frame rate 15 fps, bitrate 260 Kbps. */
    VIDEO_PROFILE_PORTRAIT_360P_3 = 1032,
    /** 1033: 360 * 640, frame rate 30 fps, bitrate 600 Kbps. */
    VIDEO_PROFILE_PORTRAIT_360P_4 = 1033,
    /** 1035: 360 * 360, frame rate 30 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_PORTRAIT_360P_6 = 1035,
    /** 1036: 360 * 480, frame rate 15 fps, bitrate 320 Kbps. */
    VIDEO_PROFILE_PORTRAIT_360P_7 = 1036,
    /** 1037: 360 * 480, frame rate 30 fps, bitrate 490 Kbps. */
    VIDEO_PROFILE_PORTRAIT_360P_8 = 1037,
    /** 1038: 360 * 640, frame rate 15 fps, bitrate 800 Kbps.
     @note `LIVE_BROADCASTING` profile only.
     */
    VIDEO_PROFILE_PORTRAIT_360P_9 = 1038,
    /** 1039: 360 * 640, frame rate 24 fps, bitrate 800 Kbps.
     @note `LIVE_BROADCASTING` profile only.
     */
    VIDEO_PROFILE_PORTRAIT_360P_10 = 1039,
    /** 1100: 360 * 640, frame rate 24 fps, bitrate 1000 Kbps.
     @note `LIVE_BROADCASTING` profile only.
     */
    VIDEO_PROFILE_PORTRAIT_360P_11 = 1100,
    /** 1040: 480 * 640, frame rate 15 fps, bitrate 500 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P = 1040,
    /** 1042: 480 * 480, frame rate 15 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P_3 = 1042,
    /** 1043: 480 * 640, frame rate 30 fps, bitrate 750 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P_4 = 1043,
    /** 1045: 480 * 480, frame rate 30 fps, bitrate 600 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P_6 = 1045,
    /** 1047: 480 * 848, frame rate 15 fps, bitrate 610 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P_8 = 1047,
    /** 1048: 480 * 848, frame rate 30 fps, bitrate 930 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P_9 = 1048,
    /** 1049: 480 * 640, frame rate 10 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_PORTRAIT_480P_10 = 1049,
    /** 1050: 720 * 1280, frame rate 15 fps, bitrate 1130 Kbps. */
    VIDEO_PROFILE_PORTRAIT_720P = 1050,
    /** 1052: 720 * 1280, frame rate 30 fps, bitrate 1710 Kbps. */
    VIDEO_PROFILE_PORTRAIT_720P_3 = 1052,
    /** 1054: 720 * 960, frame rate 15 fps, bitrate 910 Kbps. */
    VIDEO_PROFILE_PORTRAIT_720P_5 = 1054,
    /** 1055: 720 * 960, frame rate 30 fps, bitrate 1380 Kbps. */
    VIDEO_PROFILE_PORTRAIT_720P_6 = 1055,
    /** 1060: 1080 * 1920, frame rate 15 fps, bitrate 2080 Kbps. */
    VIDEO_PROFILE_PORTRAIT_1080P = 1060,
    /** 1062: 1080 * 1920, frame rate 30 fps, bitrate 3150 Kbps. */
    VIDEO_PROFILE_PORTRAIT_1080P_3 = 1062,
    /** 1064: 1080 * 1920, frame rate 60 fps, bitrate 4780 Kbps. */
    VIDEO_PROFILE_PORTRAIT_1080P_5 = 1064,
    /** 1066: 1440 * 2560, frame rate 30 fps, bitrate 4850 Kbps. */
    VIDEO_PROFILE_PORTRAIT_1440P = 1066,
    /** 1067: 1440 * 2560, frame rate 60 fps, bitrate 6500 Kbps. */
    VIDEO_PROFILE_PORTRAIT_1440P_2 = 1067,
    /** 1070: 2160 * 3840, frame rate 30 fps, bitrate 6500 Kbps. */
    VIDEO_PROFILE_PORTRAIT_4K = 1070,
    /** 1072: 2160 * 3840, frame rate 60 fps, bitrate 6500 Kbps. */
    VIDEO_PROFILE_PORTRAIT_4K_3 = 1072,
    /** Default 640 * 360, frame rate 15 fps, bitrate 400 Kbps. */
    VIDEO_PROFILE_DEFAULT = VIDEO_PROFILE_LANDSCAPE_360P,
};
 
/** Audio profiles.
 
Sets the sample rate, bitrate, encoding mode, and the number of channels:*/
enum AUDIO_PROFILE_TYPE // sample rate, bit rate, mono/stereo, speech/music codec
{
    /**
     0: Default audio profile:
     - For the interactive streaming profile: A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 64 Kbps.
     - For the `COMMUNICATION` profile:
        - Windows: A sample rate of 16 KHz, music encoding, mono, and a bitrate of up to 16 Kbps.
        - Android/macOS/iOS: A sample rate of 32 KHz, music encoding, mono, and a bitrate of up to 18 Kbps.
    */
    AUDIO_PROFILE_DEFAULT = 0, // use default settings
    /**
     1: A sample rate of 32 KHz, audio encoding, mono, and a bitrate of up to 18 Kbps.
     */
    AUDIO_PROFILE_SPEECH_STANDARD = 1, // 32Khz, 18Kbps, mono, speech
    /**
     2: A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 64 Kbps.
     */
    AUDIO_PROFILE_MUSIC_STANDARD = 2, // 48Khz, 48Kbps, mono, music
    /**
     3: A sample rate of 48 KHz, music encoding, stereo, and a bitrate of up to 80 Kbps.
     */
    AUDIO_PROFILE_MUSIC_STANDARD_STEREO = 3, // 48Khz, 56Kbps, stereo, music
    /**
     4: A sample rate of 48 KHz, music encoding, mono, and a bitrate of up to 96 Kbps.
     */
    AUDIO_PROFILE_MUSIC_HIGH_QUALITY = 4, // 48Khz, 128Kbps, mono, music
    /**
     5: A sample rate of 48 KHz, music encoding, stereo, and a bitrate of up to 128 Kbps.
     */
    AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO = 5, // 48Khz, 192Kbps, stereo, music
    /**
     6: A sample rate of 16 KHz, audio encoding, mono, and Acoustic Echo Cancellation (AES) enabled.
     */
    AUDIO_PROFILE_IOT                       = 6,
    AUDIO_PROFILE_NUM = 7,
};
 
/** Audio application scenarios.
*/
enum AUDIO_SCENARIO_TYPE // set a suitable scenario for your app type
{
    /** 0: Default audio scenario. */
    AUDIO_SCENARIO_DEFAULT = 0,
    /** 1: Entertainment scenario where users need to frequently switch the user role. */
    AUDIO_SCENARIO_CHATROOM_ENTERTAINMENT = 1,
    /** 2: Education scenario where users want smoothness and stability. */
    AUDIO_SCENARIO_EDUCATION = 2,
    /** 3: High-quality audio chatroom scenario where hosts mainly play music. */
    AUDIO_SCENARIO_GAME_STREAMING = 3,
    /** 4: Showroom scenario where a single host wants high-quality audio. */
    AUDIO_SCENARIO_SHOWROOM = 4,
    /** 5: Gaming scenario for group chat that only contains the human voice. */
    AUDIO_SCENARIO_CHATROOM_GAMING = 5,
    /** 6: IoT (Internet of Things) scenario where users use IoT devices with low power consumption. */
    AUDIO_SCENARIO_IOT = 6,
    /** 8: Meeting scenario that mainly contains the human voice.
     *
     * @since v3.2.0
     */
    AUDIO_SCENARIO_MEETING = 8,
    /** The number of elements in the enumeration.
     */
    AUDIO_SCENARIO_NUM = 9,
};
 
 /** The channel profile of the AR RtcEngine.
 */
enum CHANNEL_PROFILE_TYPE
{
   /** (Default) Communication. This profile applies to scenarios such as an audio call or video call,
    * where all users can publish and subscribe to streams.
    */
    CHANNEL_PROFILE_COMMUNICATION = 0,
   /** Live streaming. In this profile, uses have roles, namely, host and audience (default).
    * A host both publishes and subscribes to streams, while an audience subscribes to streams only.
    * This profile applies to scenarios such as a chat room or interactive video streaming.
    */
    CHANNEL_PROFILE_LIVE_BROADCASTING = 1,
   /** 2: Gaming. This profile uses a codec with a lower bitrate and consumes less power. Applies to the gaming scenario, where all game players can talk freely.
    *
    * @note AR does not recommend using this setting.
    */
    CHANNEL_PROFILE_GAME = 2,
};
/// @cond
/** The role of a user in a live interactive streaming. */
enum CLIENT_ROLE_TYPE
{
    /** 1: Host. A host can both send and receive streams. */
    CLIENT_ROLE_BROADCASTER = 1,
    /** 2: (Default) Audience. An `audience` member can only receive streams. */
    CLIENT_ROLE_AUDIENCE = 2,
};
 
/** The latency level of an audience member in a live interactive streaming.
 *
 * @note Takes effect only when the user role is `CLIENT_ROLE_BROADCASTER`.
 */
enum AUDIENCE_LATENCY_LEVEL_TYPE
{
    /** 1: Low latency. */
    AUDIENCE_LATENCY_LEVEL_LOW_LATENCY = 1,
    /** 2: (Default) Ultra low latency. */
    AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY = 2,
};
/// @cond
/** The reason why the super-resolution algorithm is not successfully enabled.
 */
enum SUPER_RESOLUTION_STATE_REASON
{
    /** 0: The super-resolution algorithm is successfully enabled.
     */
    SR_STATE_REASON_SUCCESS = 0,
    /** 1: The origin resolution of the remote video is beyond the range where
     * the super-resolution algorithm can be applied.
     */
    SR_STATE_REASON_STREAM_OVER_LIMITATION = 1,
    /** 2: Another user is already using the super-resolution algorithm.
     */
    SR_STATE_REASON_USER_COUNT_OVER_LIMITATION = 2,
    /** 3: The device does not support the super-resolution algorithm.
     */
    SR_STATE_REASON_DEVICE_NOT_SUPPORTED = 3,
};
/// @endcond
 
/** Reasons for a user being offline. */
enum USER_OFFLINE_REASON_TYPE
{
    /** 0: The user quits the call. */
    USER_OFFLINE_QUIT = 0,
    /** 1: The SDK times out and the user drops offline because no data packet is received within a certain period of time. If the user quits the call and the message is not passed to the SDK (due to an unreliable channel), the SDK assumes the user dropped offline. */
    USER_OFFLINE_DROPPED = 1,
      /** 2: (Live broadcast only.) The client role switched from the host to the audience. */
    USER_OFFLINE_BECOME_AUDIENCE = 2,
};
/**
 States of the RTMP streaming.
 */
enum RTMP_STREAM_PUBLISH_STATE
{
  /** The RTMP streaming has not started or has ended. This state is also triggered after you remove an RTMP address from the CDN by calling removePublishStreamUrl.
   */
  RTMP_STREAM_PUBLISH_STATE_IDLE = 0,
  /** The SDK is connecting to AR's streaming server and the RTMP server. This state is triggered after you call the \ref IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" method.
   */
  RTMP_STREAM_PUBLISH_STATE_CONNECTING = 1,
  /** The RTMP streaming publishes. The SDK successfully publishes the RTMP streaming and returns this state.
   */
  RTMP_STREAM_PUBLISH_STATE_RUNNING = 2,
  /** The RTMP streaming is recovering. When exceptions occur to the CDN, or the streaming is interrupted, the SDK tries to resume RTMP streaming and returns this state.
 
   - If the SDK successfully resumes the streaming, #RTMP_STREAM_PUBLISH_STATE_RUNNING (2) returns.
   - If the streaming does not resume within 60 seconds or server errors occur, #RTMP_STREAM_PUBLISH_STATE_FAILURE (4) returns. You can also reconnect to the server by calling the \ref IRtcEngine::removePublishStreamUrl "removePublishStreamUrl" and \ref IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" methods.
   */
  RTMP_STREAM_PUBLISH_STATE_RECOVERING = 3,
  /** The RTMP streaming fails. See the errCode parameter for the detailed error information. You can also call the \ref IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" method to publish the RTMP streaming again.
   */
  RTMP_STREAM_PUBLISH_STATE_FAILURE = 4,
};
 
/**
 Error codes of the RTMP streaming.
 */
enum RTMP_STREAM_PUBLISH_ERROR
{
  /** The RTMP streaming publishes successfully. */
  RTMP_STREAM_PUBLISH_ERROR_OK = 0,
  /** Invalid argument used. If, for example, you do not call the \ref IRtcEngine::setLiveTranscoding "setLiveTranscoding" method to configure the LiveTranscoding parameters before calling the addPublishStreamUrl method, the SDK returns this error. Check whether you set the parameters in the *setLiveTranscoding* method properly. */
  RTMP_STREAM_PUBLISH_ERROR_INVALID_ARGUMENT = 1,
  /** The RTMP streaming is encrypted and cannot be published. */
  RTMP_STREAM_PUBLISH_ERROR_ENCRYPTED_STREAM_NOT_ALLOWED = 2,
  /** Timeout for the RTMP streaming. Call the \ref IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" method to publish the streaming again. */
  RTMP_STREAM_PUBLISH_ERROR_CONNECTION_TIMEOUT = 3,
  /** An error occurs in AR's streaming server. Call the addPublishStreamUrl method to publish the streaming again. */
  RTMP_STREAM_PUBLISH_ERROR_INTERNAL_SERVER_ERROR = 4,
  /** An error occurs in the RTMP server. */
  RTMP_STREAM_PUBLISH_ERROR_RTMP_SERVER_ERROR = 5,
  /** The RTMP streaming publishes too frequently. */
  RTMP_STREAM_PUBLISH_ERROR_TOO_OFTEN = 6,
  /** The host publishes more than 10 URLs. Delete the unnecessary URLs before adding new ones. */
  RTMP_STREAM_PUBLISH_ERROR_REACH_LIMIT = 7,
  /** The host manipulates other hosts' URLs. Check your app logic. */
  RTMP_STREAM_PUBLISH_ERROR_NOT_AUTHORIZED = 8,
  /** AR's server fails to find the RTMP streaming. */
  RTMP_STREAM_PUBLISH_ERROR_STREAM_NOT_FOUND = 9,
  /** The format of the RTMP streaming URL is not supported. Check whether the URL format is correct. */
  RTMP_STREAM_PUBLISH_ERROR_FORMAT_NOT_SUPPORTED = 10,
  /** 推流中的背景图片或者水印地址无法拉取 **/
  RTMP_STREAMING_ERROR_FAILED_LOAD_IMAGE = 11,
 
};
 
/** Events during the RTMP streaming. */
enum RTMP_STREAMING_EVENT
{
  /** An error occurs when you add a background image or a watermark image to the RTMP stream.
   */
  RTMP_STREAMING_EVENT_FAILED_LOAD_IMAGE = 1,
};
 
/** States of importing an external video stream in the live interactive streaming. */
enum INJECT_STREAM_STATUS
{
    /** 0: The external video stream imported successfully. */
    INJECT_STREAM_STATUS_START_SUCCESS = 0,
    /** 1: The external video stream already exists. */
    INJECT_STREAM_STATUS_START_ALREADY_EXISTS = 1,
    /** 2: The external video stream to be imported is unauthorized. */
    INJECT_STREAM_STATUS_START_UNAUTHORIZED = 2,
    /** 3: Import external video stream timeout. */
    INJECT_STREAM_STATUS_START_TIMEDOUT = 3,
    /** 4: Import external video stream failed. */
    INJECT_STREAM_STATUS_START_FAILED = 4,
    /** 5: The external video stream stopped importing successfully. */
    INJECT_STREAM_STATUS_STOP_SUCCESS = 5,
    /** 6: No external video stream is found. */
    INJECT_STREAM_STATUS_STOP_NOT_FOUND = 6,
    /** 7: The external video stream to be stopped importing is unauthorized. */
    INJECT_STREAM_STATUS_STOP_UNAUTHORIZED = 7,
    /** 8: Stop importing external video stream timeout. */
    INJECT_STREAM_STATUS_STOP_TIMEDOUT = 8,
    /** 9: Stop importing external video stream failed. */
    INJECT_STREAM_STATUS_STOP_FAILED = 9,
    /** 10: The external video stream is corrupted. */
    INJECT_STREAM_STATUS_BROKEN = 10,
};
/** Remote video stream types. */
enum REMOTE_VIDEO_STREAM_TYPE
{
      /** 0: High-stream video. */
    REMOTE_VIDEO_STREAM_HIGH = 0,
      /** 1: Low-stream video. */
    REMOTE_VIDEO_STREAM_LOW = 1,
};
 
/** Use modes of the \ref media::IAudioFrameObserver::onRecordAudioFrame "onRecordAudioFrame" callback. */
enum RAW_AUDIO_FRAME_OP_MODE_TYPE
{
    /** 0: Read-only mode: Users only read the \ref AM::IAudioFrameObserver::AudioFrame "AudioFrame" data without modifying anything. For example, when users acquire the data with the AR SDK, then push the RTMP streams. */
    RAW_AUDIO_FRAME_OP_MODE_READ_ONLY = 0,
    /** 1: Write-only mode: Users replace the \ref AM::IAudioFrameObserver::AudioFrame "AudioFrame" data with their own data and pass the data to the SDK for encoding. For example, when users acquire the data. */
    RAW_AUDIO_FRAME_OP_MODE_WRITE_ONLY = 1,
    /** 2: Read and write mode: Users read the data from \ref AM::IAudioFrameObserver::AudioFrame "AudioFrame", modify it, and then play it. For example, when users have their own sound-effect processing module and perform some voice pre-processing, such as a voice change. */
    RAW_AUDIO_FRAME_OP_MODE_READ_WRITE = 2,
};
 
/** Audio-sample rates. */
enum AUDIO_SAMPLE_RATE_TYPE
{
    /** 32000: 32 kHz */
    AUDIO_SAMPLE_RATE_32000 = 32000,
    /** 44100: 44.1 kHz */
    AUDIO_SAMPLE_RATE_44100 = 44100,
      /** 48000: 48 kHz */
    AUDIO_SAMPLE_RATE_48000 = 48000,
};
 
/** Video codec profile types. */
enum VIDEO_CODEC_PROFILE_TYPE
{  /** 66: Baseline video codec profile. Generally used in video calls on mobile phones. */
    VIDEO_CODEC_PROFILE_BASELINE = 66,
    /** 77: Main video codec profile. Generally used in mainstream electronics such as MP4 players, portable video players, PSP, and iPads. */
    VIDEO_CODEC_PROFILE_MAIN = 77,
      /** 100: (Default) High video codec profile. Generally used in high-resolution broadcasts or television. */
    VIDEO_CODEC_PROFILE_HIGH = 100,
};
 
/** Video codec types */
enum VIDEO_CODEC_TYPE {
    /** Standard VP8 */
    VIDEO_CODEC_VP8 = 1,
    /** Standard H264 */
    VIDEO_CODEC_H264 = 2,
    /** Enhanced VP8 */
    VIDEO_CODEC_EVP = 3,
    /** Enhanced H264 */
    VIDEO_CODEC_E264 = 4,
    /** Standard Jpeg*/
    VIDEO_CODEC_MJPG = 5,
};
 
/**
 * Audio codec type list.
 */
enum AUDIO_CODEC_TYPE {
    /**
     * 1: OPUS
     */
    AUDIO_CODEC_OPUS = 1,
    /**
     * 3: G711
     */
    AUDIO_CODEC_G711A = 3,
    AUDIO_CODEC_G711U = 4,
    /**
     * 5: G722
     */
    AUDIO_CODEC_G722 = 5,
    /**
     * 8: AACLC
     */
    AUDIO_CODEC_AACLC = 8,
    /**
     * 9: HEAAC
     */
    AUDIO_CODEC_HEAAC = 9,
    /**
     * 253: GENERIC
     */
    AUDIO_CODEC_GENERIC = 253,
};
 
/** Video Codec types for publishing streams. */
enum VIDEO_CODEC_TYPE_FOR_STREAM
{
    VIDEO_CODEC_H264_FOR_STREAM = 1,
    VIDEO_CODEC_H265_FOR_STREAM = 2,
};
 
/** Audio equalization band frequencies. */
enum AUDIO_EQUALIZATION_BAND_FREQUENCY
{
    /** 0: 31 Hz */
    AUDIO_EQUALIZATION_BAND_31 = 0,
      /** 1: 62 Hz */
    AUDIO_EQUALIZATION_BAND_62 = 1,
    /** 2: 125 Hz */
    AUDIO_EQUALIZATION_BAND_125 = 2,
      /** 3: 250 Hz */
    AUDIO_EQUALIZATION_BAND_250 = 3,
      /** 4: 500 Hz */
    AUDIO_EQUALIZATION_BAND_500 = 4,
        /** 5: 1 kHz */
    AUDIO_EQUALIZATION_BAND_1K = 5,
        /** 6: 2 kHz */
    AUDIO_EQUALIZATION_BAND_2K = 6,
        /** 7: 4 kHz */
    AUDIO_EQUALIZATION_BAND_4K = 7,
        /** 8: 8 kHz */
    AUDIO_EQUALIZATION_BAND_8K = 8,
      /** 9: 16 kHz */
    AUDIO_EQUALIZATION_BAND_16K = 9,
};
 
/** Audio reverberation types. */
enum AUDIO_REVERB_TYPE
{
    /** 0: The level of the dry signal (db). The value is between -20 and 10. */
    AUDIO_REVERB_DRY_LEVEL = 0, // (dB, [-20,10]), the level of the dry signal
    /** 1: The level of the early reflection signal (wet signal) (dB). The value is between -20 and 10. */
    AUDIO_REVERB_WET_LEVEL = 1, // (dB, [-20,10]), the level of the early reflection signal (wet signal)
    /** 2: The room size of the reflection. The value is between 0 and 100. */
    AUDIO_REVERB_ROOM_SIZE = 2, // ([0,100]), the room size of the reflection
    /** 3: The length of the initial delay of the wet signal (ms). The value is between 0 and 200. */
    AUDIO_REVERB_WET_DELAY = 3, // (ms, [0,200]), the length of the initial delay of the wet signal in ms
    /** 4: The reverberation strength. The value is between 0 and 100. */
    AUDIO_REVERB_STRENGTH = 4, // ([0,100]), the strength of the reverberation
};
 
/**
 * Local voice changer options.
 */
enum VOICE_CHANGER_PRESET {
    /**
     * The original voice (no local voice change).
     */
    VOICE_CHANGER_OFF = 0x00000000, //Turn off the voice changer
    /**
     * The voice of an old man.
     */
    VOICE_CHANGER_OLDMAN = 0x00000001,
    /**
     * The voice of a little boy.
     */
    VOICE_CHANGER_BABYBOY = 0x00000002,
    /**
     * The voice of a little girl.
     */
    VOICE_CHANGER_BABYGIRL = 0x00000003,
    /**
     * The voice of Zhu Bajie, a character in Journey to the West who has a voice like that of a growling bear.
     */
    VOICE_CHANGER_ZHUBAJIE = 0x00000004,
    /**
     * The ethereal voice.
     */
    VOICE_CHANGER_ETHEREAL = 0x00000005,
    /**
     * The voice of Hulk.
     */
    VOICE_CHANGER_HULK = 0x00000006,
    /**
     * A more vigorous voice.
     */
    VOICE_BEAUTY_VIGOROUS = 0x00100001,//7,
    /**
     * A deeper voice.
     */
    VOICE_BEAUTY_DEEP = 0x00100002,
    /**
     * A mellower voice.
     */
    VOICE_BEAUTY_MELLOW = 0x00100003,
    /**
     * Falsetto.
     */
    VOICE_BEAUTY_FALSETTO = 0x00100004,
    /**
     * A fuller voice.
     */
    VOICE_BEAUTY_FULL = 0x00100005,
    /**
     * A clearer voice.
     */
    VOICE_BEAUTY_CLEAR = 0x00100006,
    /**
     * A more resounding voice.
     */
    VOICE_BEAUTY_RESOUNDING = 0x00100007,
    /**
     * A more ringing voice.
     */
    VOICE_BEAUTY_RINGING = 0x00100008,
    /**
     * A more spatially resonant voice.
     */
    VOICE_BEAUTY_SPACIAL = 0x00100009,
    /**
     * (For male only) A more magnetic voice. Do not use it when the speaker is a female; otherwise, voice distortion occurs.
     */
    GENERAL_BEAUTY_VOICE_MALE_MAGNETIC = 0x00200001,
    /**
     * (For female only) A fresher voice. Do not use it when the speaker is a male; otherwise, voice distortion occurs.
     */
    GENERAL_BEAUTY_VOICE_FEMALE_FRESH = 0x00200002,
    /**
     *     (For female only) A more vital voice. Do not use it when the speaker is a male; otherwise, voice distortion occurs.
     */
    GENERAL_BEAUTY_VOICE_FEMALE_VITALITY = 0x00200003
 
};
 
/** Local voice reverberation presets. */
enum AUDIO_REVERB_PRESET {
    /**
     * Turn off local voice reverberation, that is, to use the original voice.
     */
    AUDIO_REVERB_OFF = 0x00000000, // Turn off audio reverb
    /**
     * The reverberation style typical of a KTV venue (enhanced).
     */
    AUDIO_REVERB_FX_KTV = 0x00100001,
    /**
     * The reverberation style typical of a concert hall (enhanced).
     */
    AUDIO_REVERB_FX_VOCAL_CONCERT = 0x00100002,
    /**
     * The reverberation style typical of an uncle's voice.
     */
    AUDIO_REVERB_FX_UNCLE = 0x00100003,
    /**
     * The reverberation style typical of a little sister's voice.
     */
    AUDIO_REVERB_FX_SISTER = 0x00100004,
    /**
     * The reverberation style typical of a recording studio (enhanced).
     */
    AUDIO_REVERB_FX_STUDIO = 0x00100005,
    /**
     * The reverberation style typical of popular music (enhanced).
     */
    AUDIO_REVERB_FX_POPULAR = 0x00100006,
    /**
     * The reverberation style typical of R&B music (enhanced).
     */
    AUDIO_REVERB_FX_RNB = 0x00100007,
    /**
     * The reverberation style typical of the vintage phonograph.
     */
    AUDIO_REVERB_FX_PHONOGRAPH = 0x00100008,
    /**
     * The reverberation style typical of popular music.
     */
    AUDIO_REVERB_POPULAR = 0x00000001,
    /**
     * The reverberation style typical of R&B music.
     */
    AUDIO_REVERB_RNB = 0x00000002,
    /**
     * The reverberation style typical of rock music.
     */
    AUDIO_REVERB_ROCK = 0x00000003,
    /**
     * The reverberation style typical of hip-hop music.
     */
     AUDIO_REVERB_HIPHOP = 0x00000004,
    /**
     * The reverberation style typical of a concert hall.
     */
    AUDIO_REVERB_VOCAL_CONCERT = 0x00000005,
    /**
     * The reverberation style typical of a KTV venue.
     */
    AUDIO_REVERB_KTV = 0x00000006,
    /**
     * The reverberation style typical of a recording studio.
     */
    AUDIO_REVERB_STUDIO = 0x00000007,
    /**
     * The reverberation of the virtual stereo. The virtual stereo is an effect that renders the monophonic
     * audio as the stereo audio, so that all users in the channel can hear the stereo voice effect.
     * To achieve better virtual stereo reverberation, AR recommends setting `profile` in `setAudioProfile`
     * as `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`.
     */
    AUDIO_VIRTUAL_STEREO = 0x00200001,
    /** 1: Electronic Voice.*/
    AUDIO_ELECTRONIC_VOICE = 0x00300001,
    /** 1: 3D Voice.*/
    AUDIO_THREEDIM_VOICE = 0x00400001
};
/** The options for SDK preset voice beautifier effects.
 */
enum VOICE_BEAUTIFIER_PRESET
{
    /** Turn off voice beautifier effects and use the original voice.
     */
    VOICE_BEAUTIFIER_OFF = 0x00000000,
    /** A more magnetic voice.
     *
     * @note AR recommends using this enumerator to process a male-sounding voice; otherwise, you may experience vocal distortion.
     */
    CHAT_BEAUTIFIER_MAGNETIC = 0x01010100,
    /** A fresher voice.
     *
     * @note AR recommends using this enumerator to process a female-sounding voice; otherwise, you may experience vocal distortion.
     */
    CHAT_BEAUTIFIER_FRESH = 0x01010200,
    /** A more vital voice.
     *
     * @note AR recommends using this enumerator to process a female-sounding voice; otherwise, you may experience vocal distortion.
     */
    CHAT_BEAUTIFIER_VITALITY = 0x01010300,
    /** A more vigorous voice.
     */
    TIMBRE_TRANSFORMATION_VIGOROUS = 0x01030100,
    /** A deeper voice.
     */
    TIMBRE_TRANSFORMATION_DEEP = 0x01030200,
    /** A mellower voice.
     */
    TIMBRE_TRANSFORMATION_MELLOW = 0x01030300,
    /** A falsetto voice.
     */
    TIMBRE_TRANSFORMATION_FALSETTO = 0x01030400,
    /** A falsetto voice.
     */
    TIMBRE_TRANSFORMATION_FULL = 0x01030500,
    /** A clearer voice.
     */
    TIMBRE_TRANSFORMATION_CLEAR = 0x01030600,
    /** A more resounding voice.
     */
    TIMBRE_TRANSFORMATION_RESOUNDING = 0x01030700,
    /** A more ringing voice.
     */
    TIMBRE_TRANSFORMATION_RINGING = 0x01030800
};
/** The options for SDK preset audio effects.
 */
enum AUDIO_EFFECT_PRESET
{
    /** Turn off audio effects and use the original voice.
     */
    AUDIO_EFFECT_OFF = 0x00000000,
    /** An audio effect typical of a KTV venue.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`
     * before setting this enumerator.
     */
    ROOM_ACOUSTICS_KTV = 0x02010100,
    /** An audio effect typical of a concert hall.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`
     * before setting this enumerator.
     */
    ROOM_ACOUSTICS_VOCAL_CONCERT = 0x02010200,
    /** An audio effect typical of a recording studio.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`
     * before setting this enumerator.
     */
    ROOM_ACOUSTICS_STUDIO = 0x02010300,
    /** An audio effect typical of a vintage phonograph.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`
     * before setting this enumerator.
     */
    ROOM_ACOUSTICS_PHONOGRAPH = 0x02010400,
    /** A virtual stereo effect that renders monophonic audio as stereo audio.
     *
     * @note Call \ref IRtcEngine::setAudioProfile "setAudioProfile" and set the `profile` parameter to
     * `AUDIO_PROFILE_MUSIC_STANDARD_STEREO(3)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before setting this
     * enumerator; otherwise, the enumerator setting does not take effect.
     */
    ROOM_ACOUSTICS_VIRTUAL_STEREO = 0x02010500,
    /** A more spatial audio effect.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`
     * before setting this enumerator.
     */
    ROOM_ACOUSTICS_SPACIAL = 0x02010600,
    /** A more ethereal audio effect.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)`
     * before setting this enumerator.
     */
    ROOM_ACOUSTICS_ETHEREAL = 0x02010700,
    /** A 3D voice effect that makes the voice appear to be moving around the user. The default cycle period of the 3D
     * voice effect is 10 seconds. To change the cycle period, call \ref IRtcEngine::setAudioEffectParameters "setAudioEffectParameters"
     * after this method.
     *
     * @note
     * - Call \ref IRtcEngine::setAudioProfile "setAudioProfile" and set the `profile` parameter to `AUDIO_PROFILE_MUSIC_STANDARD_STEREO(3)`
     * or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before setting this enumerator; otherwise, the enumerator setting does not take effect.
     * - If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect.
     */
    ROOM_ACOUSTICS_3D_VOICE = 0x02010800,
    /** The voice of an uncle.
     *
     * @note
     * - AR recommends using this enumerator to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
     * - To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    VOICE_CHANGER_EFFECT_UNCLE = 0x02020100,
    /** The voice of an old man.
     *
     * @note
     * - AR recommends using this enumerator to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
     * - To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and setting
     * the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before setting
     * this enumerator.
     */
    VOICE_CHANGER_EFFECT_OLDMAN = 0x02020200,
    /** The voice of a boy.
     *
     * @note
     * - AR recommends using this enumerator to process a male-sounding voice; otherwise, you may not hear the anticipated voice effect.
     * - To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and setting
     * the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    VOICE_CHANGER_EFFECT_BOY = 0x02020300,
    /** The voice of a young woman.
     *
     * @note
     * - AR recommends using this enumerator to process a female-sounding voice; otherwise, you may not hear the anticipated voice effect.
     * - To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and setting
     * the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    VOICE_CHANGER_EFFECT_SISTER = 0x02020400,
    /** The voice of a girl.
     *
     * @note
     * - AR recommends using this enumerator to process a female-sounding voice; otherwise, you may not hear the anticipated voice effect.
     * - To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and setting
     * the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    VOICE_CHANGER_EFFECT_GIRL = 0x02020500,
    /** The voice of Pig King, a character in Journey to the West who has a voice like a growling bear.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    VOICE_CHANGER_EFFECT_PIGKING = 0x02020600,
    /** The voice of Hulk.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    VOICE_CHANGER_EFFECT_HULK = 0x02020700,
    /** An audio effect typical of R&B music.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    STYLE_TRANSFORMATION_RNB = 0x02030100,
    /** An audio effect typical of popular music.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    STYLE_TRANSFORMATION_POPULAR = 0x02030200,
    /** A pitch correction effect that corrects the user's pitch based on the pitch of the natural C major scale.
     * To change the basic mode and tonic pitch, call \ref IRtcEngine::setAudioEffectParameters "setAudioEffectParameters" after this method.
     *
     * @note To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before
     * setting this enumerator.
     */
    PITCH_CORRECTION = 0x02040100
};
/** Audio codec profile types. The default value is LC_ACC. */
enum AUDIO_CODEC_PROFILE_TYPE
{
    /** 0: LC-AAC, which is the low-complexity audio codec type. */
    AUDIO_CODEC_PROFILE_LC_AAC = 0,
    /** 1: HE-AAC, which is the high-efficiency audio codec type. */
    AUDIO_CODEC_PROFILE_HE_AAC = 1,
};
 
/** Remote audio states.
 */
enum REMOTE_AUDIO_STATE
{
      /** 0: The remote audio is in the default state, probably due to
       * #REMOTE_AUDIO_REASON_LOCAL_MUTED (3),
       * #REMOTE_AUDIO_REASON_REMOTE_MUTED (5), or
       * #REMOTE_AUDIO_REASON_REMOTE_OFFLINE (7).
       */
      REMOTE_AUDIO_STATE_STOPPED = 0,  // Default state, audio is started or remote user disabled/muted audio stream
      /** 1: The first remote audio packet is received.
       */
      REMOTE_AUDIO_STATE_STARTING = 1,  // The first audio frame packet has been received
      /** 2: The remote audio stream is decoded and plays normally, probably
       * due to #REMOTE_AUDIO_REASON_NETWORK_RECOVERY (2),
       * #REMOTE_AUDIO_REASON_LOCAL_UNMUTED (4), or
       * #REMOTE_AUDIO_REASON_REMOTE_UNMUTED (6).
       */
      REMOTE_AUDIO_STATE_DECODING = 2,  // The first remote audio frame has been decoded or fronzen state ends
      /** 3: The remote audio is frozen, probably due to
       * #REMOTE_AUDIO_REASON_NETWORK_CONGESTION (1).
       */
      REMOTE_AUDIO_STATE_FROZEN = 3,    // Remote audio is frozen, probably due to network issue
      /** 4: The remote audio fails to start, probably due to
       * #REMOTE_AUDIO_REASON_INTERNAL (0).
       */
      REMOTE_AUDIO_STATE_FAILED = 4,    // Remote audio play failed
};
 
/** Remote audio state reasons.
 */
enum REMOTE_AUDIO_STATE_REASON
{
      /** 0: Internal reasons.
       */
      REMOTE_AUDIO_REASON_INTERNAL = 0,
      /** 1: Network congestion.
       */
      REMOTE_AUDIO_REASON_NETWORK_CONGESTION = 1,
      /** 2: Network recovery.
       */
      REMOTE_AUDIO_REASON_NETWORK_RECOVERY = 2,
      /** 3: The local user stops receiving the remote audio stream or
       * disables the audio module.
       */
      REMOTE_AUDIO_REASON_LOCAL_MUTED = 3,
      /** 4: The local user resumes receiving the remote audio stream or
       * enables the audio module.
       */
      REMOTE_AUDIO_REASON_LOCAL_UNMUTED = 4,
      /** 5: The remote user stops sending the audio stream or disables the
       * audio module.
       */
      REMOTE_AUDIO_REASON_REMOTE_MUTED = 5,
      /** 6: The remote user resumes sending the audio stream or enables the
       * audio module.
       */
      REMOTE_AUDIO_REASON_REMOTE_UNMUTED = 6,
      /** 7: The remote user leaves the channel.
       */
      REMOTE_AUDIO_REASON_REMOTE_OFFLINE = 7,
};
 
/** Remote video states. */
// enum REMOTE_VIDEO_STATE
// {
//     // REMOTE_VIDEO_STATE_STOPPED is not used at this version. Ignore this value.
//     // REMOTE_VIDEO_STATE_STOPPED = 0,  // Default state, video is started or remote user disabled/muted video stream
//       /** 1: The remote video is playing. */
//       REMOTE_VIDEO_STATE_RUNNING = 1,  // Running state, remote video can be displayed normally
//       /** 2: The remote video is frozen. */
//       REMOTE_VIDEO_STATE_FROZEN = 2,    // Remote video is frozen, probably due to network issue.
// };
 
/** The state of the remote video. */
enum REMOTE_VIDEO_STATE {
    /** 0: The remote video is in the default state, probably due to #REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED (3), #REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED (5), or #REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE (7).
     */
    REMOTE_VIDEO_STATE_STOPPED = 0,
 
    /** 1: The first remote video packet is received.
     */
    REMOTE_VIDEO_STATE_STARTING = 1,
 
    /** 2: The remote video stream is decoded and plays normally, probably due to #REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY (2), #REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED (4), #REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED (6), or #REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY (9).
     */
    REMOTE_VIDEO_STATE_DECODING = 2,
 
    /** 3: The remote video is frozen, probably due to #REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION (1) or #REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK (8).
     */
    REMOTE_VIDEO_STATE_FROZEN = 3,
 
    /** 4: The remote video fails to start, probably due to #REMOTE_VIDEO_STATE_REASON_INTERNAL (0).
     */
    REMOTE_VIDEO_STATE_FAILED = 4
};
/** The publishing state.
 */
enum STREAM_PUBLISH_STATE {
    /** 0: The initial publishing state after joining the channel.
     */
    PUB_STATE_IDLE = 0,
    /** 1: Fails to publish the local stream. Possible reasons:
     * - The local user calls \ref IRtcEngine::muteLocalAudioStream "muteLocalAudioStream(true)" or \ref IRtcEngine::muteLocalVideoStream "muteLocalVideoStream(true)" to stop sending local streams.
     * - The local user calls \ref IRtcEngine::disableAudio "disableAudio" or \ref IRtcEngine::disableVideo "disableVideo" to disable the entire audio or video module.
     * - The local user calls \ref IRtcEngine::enableLocalAudio "enableLocalAudio(false)" or \ref IRtcEngine::enableLocalVideo "enableLocalVideo(false)" to disable the local audio sampling or video capturing.
     * - The role of the local user is `AUDIENCE`.
     */
    PUB_STATE_NO_PUBLISHED = 1,
    /** 2: Publishing.
     */
    PUB_STATE_PUBLISHING = 2,
    /** 3: Publishes successfully.
     */
    PUB_STATE_PUBLISHED = 3
};
/** The subscribing state.
 */
enum STREAM_SUBSCRIBE_STATE {
    /** 0: The initial subscribing state after joining the channel.
     */
    SUB_STATE_IDLE = 0,
    /** 1: Fails to subscribe to the remote stream. Possible reasons:
     * - The remote user:
     *  - Calls \ref IRtcEngine::muteLocalAudioStream "muteLocalAudioStream(true)" or \ref IRtcEngine::muteLocalVideoStream "muteLocalVideoStream(true)" to stop sending local streams.
     *  - Calls \ref IRtcEngine::disableAudio "disableAudio" or \ref IRtcEngine::disableVideo "disableVideo" to disable the entire audio or video modules.
     *  - Calls \ref IRtcEngine::enableLocalAudio "enableLocalAudio(false)" or \ref IRtcEngine::enableLocalVideo "enableLocalVideo(false)" to disable the local audio sampling or video capturing.
     *  - The role of the remote user is `AUDIENCE`.
     * - The local user calls the following methods to stop receiving remote streams:
     *  - Calls \ref IRtcEngine::muteRemoteAudioStream "muteRemoteAudioStream(true)", \ref IRtcEngine::muteAllRemoteAudioStreams "muteAllRemoteAudioStreams(true)", or \ref IRtcEngine::setDefaultMuteAllRemoteAudioStreams "setDefaultMuteAllRemoteAudioStreams(true)" to stop receiving remote audio streams.
     *  - Calls \ref IRtcEngine::muteRemoteVideoStream "muteRemoteVideoStream(true)", \ref IRtcEngine::muteAllRemoteVideoStreams "muteAllRemoteVideoStreams(true)", or \ref IRtcEngine::setDefaultMuteAllRemoteVideoStreams "setDefaultMuteAllRemoteVideoStreams(true)" to stop receiving remote video streams.
     */
    SUB_STATE_NO_SUBSCRIBED = 1,
    /** 2: Subscribing.
     */
    SUB_STATE_SUBSCRIBING = 2,
    /** 3: Subscribes to and receives the remote stream successfully.
     */
    SUB_STATE_SUBSCRIBED = 3
};
 
/** The remote video frozen type. */
enum XLA_REMOTE_VIDEO_FROZEN_TYPE {
    /** 0: 500ms video frozen type.
     */
    XLA_REMOTE_VIDEO_FROZEN_500MS = 0,
    /** 1: 200ms video frozen type.
     */
    XLA_REMOTE_VIDEO_FROZEN_200MS = 1,
    /** 2: 600ms video frozen type.
     */
    XLA_REMOTE_VIDEO_FROZEN_600MS = 2,
    /** 3: max video frozen type.
     */
    XLA_REMOTE_VIDEO_FROZEN_TYPE_MAX = 3,
};
 
/** The remote audio frozen type. */
enum XLA_REMOTE_AUDIO_FROZEN_TYPE {
    /** 0: 80ms audio frozen.
     */
    XLA_REMOTE_AUDIO_FROZEN_80MS = 0,
    /** 1: 200ms audio frozen.
     */
    XLA_REMOTE_AUDIO_FROZEN_200MS = 1,
    /** 2: max audio frozen type.
     */
    XLA_REMOTE_AUDIO_FROZEN_TYPE_MAX = 2,
};
 
/** The reason for the remote video state change. */
enum REMOTE_VIDEO_STATE_REASON {
    /** 0: The SDK reports this reason when the video state changes.
     */
    REMOTE_VIDEO_STATE_REASON_INTERNAL = 0,
 
    /** 1: Network congestion.
     */
    REMOTE_VIDEO_STATE_REASON_NETWORK_CONGESTION = 1,
 
    /** 2: Network recovery.
     */
    REMOTE_VIDEO_STATE_REASON_NETWORK_RECOVERY = 2,
 
    /** 3: The local user stops receiving the remote video stream or disables the video module.
     */
    REMOTE_VIDEO_STATE_REASON_LOCAL_MUTED = 3,
 
    /** 4: The local user resumes receiving the remote video stream or enables the video module.
     */
    REMOTE_VIDEO_STATE_REASON_LOCAL_UNMUTED = 4,
 
    /** 5: The remote user stops sending the video stream or disables the video module.
     */
    REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED = 5,
 
    /** 6: The remote user resumes sending the video stream or enables the video module.
     */
    REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED = 6,
 
    /** 7: The remote user leaves the channel.
     */
    REMOTE_VIDEO_STATE_REASON_REMOTE_OFFLINE = 7,
 
    /** 8: The remote audio-and-video stream falls back to the audio-only stream due to poor network conditions.
     */
    REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK = 8,
 
    /** 9: The remote audio-only stream switches back to the audio-and-video stream after the network conditions improve.
     */
    REMOTE_VIDEO_STATE_REASON_AUDIO_FALLBACK_RECOVERY = 9
 
};
 
/** Video frame rates. */
enum FRAME_RATE
{
      /** 1: 1 fps */
    FRAME_RATE_FPS_1 = 1,
        /** 7: 7 fps */
    FRAME_RATE_FPS_7 = 7,
      /** 10: 10 fps */
    FRAME_RATE_FPS_10 = 10,
    /** 15: 15 fps */
    FRAME_RATE_FPS_15 = 15,
        /** 24: 24 fps */
    FRAME_RATE_FPS_24 = 24,
    /** 30: 30 fps */
    FRAME_RATE_FPS_30 = 30,
    /** 60: 60 fps (Windows and macOS only) */
    FRAME_RATE_FPS_60 = 60,
};
 
/** Video output orientation modes.
 */
enum ORIENTATION_MODE {
  /** 0: (Default) Adaptive mode.
 
   The video encoder adapts to the orientation mode of the video input device.
 
   - If the width of the captured video from the SDK is greater than the height, the encoder sends the video in landscape mode. The encoder also sends the rotational information of the video, and the receiver uses the rotational information to rotate the received video.
   - When you use a custom video source, the output video from the encoder inherits the orientation of the original video. If the original video is in portrait mode, the output video from the encoder is also in portrait mode. The encoder also sends the rotational information of the video to the receiver.
   */
    ORIENTATION_MODE_ADAPTIVE = 0,
    /** 1: Landscape mode.
 
     The video encoder always sends the video in landscape mode. The video encoder rotates the original video before sending it and the rotational infomation is 0. This mode applies to scenarios involving CDN live streaming.
     */
    ORIENTATION_MODE_FIXED_LANDSCAPE = 1,
    /** 2: Portrait mode.
 
     The video encoder always sends the video in portrait mode. The video encoder rotates the original video before sending it and the rotational infomation is 0. This mode applies to scenarios involving CDN live streaming.
     */
    ORIENTATION_MODE_FIXED_PORTRAIT = 2,
};
 
/** Video degradation preferences when the bandwidth is a constraint. */
enum DEGRADATION_PREFERENCE {
    /** 0: (Default) Degrade the frame rate in order to maintain the video quality. */
    MAINTAIN_QUALITY = 0,
    /** 1: Degrade the video quality in order to maintain the frame rate. */
    MAINTAIN_FRAMERATE = 1,
    /** 2: (For future use) Maintain a balance between the frame rate and video quality. */
    MAINTAIN_BALANCED = 2,
};
 
/** Stream fallback options. */
enum STREAM_FALLBACK_OPTIONS
{
    /** 0: No fallback behavior for the local/remote video stream when the uplink/downlink network conditions are poor. The quality of the stream is not guaranteed. */
    STREAM_FALLBACK_OPTION_DISABLED = 0,
    /** 1: Under poor downlink network conditions, the remote video stream, to which you subscribe, falls back to the low-stream (low resolution and low bitrate) video. You can set this option only in the \ref IRtcEngine::setRemoteSubscribeFallbackOption "setRemoteSubscribeFallbackOption" method. Nothing happens when you set this in the \ref IRtcEngine::setLocalPublishFallbackOption "setLocalPublishFallbackOption" method. */
    STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW = 1,
    /** 2: Under poor uplink network conditions, the published video stream falls back to audio only.
 
    Under poor downlink network conditions, the remote video stream, to which you subscribe, first falls back to the low-stream (low resolution and low bitrate) video; and then to an audio-only stream if the network conditions worsen.*/
    STREAM_FALLBACK_OPTION_AUDIO_ONLY = 2,
};
 
 /** Camera capturer configuration.
 */
 enum CAPTURER_OUTPUT_PREFERENCE
 {
     /** 0: (Default) self-adapts the camera output parameters to the system performance and network conditions to balance CPU consumption and video preview quality.
     */
     CAPTURER_OUTPUT_PREFERENCE_AUTO = 0,
     /** 1: Prioritizes the system performance. The SDK chooses the dimension and frame rate of the local camera capture closest to those set by \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration".
     */
     CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE = 1,
     /** 2: Prioritizes the local preview quality. The SDK chooses higher camera output parameters to improve the local video preview quality. This option requires extra CPU and RAM usage for video pre-processing.
     */
     CAPTURER_OUTPUT_PREFERENCE_PREVIEW = 2,
     /** 3: Allows you to customize the width and height of the video image captured by the local camera.
      *
      * @since v3.3.0
      */
     CAPTURER_OUTPUT_PREFERENCE_MANUAL = 3,
 };
 
/** The priority of the remote user.
 */
enum PRIORITY_TYPE
{
  /** 50: The user's priority is high.
   */
  PRIORITY_HIGH = 50,
  /** 100: (Default) The user's priority is normal.
  */
  PRIORITY_NORMAL = 100,
};
 
/** Connection states. */
enum CONNECTION_STATE_TYPE
{
  /** 1: The SDK is disconnected from AR's edge server.
 
   - This is the initial state before calling the \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method.
   - The SDK also enters this state when the application calls the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method.
   */
  CONNECTION_STATE_DISCONNECTED = 1,
  /** 2: The SDK is connecting to AR's edge server.
 
   - When the application calls the \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method, the SDK starts to establish a connection to the specified channel, triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged" callback, and switches to the #CONNECTION_STATE_CONNECTING state.
   - When the SDK successfully joins the channel, it triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged" callback and switches to the #CONNECTION_STATE_CONNECTED state.
   - After the SDK joins the channel and when it finishes initializing the media engine, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onJoinChannelSuccess "onJoinChannelSuccess" callback.
   */
  CONNECTION_STATE_CONNECTING = 2,
  /** 3: The SDK is connected to AR's edge server and has joined a channel. You can now publish or subscribe to a media stream in the channel.
 
   If the connection to the channel is lost because, for example, if the network is down or switched, the SDK automatically tries to reconnect and triggers:
   - The \ref ar::rtc::IRtcEngineEventHandler::onConnectionInterrupted "onConnectionInterrupted" callback (deprecated).
   - The \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged" callback and switches to the #CONNECTION_STATE_RECONNECTING state.
   */
  CONNECTION_STATE_CONNECTED = 3,
  /** 4: The SDK keeps rejoining the channel after being disconnected from a joined channel because of network issues.
 
   - If the SDK cannot rejoin the channel within 10 seconds after being disconnected from AR's edge server, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionLost "onConnectionLost" callback, stays in the #CONNECTION_STATE_RECONNECTING state, and keeps rejoining the channel.
   - If the SDK fails to rejoin the channel 20 minutes after being disconnected from AR's edge server, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged" callback, switches to the #CONNECTION_STATE_FAILED state, and stops rejoining the channel.
   */
  CONNECTION_STATE_RECONNECTING = 4,
  /** 5: The SDK fails to connect to AR's edge server or join the channel.
 
   You must call the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method to leave this state, and call the \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method again to rejoin the channel.
 
   If the SDK is banned from joining the channel by AR's edge server (through the RESTful API), the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionBanned "onConnectionBanned" (deprecated) and \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged" callbacks.
   */
  CONNECTION_STATE_FAILED = 5,
};
 
/** Reasons for a connection state change. */
enum CONNECTION_CHANGED_REASON_TYPE
{
  /** 0: The SDK is connecting to AR's edge server. */
  CONNECTION_CHANGED_CONNECTING = 0,
  /** 1: The SDK has joined the channel successfully. */
  CONNECTION_CHANGED_JOIN_SUCCESS = 1,
  /** 2: The connection between the SDK and AR's edge server is interrupted. */
  CONNECTION_CHANGED_INTERRUPTED = 2,
  /** 3: The connection between the SDK and AR's edge server is banned by AR's edge server. */
  CONNECTION_CHANGED_BANNED_BY_SERVER = 3,
  /** 4: The SDK fails to join the channel for more than 20 minutes and stops reconnecting to the channel. */
  CONNECTION_CHANGED_JOIN_FAILED = 4,
  /** 5: The SDK has left the channel. */
  CONNECTION_CHANGED_LEAVE_CHANNEL = 5,
  /** 6: The connection failed since Appid is not valid. */
  CONNECTION_CHANGED_INVALID_APP_ID = 6,
  /** 7: The connection failed since channel name is not valid. */
  CONNECTION_CHANGED_INVALID_CHANNEL_NAME = 7,
  /** 8: The connection failed since token is not valid, possibly because:
 
   - The App Certificate for the project is enabled in Console, but you do not use Token when joining the channel. If you enable the App Certificate, you must use a token to join the channel.
   - The uid that you specify in the \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method is different from the uid that you pass for generating the token.
   */
  CONNECTION_CHANGED_INVALID_TOKEN = 8,
  /** 9: The connection failed since token is expired. */
  CONNECTION_CHANGED_TOKEN_EXPIRED = 9,
  /** 10: The connection is rejected by server. This error usually occurs in the following situations:
   * - When the user is already in the channel, and still calls the method to join the channel, for example,
   * \ref IRtcEngine::joinChannel "joinChannel".
   * - When the user tries to join a channel during \ref IRtcEngine::startEchoTest "startEchoTest". Once you
   * call \ref IRtcEngine::startEchoTest "startEchoTest", you need to call \ref IRtcEngine::stopEchoTest "stopEchoTest" before joining a channel.
   *
   */
  CONNECTION_CHANGED_REJECTED_BY_SERVER = 10,
  /** 11: The connection changed to reconnecting since SDK has set a proxy server. */
  CONNECTION_CHANGED_SETTING_PROXY_SERVER = 11,
  /** 12: When SDK is in connection failed, the renew token operation will make it connecting. */
  CONNECTION_CHANGED_RENEW_TOKEN = 12,
  /** 13: The IP Address of SDK client has changed. i.e., Network type or IP/Port changed by network operator might change client IP address. */
  CONNECTION_CHANGED_CLIENT_IP_ADDRESS_CHANGED = 13,
  /** 14: Timeout for the keep-alive of the connection between the SDK and AR's edge server. The connection state changes to CONNECTION_STATE_RECONNECTING(4). */
  CONNECTION_CHANGED_KEEP_ALIVE_TIMEOUT = 14,
};
 
/** Network type. */
enum NETWORK_TYPE
{
  /** -1: The network type is unknown. */
  NETWORK_TYPE_UNKNOWN = -1,
  /** 0: The SDK disconnects from the network. */
  NETWORK_TYPE_DISCONNECTED = 0,
  /** 1: The network type is LAN. */
  NETWORK_TYPE_LAN = 1,
  /** 2: The network type is Wi-Fi(including hotspots). */
  NETWORK_TYPE_WIFI = 2,
  /** 3: The network type is mobile 2G. */
  NETWORK_TYPE_MOBILE_2G = 3,
  /** 4: The network type is mobile 3G. */
  NETWORK_TYPE_MOBILE_3G = 4,
  /** 5: The network type is mobile 4G. */
  NETWORK_TYPE_MOBILE_4G = 5,
};
 
/** States of the last-mile network probe test. */
enum LASTMILE_PROBE_RESULT_STATE {
  /** 1: The last-mile network probe test is complete. */
  LASTMILE_PROBE_RESULT_COMPLETE = 1,
  /** 2: The last-mile network probe test is incomplete and the bandwidth estimation is not available, probably due to limited test resources. */
  LASTMILE_PROBE_RESULT_INCOMPLETE_NO_BWE = 2,
  /** 3: The last-mile network probe test is not carried out, probably due to poor network conditions. */
  LASTMILE_PROBE_RESULT_UNAVAILABLE = 3
};
/** Audio output routing. */
enum AUDIO_ROUTE_TYPE {
    /** Default.
     */
    AUDIO_ROUTE_DEFAULT = -1,
    /** Headset.
     */
    AUDIO_ROUTE_HEADSET = 0,
    /** Earpiece.
     */
    AUDIO_ROUTE_EARPIECE = 1,
    /** Headset with no microphone.
     */
    AUDIO_ROUTE_HEADSET_NO_MIC = 2,
    /** Speakerphone.
     */
    AUDIO_ROUTE_SPEAKERPHONE = 3,
    /** Loudspeaker.
     */
    AUDIO_ROUTE_LOUDSPEAKER = 4,
    /** Bluetooth headset.
     */
    AUDIO_ROUTE_BLUETOOTH = 5,
    /** USB peripheral.
     */
    AUDIO_ROUTE_USB = 6,
    /** HDMI peripheral.
     */
    AUDIO_ROUTE_HDMI = 7,
    /** DisplayPort peripheral.
     */
    AUDIO_ROUTE_DISPLAYPORT = 8,
    /** Apple AirPlay.
     */
    AUDIO_ROUTE_AIRPLAY = 9,
};
 
#if (defined(__APPLE__) && TARGET_OS_IOS)
/** Audio session restriction. */
enum AUDIO_SESSION_OPERATION_RESTRICTION {
    /** No restriction, the SDK has full control of the audio session operations. */
    AUDIO_SESSION_OPERATION_RESTRICTION_NONE = 0,
    /** The SDK does not change the audio session category. */
    AUDIO_SESSION_OPERATION_RESTRICTION_SET_CATEGORY = 1,
    /** The SDK does not change any setting of the audio session (category, mode, categoryOptions). */
    AUDIO_SESSION_OPERATION_RESTRICTION_CONFIGURE_SESSION = 1 << 1,
    /** The SDK keeps the audio session active when leaving a channel. */
    AUDIO_SESSION_OPERATION_RESTRICTION_DEACTIVATE_SESSION = 1 << 2,
    /** The SDK does not configure the audio session anymore. */
    AUDIO_SESSION_OPERATION_RESTRICTION_ALL = 1 << 7,
};
#endif
 
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
enum CAMERA_DIRECTION {
    /** The rear camera. */
    CAMERA_REAR = 0,
    /** The front camera. */
    CAMERA_FRONT = 1,
};
#endif
 
/** The uplink or downlink last-mile network probe test result. */
struct LastmileProbeOneWayResult {
  /** The packet loss rate (%). */
  unsigned int packetLossRate;
  /** The network jitter (ms). */
  unsigned int jitter;
  /* The estimated available bandwidth (bps). */
  unsigned int availableBandwidth;
};
 
/** The uplink and downlink last-mile network probe test result. */
struct LastmileProbeResult{
  /** The state of the probe test. */
  LASTMILE_PROBE_RESULT_STATE state;
  /** The uplink last-mile network probe test result. */
  LastmileProbeOneWayResult uplinkReport;
  /** The downlink last-mile network probe test result. */
  LastmileProbeOneWayResult downlinkReport;
  /** The round-trip delay time (ms). */
  unsigned int rtt;
};
 
/** Configurations of the last-mile network probe test. */
struct LastmileProbeConfig {
  /** Sets whether or not to test the uplink network. Some users, for example, the audience in a `LIVE_BROADCASTING` channel, do not need such a test:
  - true: test.
  - false: do not test. */
  bool probeUplink;
  /** Sets whether or not to test the downlink network:
  - true: test.
  - false: do not test. */
  bool probeDownlink;
  /** The expected maximum sending bitrate (bps) of the local user. The value ranges between 100000 and 5000000. We recommend setting this parameter according to the bitrate value set by \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration". */
  unsigned int expectedUplinkBitrate;
  /** The expected maximum receiving bitrate (bps) of the local user. The value ranges between 100000 and 5000000. */
  unsigned int expectedDownlinkBitrate;
};
 
/** Properties of the audio volume information.
 
 An array containing the user ID and volume information for each speaker.
 */
struct AudioVolumeInfo
{
   /**
    User ID of the speaker. The uid of the local user is 0.
    */
    uid_t uid;
   /** The volume of the speaker. The volume ranges between 0 (lowest volume) and 255 (highest volume).
    */
    unsigned int volume;
    /** Voice activity status of the local user.
     * - 0: The local user is not speaking.
     * - 1: The local user is speaking.
     * 
     * @note
     * - The `vad` parameter cannot report the voice activity status of the remote users. In the remote users' callback, `vad` = 0.
     * - Ensure that you set `report_vad`(true) in the \ref ar::rtc::IRtcEngine::enableAudioVolumeIndication(int, int, bool) "enableAudioVolumeIndication" method to enable the voice activity detection of the local user.
     */
    unsigned int vad;
    /** The channel ID, which indicates which channel the speaker is in.
     */
    const char * channelId;
};
/// @cond
/** The detailed options of a user.
 */
struct ClientRoleOptions
{
    /** The latency level of an audience member in a live interactive streaming. See #AUDIENCE_LATENCY_LEVEL_TYPE.
     */
    AUDIENCE_LATENCY_LEVEL_TYPE audienceLatencyLevel;
    ClientRoleOptions()
        : audienceLatencyLevel(AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY) {}
};
/// @endcond
/** Statistics of the channel.
 */
struct RtcStats
{
  /**
   Call duration (s), represented by an aggregate value.
   */
    unsigned int duration;
    /**
     Total number of bytes transmitted, represented by an aggregate value.
     */
    unsigned int txBytes;
    /**
     Total number of bytes received, represented by an aggregate value.
     */
    unsigned int rxBytes;
     /** Total number of audio bytes sent (bytes), represented
     * by an aggregate value.
     */
    unsigned int txAudioBytes;
    /** Total number of video bytes sent (bytes), represented
     * by an aggregate value.
     */
    unsigned int txVideoBytes;
    /** Total number of audio bytes received (bytes) before
     * network countermeasures, represented by an aggregate value.
     */
    unsigned int rxAudioBytes;
    /** Total number of video bytes received (bytes),
     * represented by an aggregate value.
     */
    unsigned int rxVideoBytes;
 
    /**
     Transmission bitrate (Kbps), represented by an instantaneous value.
     */
    unsigned short txKBitRate;
    /**
     Receive bitrate (Kbps), represented by an instantaneous value.
     */
    unsigned short rxKBitRate;
    /**
     Audio receive bitrate (Kbps), represented by an instantaneous value.
     */
    unsigned short rxAudioKBitRate;
    /**
     Audio transmission bitrate (Kbps), represented by an instantaneous value.
     */
    unsigned short txAudioKBitRate;
    /**
     Video receive bitrate (Kbps), represented by an instantaneous value.
     */
    unsigned short rxVideoKBitRate;
    /**
     Video transmission bitrate (Kbps), represented by an instantaneous value.
     */
    unsigned short txVideoKBitRate;
    /** Client-server latency (ms)
     */
    unsigned short lastmileDelay;
    /** The packet loss rate (%) from the local client to AR's edge server,
     * before using the anti-packet-loss method.
     */
    unsigned short txPacketLossRate;
    /** The packet loss rate (%) from AR's edge server to the local client,
     * before using the anti-packet-loss method.
     */
    unsigned short rxPacketLossRate;
    /** Number of users in the channel.
 
     - Communication profile: The number of users in the channel.
     - Live broadcast profile:
 
         -  If the local user is an audience: The number of users in the channel = The number of hosts in the channel + 1.
         -  If the user is a host: The number of users in the channel = The number of hosts in the channel.
     */
    unsigned int userCount;
    /**
     Application CPU usage (%).
     */
    double cpuAppUsage;
    /**
     System CPU usage (%).
     */
    double cpuTotalUsage;
    /** The round-trip time delay from the client to the local router.
     */
    int gatewayRtt;
    /**
     The memory usage ratio of the app (%).
     @note This value is for reference only. Due to system limitations, you may not get the value of this member.
     */
    double memoryAppUsageRatio;
    /**
     The memory usage ratio of the system (%).
     @note This value is for reference only. Due to system limitations, you may not get the value of this member.
     */
    double memoryTotalUsageRatio;
    /**
     The memory usage of the app (KB).
     @note This value is for reference only. Due to system limitations, you may not get the value of this member.
     */
    int memoryAppUsageInKbytes;
  RtcStats()
      : duration(0)
      , txBytes(0)
      , rxBytes(0)
      , txAudioBytes(0)
      , txVideoBytes(0)
      , rxAudioBytes(0)
      , rxVideoBytes(0)
      , txKBitRate(0)
      , rxKBitRate(0)
      , rxAudioKBitRate(0)
      , txAudioKBitRate(0)
      , rxVideoKBitRate(0)
      , txVideoKBitRate(0)
      , lastmileDelay(0)
      , txPacketLossRate(0)
      , rxPacketLossRate(0)
      , userCount(0)
      , cpuAppUsage(0)
      , cpuTotalUsage(0)
      , gatewayRtt(0)
      , memoryAppUsageRatio(0)
      , memoryTotalUsageRatio(0)
      , memoryAppUsageInKbytes(0) {}
};
 
/** Quality change of the local video in terms of target frame rate and target bit rate since last count.
  */
enum QUALITY_ADAPT_INDICATION {
  /** The quality of the local video stays the same. */
  ADAPT_NONE = 0,
  /** The quality improves because the network bandwidth increases. */
  ADAPT_UP_BANDWIDTH = 1,
  /** The quality worsens because the network bandwidth decreases. */
  ADAPT_DOWN_BANDWIDTH = 2,
};
 
/** The error code in CHANNEL_MEDIA_RELAY_ERROR. */
enum CHANNEL_MEDIA_RELAY_ERROR {
    /** 0: The state is normal.
     */
    RELAY_OK = 0,
    /** 1: An error occurs in the server response.
     */
    RELAY_ERROR_SERVER_ERROR_RESPONSE = 1,
    /** 2: No server response. You can call the
     * \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method to
     * leave the channel.
     */
    RELAY_ERROR_SERVER_NO_RESPONSE = 2,
    /** 3: The SDK fails to access the service, probably due to limited
     * resources of the server.
     */
    RELAY_ERROR_NO_RESOURCE_AVAILABLE = 3,
    /** 4: Fails to send the relay request.
     */
    RELAY_ERROR_FAILED_JOIN_SRC = 4,
    /** 5: Fails to accept the relay request.
     */
    RELAY_ERROR_FAILED_JOIN_DEST = 5,
    /** 6: The server fails to receive the media stream.
     */
    RELAY_ERROR_FAILED_PACKET_RECEIVED_FROM_SRC = 6,
    /** 7: The server fails to send the media stream.
     */
    RELAY_ERROR_FAILED_PACKET_SENT_TO_DEST = 7,
    /** 8: The SDK disconnects from the server due to poor network
     * connections. You can call the \ref ar::rtc::IRtcEngine::leaveChannel
     * "leaveChannel" method to leave the channel.
     */
    RELAY_ERROR_SERVER_CONNECTION_LOST = 8,
    /** 9: An internal error occurs in the server.
     */
    RELAY_ERROR_INTERNAL_ERROR = 9,
    /** 10: The token of the source channel has expired.
     */
    RELAY_ERROR_SRC_TOKEN_EXPIRED = 10,
    /** 11: The token of the destination channel has expired.
     */
    RELAY_ERROR_DEST_TOKEN_EXPIRED = 11,
};
 
/** The event code in CHANNEL_MEDIA_RELAY_EVENT. */
enum CHANNEL_MEDIA_RELAY_EVENT {
    /** 0: The user disconnects from the server due to poor network
     * connections.
     */
    RELAY_EVENT_NETWORK_DISCONNECTED = 0,
    /** 1: The network reconnects.
     */
    RELAY_EVENT_NETWORK_CONNECTED = 1,
    /** 2: The user joins the source channel.
     */
    RELAY_EVENT_PACKET_JOINED_SRC_CHANNEL = 2,
    /** 3: The user joins the destination channel.
     */
    RELAY_EVENT_PACKET_JOINED_DEST_CHANNEL = 3,
    /** 4: The SDK starts relaying the media stream to the destination channel.
     */
    RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL = 4,
    /** 5: The server receives the video stream from the source channel.
     */
    RELAY_EVENT_PACKET_RECEIVED_VIDEO_FROM_SRC = 5,
    /** 6: The server receives the audio stream from the source channel.
     */
    RELAY_EVENT_PACKET_RECEIVED_AUDIO_FROM_SRC = 6,
    /** 7: The destination channel is updated.
     */
    RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL = 7,
    /** 8: The destination channel update fails due to internal reasons.
     */
    RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_REFUSED = 8,
    /** 9: The destination channel does not change, which means that the
     * destination channel fails to be updated.
     */
    RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE = 9,
    /** 10: The destination channel name is NULL.
     */
    RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL_IS_NULL = 10,
    /** 11: The video profile is sent to the server.
     */
    RELAY_EVENT_VIDEO_PROFILE_UPDATE = 11,
};
 
/** The state code in CHANNEL_MEDIA_RELAY_STATE. */
enum CHANNEL_MEDIA_RELAY_STATE {
    /** 0: The SDK is initializing.
     */
    RELAY_STATE_IDLE = 0,
    /** 1: The SDK tries to relay the media stream to the destination channel.
     */
    RELAY_STATE_CONNECTING = 1,
    /** 2: The SDK successfully relays the media stream to the destination
     * channel.
     */
    RELAY_STATE_RUNNING = 2,
    /** 3: A failure occurs. See the details in code.
     */
    RELAY_STATE_FAILURE = 3,
};
 
/** Statistics of the local video stream.
 */
struct LocalVideoStats
{
  /** Bitrate (Kbps) sent in the reported interval, which does not include
   * the bitrate of the retransmission video after packet loss.
   */
  int sentBitrate;
  /** Frame rate (fps) sent in the reported interval, which does not include
   * the frame rate of the retransmission video after packet loss.
   */
  int sentFrameRate;
  /** The encoder output frame rate (fps) of the local video.
   */
  int encoderOutputFrameRate;
  /** The render output frame rate (fps) of the local video.
   */
  int rendererOutputFrameRate;
  /** The target bitrate (Kbps) of the current encoder. This value is estimated by the SDK based on the current network conditions.
    */
  int targetBitrate;
  /** The target frame rate (fps) of the current encoder.
    */
  int targetFrameRate;
  /** Quality change of the local video in terms of target frame rate and
   * target bit rate in this reported interval. See #QUALITY_ADAPT_INDICATION.
   */
  QUALITY_ADAPT_INDICATION qualityAdaptIndication;
  /** The encoding bitrate (Kbps), which does not include the bitrate of the
   * re-transmission video after packet loss.
   */
  int encodedBitrate;
  /** The width of the encoding frame (px).
   */
  int encodedFrameWidth;
  /** The height of the encoding frame (px).
   */
  int encodedFrameHeight;
  /** The value of the sent frames, represented by an aggregate value.
   */
  int encodedFrameCount;
  /** The codec type of the local video:
   * - VIDEO_CODEC_VP8 = 1: VP8.
   * - VIDEO_CODEC_H264 = 2: (Default) H.264.
   */
  VIDEO_CODEC_TYPE codecType;
  /** The video packet loss rate (%) from the local client to the AR edge server before applying the anti-packet loss strategies.
   */
  unsigned short txPacketLossRate;
  /** The capture frame rate (fps) of the local video.
   */
  int captureFrameRate;
};
 
/** Statistics of the remote video stream.
 */
struct RemoteVideoStats
{
/**
 User ID of the remote user sending the video streams.
 */
uid_t uid;
/** **DEPRECATED** Time delay (ms).
 *
 * In scenarios where audio and video is synchronized, you can use the value of
 * `networkTransportDelay` and `jitterBufferDelay` in `RemoteAudioStats` to know the delay statistics of the remote video.
 */
int delay;
/** Width (pixels) of the video stream.
 */
int width;
/**
 Height (pixels) of the video stream.
 */
int height;
/**
 Bitrate (Kbps) received since the last count.
 */
int receivedBitrate;
/** The decoder output frame rate (fps) of the remote video.
 */
int decoderOutputFrameRate;
/** The render output frame rate (fps) of the remote video.
 */
int rendererOutputFrameRate;
/** Packet loss rate (%) of the remote video stream after using the anti-packet-loss method.
 */
int packetLossRate;
/** The type of the remote video stream: #REMOTE_VIDEO_STREAM_TYPE
 */
REMOTE_VIDEO_STREAM_TYPE rxStreamType;
/**
 The total freeze time (ms) of the remote video stream after the remote user joins the channel.
 In a video session where the frame rate is set to no less than 5 fps, video freeze occurs when
 the time interval between two adjacent renderable video frames is more than 500 ms.
 */
int totalFrozenTime;
/**
 The total video freeze time as a percentage (%) of the total time when the video is available.
 */
int frozenRate;
/**
 The total time (ms) when the remote user in the Communication profile or the remote
 broadcaster in the Live-broadcast profile neither stops sending the video stream nor
 disables the video module after joining the channel.
 
 @since v3.0.1
*/
int totalActiveTime;
/**
 * The total publish duration (ms) of the remote video stream.
 */
int publishDuration;
};
 
/** Audio statistics of the local user */
struct LocalAudioStats
{
    /** The number of channels.
     */
    int numChannels;
    /** The sample rate (Hz).
     */
    int sentSampleRate;
    /** The average sending bitrate (Kbps).
     */
    int sentBitrate;
    /** The audio packet loss rate (%) from the local client to the AR edge server before applying the anti-packet loss strategies.
     */
    unsigned short txPacketLossRate;
};
 
/** Audio statistics of a remote user */
struct RemoteAudioStats
{
    /** User ID of the remote user sending the audio streams.
     *
     */
    uid_t uid;
    /** Audio quality received by the user: #QUALITY_TYPE.
     */
    int quality;
    /** Network delay (ms) from the sender to the receiver.
     */
    int networkTransportDelay;
    /** Network delay (ms) from the receiver to the jitter buffer.
     */
    int jitterBufferDelay;
    /** The audio frame loss rate in the reported interval.
     */
    int audioLossRate;
    /** The number of channels.
     */
    int numChannels;
    /** The sample rate (Hz) of the received audio stream in the reported
     * interval.
     */
    int receivedSampleRate;
    /** The average bitrate (Kbps) of the received audio stream in the
     * reported interval. */
    int receivedBitrate;
    /** The total freeze time (ms) of the remote audio stream after the remote user joins the channel. In a session, audio freeze occurs when the audio frame loss rate reaches 4%.
     */
    int totalFrozenTime;
    /** The total audio freeze time as a percentage (%) of the total time when the audio is available. */
    int frozenRate;
    /** The total time (ms) when the remote user in the `COMMUNICATION` profile or the remote host in
     the `LIVE_BROADCASTING` profile neither stops sending the audio stream nor disables the audio module after joining the channel.
     */
    int totalActiveTime;
    /**
     * The total publish duration (ms) of the remote audio stream.
     */
    int publishDuration;
    /**
     * Quality of experience (QoE) of the local user when receiving a remote audio stream. See #EXPERIENCE_QUALITY_TYPE.
     *
     * @since v3.3.0
     */
    int qoeQuality;
    /**
     * The reason for poor QoE of the local user when receiving a remote audio stream. See #EXPERIENCE_POOR_REASON.
     *
     * @since v3.3.0
     */
    int qualityChangedReason;
     /**
     * The mos value of remote audio.
     */
    int mosValue;
};
 
/**
 * Video dimensions.
 */
struct VideoDimensions {
    /** Width (pixels) of the video. */
    int width;
      /** Height (pixels) of the video. */
    int height;
    VideoDimensions()
        : width(640), height(480)
    {}
    VideoDimensions(int w, int h)
        : width(w), height(h)
    {}
};
 
/** (Recommended) The standard bitrate set in the \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration" method.
 
 In this mode, the bitrates differ between the live interactive streaming and communication profiles:
 
 - `COMMUNICATION` profile: The video bitrate is the same as the base bitrate.
 - `LIVE_BROADCASTING` profile: The video bitrate is twice the base bitrate.
 
 */
const int STANDARD_BITRATE = 0;
 
/** The compatible bitrate set in the \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration" method.
 
 The bitrate remains the same regardless of the channel profile. If you choose this mode in the Live-broadcast profile, the video frame rate may be lower than the set value.
 */
const int COMPATIBLE_BITRATE = -1;
 
/** Use the default minimum bitrate.
 */
const int DEFAULT_MIN_BITRATE = -1;
 
/** Video encoder configurations.
 */
struct VideoEncoderConfiguration {
  /** The video frame dimensions (px) used to specify the video quality and measured by the total number of pixels along a frame's width and height: VideoDimensions. The default value is 640 x 360.
  */
    VideoDimensions dimensions;
    /** The frame rate of the video: #FRAME_RATE. The default value is 15.
 
     Note that we do not recommend setting this to a value greater than 30.
    */
    FRAME_RATE frameRate;
    /** The minimum frame rate of the video. The default value is -1.
     */
    int minFrameRate;
    /** The video encoding bitrate (Kbps).
 
     Choose one of the following options:
 
     - #STANDARD_BITRATE: (Recommended) The standard bitrate.
        - the `COMMUNICATION` profile: the encoding bitrate equals the base bitrate.
        - the `LIVE_BROADCASTING` profile: the encoding bitrate is twice the base bitrate.
     - #COMPATIBLE_BITRATE: The compatible bitrate: the bitrate stays the same regardless of the profile.
 
     the `COMMUNICATION` profile prioritizes smoothness, while the `LIVE_BROADCASTING` profile prioritizes video quality (requiring a higher bitrate). We recommend setting the bitrate mode as #STANDARD_BITRATE to address this difference.
 
     The following table lists the recommended video encoder configurations, where the base bitrate applies to the `COMMUNICATION` profile. Set your bitrate based on this table. If you set a bitrate beyond the proper range, the SDK automatically sets it to within the range.
 
     @note
     In the following table, **Base Bitrate** applies to the `COMMUNICATION` profile, and **Live Bitrate** applies to the `LIVE_BROADCASTING` profile.
 
     | Resolution             | Frame Rate (fps) | Base Bitrate (Kbps)                    | Live Bitrate (Kbps)                    |
     |------------------------|------------------|----------------------------------------|----------------------------------------|
     | 160 * 120              | 15               | 65                                     | 130                                    |
     | 120 * 120              | 15               | 50                                     | 100                                    |
     | 320 * 180              | 15               | 140                                    | 280                                    |
     | 180 * 180              | 15               | 100                                    | 200                                    |
     | 240 * 180              | 15               | 120                                    | 240                                    |
     | 320 * 240              | 15               | 200                                    | 400                                    |
     | 240 * 240              | 15               | 140                                    | 280                                    |
     | 424 * 240              | 15               | 220                                    | 440                                    |
     | 640 * 360              | 15               | 400                                    | 800                                    |
     | 360 * 360              | 15               | 260                                    | 520                                    |
     | 640 * 360              | 30               | 600                                    | 1200                                   |
     | 360 * 360              | 30               | 400                                    | 800                                    |
     | 480 * 360              | 15               | 320                                    | 640                                    |
     | 480 * 360              | 30               | 490                                    | 980                                    |
     | 640 * 480              | 15               | 500                                    | 1000                                   |
     | 480 * 480              | 15               | 400                                    | 800                                    |
     | 640 * 480              | 30               | 750                                    | 1500                                   |
     | 480 * 480              | 30               | 600                                    | 1200                                   |
     | 848 * 480              | 15               | 610                                    | 1220                                   |
     | 848 * 480              | 30               | 930                                    | 1860                                   |
     | 640 * 480              | 10               | 400                                    | 800                                    |
     | 1280 * 720             | 15               | 1130                                   | 2260                                   |
     | 1280 * 720             | 30               | 1710                                   | 3420                                   |
     | 960 * 720              | 15               | 910                                    | 1820                                   |
     | 960 * 720              | 30               | 1380                                   | 2760                                   |
     | 1920 * 1080            | 15               | 2080                                   | 4160                                   |
     | 1920 * 1080            | 30               | 3150                                   | 6300                                   |
     | 1920 * 1080            | 60               | 4780                                   | 6500                                   |
     | 2560 * 1440            | 30               | 4850                                   | 6500                                   |
     | 2560 * 1440            | 60               | 6500                                   | 6500                                   |
     | 3840 * 2160            | 30               | 6500                                   | 6500                                   |
     | 3840 * 2160            | 60               | 6500                                   | 6500                                   |
 
     */
    int bitrate;
    /** The minimum encoding bitrate (Kbps).
 
     The SDK automatically adjusts the encoding bitrate to adapt to the network conditions. Using a value greater than the default value forces the video encoder to output high-quality images but may cause more packet loss and hence sacrifice the smoothness of the video transmission. That said, unless you have special requirements for image quality, AR does not recommend changing this value.
 
     @note This parameter applies only to the `LIVE_BROADCASTING` profile.
     */
    int minBitrate;
    /** The video orientation mode of the video: #ORIENTATION_MODE.
    */
    ORIENTATION_MODE orientationMode;
    /** The video encoding degradation preference under limited bandwidth: #DEGRADATION_PREFERENCE.
     */
    DEGRADATION_PREFERENCE degradationPreference;
    /** Sets the mirror mode of the published local video stream. It only affects the video that the remote user sees. See #VIDEO_MIRROR_MODE_TYPE
 
    @note: The SDK disables the mirror mode by default.
    */
    VIDEO_MIRROR_MODE_TYPE mirrorMode;
 
    VideoEncoderConfiguration(
        const VideoDimensions& d, FRAME_RATE f,
        int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mr = VIDEO_MIRROR_MODE_AUTO)
        : dimensions(d), frameRate(f), minFrameRate(-1), bitrate(b),
          minBitrate(DEFAULT_MIN_BITRATE), orientationMode(m),
          degradationPreference(MAINTAIN_QUALITY), mirrorMode(mr)
    {}
    VideoEncoderConfiguration(
        int width, int height, FRAME_RATE f,
        int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mr = VIDEO_MIRROR_MODE_AUTO)
        : dimensions(width, height), frameRate(f),
          minFrameRate(-1), bitrate(b),
          minBitrate(DEFAULT_MIN_BITRATE), orientationMode(m),
          degradationPreference(MAINTAIN_QUALITY), mirrorMode(mr)
    {}
    VideoEncoderConfiguration()
        : dimensions(640, 480)
        , frameRate(FRAME_RATE_FPS_15)
        , minFrameRate(-1)
        , bitrate(STANDARD_BITRATE)
        , minBitrate(DEFAULT_MIN_BITRATE)
        , orientationMode(ORIENTATION_MODE_ADAPTIVE)
        , degradationPreference(MAINTAIN_QUALITY)
        , mirrorMode(VIDEO_MIRROR_MODE_AUTO)
    {}
};
 
/** The video and audio properties of the user displaying the video in the CDN live. AR supports a maximum of 17 transcoding users in a CDN streaming channel.
*/
typedef struct TranscodingUser {
  /** User ID of the user displaying the video in the CDN live.
  */
    uid_t uid;
 
/** Horizontal position (pixel) of the video frame relative to the top left corner.
*/
    int x;
    /** Vertical position (pixel) of the video frame relative to the top left corner.
    */
    int y;
    /** Width (pixel) of the video frame. The default value is 360.
    */
    int width;
    /** Height (pixel) of the video frame. The default value is 640.
    */
    int height;
 
    /** The layer index of the video frame. An integer. The value range is [0, 100].
 
     - 0: (Default) Bottom layer.
     - 100: Top layer.
 
     @note
     - If zOrder is beyond this range, the SDK reports #ERR_INVALID_ARGUMENT.
     - As of v2.3, the SDK supports zOrder = 0.
     */
    int zOrder;
    /** The transparency level of the user's video. The value ranges between 0 and 1.0:
 
     - 0: Completely transparent
     - 1.0: (Default) Opaque
     */
    double alpha;
    /** The audio channel of the sound. The default value is 0:
 
     - 0: (Default) Supports dual channels at most, depending on the upstream of the host.
     - 1: The audio stream of the host uses the FL audio channel. If the upstream of the host uses multiple audio channels, these channels are mixed into mono first.
     - 2: The audio stream of the host uses the FC audio channel. If the upstream of the host uses multiple audio channels, these channels are mixed into mono first.
     - 3: The audio stream of the host uses the FR audio channel. If the upstream of the host uses multiple audio channels, these channels are mixed into mono first.
     - 4: The audio stream of the host uses the BL audio channel. If the upstream of the host uses multiple audio channels, these channels are mixed into mono first.
     - 5: The audio stream of the host uses the BR audio channel. If the upstream of the host uses multiple audio channels, these channels are mixed into mono first.
 
     @note If your setting is not 0, you may need a specialized player.
     */
    int audioChannel;
    TranscodingUser()
        : uid(0)
        , x(0)
        , y(0)
        , width(0)
        , height(0)
        , zOrder(0)
        , alpha(1.0)
        , audioChannel(0)
    {}
 
} TranscodingUser;
 
/** Image properties.
 
 The properties of the watermark and background images.
 */
typedef struct RtcImage {
    RtcImage() :
       url(NULL),
       x(0),
       y(0),
       width(0),
       height(0)
    {}
    /** HTTP/HTTPS URL address of the image on the live video. The maximum length of this parameter is 1024 bytes. */
    const char* url;
    /** Horizontal position of the image from the upper left of the live video. */
    int x;
    /** Vertical position of the image from the upper left of the live video. */
    int y;
    /** Width of the image on the live video. */
    int width;
    /** Height of the image on the live video. */
    int height;
} RtcImage;
/** The configuration for advanced features of the RTMP streaming with transcoding.
 */
typedef struct LiveStreamAdvancedFeature {
    LiveStreamAdvancedFeature() : featureName(NULL) , opened(false) {
    }
 
    /** The advanced feature for high-quality video with a lower bitrate. */
    const char* LBHQ = "lbhq";
    /** The advanced feature for the optimized video encoder. */
    const char* VEO = "veo";
 
    /** The name of the advanced feature. It contains LBHQ and VEO.
     */
    const char* featureName;
 
    /** Whether to enable the advanced feature:
     * - true: Enable the advanced feature.
     * - false: (Default) Disable the advanced feature.
     */
    bool opened;
} LiveStreamAdvancedFeature;
 
/** A struct for managing CDN live audio/video transcoding settings.
*/
typedef struct LiveTranscoding {
   /** The width of the video in pixels. The default value is 360.
    * - When pushing video streams to the CDN, ensure that `width` is at least 64; otherwise, the AR server adjusts the value to 64.
    * - When pushing audio streams to the CDN, set `width` and `height` as 0.
    */
    int width;
    /** The height of the video in pixels. The default value is 640.
     * - When pushing video streams to the CDN, ensure that `height` is at least 64; otherwise, the AR server adjusts the value to 64.
     * - When pushing audio streams to the CDN, set `width` and `height` as 0.
    */
    int height;
    /** Bitrate of the CDN live output video stream. The default value is 400 Kbps.
 
    Set this parameter according to the Video Bitrate Table. If you set a bitrate beyond the proper range, the SDK automatically adapts it to a value within the range.
    */
    int videoBitrate;
    /** Frame rate of the output video stream set for the CDN live streaming. The default value is 15 fps, and the value range is (0,30].
 
    @note The AR server adjusts any value over 30 to 30.
    */
    int videoFramerate;
 
    /** **DEPRECATED** Latency mode:
 
     - true: Low latency with unassured quality.
     - false: (Default) High latency with assured quality.
     */
    bool lowLatency;
 
    /** Video GOP in frames. The default value is 30 fps.
    */
    int videoGop;
    /** Self-defined video codec profile: #VIDEO_CODEC_PROFILE_TYPE.
 
    @note If you set this parameter to other values, AR adjusts it to the default value of 100.
    */
    VIDEO_CODEC_PROFILE_TYPE videoCodecProfile;
    /** The background color in RGB hex value. Value only. Do not include a preceeding #. For example, 0xFFB6C1 (light pink). The default value is 0x000000 (black).
     */
    unsigned int backgroundColor;
 
    /** video codec type */
    VIDEO_CODEC_TYPE_FOR_STREAM videoCodecType;
 
    /** The number of users in the live interactive streaming.
     */
    unsigned int userCount;
    /** TranscodingUser
    */
    TranscodingUser *transcodingUsers;
    /** Reserved property. Extra user-defined information to send SEI for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 Bytes.
 
     For more information on SEI frame, see [SEI-related questions](https://docs.ar.io/en/faq/sei).
     */
    const char *transcodingExtraInfo;
 
    /** **DEPRECATED** The metadata sent to the CDN live client defined by the RTMP or FLV metadata.
     */
    const char *metadata;
    /** The watermark image added to the CDN live publishing stream.
 
    Ensure that the format of the image is PNG. Once a watermark image is added, the audience of the CDN live publishing stream can see the watermark image. See RtcImage.
    */
    RtcImage* watermark;
    /** The background image added to the CDN live publishing stream.
 
     Once a background image is added, the audience of the CDN live publishing stream can see the background image. See RtcImage.
    */
    RtcImage* backgroundImage;
    /** Self-defined audio-sample rate: #AUDIO_SAMPLE_RATE_TYPE.
    */
    AUDIO_SAMPLE_RATE_TYPE audioSampleRate;
    /** Bitrate of the CDN live audio output stream. The default value is 48 Kbps, and the highest value is 128.
     */
    int audioBitrate;
    /** The numbder of audio channels for the CDN live stream. ar recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose option 3, 4, or 5:
 
     - 1: (Default) Mono.
     - 2: Stereo.
     - 3: Three audio channels.
     - 4: Four audio channels.
     - 5: Five audio channels.
     */
    int audioChannels;
    /** Self-defined audio codec profile: #AUDIO_CODEC_PROFILE_TYPE.
     */
 
    AUDIO_CODEC_PROFILE_TYPE audioCodecProfile;
 
    /** Advanced features of the RTMP streaming with transcoding. See LiveStreamAdvancedFeature.
     *
     * @since v3.1.0
     */
    LiveStreamAdvancedFeature* advancedFeatures;
 
    /** The number of enabled advanced features. The default value is 0. */
    unsigned int advancedFeatureCount;
 
    LiveTranscoding()
        : width(360)
        , height(640)
        , videoBitrate(400)
        , videoFramerate(15)
        , lowLatency(false)
        , videoGop(30)
        , videoCodecProfile(VIDEO_CODEC_PROFILE_HIGH)
        , backgroundColor(0x000000)
        , videoCodecType(VIDEO_CODEC_H264_FOR_STREAM)
        , userCount(0)
        , transcodingUsers(NULL)
        , transcodingExtraInfo(NULL)
        , metadata(NULL)
        , watermark(NULL)
        , backgroundImage(NULL)
        , audioSampleRate(AUDIO_SAMPLE_RATE_48000)
        , audioBitrate(48)
        , audioChannels(1)
        , audioCodecProfile(AUDIO_CODEC_PROFILE_LC_AAC)
        , advancedFeatures(NULL)
        , advancedFeatureCount(0)
    {}
} LiveTranscoding;
 
 /** Camera capturer configuration.
  */
 struct CameraCapturerConfiguration{
 
     /** Camera capturer preference settings. See: #CAPTURER_OUTPUT_PREFERENCE. */
     CAPTURER_OUTPUT_PREFERENCE preference;
     /** The width (px) of the video image captured by the local camera.
      * To customize the width of the video image, set `preference` as #CAPTURER_OUTPUT_PREFERENCE_MANUAL (3) first,
      * and then use `captureWidth`.
      *
      * @since v3.3.0
      */
     int captureWidth;
     /** The height (px) of the video image captured by the local camera.
      * To customize the height of the video image, set `preference` as #CAPTURER_OUTPUT_PREFERENCE_MANUAL (3) first,
      * and then use `captureHeight`.
      *
      * @since v3.3.0
      */
     int captureHeight;
     #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
     /** Camera direction settings (for Android/iOS only). See: #CAMERA_DIRECTION. */
     CAMERA_DIRECTION cameraDirection;
     #endif
 
     CameraCapturerConfiguration()
        :preference(CAPTURER_OUTPUT_PREFERENCE_AUTO)
        ,captureWidth(640)
        ,captureHeight(480)
        {}
 
    CameraCapturerConfiguration(int width, int height)
        :preference(CAPTURER_OUTPUT_PREFERENCE_MANUAL)
        ,captureWidth(width)
        ,captureHeight(height)
        {}
 };
/** The configurations for the data stream.
 *
 * @since v3.3.0
 *
 * |`syncWithAudio` |`ordered`| SDK behaviors|
 * |--------------|--------|-------------|
 * | false   |  false   |The SDK triggers the `onStreamMessage` callback immediately after the receiver receives a data packet      |
 * | true |  false | <p>If the data packet delay is within the audio delay, the SDK triggers the `onStreamMessage` callback when the synchronized audio packet is played out.</p><p>If the data packet delay exceeds the audio delay, the SDK triggers the `onStreamMessage` callback as soon as the data packet is received. In this case, the data packet is not synchronized with the audio packet.</p>   |
 * | false  |  true | <p>If the delay of a data packet is within five seconds, the SDK corrects the order of the data packet.</p><p>If the delay of a data packet exceeds five seconds, the SDK discards the data packet.</p>     |
 * |  true  |  true   | <p>If the delay of a data packet is within the audio delay, the SDK corrects the order of the data packet.</p><p>If the delay of a data packet exceeds the audio delay, the SDK discards this data packet.</p>     |
 */
struct DataStreamConfig {
    /** Whether to synchronize the data packet with the published audio packet.
     *
     * - true: Synchronize the data packet with the audio packet.
     * - false: Do not synchronize the data packet with the audio packet.
     *
     * When you set the data packet to synchronize with the audio, then if the data
     * packet delay is within the audio delay, the SDK triggers the `onStreamMessage` callback when
     * the synchronized audio packet is played out. Do not set this parameter as `true` if you
     * need the receiver to receive the data packet immediately. AR recommends that you set
     * this parameter to `true` only when you need to implement specific functions, for example
     * lyric synchronization.
     */
    bool syncWithAudio;
    /** Whether the SDK guarantees that the receiver receives the data in the sent order.
     *
     * - true: Guarantee that the receiver receives the data in the sent order.
     * - false: Do not guarantee that the receiver receives the data in the sent order.
     *
     * Do not set this parameter to `true` if you need the receiver to receive the data immediately.
     */
    bool ordered;
};
/** Configuration of the injected media stream.
 */
struct InjectStreamConfig {
    /** Width of the injected stream in the live interactive streaming. The default value is 0 (same width as the original stream).
     */
    int width;
    /** Height of the injected stream in the live interactive streaming. The default value is 0 (same height as the original stream).
     */
    int height;
    /** Video GOP (in frames) of the injected stream in the live interactive streaming. The default value is 30 fps.
     */
    int videoGop;
    /** Video frame rate of the injected stream in the live interactive streaming. The default value is 15 fps.
     */
    int videoFramerate;
    /** Video bitrate of the injected stream in the live interactive streaming. The default value is 400 Kbps.
 
     @note The setting of the video bitrate is closely linked to the resolution. If the video bitrate you set is beyond a reasonable range, the SDK sets it within a reasonable range.
     */
    int videoBitrate;
    /** Audio-sample rate of the injected stream in the live interactive streaming: #AUDIO_SAMPLE_RATE_TYPE. The default value is 48000 Hz.
 
     @note We recommend setting the default value.
     */
    AUDIO_SAMPLE_RATE_TYPE audioSampleRate;
    /** Audio bitrate of the injected stream in the live interactive streaming. The default value is 48.
 
     @note We recommend setting the default value.
     */
    int audioBitrate;
    /** Audio channels in the live interactive streaming.
 
     - 1: (Default) Mono
     - 2: Two-channel stereo
 
     @note We recommend setting the default value.
     */
    int audioChannels;
 
    // width / height default set to 0 means pull the stream with its original resolution
    InjectStreamConfig()
        : width(0)
        , height(0)
        , videoGop(30)
        , videoFramerate(15)
        , videoBitrate(400)
        , audioSampleRate(AUDIO_SAMPLE_RATE_48000)
        , audioBitrate(48)
        , audioChannels(1)
    {}
};
/** The definition of ChannelMediaInfo.
 */
struct ChannelMediaInfo {
    /** The channel name. 
     */
    const char* channelName;
    /** The token that enables the user to join the channel.
     */
    const char* token;
    /** The user ID.
     */
    uid_t uid;
};
 
/** The definition of ChannelMediaRelayConfiguration.
 */
struct ChannelMediaRelayConfiguration {
    /** Pointer to the information of the source channel: ChannelMediaInfo. It contains the following members:
     * - `channelName`: The name of the source channel. The default value is `NULL`, which means the SDK applies the name of the current channel.
     * - `uid`: ID of the host whose media stream you want to relay. The default value is 0, which means the SDK generates a random UID. You must set it as 0.
     * - `token`: The token for joining the source channel. It is generated with the `channelName` and `uid` you set in `srcInfo`.
     *   - If you have not enabled the App Certificate, set this parameter as the default value `NULL`, which means the SDK applies the App ID.
     *   - If you have enabled the App Certificate, you must use the `token` generated with the `channelName` and `uid`, and the `uid` must be set as 0.
     */
    ChannelMediaInfo *srcInfo;
    /** Pointer to the information of the destination channel: ChannelMediaInfo. It contains the following members:
     * - `channelName`: The name of the destination channel.
     * - `uid`: ID of the host in the destination channel. The value ranges from 0 to (2<sup>32</sup>-1). To avoid UID conflicts, this `uid` must be different from any other UIDs in the destination channel. The default value is 0, which means the SDK generates a random UID.
     * - `token`: The token for joining the destination channel. It is generated with the `channelName` and `uid` you set in `destInfos`.
     *   - If you have not enabled the App Certificate, set this parameter as the default value `NULL`, which means the SDK applies the App ID.
     *   - If you have enabled the App Certificate, you must use the `token` generated with the `channelName` and `uid`.
     */
    ChannelMediaInfo *destInfos;
    /** The number of destination channels. The default value is 0, and the
     * value range is [0,4). Ensure that the value of this parameter
     * corresponds to the number of ChannelMediaInfo structs you define in
     * `destInfos`.
     */
    int destCount;
 
    ChannelMediaRelayConfiguration()
            : srcInfo(nullptr)
            , destInfos(nullptr)
            , destCount(0)
    {}
};
 
/**  **DEPRECATED** Lifecycle of the CDN live video stream.
*/
enum RTMP_STREAM_LIFE_CYCLE_TYPE
{
  /** Bind to the channel lifecycle. If all hosts leave the channel, the CDN live streaming stops after 30 seconds.
  */
    RTMP_STREAM_LIFE_CYCLE_BIND2CHANNEL = 1,
  /** Bind to the owner of the RTMP stream. If the owner leaves the channel, the CDN live streaming stops immediately.
  */
    RTMP_STREAM_LIFE_CYCLE_BIND2OWNER = 2,
};
 
/** Content hints for screen sharing.
*/
enum VideoContentHint
{
    /** (Default) No content hint.
     */
    CONTENT_HINT_NONE,
    /** Motion-intensive content. Choose this option if you prefer smoothness or when you are sharing a video clip, movie, or video game.
     */
    CONTENT_HINT_MOTION,
    /** Motionless content. Choose this option if you prefer sharpness or when you are sharing a picture, PowerPoint slide, or text.
     */
    CONTENT_HINT_DETAILS
};
 
/** The relative location of the region to the screen or window.
 */
struct Rectangle
{
    /** The horizontal offset from the top-left corner.
    */
    int x;
    /** The vertical offset from the top-left corner.
    */
    int y;
    /** The width of the region.
    */
    int width;
    /** The height of the region.
    */
    int height;
 
    Rectangle(): x(0), y(0), width(0), height(0) {}
    Rectangle(int xx, int yy, int ww, int hh): x(xx), y(yy), width(ww), height(hh) {}
};
 
/**  **DEPRECATED** Definition of the rectangular region. */
typedef struct Rect {
    /** Y-axis of the top line.
     */
    int top;
    /** X-axis of the left line.
     */
    int left;
    /** Y-axis of the bottom line.
     */
    int bottom;
    /** X-axis of the right line.
     */
    int right;
 
    Rect(): top(0), left(0), bottom(0), right(0) {}
    Rect(int t, int l, int b, int r): top(t), left(l), bottom(b), right(r) {}
} Rect;
 
/** The options of the watermark image to be added. */
typedef struct WatermarkOptions {
    /** Sets whether or not the watermark image is visible in the local video preview: 
     * - true: (Default) The watermark image is visible in preview.
     * - false: The watermark image is not visible in preview. 
     */
    bool visibleInPreview;
    /**
     * The watermark position in the landscape mode. See Rectangle.
     * For detailed information on the landscape mode, see the advanced guide *Video Rotation*.
     */
    Rectangle positionInLandscapeMode;
    /**
     * The watermark position in the portrait mode. See Rectangle.
     * For detailed information on the portrait mode, see the advanced guide *Video Rotation*.
     */
    Rectangle positionInPortraitMode;
 
    WatermarkOptions()
        : visibleInPreview(true)
        , positionInLandscapeMode(0, 0, 0, 0)
        , positionInPortraitMode(0, 0, 0, 0)
    {}
} WatermarkOptions;
 
/** Screen sharing encoding parameters.
*/
struct ScreenCaptureParameters
{
    /** The maximum encoding dimensions of the shared region in terms of width * height.
 
     The default value is 1920 * 1080 pixels, that is, 2073600 pixels. AR uses the value of this parameter to calculate the charges.
 
     If the aspect ratio is different between the encoding dimensions and screen dimensions, AR applies the following algorithms for encoding. Suppose the encoding dimensions are 1920 x 1080:
 
     - If the value of the screen dimensions is lower than that of the encoding dimensions, for example, 1000 &times; 1000, the SDK uses 1000 &times; 1000 for encoding.
     - If the value of the screen dimensions is higher than that of the encoding dimensions, for example, 2000 &times; 1500, the SDK uses the maximum value under 1920 &times; 1080 with the aspect ratio of the screen dimension (4:3) for encoding, that is, 1440 &times; 1080.
     */
    VideoDimensions dimensions;
    /** The frame rate (fps) of the shared region.
 
    The default value is 5. We do not recommend setting this to a value greater than 15.
     */
    int frameRate;
    /** The bitrate (Kbps) of the shared region.
 
    The default value is 0 (the SDK works out a bitrate according to the dimensions of the current screen).
     */
    int bitrate;
    /** Sets whether or not to capture the mouse for screen sharing:
 
    - true: (Default) Capture the mouse.
    - false: Do not capture the mouse.
     */
    bool captureMouseCursor;
    
    /** Whether to bring the window to the front when calling \ref IRtcEngine::startScreenCaptureByWindowId "startScreenCaptureByWindowId" to share the window:
     * - true: Bring the window to the front.
     * - false: (Default) Do not bring the window to the front.
     */
    bool windowFocus;
    /** A list of IDs of windows to be blocked.
     *
     * When calling \ref IRtcEngine::startScreenCaptureByScreenRect "startScreenCaptureByScreenRect" to start screen sharing, you can use this parameter to block the specified windows.
     * When calling \ref IRtcEngine::updateScreenCaptureParameters "updateScreenCaptureParameters" to update the configuration for screen sharing, you can use this parameter to dynamically block the specified windows during screen sharing.
     */
    view_t* excludeWindowList;
    /** The number of windows to be blocked.
     */
    int excludeWindowCount;
    
    /** Sets whether or not to capture the speaker audio for screen sharing:
 
    - true: Capture the speaker audio.
    - false: (Default) Do not capture the speaker audio.
     */
    bool captureAudio;
 
    ScreenCaptureParameters() : dimensions(1920, 1080), frameRate(5), bitrate(STANDARD_BITRATE), captureMouseCursor(true), windowFocus(false), excludeWindowList(NULL), excludeWindowCount(0) {}
    ScreenCaptureParameters(const VideoDimensions& d, int f, int b, bool c, bool focus, view_t *ex = NULL, int cnt = 0) : dimensions(d), frameRate(f), bitrate(b), captureMouseCursor(c), windowFocus(focus), excludeWindowList(ex), excludeWindowCount(cnt) {}
    ScreenCaptureParameters(int width, int height, int f, int b, bool c, bool focus, view_t *ex = NULL, int cnt = 0) : dimensions(width, height), frameRate(f), bitrate(b), captureMouseCursor(c), windowFocus(focus), excludeWindowList(ex), excludeWindowCount(cnt) {}
};
 
/** Video display settings of the VideoCanvas class.
*/
struct VideoCanvas
{
    /** Video display window (view).
     */
    view_t view;
    /** The rendering mode of the video view. See RENDER_MODE_TYPE
     */
    int renderMode;
    /** The unique channel name for the ARRTC session in the string format. The string length must be less than 64 bytes. Supported character scopes are:
     - All lowercase English letters: a to z. 
     - All uppercase English letters: A to Z. 
     - All numeric characters: 0 to 9. 
     - The space character. 
     - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
 
     @note 
     - The default value is the empty string "". Use the default value if the user joins the channel using the \ref IRtcEngine::joinChannel "joinChannel" method in the IRtcEngine class. The `VideoCanvas` struct defines the video canvas of the user in the channel.
     - If the user joins the channel using the \ref IRtcEngine::joinChannel "joinChannel" method in the IChannel class, set this parameter as the `channelId` of the `IChannel` object. The `VideoCanvas` struct defines the video canvas of the user in the channel with the specified channel ID.
     */
    char channelId[MAX_CHANNEL_ID_LENGTH];
    /** The user ID. */
    uid_t uid;
    void *priv; // private data (underlying video engine denotes it)
    /** The mirror mode of the video view. See VIDEO_MIRROR_MODE_TYPE
     @note
     - For the mirror mode of the local video view: If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
     - For the mirror mode of the remote video view: The SDK disables the mirror mode by default.
    */
    VIDEO_MIRROR_MODE_TYPE mirrorMode;
 
    VideoCanvas()
        : view(NULL)
        , renderMode(RENDER_MODE_HIDDEN)
        , uid(0)
        , priv(NULL)
        , mirrorMode(VIDEO_MIRROR_MODE_AUTO)
    {
        channelId[0] = '\0';
    }
    VideoCanvas(view_t v, int m, uid_t u)
        : view(v)
        , renderMode(m)
        , uid(u)
        , priv(NULL)
        , mirrorMode(VIDEO_MIRROR_MODE_AUTO)
    {
        channelId[0] = '\0';
    }
    VideoCanvas(view_t v, int m, const char *ch, uid_t u)
        : view(v)
        , renderMode(m)
        , uid(u)
        , priv(NULL)
        , mirrorMode(VIDEO_MIRROR_MODE_AUTO)
    {
        strncpy(channelId, ch, MAX_CHANNEL_ID_LENGTH);
        channelId[MAX_CHANNEL_ID_LENGTH - 1] = '\0';
    }
    VideoCanvas(view_t v, int rm, uid_t u, VIDEO_MIRROR_MODE_TYPE mm)
        : view(v)
        , renderMode(rm)
        , uid(u)
        , priv(NULL)
        , mirrorMode(mm)
    {
        channelId[0] = '\0';
    }
    VideoCanvas(view_t v, int rm, const char *ch, uid_t u, VIDEO_MIRROR_MODE_TYPE mm)
        : view(v)
        , renderMode(rm)
        , uid(u)
        , priv(NULL)
        , mirrorMode(mm)
    {
        strncpy(channelId, ch, MAX_CHANNEL_ID_LENGTH);
        channelId[MAX_CHANNEL_ID_LENGTH - 1] = '\0';
    }
};
 
/** Image enhancement options.
*/
struct BeautyOptions {
    /** The contrast level, used with the @p lightening parameter.
    */
    enum LIGHTENING_CONTRAST_LEVEL
    {
        /** Low contrast level. */
        LIGHTENING_CONTRAST_LOW = 0,
        /** (Default) Normal contrast level. */
        LIGHTENING_CONTRAST_NORMAL,
        /** High contrast level. */
        LIGHTENING_CONTRAST_HIGH
    };
 
/** The contrast level, used with the @p lightening parameter.
*/
LIGHTENING_CONTRAST_LEVEL lighteningContrastLevel;
 
/** The brightness level. The value ranges from 0.0 (original) to 1.0. */
float lighteningLevel;
 
/** The sharpness level. The value ranges between 0 (original) and 1. This parameter is usually used to remove blemishes.
 */
float smoothnessLevel;
 
/** The redness level. The value ranges between 0 (original) and 1. This parameter adjusts the red saturation level.
*/
float rednessLevel;
 
BeautyOptions(LIGHTENING_CONTRAST_LEVEL contrastLevel, float lightening, float smoothness, float redness)
    : lighteningLevel(lightening),
    smoothnessLevel(smoothness),
    rednessLevel(redness),
    lighteningContrastLevel(contrastLevel) {}
 
BeautyOptions()
    : lighteningLevel(0),
    smoothnessLevel(0),
    rednessLevel(0),
    lighteningContrastLevel(LIGHTENING_CONTRAST_NORMAL) {}
};
 
/**
 * The UserInfo struct.
 */
struct UserInfo {
  /**
   * The user ID.
   */
  uid_t uid;
  /**
   * The user account.
   */
  char userAccount[MAX_USER_ACCOUNT_LENGTH];
  UserInfo()
      : uid(0) {
    userAccount[0] = '\0';
  }
};
 
/**
 *  Regions for connetion.
 */
enum AREA_CODE {
    /**
     * Mainland China.
     */
    AREA_CODE_CN = 0x00000001,
    /**
     * North America.
     */
    AREA_CODE_NA = 0x00000002,
    /**
     * Europe.
     */
    AREA_CODE_EU = 0x00000004,
    /**
     * Asia, excluding Mainland China.
     */
    AREA_CODE_AS = 0x00000008,
    /**
     * Japan.
     */
    AREA_CODE_JP = 0x00000010,
    /**
     * India.
     */
    AREA_CODE_IN = 0x00000020,
    /**
     * (Default) Global.
     */
    AREA_CODE_GLOB = 0xFFFFFFFF
};
 
enum ENCRYPTION_CONFIG {
    /**
     * - 1: Force set master key and mode;
     * - 0: Not force set, checking whether encryption plugin exists
     */
    ENCRYPTION_FORCE_SETTING = (1 << 0),
    /**
     * - 1: Force not encrypting packet;
     * - 0: Not force encrypting;
     */
    ENCRYPTION_FORCE_DISABLE_PACKET = (1 << 1)
};
/** Definition of IPacketObserver.
*/
class IPacketObserver
{
public:
/** Definition of Packet.
 */
    struct Packet
    {
        /** Buffer address of the sent or received data.
         * @note AR recommends that the value of buffer is more than 2048 bytes, otherwise, you may meet undefined behaviors such as a crash.
         */
        const unsigned char* buffer;
        /** Buffer size of the sent or received data.
         */
        unsigned int size;
    };
    /** Occurs when the local user sends an audio packet.
 
     @param packet The sent audio packet. See Packet.
     @return
     - true: The audio packet is sent successfully.
     - false: The audio packet is discarded.
     */
    virtual bool onSendAudioPacket(Packet& packet) = 0;
    /** Occurs when the local user sends a video packet.
 
     @param packet The sent video packet. See Packet.
     @return
     - true: The video packet is sent successfully.
     - false: The video packet is discarded.
     */
    virtual bool onSendVideoPacket(Packet& packet) = 0;
    /** Occurs when the local user receives an audio packet.
 
     @param packet The received audio packet. See Packet.
     @return
     - true: The audio packet is received successfully.
     - false: The audio packet is discarded.
     */
    virtual bool onReceiveAudioPacket(Packet& packet) = 0;
    /** Occurs when the local user receives a video packet.
 
     @param packet The received video packet. See Packet.
     @return
     - true: The video packet is received successfully.
     - false: The video packet is discarded.
     */
    virtual bool onReceiveVideoPacket(Packet& packet) = 0;
};
 
 
#if defined(_WIN32)||defined(__ANDROID__) || (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_MAC))
/** The capture type of the custom video source.
 */
enum VIDEO_CAPTURE_TYPE {
    /** Unknown type.
     */
    VIDEO_CAPTURE_UNKNOWN,
    /** (Default) Video captured by the camera.
     */
    VIDEO_CAPTURE_CAMERA,
    /** Video for screen sharing.
     */
    VIDEO_CAPTURE_SCREEN,
};
 
/** The IVideoFrameConsumer class. The SDK uses it to receive the video frame that you capture.
 */
class IVideoFrameConsumer {
public:
    /** Receives the raw video frame.
     *
     * @note Ensure that the video frame type that you specify in this method is the same as that in the \ref ar::rtc::IVideoSource::getBufferType "getBufferType" callback.
     *
     * @param buffer The video buffer.
     * @param frameType The video frame type. See \ref AM::ExternalVideoFrame::VIDEO_PIXEL_FORMAT "VIDEO_PIXEL_FORMAT".
     * @param width The width (px) of the video frame.
     * @param height The height (px) of the video frame.
     * @param rotation The angle (degree) at which the video frame rotates clockwise. If you set the rotation angle, the
     * SDK rotates the video frame after receiving it. You can set the rotation angle as `0`, `90`, `180`, and `270`.
     * @param timestamp The Unix timestamp (ms) of the video frame. You must set a timestamp for each video frame.
     */
#if defined(_WIN32)
    virtual void consumeRawVideoFrame(const unsigned char *buffer, AM::ExternalVideoFrame::VIDEO_PIXEL_FORMAT frameType, int width, int height, int rotation, long timestamp) = 0;
#endif
};
 
/** The IVideoSource class. You can use it to customize the video source.
 */
class IVideoSource {
public:
    /** Notification for initializing the custom video source.
     *
     * The SDK triggers this callback to remind you to initialize the custom video source. After receiving this callback,
     * you can do some preparation, such as enabling the camera, and then use the return value to tell the SDK whether the
     * custom video source is prepared.
     *
     * @param consumer An IVideoFrameConsumer object that the SDK passes to you. You need to reserve this object and use it
     * to send the video frame to the SDK once the custom video source is started. See IVideoFrameConsumer.
     *
     * @return
     * - true: The custom video source is initialized.
     * - false: The custom video source is not ready or fails to initialize. The SDK stops and reports the error.
     */
    virtual bool onInitialize(IVideoFrameConsumer *consumer) = 0;
 
    /** Notification for disabling the custom video source.
     *
     * The SDK triggers this callback to remind you to disable the custom video source device. This callback tells you
     * that the SDK is about to release the IVideoFrameConsumer object. Ensure that you no longer use IVideoFrameConsumer
     * after receiving this callback.
     */
    virtual void onDispose() = 0;
 
    /** Notification for starting the custom video source.
     *
     * The SDK triggers this callback to remind you to start the custom video source for capturing video. The SDK uses
     * IVideoFrameConsumer to receive the video frame that you capture after the video source is started. You must use
     * the return value to tell the SDK whether the custom video source is started.
     *
     * @return
     * - true: The custom video source is started.
     * - false: The custom video source fails to start. The SDK stops and reports the error.
     */
    virtual bool onStart() = 0;
 
    /** Notification for stopping capturing video.
     *
     * The SDK triggers this callback to remind you to stop capturing video. This callback tells you that the SDK is about
     * to stop using IVideoFrameConsumer to receive the video frame that you capture.
     */
    virtual void onStop() = 0;
 
    /** Gets the video frame type.
     *
     * Before you initialize the custom video source, the SDK triggers this callback to query the video frame type. You
     * must specify the video frame type in the return value and then pass it to the SDK.
     *
     * @note Ensure that the video frame type that you specify in this callback is the same as that in the \ref ar::rtc::IVideoFrameConsumer::consumeRawVideoFrame "consumeRawVideoFrame" method.
     *
     * @return \ref AM::ExternalVideoFrame::VIDEO_PIXEL_FORMAT "VIDEO_PIXEL_FORMAT"
     */
#if defined(_WIN32)
    virtual AM::ExternalVideoFrame::VIDEO_PIXEL_FORMAT getBufferType() = 0;
#endif
    /** Gets the capture type of the custom video source.
     *
     * Before you initialize the custom video source, the SDK triggers this callback to query the capture type of the video source.
     * You must specify the capture type in the return value and then pass it to the SDK. The SDK enables the corresponding video
     * processing algorithm according to the capture type after receiving the video frame.
     *
     * @return #VIDEO_CAPTURE_TYPE
     */
    virtual VIDEO_CAPTURE_TYPE getVideoCaptureType() = 0;
    /** Gets the content hint of the custom video source.
     *
     * If you specify the custom video source as a screen-sharing video, the SDK triggers this callback to query the
     * content hint of the video source before you initialize the video source. You must specify the content hint in the
     * return value and then pass it to the SDK. The SDK enables the corresponding video processing algorithm according
     * to the content hint after receiving the video frame.
     *
     * @return \ref ar::rtc::VideoContentHint "VideoContentHint"
     */
    virtual VideoContentHint getVideoContentHint() = 0;
};
#endif
 
/** The SDK uses the IRtcEngineEventHandler interface class to send callbacks to the application. The application inherits the methods of this interface class to retrieve these callbacks.
 
 All methods in this interface class have default (empty) implementations. Therefore, the application can only inherit some required events. In the callbacks, avoid time-consuming tasks or calling blocking APIs, such as the SendMessage method. Otherwise, the SDK may not work properly.
 */
class IRtcEngineEventHandler
{
public:
    virtual ~IRtcEngineEventHandler() {}
    
    /** Reports a warning during SDK runtime.
 
     In most cases, the application can ignore the warning reported by the SDK because the SDK can usually fix the issue and resume running. For example, when losing connection with the server, the SDK may report #WARN_LOOKUP_CHANNEL_TIMEOUT and automatically try to reconnect.
 
     @param warn Warning code: #WARN_CODE_TYPE.
     @param msg Pointer to the warning message.
     */
    virtual void onWarning(int warn, const char* msg) {
        (void)warn;
        (void)msg;
    }
 
    /** Reports an error during SDK runtime.
 
     In most cases, the SDK cannot fix the issue and resume running. The SDK requires the application to take action or informs the user about the issue.
 
     For example, the SDK reports an #ERR_START_CALL error when failing to initialize a call. The application informs the user that the call initialization failed and invokes the \ref IRtcEngine::leaveChannel "leaveChannel" method to leave the channel.
 
     @param err Error code: #ERROR_CODE_TYPE.
     @param msg Pointer to the error message.
     */
    virtual void onError(int err, const char* msg) {
        (void)err;
        (void)msg;
    }
 
    /** Occurs when a user joins a channel.
 
     This callback notifies the application that a user joins a specified channel when the application calls the \ref IRtcEngine::joinChannel "joinChannel" method.
 
     The channel name assignment is based on @p channelName specified in the \ref IRtcEngine::joinChannel "joinChannel" method.
 
     If the @p uid is not specified in the *joinChannel* method, the server automatically assigns a @p uid.
 
     @param channel  Pointer to the channel name.
     @param  uid User ID of the user joining the channel.
     @param  elapsed Time elapsed (ms) from the user calling the \ref IRtcEngine::joinChannel "joinChannel" method until the SDK triggers this callback.
     */
    virtual void onJoinChannelSuccess(const char* channel, uid_t uid, int elapsed) {
        (void)channel;
        (void)uid;
        (void)elapsed;
    }
 
    /** Occurs when a user rejoins the channel after disconnection due to network problems.
 
    When a user loses connection with the server because of network problems, the SDK automatically tries to reconnect and triggers this callback upon reconnection.
 
     @param channel Pointer to the channel name.
     @param uid User ID of the user rejoining the channel.
     @param elapsed Time elapsed (ms) from starting to reconnect until the SDK triggers this callback.
     */
    virtual void onRejoinChannelSuccess(const char* channel, uid_t uid, int elapsed) {
        (void)channel;
        (void)uid;
        (void)elapsed;
    }
 
    /** Occurs when a user leaves the channel.
 
    This callback notifies the application that a user leaves the channel when the application calls the \ref IRtcEngine::leaveChannel "leaveChannel" method.
 
    The application retrieves information, such as the call duration and statistics.
 
     @param stats Pointer to the statistics of the call: RtcStats.
     */
    virtual void onLeaveChannel(const RtcStats& stats) {
        (void)stats;
    }
 
    /** Occurs when the user role switches in a live broadcast. For example, from a host to an audience or vice versa.
 
    This callback notifies the application of a user role switch when the application calls the \ref IRtcEngine::setClientRole "setClientRole" method.
 
    The SDK triggers this callback when the local user switches the user role by calling the \ref ar::rtc::IRtcEngine::setClientRole "setClientRole" method after joining the channel.
     @param oldRole Role that the user switches from: #CLIENT_ROLE_TYPE.
     @param newRole Role that the user switches to: #CLIENT_ROLE_TYPE.
     */
    virtual void onClientRoleChanged(CLIENT_ROLE_TYPE oldRole, CLIENT_ROLE_TYPE newRole) {
    }
 
    /** Occurs when a remote user (Communication)/ host (Live Broadcast) joins the channel.
 
     - Communication profile: This callback notifies the application that another user joins the channel. If other users are already in the channel, the SDK also reports to the application on the existing users.
     - Live-broadcast profile: This callback notifies the application that the host joins the channel. If other hosts are already in the channel, the SDK also reports to the application on the existing hosts. We recommend limiting the number of hosts to 17.
 
     The SDK triggers this callback under one of the following circumstances:
     - A remote user/host joins the channel by calling the \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method.
     - A remote user switches the user role to the host by calling the \ref ar::rtc::IRtcEngine::setClientRole "setClientRole" method after joining the channel.
     - A remote user/host rejoins the channel after a network interruption.
     - The host injects an online media stream into the channel by calling the \ref ar::rtc::IRtcEngine::addInjectStreamUrl "addInjectStreamUrl" method.
 
     @note In the Live-broadcast profile:
     - The host receives this callback when another host joins the channel.
     - The audience in the channel receives this callback when a new host joins the channel.
     - When a web application joins the channel, the SDK triggers this callback as long as the web application publishes streams.
 
     @param uid User ID of the user or host joining the channel.
     @param elapsed Time delay (ms) from the local user calling the \ref IRtcEngine::joinChannel "joinChannel" method until the SDK triggers this callback.
     */
    virtual void onUserJoined(uid_t uid, int elapsed) {
        (void)uid;
        (void)elapsed;
    }
 
    /** Occurs when a remote user (Communication)/host (Live Broadcast) leaves the channel.
 
    Reasons why the user is offline:
 
    - Leave the channel: When the user/host leaves the channel, the user/host sends a goodbye message. When the message is received, the SDK assumes that the user/host leaves the channel.
    - Drop offline: When no data packet of the user or host is received for a certain period of time, the SDK assumes that the user/host drops offline. Unreliable network connections may lead to false detections, so we recommend using a signaling system for more reliable offline detection.
 
     @param uid User ID of the user leaving the channel or going offline.
     @param reason Reason why the user is offline: #USER_OFFLINE_REASON_TYPE.
     */
    virtual void onUserOffline(uid_t uid, USER_OFFLINE_REASON_TYPE reason) {
        (void)uid;
        (void)reason;
    }
 
    /** Reports the last mile network quality of the local user once every two seconds before the user joins the channel.
 
     Last mile refers to the connection between the local device and AR's edge server. After the application calls the \ref IRtcEngine::enableLastmileTest "enableLastmileTest" method, this callback reports once every two seconds the uplink and downlink last mile network conditions of the local user before the user joins the channel.
 
     @param quality The last mile network quality: #QUALITY_TYPE.
     */
    virtual void onLastmileQuality(int quality) {
        (void)quality;
    }
 
    /** Reports the last-mile network probe result.
 
    The SDK triggers this callback within 30 seconds after the app calls the \ref ar::rtc::IRtcEngine::startLastmileProbeTest "startLastmileProbeTest" method.
 
    @param result The uplink and downlink last-mile network probe test result. See LastmileProbeResult.
    */
    virtual void onLastmileProbeResult(const LastmileProbeResult& result) {
        (void)result;
    }
 
    /** **DEPRECATED** Occurs when the connection between the SDK and the server is interrupted.
 
     Deprecated as of v2.3.2. Replaced by the \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged(CONNECTION_STATE_RECONNECTING, CONNECTION_CHANGED_INTERRUPTED)" callback.
 
     The SDK triggers this callback when it loses connection with the server for more than four seconds after the connection is established.
 
     After triggering this callback, the SDK tries reconnecting to the server. You can use this callback to implement pop-up reminders.
 
     This callback is different from \ref ar::rtc::IRtcEngineEventHandler::onConnectionLost "onConnectionLost":
     - The SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionInterrupted "onConnectionInterrupted" callback when it loses connection with the server for more than four seconds after it successfully joins the channel.
     - The SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionLost "onConnectionLost" callback when it loses connection with the server for more than 10 seconds, whether or not it joins the channel.
 
     If the SDK fails to rejoin the channel 20 minutes after being disconnected from AR's edge server, the SDK stops rejoining the channel.
 
    */
    virtual void onConnectionInterrupted() {}
 
    /** Occurs when the SDK cannot reconnect to AR's edge server 10 seconds after its connection to the server is interrupted.
 
    The SDK triggers this callback when it cannot connect to the server 10 seconds after calling the \ref IRtcEngine::joinChannel "joinChannel" method, whether or not it is in the channel.
 
    This callback is different from \ref ar::rtc::IRtcEngineEventHandler::onConnectionInterrupted "onConnectionInterrupted":
 
    - The SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionInterrupted "onConnectionInterrupted" callback when it loses connection with the server for more than four seconds after it successfully joins the channel.
    - The SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onConnectionLost "onConnectionLost" callback when it loses connection with the server for more than 10 seconds, whether or not it joins the channel.
 
    If the SDK fails to rejoin the channel 20 minutes after being disconnected from AR's edge server, the SDK stops rejoining the channel.
 
     */
    virtual void onConnectionLost() {}
 
    /** **DEPRECATED** Deprecated as of v2.3.2. Replaced by the \ref ar::rtc::IRtcEngineEventHandler::onConnectionStateChanged "onConnectionStateChanged(CONNECTION_STATE_FAILED, CONNECTION_CHANGED_BANNED_BY_SERVER)" callback.
 
    Occurs when your connection is banned by the AR Server.
     */
    virtual void onConnectionBanned() {}
 
    /** Occurs when a method is executed by the SDK.
 
     @param err The error code (#ERROR_CODE_TYPE) returned by the SDK when a method call fails. If the SDK returns 0, then the method call is successful.
     @param api Pointer to the method executed by the SDK.
     @param result Pointer to the result of the method call.
     */
    virtual void onApiCallExecuted(int err, const char* api, const char* result) {
        (void)err;
        (void)api;
        (void)result;
    }
 
    /** Occurs when the token expires.
 
     After a token is specified by calling the \ref IRtcEngine::joinChannel "joinChannel" method, if the SDK losses connection with the AR server due to network issues, the token may expire after a certain period of time and a new token may be required to reconnect to the server.
 
     This callback notifies the application to generate a new token. Call the \ref IRtcEngine::renewToken "renewToken" method to renew the token.
     */
    virtual void onRequestToken() {
    }
 
    /** Occurs when the token expires in 30 seconds.
 
     The user becomes offline if the token used in the \ref IRtcEngine::joinChannel "joinChannel" method expires. The SDK triggers this callback 30 seconds before the token expires to remind the application to get a new token. Upon receiving this callback, generate a new token on the server and call the \ref IRtcEngine::renewToken "renewToken" method to pass the new token to the SDK.
 
     @param token Pointer to the token that expires in 30 seconds.
     */
    virtual void onTokenPrivilegeWillExpire(const char* token) {
        (void)token;
    }
 
    /** **DEPRECATED** Reports the statistics of the audio stream from each remote user/host.
 
    Deprecated as of v2.3.2. Use the \ref ar::rtc::IRtcEngineEventHandler::onRemoteAudioStats "onRemoteAudioStats" callback instead.
 
     The SDK triggers this callback once every two seconds to report the audio quality of each remote user/host sending an audio stream. If a channel has multiple users/hosts sending audio streams, the SDK triggers this callback as many times.
 
     @param uid User ID of the speaker.
     @param quality Audio quality of the user: #QUALITY_TYPE.
     @param delay Time delay (ms) of sending the audio packet from the sender to the receiver, including the time delay of audio sampling pre-processing, transmission, and the jitter buffer.
     @param lost Packet loss rate (%) of the audio packet sent from the sender to the receiver.
     */
    virtual void onAudioQuality(uid_t uid, int quality, unsigned short delay, unsigned short lost) {
        (void)uid;
        (void)quality;
        (void)delay;
        (void)lost;
    }
 
    /** Reports the statistics of the current call. 
    
     The SDK triggers this callback once every two seconds after the user joins the channel.
     
     @param stats Statistics of the RtcEngine: RtcStats.
     */
    virtual void onRtcStats(const RtcStats& stats) {
        (void)stats;
    }
 
    /** Reports the last mile network quality of each user in the channel once every two seconds.
 
     Last mile refers to the connection between the local device and AR's edge server. This callback reports once every two seconds the last mile network conditions of each user in the channel. If a channel includes multiple users, the SDK triggers this callback as many times.
 
     @param uid User ID. The network quality of the user with this @p uid is reported. If @p uid is 0, the local network quality is reported.
     @param txQuality Uplink transmission quality rating of the user in terms of the transmission bitrate, packet loss rate, average RTT (Round-Trip Time), and jitter of the uplink network. @p txQuality is a quality rating helping you understand how well the current uplink network conditions can support the selected VideoEncoderConfiguration. For example, a 1000 Kbps uplink network may be adequate for video frames with a resolution of 640 &times; 480 and a frame rate of 15 fps in the Live-broadcast profile, but may be inadequate for resolutions higher than 1280 &times; 720. See #QUALITY_TYPE.
     @param rxQuality Downlink network quality rating of the user in terms of the packet loss rate, average RTT, and jitter of the downlink network. See #QUALITY_TYPE.
     */
    virtual void onNetworkQuality(uid_t uid, int txQuality, int rxQuality) {
    (void)uid;
    (void)txQuality;
    (void)rxQuality;
    }
 
    /** Reports the statistics of the local video stream.
     *
     * The SDK triggers this callback once every two seconds for each
     * user/host. If there are multiple users/hosts in the channel, the SDK
     * triggers this callback as many times.
     *
     * @note
     * If you have called the \ref ar::rtc::IRtcEngine::enableDualStream
     * "enableDualStream" method, the \ref onLocalVideoStats()
     * "onLocalVideoStats" callback reports the statistics of the high-video
     * stream (high bitrate, and high-resolution video stream).
     *
     * @param stats Statistics of the local video stream. See LocalVideoStats.
     */
  virtual void onLocalVideoStats(const LocalVideoStats& stats) {
    (void)stats;
    }
 
    /** Reports the statistics of the video stream from each remote user/host.
     *
     * The SDK triggers this callback once every two seconds for each remote
     * user/host. If a channel includes multiple remote users, the SDK
     * triggers this callback as many times.
     *
     * @param stats Statistics of the remote video stream. See
     * RemoteVideoStats.
     */
    virtual void onRemoteVideoStats(const RemoteVideoStats& stats) {
      (void)stats;
      }
 
    /** Reports the statistics of the local audio stream.
     *
     * The SDK triggers this callback once every two seconds.
     *
     * @param stats The statistics of the local audio stream.
     * See LocalAudioStats.
     */
    virtual void onLocalAudioStats(const LocalAudioStats& stats) {
        (void)stats;
    }
 
    /** Reports the statistics of the audio stream from each remote user/host.
 
     This callback replaces the \ref ar::rtc::IRtcEngineEventHandler::onAudioQuality "onAudioQuality" callback.
 
     The SDK triggers this callback once every two seconds for each remote user/host. If a channel includes multiple remote users, the SDK triggers this callback as many times.
 
     @param stats Pointer to the statistics of the received remote audio streams. See RemoteAudioStats.
     */
    virtual void onRemoteAudioStats(const RemoteAudioStats& stats) {
        (void)stats;
    }
 
    /** Occurs when the local audio state changes.
     *
     * This callback indicates the state change of the local audio stream,
     * including the state of the audio recording and encoding, and allows
     * you to troubleshoot issues when exceptions occur.
     *
     * @note
     * When the state is #LOCAL_AUDIO_STREAM_STATE_FAILED (3), see the `error`
     * parameter for details.
     *
     * @param state State of the local audio. See #LOCAL_AUDIO_STREAM_STATE.
     * @param error The error information of the local audio.
     * See #LOCAL_AUDIO_STREAM_ERROR.
     */
    virtual void onLocalAudioStateChanged(LOCAL_AUDIO_STREAM_STATE state, LOCAL_AUDIO_STREAM_ERROR error) {
        (void)state;
        (void)error;
    }
 
    /** Occurs when the remote audio state changes.
     *
     * This callback indicates the state change of the remote audio stream.
     *
     * @param uid ID of the remote user whose audio state changes.
     * @param state State of the remote audio. See #REMOTE_AUDIO_STATE.
     * @param reason The reason of the remote audio state change.
     * See #REMOTE_AUDIO_STATE_REASON.
     * @param elapsed Time elapsed (ms) from the local user calling the
     * \ref IRtcEngine::joinChannel "joinChannel" method until the SDK
     * triggers this callback.
     */
    virtual void onRemoteAudioStateChanged(uid_t uid, REMOTE_AUDIO_STATE state, REMOTE_AUDIO_STATE_REASON reason, int elapsed) {
        (void)uid;
        (void)state;
        (void)reason;
        (void)elapsed;
    }
 
    /** Occurs when the audio publishing state changes.
     *
     * @since v3.1.0
     *
     * This callback indicates the publishing state change of the local audio stream.
     *
     * @param channel The channel name.
     * @param oldState The previous publishing state. For details, see #STREAM_PUBLISH_STATE.
     * @param newState The current publishing state. For details, see #STREAM_PUBLISH_STATE.
     * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
     */
    virtual void onAudioPublishStateChanged(const char* channel, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState) {
        (void)channel;
        (void)oldState;
        (void)newState;
        (void)elapseSinceLastState;
    }
 
    /** Occurs when the video publishing state changes.
     *
     * @since v3.1.0
     *
     * This callback indicates the publishing state change of the local video stream.
     *
     * @param channel The channel name.
     * @param oldState The previous publishing state. For details, see #STREAM_PUBLISH_STATE.
     * @param newState The current publishing state. For details, see #STREAM_PUBLISH_STATE.
     * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
     */
    virtual void onVideoPublishStateChanged(const char* channel, STREAM_PUBLISH_STATE oldState, STREAM_PUBLISH_STATE newState, int elapseSinceLastState) {
        (void)channel;
        (void)oldState;
        (void)newState;
        (void)elapseSinceLastState;
    }
 
    /** Occurs when the audio subscribing state changes.
     *
     * @since v3.1.0
     *
     * This callback indicates the subscribing state change of a remote audio stream.
     *
     * @param channel The channel name.
     * @param uid The ID of the remote user.
     * @param oldState The previous subscribing state. For details, see #STREAM_SUBSCRIBE_STATE.
     * @param newState The current subscribing state. For details, see #STREAM_SUBSCRIBE_STATE.
     * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
     */
    virtual void onAudioSubscribeStateChanged(const char* channel, uid_t uid, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState) {
        (void)channel;
        (void)uid;
        (void)oldState;
        (void)newState;
        (void)elapseSinceLastState;
    }
 
    /** Occurs when the audio subscribing state changes.
     *
     * @since v3.1.0
     *
     * This callback indicates the subscribing state change of a remote video stream.
     *
     * @param channel The channel name.
     * @param uid The ID of the remote user.
     * @param oldState The previous subscribing state. For details, see #STREAM_SUBSCRIBE_STATE.
     * @param newState The current subscribing state. For details, see #STREAM_SUBSCRIBE_STATE.
     * @param elapseSinceLastState The time elapsed (ms) from the previous state to the current state.
     */
    virtual void onVideoSubscribeStateChanged(const char* channel, uid_t uid, STREAM_SUBSCRIBE_STATE oldState, STREAM_SUBSCRIBE_STATE newState, int elapseSinceLastState) {
        (void)channel;
        (void)uid;
        (void)oldState;
        (void)newState;
        (void)elapseSinceLastState;
    }
 
    /** Reports which users are speaking, the speakers' volume and whether the local user is speaking.
 
     This callback reports the IDs and volumes of the loudest speakers at the moment in the channel, and whether the local user is speaking.
 
     By default, this callback is disabled. You can enable it by calling the \ref IRtcEngine::enableAudioVolumeIndication(int, int, bool) "enableAudioVolumeIndication" method.
     Once enabled, this callback is triggered at the set interval, regardless of whether a user speaks or not.
 
     The SDK triggers two independent `onAudioVolumeIndication` callbacks at one time, which separately report the volume information of the local user and all the remote speakers. 
     For more information, see the detailed parameter descriptions.
 
     @note
     - To enable the voice activity detection of the local user, ensure that you set `report_vad`(true) in the `enableAudioVolumeIndication` method.
     - Calling the \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" method affects the SDK's behavior:
        - If the local user calls the \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" method, the SDK stops triggering the local user's callback.
        - 20 seconds after a remote speaker calls the *muteLocalAudioStream* method, the remote speakers' callback excludes this remote user's information; 20 seconds after all remote users call the *muteLocalAudioStream* method, the SDK stops triggering the remote speakers' callback.
     - An empty @p speakers array in the *onAudioVolumeIndication* callback suggests that no remote user is speaking at the moment.
 
     @param speakers A pointer to AudioVolumeInfo:
     - In the local user's callback, this struct contains the following members:
       - `uid` = 0, 
       - `volume` = `totalVolume`, which reports the sum of the voice volume and audio-mixing volume of the local user, and
       - `vad`, which reports the voice activity status of the local user.
     - In the remote speakers' callback, this array contains the following members:
       - `uid` of the remote speaker,
       - `volume`, which reports the sum of the voice volume and audio-mixing volume of each remote speaker, and
       - `vad` = 0.
       
       An empty speakers array in the callback indicates that no remote user is speaking at the moment.
     @param speakerNumber Total number of speakers. The value range is [0, 3].
     - In the local user’s callback, `speakerNumber` = 1, regardless of whether the local user speaks or not.
     - In the remote speakers' callback, the callback reports the IDs and volumes of the three loudest speakers when there are more than three remote users in the channel, and `speakerNumber` = 3.
     @param totalVolume Total volume after audio mixing. The value ranges between 0 (lowest volume) and 255 (highest volume).
     - In the local user’s callback, `totalVolume` is the sum of the voice volume and audio-mixing volume of the local user.
     - In the remote speakers' callback, `totalVolume` is the sum of the voice volume and audio-mixing volume of all the remote speakers.
     */
    virtual void onAudioVolumeIndication(const AudioVolumeInfo* speakers, unsigned int speakerNumber, int totalVolume) {
        (void)speakers;
        (void)speakerNumber;
        (void)totalVolume;
    }
 
    /** Occurs when the most active speaker is detected.
 
     After a successful call of \ref IRtcEngine::enableAudioVolumeIndication(int, int, bool) "enableAudioVolumeIndication", 
     the SDK continuously detects which remote user has the loudest volume. During the current period, the remote user, 
     who is detected as the loudest for the most times, is the most active user.
 
     When the number of user is no less than two and an active speaker exists, the SDK triggers this callback and reports the `uid` of the most active speaker.
     - If the most active speaker is always the same user, the SDK triggers this callback only once.
     - If the most active speaker changes to another user, the SDK triggers this callback again and reports the `uid` of the new active speaker.
    
     @param uid The user ID of the most active speaker.
    */
    virtual void onActiveSpeaker(uid_t uid) {
        (void)uid;
    }
 
    /** **DEPRECATED** Occurs when the video stops playing.
 
     The application can use this callback to change the configuration of the view (for example, displaying other pictures in the view) after the video stops playing.
 
     Deprecated as of v2.4.1. Use LOCAL_VIDEO_STREAM_STATE_STOPPED(0) in the \ref ar::rtc::IRtcEngineEventHandler::onLocalVideoStateChanged "onLocalVideoStateChanged" callback instead.
     */
    virtual void onVideoStopped() {}
 
    /** Occurs when the first local video frame is displayed/rendered on the local video view.
 
    @param width Width (px) of the first local video frame.
    @param height Height (px) of the first local video frame.
    @param elapsed Time elapsed (ms) from the local user calling the \ref IRtcEngine::joinChannel "joinChannel" method until the SDK triggers this callback.
    If you call the \ref IRtcEngine::startPreview "startPreview" method  before calling the *joinChannel* method, then @p elapsed is the time elapsed from calling the *startPreview* method until the SDK triggers this callback.
    */
    virtual void onFirstLocalVideoFrame(int width, int height, int elapsed) {
        (void)width;
        (void)height;
        (void)elapsed;
    }
 
    /** Occurs when the first video frame is published.
     *
     * @since v3.1.0
     *
     * The SDK triggers this callback under one of the following circumstances:
     * - The local client enables the video module and calls \ref IRtcEngine::joinChannel "joinChannel" successfully.
     * - The local client calls \ref IRtcEngine::muteLocalVideoStream "muteLocalVideoStream(true)" and \ref IRtcEngine::muteLocalVideoStream "muteLocalVideoStream(false)" in sequence.
     * - The local client calls \ref IRtcEngine::disableVideo "disableVideo" and \ref IRtcEngine::enableVideo "enableVideo" in sequence.
     *
     * @param elapsed The time elapsed (ms) from the local client calling \ref IRtcEngine::joinChannel "joinChannel" until the SDK triggers this callback.
     */
    virtual void onFirstLocalVideoFramePublished(int elapsed) {
        (void)elapsed;
    }
 
    /** Occurs when the first remote video frame is received and decoded.
     *
     * @deprecated
     * This callback is deprecated and replaced by the
     * \ref onRemoteVideoStateChanged() "onRemoteVideoStateChanged" callback
     * with the following parameters:
     * - #REMOTE_VIDEO_STATE_STARTING (1)
     * - #REMOTE_VIDEO_STATE_DECODING (2)
     *
     * This callback is triggered in either of the following scenarios:
     *
     * - The remote user joins the channel and sends the video stream.
     * - The remote user stops sending the video stream and re-sends it after
     * 15 seconds. Reasons for such an interruption include:
     *  - The remote user leaves the channel.
     *  - The remote user drops offline.
     *  - The remote user calls the
     * \ref ar::rtc::IRtcEngine::muteLocalVideoStream "muteLocalVideoStream"
     *  method to stop sending the video stream.
     *  - The remote user calls the
     * \ref ar::rtc::IRtcEngine::disableVideo "disableVideo" method to
     * disable video.
     *
     * The application can configure the user view settings in this callback.
     *
     * @param uid User ID of the remote user sending the video stream.
     * @param width Width (px) of the video stream.
     * @param height Height (px) of the video stream.
     * @param elapsed Time elapsed (ms) from the local user calling the
     * \ref IRtcEngine::joinChannel "joinChannel" method until the SDK
     * triggers this callback.
     */
    virtual void onFirstRemoteVideoDecoded(uid_t uid, int width, int height, int elapsed) {
        (void)uid;
        (void)width;
        (void)height;
        (void)elapsed;
    }
 
    /** Occurs when the first remote video frame is rendered.
 
    The SDK triggers this callback when the first frame of the remote video is displayed in the user's video window. The application can retrieve the time elapsed from a user joining the channel until the first video frame is displayed.
 
    @param uid User ID of the remote user sending the video stream.
    @param width Width (px) of the video frame.
    @param height Height (px) of the video stream.
    @param elapsed Time elapsed (ms) from the local user calling the \ref IRtcEngine::joinChannel "joinChannel" method until the SDK triggers this callback.
    */
    virtual void onFirstRemoteVideoFrame(uid_t uid, int width, int height, int elapsed) {
        (void)uid;
        (void)width;
        (void)height;
        (void)elapsed;
    }
 
    /** @deprecated This method is deprecated from v3.0.0, use the \ref ar::rtc::IRtcEngineEventHandler::onRemoteAudioStateChanged "onRemoteAudioStateChanged" callback instead.
 
     Occurs when a remote user's audio stream playback pauses/resumes.
 
     The SDK triggers this callback when the remote user stops or resumes sending the audio stream by calling the \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" method.
 
     @note This callback does not work properly when the number of users (in the `COMMUNICATION` profile) or hosts (in the `LIVE_BROADCASTING` profile) in the channel exceeds 17.
 
     @param uid User ID of the remote user.
     @param muted Whether the remote user's audio stream is muted/unmuted:
     - true: Muted.
     - false: Unmuted.
     */
    virtual void onUserMuteAudio(uid_t uid, bool muted) {
        (void)uid;
        (void)muted;
    }
     
    /** Occurs when a remote user's video stream playback pauses/resumes.
     *
     * You can also use the
     * \ref onRemoteVideoStateChanged() "onRemoteVideoStateChanged" callback
     * with the following parameters:
     * - #REMOTE_VIDEO_STATE_STOPPED (0) and
     * #REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED (5).
     * - #REMOTE_VIDEO_STATE_DECODING (2) and
     * #REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED (6).
     *
     * The SDK triggers this callback when the remote user stops or resumes
     * sending the video stream by calling the
     * \ref ar::rtc::IRtcEngine::muteLocalVideoStream
     * "muteLocalVideoStream" method.
     *
     * @note This callback does not work properly when the number of users (in the `COMMUNICATION` profile) or hosts (in the `LIVE_BROADCASTING` profile) in the channel exceeds 17.
     *
     * @param uid User ID of the remote user.
     * @param muted Whether the remote user's video stream playback is
     * paused/resumed:
     * - true: Paused.
     * - false: Resumed.
     */
    virtual void onUserMuteVideo(uid_t uid, bool muted) {
        (void)uid;
        (void)muted;
    }
 
    /** Occurs when a specific remote user enables/disables the video
     * module.
     *
     * @deprecated
     * This callback is deprecated and replaced by the
     * \ref onRemoteVideoStateChanged() "onRemoteVideoStateChanged" callback
     * with the following parameters:
     * - #REMOTE_VIDEO_STATE_STOPPED (0) and
     * #REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED (5).
     * - #REMOTE_VIDEO_STATE_DECODING (2) and
     * #REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED (6).
     *
     * Once the video module is disabled, the remote user can only use a
     * voice call. The remote user cannot send or receive any video from
     * other users.
     *
     * The SDK triggers this callback when the remote user enables or disables
     * the video module by calling the
     * \ref ar::rtc::IRtcEngine::enableVideo "enableVideo" or
     * \ref ar::rtc::IRtcEngine::disableVideo "disableVideo" method.
     *
     * @note This callback returns invalid when the number of users in a
     * channel exceeds 20.
     *
     * @param uid User ID of the remote user.
     * @param enabled Whether the remote user enables/disables the video
     * module:
     * - true: Enable. The remote user can enter a video session.
     * - false: Disable. The remote user can only enter a voice session, and
     * cannot send or receive any video stream.
     */
        virtual void onUserEnableVideo(uid_t uid, bool enabled) {
            (void)uid;
            (void)enabled;
        }
 
    /** Occurs when the audio device state changes.
 
     This callback notifies the application that the system's audio device state is changed. For example, a headset is unplugged from the device.
 
     @param deviceId Pointer to the device ID.
     @param deviceType Device type: #MEDIA_DEVICE_TYPE.
     @param deviceState Device state: #MEDIA_DEVICE_STATE_TYPE.
     */
    virtual void onAudioDeviceStateChanged(const char* deviceId, int deviceType, int deviceState) {
        (void)deviceId;
        (void)deviceType;
        (void)deviceState;
    }
 
    /** Occurs when the volume of the playback device, microphone, or application changes.
 
     @param deviceType Device type: #MEDIA_DEVICE_TYPE.
     @param volume Volume of the device. The value ranges between 0 and 255.
     @param muted
     - true: The audio device is muted.
     - false: The audio device is not muted.
     */
    virtual void onAudioDeviceVolumeChanged(MEDIA_DEVICE_TYPE deviceType, int volume, bool muted) {
        (void)deviceType;
        (void)volume;
        (void)muted;
    }
 
    /** **DEPRECATED** Occurs when the camera turns on and is ready to capture the video.
 
     If the camera fails to turn on, fix the error reported in the \ref IRtcEngineEventHandler::onError "onError" callback.
 
     Deprecated as of v2.4.1. Use #LOCAL_VIDEO_STREAM_STATE_CAPTURING (1) in the \ref ar::rtc::IRtcEngineEventHandler::onLocalVideoStateChanged "onLocalVideoStateChanged" callback instead.
     */
    virtual void onCameraReady() {}
 
    /** Occurs when the camera focus area changes.
 
     The SDK triggers this callback when the local user changes the camera focus position by calling the setCameraFocusPositionInPreview method.
     
     @note This callback is for Android and iOS only.
 
     @param x x coordinate of the changed camera focus area.
     @param y y coordinate of the changed camera focus area.
     @param width Width of the changed camera focus area.
     @param height Height of the changed camera focus area.
     */
    virtual void onCameraFocusAreaChanged(int x, int y, int width, int height) {
        (void)x;
        (void)y;
        (void)width;
        (void)height;
    }
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
    /**
     * Reports the face detection result of the local user. Applies to Android and iOS only.
     * @since v3.0.1
     *
     * Once you enable face detection by calling \ref IRtcEngine::enableFaceDetection "enableFaceDetection"(true), you can get the following information on the local user in real-time:
     * - The width and height of the local video.
     * - The position of the human face in the local video.
     * - The distance between the human face and the device screen. This value is based on the fitting calculation of the local video size and the position of the human face.
     *
     * @note
     * - If the SDK does not detect a face, it reduces the frequency of this callback to reduce power consumption on the local device.
     * - The SDK stops triggering this callback when a human face is in close proximity to the screen.
     * - On Android, the `distance` value reported in this callback may be slightly different from the actual distance. Therefore, AR does not recommend using it for
     * accurate calculation.
     * @param imageWidth The width (px) of the local video.
     * @param imageHeight The height (px) of the local video.
     * @param vecRectangle The position and size of the human face on the local video:
     * - `x`: The x coordinate (px) of the human face in the local video. Taking the top left corner of the captured video as the origin,
     * the x coordinate represents the relative lateral displacement of the top left corner of the human face to the origin.
     * - `y`: The y coordinate (px) of the human face in the local video. Taking the top left corner of the captured video as the origin,
     * the y coordinate represents the relative longitudinal displacement of the top left corner of the human face to the origin.
     * - `width`: The width (px) of the human face in the captured video.
     * - `height`: The height (px) of the human face in the captured video.
     * @param vecDistance The distance (cm) between the human face and the screen.
     * @param numFaces The number of faces detected. If the value is 0, it means that no human face is detected.
     */
    virtual void onFacePositionChanged(int imageWidth, int imageHeight, Rectangle* vecRectangle, int* vecDistance, int numFaces){
       (void)imageWidth;
       (void)imageHeight;
       (void)vecRectangle;
       (void)vecDistance;
        (void)numFaces;
    }
#endif
    /** Occurs when the camera exposure area changes.
 
    The SDK triggers this callback when the local user changes the camera exposure position by calling the setCameraExposurePosition method.
     
     @note This callback is for Android and iOS only.
     
     @param x x coordinate of the changed camera exposure area.
     @param y y coordinate of the changed camera exposure area.
     @param width Width of the changed camera exposure area.
     @param height Height of the changed camera exposure area.
     */
    virtual void onCameraExposureAreaChanged(int x, int y, int width, int height) {
        (void)x;
        (void)y;
        (void)width;
        (void)height;
    }
 
    /** Occurs when the audio mixing file playback finishes.
 
     **DEPRECATED**  use onAudioMixingStateChanged instead.
 
     You can start an audio mixing file playback by calling the \ref IRtcEngine::startAudioMixing "startAudioMixing" method. The SDK triggers this callback when the audio mixing file playback finishes.
 
     If the *startAudioMixing* method call fails, an error code returns in the \ref IRtcEngineEventHandler::onError "onError" callback.
 
     */
    virtual void onAudioMixingFinished() {
    }
 
    /** Occurs when the state of the local user's audio mixing file changes.
 
     When you call the \ref IRtcEngine::startAudioMixing "startAudioMixing" method and the state of audio mixing file changes, the SDK triggers this callback.
     - When the audio mixing file plays, pauses playing, or stops playing, this callback returns 710, 711, or 713 in @p state, and 0 in @p errorCode.
     - When exceptions occur during playback, this callback returns 714 in @p state and an error in @p errorCode.
     - If the local audio mixing file does not exist, or if the SDK does not support the file format or cannot access the music file URL, the SDK returns WARN_AUDIO_MIXING_OPEN_ERROR = 701.
 
     @param state The state code. See #AUDIO_MIXING_STATE_TYPE.
     @param errorCode The error code. See #AUDIO_MIXING_ERROR_TYPE.
     */
    virtual void onAudioMixingStateChanged(AUDIO_MIXING_STATE_TYPE state, AUDIO_MIXING_ERROR_TYPE errorCode){
    }
    /** Occurs when a remote user starts audio mixing.
 
     When a remote user calls \ref IRtcEngine::startAudioMixing "startAudioMixing" to play the background music, the SDK reports this callback.
     */
    virtual void onRemoteAudioMixingBegin() {
    }
    /** Occurs when a remote user finishes audio mixing.
     */
    virtual void onRemoteAudioMixingEnd() {
    }
 
    /** Occurs when the local audio effect playback finishes.
 
     The SDK triggers this callback when the local audio effect file playback finishes.
 
     @param soundId ID of the local audio effect. Each local audio effect has a unique ID.
     */
    virtual void onAudioEffectFinished(int soundId) {
    }
 
 
    /**
     Occurs when the SDK decodes the first remote audio frame for playback.
 
     @deprecated v3.0.0
 
     This callback is deprecated. Use `onRemoteAudioStateChanged` instead.
 
     This callback is triggered in either of the following scenarios:
 
     - The remote user joins the channel and sends the audio stream.
     - The remote user stops sending the audio stream and re-sends it after 15 seconds. Reasons for such an interruption include:
         - The remote user leaves channel.
         - The remote user drops offline.
         - The remote user calls the \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" method to stop sending the local audio stream.
         - The remote user calls the \ref ar::rtc::IRtcEngine::disableAudio "disableAudio" method to disable audio.
 
     @param uid User ID of the remote user sending the audio stream.
     @param elapsed Time elapsed (ms) from the local user calling the \ref IRtcEngine::joinChannel "joinChannel" method until the SDK triggers this callback.
     */
    virtual void onFirstRemoteAudioDecoded(uid_t uid, int elapsed) {
        (void)uid;
        (void)elapsed;
    }
 
    /** Occurs when the video device state changes.
 
     @note On a Windows device with an external camera for video capturing, the video disables once the external camera is unplugged.
 
     @param deviceId Pointer to the device ID of the video device that changes state.
     @param deviceType Device type: #MEDIA_DEVICE_TYPE.
     @param deviceState Device state: #MEDIA_DEVICE_STATE_TYPE.
     */
    virtual void onVideoDeviceStateChanged(const char* deviceId, int deviceType, int deviceState) {
        (void)deviceId;
        (void)deviceType;
        (void)deviceState;
    }
 
    /** Occurs when the local video stream state changes.
 
     This callback indicates the state of the local video stream, including camera capturing and video encoding, and allows you to troubleshoot issues when exceptions occur.
 
     @note For some device models, the SDK will not trigger this callback when the state of the local video changes while the local video capturing device is in use, so you have to make your own timeout judgment.
 
     @param localVideoState State type #LOCAL_VIDEO_STREAM_STATE. When the state is LOCAL_VIDEO_STREAM_STATE_FAILED (3), see the `error` parameter for details.
     @param error The detailed error information: #LOCAL_VIDEO_STREAM_ERROR.
     */
    virtual void onLocalVideoStateChanged(LOCAL_VIDEO_STREAM_STATE localVideoState, LOCAL_VIDEO_STREAM_ERROR error) {
        (void)localVideoState;
        (void)error;
    }
 
    /** Occurs when the video size or rotation of a specified user changes.
 
     @param uid User ID of the remote user or local user (0) whose video size or rotation changes.
     @param width New width (pixels) of the video.
     @param height New height (pixels) of the video.
     @param rotation New rotation of the video [0 to 360).
     */
    virtual void onVideoSizeChanged(uid_t uid, int width, int height, int rotation) {
        (void)uid;
        (void)width;
        (void)height;
        (void)rotation;
    }
    /** Occurs when the remote video state changes.
     *
     * @param uid ID of the remote user whose video state changes.
     * @param state State of the remote video. See #REMOTE_VIDEO_STATE.
     * @param reason The reason of the remote video state change. See
     * #REMOTE_VIDEO_STATE_REASON.
     * @param elapsed Time elapsed (ms) from the local user calling the
     * \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method until the
     * SDK triggers this callback.
     */
    virtual void onRemoteVideoStateChanged(uid_t uid, REMOTE_VIDEO_STATE state, REMOTE_VIDEO_STATE_REASON reason, int elapsed) {
        (void)uid;
        (void)state;
        (void)reason;
        (void)elapsed;
    }
 
    /** Occurs when a specified remote user enables/disables the local video
     * capturing function.
     *
     * @deprecated
     * This callback is deprecated and replaced by the
     * \ref onRemoteVideoStateChanged() "onRemoteVideoStateChanged" callback
     * with the following parameters:
     * - #REMOTE_VIDEO_STATE_STOPPED (0) and
     * #REMOTE_VIDEO_STATE_REASON_REMOTE_MUTED (5).
     * - #REMOTE_VIDEO_STATE_DECODING (2) and
     * #REMOTE_VIDEO_STATE_REASON_REMOTE_UNMUTED (6).
     *
     * This callback is only applicable to the scenario when the user only
     * wants to watch the remote video without sending any video stream to the
     * other user.
     *
     * The SDK triggers this callback when the remote user resumes or stops
     * capturing the video stream by calling the
     * \ref ar::rtc::IRtcEngine::enableLocalVideo "enableLocalVideo" method.
     *
     * @param uid User ID of the remote user.
     * @param enabled Whether the specified remote user enables/disables the
     * local video capturing function:
     * - true: Enable. Other users in the channel can see the video of this
     * remote user.
     * - false: Disable. Other users in the channel can no longer receive the
     * video stream from this remote user, while this remote user can still
     * receive the video streams from other users.
     */
    virtual void onUserEnableLocalVideo(uid_t uid, bool enabled) {
        (void)uid;
        (void)enabled;
    }
 
//    virtual void onStreamError(int streamId, int code, int parameter, const char* message, size_t length) {}
    /** Occurs when the local user receives the data stream from the remote user within five seconds.
 
    The SDK triggers this callback when the local user receives the stream message that the remote user sends by calling the \ref ar::rtc::IRtcEngine::sendStreamMessage "sendStreamMessage" method.
    @param uid User ID of the remote user sending the message.
    @param streamId Stream ID.
    @param data Pointer to the data received by the local user.
    @param length Length of the data in bytes.
    */
    virtual void onStreamMessage(uid_t uid, int streamId, const char* data, size_t length) {
        (void)uid;
        (void)streamId;
        (void)data;
        (void)length;
    }
 
    /** Occurs when the local user does not receive the data stream from the remote user within five seconds.
 
     The SDK triggers this callback when the local user fails to receive the stream message that the remote user sends by calling the \ref ar::rtc::IRtcEngine::sendStreamMessage "sendStreamMessage" method.
     @param uid User ID of the remote user sending the message.
     @param streamId Stream ID.
     @param code Error code: #ERROR_CODE_TYPE.
     @param missed Number of lost messages.
     @param cached Number of incoming cached messages when the data stream is interrupted.
     */
    virtual void onStreamMessageError(uid_t uid, int streamId, int code, int missed, int cached) {
        (void)uid;
        (void)streamId;
        (void)code;
        (void)missed;
        (void)cached;
    }
 
    /** Occurs when the media engine loads.*/
    virtual void onMediaEngineLoadSuccess() {
    }
    /** Occurs when the media engine call starts.*/
    virtual void onMediaEngineStartCallSuccess() {
    }
    /// @cond
    /** Reports whether the super-resolution algorithm is enabled.
     *
     * @since v3.2.0
     *
     * After calling \ref IRtcEngine::enableRemoteSuperResolution "enableRemoteSuperResolution", the SDK triggers this
     * callback to report whether the super-resolution algorithm is successfully enabled. If not successfully enabled,
     * you can use reason for troubleshooting.
     *
     * @param uid The ID of the remote user.
     * @param enabled Whether the super-resolution algorithm is successfully enabled:
     * - true: The super-resolution algorithm is successfully enabled.
     * - false: The super-resolution algorithm is not successfully enabled.
     * @param reason The reason why the super-resolution algorithm is not successfully enabled. See #SUPER_RESOLUTION_STATE_REASON.
     */
    virtual void onUserSuperResolutionEnabled(uid_t uid, bool enabled, SUPER_RESOLUTION_STATE_REASON reason) {
        (void)uid;
        (void)enabled;
        (void)reason;
    }
    /// @endcond
 
    /** Occurs when the state of the media stream relay changes.
     *
     * The SDK returns the state of the current media relay with any error
     * message.
     *
     * @param state The state code in #CHANNEL_MEDIA_RELAY_STATE.
     * @param code The error code in #CHANNEL_MEDIA_RELAY_ERROR.
     */
    virtual void onChannelMediaRelayStateChanged(CHANNEL_MEDIA_RELAY_STATE state,CHANNEL_MEDIA_RELAY_ERROR code) {
    }
 
    /** Reports events during the media stream relay.
     *
     * @param code The event code in #CHANNEL_MEDIA_RELAY_EVENT.
     */
    virtual void onChannelMediaRelayEvent(CHANNEL_MEDIA_RELAY_EVENT code) {
    }
 
    /** Occurs when the engine sends the first local audio frame.
 
     @deprecated Deprecated as of v3.1.0. Use the \ref IRtcEngineEventHandler::onFirstLocalAudioFramePublished "onFirstLocalAudioFramePublished" callback instead.
 
     @param elapsed Time elapsed (ms) from the local user calling \ref IRtcEngine::joinChannel "joinChannel" until the SDK triggers this callback.
     */
    virtual void onFirstLocalAudioFrame(int elapsed) {
        (void)elapsed;
    }
 
    /** Occurs when the first audio frame is published.
     *
     * @since v3.1.0
     *
     * The SDK triggers this callback under one of the following circumstances:
     * - The local client enables the audio module and calls \ref IRtcEngine::joinChannel "joinChannel" successfully.
     * - The local client calls \ref IRtcEngine::muteLocalAudioStream "muteLocalAudioStream(true)" and \ref IRtcEngine::muteLocalAudioStream "muteLocalAudioStream(false)" in sequence.
     * - The local client calls \ref IRtcEngine::disableAudio "disableAudio" and \ref IRtcEngine::enableAudio "enableAudio" in sequence.
     *
     * @param elapsed The time elapsed (ms) from the local client calling \ref IRtcEngine::joinChannel "joinChannel" until the SDK triggers this callback.
     */
    virtual void onFirstLocalAudioFramePublished(int elapsed) {
        (void)elapsed;
    }
 
    /** Occurs when the engine receives the first audio frame from a specific remote user.
 
    @param uid User ID of the remote user.
    @param elapsed Time elapsed (ms) from the remote user calling \ref IRtcEngine::joinChannel "joinChannel" until the SDK triggers this callback.
    */
    virtual void onFirstRemoteAudioFrame(uid_t uid, int elapsed) {
        (void)uid;
        (void)elapsed;
    }
 
  /**
   Occurs when the state of the RTMP streaming changes.
 
   The SDK triggers this callback to report the result of the local user calling the \ref ar::rtc::IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" or \ref ar::rtc::IRtcEngine::removePublishStreamUrl "removePublishStreamUrl" method.
 
   This callback indicates the state of the RTMP streaming. When exceptions occur, you can troubleshoot issues by referring to the detailed error descriptions in the *errCode* parameter.
 
   @param url The RTMP URL address.
   @param state The RTMP streaming state. See: #RTMP_STREAM_PUBLISH_STATE.
   @param errCode The detailed error information for streaming. See: #RTMP_STREAM_PUBLISH_ERROR.
   */
  virtual void onRtmpStreamingStateChanged(const char *url, RTMP_STREAM_PUBLISH_STATE state, RTMP_STREAM_PUBLISH_ERROR errCode) {
    (void) url;
    (void) state;
    (void) errCode;
  }
 
 /** Reports events during the RTMP streaming.
  *
  * @since v3.1.0
  *
  * @param url The RTMP streaming URL.
  * @param eventCode The event code. See #RTMP_STREAMING_EVENT
  */
  virtual void onRtmpStreamingEvent(const char* url, RTMP_STREAMING_EVENT eventCode) {
      (void) url;
      (void) eventCode;
  }
 
    /** @deprecated This method is deprecated, use the \ref ar::rtc::IRtcEngineEventHandler::onRtmpStreamingStateChanged "onRtmpStreamingStateChanged" callback instead.
 
     Reports the result of calling the \ref IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" method. (CDN live only.)
 
     @param url The RTMP URL address.
     @param error Error code: #ERROR_CODE_TYPE. Main errors include:
     - #ERR_OK (0): The publishing succeeds.
     - #ERR_FAILED (1): The publishing fails.
     - #ERR_INVALID_ARGUMENT (2): Invalid argument used. If, for example, you did not call \ref ar::rtc::IRtcEngine::setLiveTranscoding "setLiveTranscoding" to configure LiveTranscoding before calling \ref ar::rtc::IRtcEngine::addPublishStreamUrl "addPublishStreamUrl", the SDK reports #ERR_INVALID_ARGUMENT.
     - #ERR_TIMEDOUT (10): The publishing timed out.
     - #ERR_ALREADY_IN_USE (19): The chosen URL address is already in use for CDN live streaming.
     - #ERR_RESOURCE_LIMITED (22): The backend system does not have enough resources for the CDN live streaming.
     - #ERR_ENCRYPTED_STREAM_NOT_ALLOWED_PUBLISH (130): You cannot publish an encrypted stream.
     - #ERR_PUBLISH_STREAM_CDN_ERROR (151)
     - #ERR_PUBLISH_STREAM_NUM_REACH_LIMIT (152)
     - #ERR_PUBLISH_STREAM_NOT_AUTHORIZED (153)
     - #ERR_PUBLISH_STREAM_INTERNAL_SERVER_ERROR (154)
     - #ERR_PUBLISH_STREAM_FORMAT_NOT_SUPPORTED (156)
     */
    virtual void onStreamPublished(const char *url, int error) {
        (void)url;
        (void)error;
    }
    /** Reports the result of calling the \ref ar::rtc::IRtcEngine::removePublishStreamUrl "removePublishStreamUrl" method. (CDN live only.)
 
     This callback indicates whether you have successfully removed an RTMP stream from the CDN.
 
     @param url The RTMP URL address.
     */
    virtual void onStreamUnpublished(const char *url) {
        (void)url;
    }
/** Occurs when the publisher's transcoding is updated. 
 * 
 * When the `LiveTranscoding` class in the \ref ar::rtc::IRtcEngine::setLiveTranscoding "setLiveTranscoding" method updates, the SDK triggers the `onTranscodingUpdated` callback to report the update information to the local host.
 * 
 * @note If you call the `setLiveTranscoding` method to set the LiveTranscoding class for the first time, the SDK does not trigger the `onTranscodingUpdated` callback.
 * 
 */
    virtual void onTranscodingUpdated() {
    }
   /** Occurs when a voice or video stream URL address is added to a live broadcast.
 
    @param url Pointer to the URL address of the externally injected stream.
    @param uid User ID.
    @param status State of the externally injected stream: #INJECT_STREAM_STATUS.
    */
    virtual void onStreamInjectedStatus(const char* url, uid_t uid, int status) {
        (void)url;
        (void)uid;
        (void)status;
    }
 
    /** Occurs when the local audio route changes.
 
     The SDK triggers this callback when the local audio route switches to an earpiece, speakerphone, headset, or Bluetooth device.
 
     @note This callback is for Android and iOS only.
 
     @param routing Audio output routing. See: #AUDIO_ROUTE_TYPE.
     */
    virtual void onAudioRouteChanged(AUDIO_ROUTE_TYPE routing) {
        (void)routing;
    }
 
   /** Occurs when the locally published media stream falls back to an audio-only stream due to poor network conditions or switches back to the video after the network conditions improve.
 
    If you call \ref IRtcEngine::setLocalPublishFallbackOption "setLocalPublishFallbackOption" and set *option* as #STREAM_FALLBACK_OPTION_AUDIO_ONLY, the SDK triggers this callback when the locally published stream falls back to audio-only mode due to poor uplink conditions, or when the audio stream switches back to the video after the uplink network condition improves.
 
    @param isFallbackOrRecover Whether the locally published stream falls back to audio-only or switches back to the video:
    - true: The locally published stream falls back to audio-only due to poor network conditions.
    - false: The locally published stream switches back to the video after the network conditions improve.
    */
    virtual void onLocalPublishFallbackToAudioOnly(bool isFallbackOrRecover) {
        (void)isFallbackOrRecover;
    }
 
    /** Occurs when the remote media stream falls back to audio-only stream
     * due to poor network conditions or switches back to the video stream
     * after the network conditions improve.
     *
     * If you call
     * \ref IRtcEngine::setRemoteSubscribeFallbackOption
     * "setRemoteSubscribeFallbackOption" and set
     * @p option as #STREAM_FALLBACK_OPTION_AUDIO_ONLY, the SDK triggers this
     * callback when the remote media stream falls back to audio-only mode due
     * to poor uplink conditions, or when the remote media stream switches
     * back to the video after the uplink network condition improves.
     *
     * @note Once the remote media stream switches to the low stream due to
     * poor network conditions, you can monitor the stream switch between a
     * high and low stream in the RemoteVideoStats callback.
     *
     * @param uid ID of the remote user sending the stream.
     * @param isFallbackOrRecover Whether the remotely subscribed media stream
     * falls back to audio-only or switches back to the video:
     * - true: The remotely subscribed media stream falls back to audio-only
     * due to poor network conditions.
     * - false: The remotely subscribed media stream switches back to the
     * video stream after the network conditions improved.
     */
    virtual void onRemoteSubscribeFallbackToAudioOnly(uid_t uid, bool isFallbackOrRecover) {
        (void)uid;
        (void)isFallbackOrRecover;
    }
 
    /** Reports the transport-layer statistics of each remote audio stream.
     *
     * @deprecated
     * This callback is deprecated and replaced by the
     * \ref onRemoteAudioStats() "onRemoteAudioStats" callback.
     *
     * This callback reports the transport-layer statistics, such as the
     * packet loss rate and network time delay, once every two seconds after
     * the local user receives an audio packet from a remote user.
     *
     * @param uid  User ID of the remote user sending the audio packet.
     * @param delay Network time delay (ms) from the remote user sending the
     * audio packet to the local user.
     * @param lost Packet loss rate (%) of the audio packet sent from the
     * remote user.
     * @param rxKBitRate  Received bitrate (Kbps) of the audio packet sent
     * from the remote user.
     */
    virtual void onRemoteAudioTransportStats(
        uid_t uid, unsigned short delay, unsigned short lost,
        unsigned short rxKBitRate) {
        (void)uid;
        (void)delay;
        (void)lost;
        (void)rxKBitRate;
    }
 
    /** Reports the transport-layer statistics of each remote video stream.
     *
     * @deprecated
     * This callback is deprecated and replaced by the
     * \ref onRemoteVideoStats() "onRemoteVideoStats" callback.
     *
     * This callback reports the transport-layer statistics, such as the
     * packet loss rate and network time delay, once every two seconds after
     * the local user receives a video packet from a remote user.
     *
     * @param uid User ID of the remote user sending the video packet.
     * @param delay Network time delay (ms) from the remote user sending the
     * video packet to the local user.
     * @param lost Packet loss rate (%) of the video packet sent from the
     * remote user.
     * @param rxKBitRate Received bitrate (Kbps) of the video packet sent
     * from the remote user.
     */
    virtual void onRemoteVideoTransportStats(
        uid_t uid, unsigned short delay, unsigned short lost,
        unsigned short rxKBitRate) {
        (void)uid;
        (void)delay;
        (void)lost;
        (void)rxKBitRate;
    }
 
    /** **DEPRECATED** Occurs when the microphone is enabled/disabled.
     *
     * The \ref onMicrophoneEnabled() "onMicrophoneEnabled" callback is
     * deprecated. Use #LOCAL_AUDIO_STREAM_STATE_STOPPED (0) or
     * #LOCAL_AUDIO_STREAM_STATE_RECORDING (1) in the
     * \ref onLocalAudioStateChanged() "onLocalAudioStateChanged" callback
     * instead.
     *
     * The SDK triggers this callback when the local user resumes or stops
     * capturing the local audio stream by calling the
     * \ref ar::rtc::IRtcEngine::enableLocalAudio "enbaleLocalAudio" method.
     *
     * @param enabled Whether the microphone is enabled/disabled:
     * - true: Enabled.
     * - false: Disabled.
     */
    virtual void onMicrophoneEnabled(bool enabled) {
        (void)enabled;
    }
    /** Occurs when the connection state between the SDK and the server changes.
 
     @param state See #CONNECTION_STATE_TYPE.
     @param reason See #CONNECTION_CHANGED_REASON_TYPE.
     */
    virtual void onConnectionStateChanged(
        CONNECTION_STATE_TYPE state, CONNECTION_CHANGED_REASON_TYPE reason) {
      (void)state;
      (void)reason;
    }
 
    /** Occurs when the local network type changes.
 
    When the network connection is interrupted, this callback indicates whether the interruption is caused by a network type change or poor network conditions.
 
     @param type See #NETWORK_TYPE.
     */
    virtual void onNetworkTypeChanged(NETWORK_TYPE type) {
      (void)type;
    }
    /** Occurs when the local user successfully registers a user account by calling the \ref ar::rtc::IRtcEngine::registerLocalUserAccount "registerLocalUserAccount" method or joins a channel by calling the \ref ar::rtc::IRtcEngine::joinChannelWithUserAccount "joinChannelWithUserAccount" method.This callback reports the user ID and user account of the local user.
 
     @param uid The ID of the local user.
     @param userAccount The user account of the local user.
     */
    virtual void onLocalUserRegistered(uid_t uid, const char* userAccount) {
      (void)uid;
      (void)userAccount;
    }
    /** Occurs when the SDK gets the user ID and user account of the remote user.
 
     After a remote user joins the channel, the SDK gets the UID and user account of the remote user,
     caches them in a mapping table object (`userInfo`), and triggers this callback on the local client.
 
     @param uid The ID of the remote user.
     @param info The `UserInfo` object that contains the user ID and user account of the remote user.
     */
    virtual void onUserInfoUpdated(uid_t uid, const UserInfo& info) {
      (void)uid;
      (void)info;
    }
};
 
/**
* Video device collection methods.
 
 The IVideoDeviceCollection interface class retrieves the video device information.
*/
class IVideoDeviceCollection
{
protected:
    virtual ~IVideoDeviceCollection(){}
public:
    /** Retrieves the total number of the indexed video devices in the system.
 
    @return Total number of the indexed video devices:
    */
    virtual int getCount() = 0;
 
    /** Retrieves a specified piece of information about an indexed video device.
 
     @param index The specified index of the video device that must be less than the return value of \ref IVideoDeviceCollection::getCount "getCount".
     @param deviceName Pointer to the video device name.
     @param deviceId Pointer to the video device ID.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH], char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Sets the device with the device ID.
 
     @param deviceId Device ID of the device.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setDevice(const char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Releases all IVideoDeviceCollection resources.
    */
    virtual void release() = 0;
};
 
/** Video device management methods.
 
 The IVideoDeviceManager interface class tests the video device interfaces. Instantiate an AVideoDeviceManager class to retrieve an IVideoDeviceManager interface.
*/
class IVideoDeviceManager
{
protected:
    virtual ~IVideoDeviceManager(){}
public:
 
    /** Enumerates the video devices.
 
     This method returns an IVideoDeviceCollection object including all video devices in the system. With the IVideoDeviceCollection object, the application can enumerate the video devices. The application must call the \ref IVideoDeviceCollection::release "release" method to release the returned object after using it.
 
     @return
     - An IVideoDeviceCollection object including all video devices in the system: Success.
     - NULL: Failure.
     */
    virtual IVideoDeviceCollection* enumerateVideoDevices() = 0;
 
    /** Starts the video-capture device test.
 
     This method tests whether the video-capture device works properly. Before calling this method, ensure that you have already called the \ref IRtcEngine::enableVideo "enableVideo" method, and the window handle (*hwnd*) parameter is valid.
 
     @param hwnd The window handle used to display the screen.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startDeviceTest(view_t hwnd) = 0;
 
    /** Stops the video-capture device test.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopDeviceTest() = 0;
 
    /** Sets a device with the device ID.
 
     @param deviceId Pointer to the video-capture device ID. Call the \ref IVideoDeviceManager::enumerateVideoDevices "enumerateVideoDevices" method to retrieve it.
 
     @note Plugging or unplugging the device does not change the device ID.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setDevice(const char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Retrieves the video-capture device that is in use.
 
     @param deviceId Pointer to the video-capture device ID.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getDevice(char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Select video device for Screen cast.
 
     @param deviceId Pointer to the video-capture device ID.
     @note: deviceId - scree0 for default desktop
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int selectScreenCastDevice(char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Releases all IVideoDeviceManager resources.
    */
    virtual void release() = 0;
};
 
/** Audio device collection methods.
 
The IAudioDeviceCollection interface class retrieves device-related information.
*/
class IAudioDeviceCollection
{
protected:
    virtual ~IAudioDeviceCollection(){}
public:
 
    /** Retrieves the total number of audio playback or audio recording devices.
 
     @note You must first call the \ref IAudioDeviceManager::enumeratePlaybackDevices "enumeratePlaybackDevices" or \ref IAudioDeviceManager::enumerateRecordingDevices "enumerateRecordingDevices" method before calling this method to return the number of  audio playback or audio recording devices.
 
     @return Number of audio playback or audio recording devices.
     */
    virtual int getCount() = 0;
 
    /** Retrieves a specified piece of information about an indexed audio device.
 
     @param index The specified index that must be less than the return value of \ref IAudioDeviceCollection::getCount "getCount".
     @param deviceName Pointer to the audio device name.
     @param deviceId Pointer to the audio device ID.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH], char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Specifies a device with the device ID.
 
     @param deviceId Pointer to the device ID of the device.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setDevice(const char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Sets the volume of the application.
 
    @param volume Application volume. The value ranges between 0 (lowest volume) and 255 (highest volume).
    @return
    - 0: Success.
    - < 0: Failure.
    */
    virtual int setApplicationVolume(int volume) = 0;
 
    /** Retrieves the volume of the application.
 
     @param volume Pointer to the application volume. The volume value ranges between 0 (lowest volume) and 255 (highest volume).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getApplicationVolume(int& volume) = 0;
 
    /** Mutes the application.
 
     @param mute Sets whether to mute/unmute the application:
     - true: Mute the application.
     - false: Unmute the application.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setApplicationMute(bool mute) = 0;
    /** Gets the mute state of the application.
 
     @param mute Pointer to whether the application is muted/unmuted.
     - true: The application is muted.
     - false: The application is not muted.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int isApplicationMute(bool& mute) = 0;
 
    /** Releases all IAudioDeviceCollection resources.
    */
    virtual void release() = 0;
};
/** Audio device management methods.
 
 The IAudioDeviceManager interface class allows for audio device interface testing. Instantiate an AAudioDeviceManager class to retrieve the IAudioDeviceManager interface.
*/
class IAudioDeviceManager
{
protected:
    virtual ~IAudioDeviceManager(){}
public:
 
    /** Enumerates the audio playback devices.
 
     This method returns an IAudioDeviceCollection object that includes all audio playback devices in the system. With the IAudioDeviceCollection object, the application can enumerate the audio playback devices.
 
     @note The application must call the \ref IAudioDeviceCollection::release "release" method to release the returned object after using it.
 
     @return
     - Success: Returns an IAudioDeviceCollection object that includes all audio playback devices in the system. For wireless Bluetooth headset devices with master and slave headsets, the master headset is the playback device.
     - Returns NULL: Failure.
     */
    virtual IAudioDeviceCollection* enumeratePlaybackDevices() = 0;
 
    /** Enumerates the audio recording devices.
 
     This method returns an IAudioDeviceCollection object that includes all audio recording devices in the system. With the IAudioDeviceCollection object, the application can enumerate the audio recording devices.
 
     @note The application needs to call the \ref IAudioDeviceCollection::release "release" method to release the returned object after using it.
 
     @return
     - Returns an IAudioDeviceCollection object that includes all audio recording devices in the system: Success.
     - Returns NULL: Failure.
     */
    virtual IAudioDeviceCollection* enumerateRecordingDevices() = 0;
 
    /** Sets the audio playback device using the device ID.
 
     @note Plugging or unplugging the audio device does not change the device ID.
 
     @param deviceId Device ID of the audio playback device, retrieved by calling the \ref IAudioDeviceManager::enumeratePlaybackDevices "enumeratePlaybackDevices" method.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setPlaybackDevice(const char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Sets the audio recording device using the device ID.
 
     @param deviceId Device ID of the audio recording device, retrieved by calling the \ref IAudioDeviceManager::enumerateRecordingDevices "enumerateRecordingDevices" method.
 
     @note Plugging or unplugging the audio device does not change the device ID.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRecordingDevice(const char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Starts the audio playback device test.
 
     This method tests if the playback device works properly. In the test, the SDK plays an audio file specified by the user. If the user can hear the audio, the playback device works properly.
 
     @param testAudioFilePath Pointer to the path of the audio file for the audio playback device test in UTF-8:
     - Supported file formats: wav, mp3, m4a, and aac.
     - Supported file sample rates: 8000, 16000, 32000, 44100, and 48000 Hz.
 
     @return
     - 0: Success, and you can hear the sound of the specified audio file.
     - < 0: Failure.
     */
    virtual int startPlaybackDeviceTest(const char* testAudioFilePath) = 0;
 
    /** Stops the audio playback device test.
 
     This method stops testing the audio playback device. You must call this method to stop the test after calling the \ref IAudioDeviceManager::startPlaybackDeviceTest "startPlaybackDeviceTest" method.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopPlaybackDeviceTest() = 0;
 
    /** Sets the volume of the audio playback device.
 
     @param volume Sets the volume of the audio playback device. The value ranges between 0 (lowest volume) and 255 (highest volume).
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setPlaybackDeviceVolume(int volume) = 0;
 
    /** Retrieves the volume of the audio playback device.
 
     @param volume Pointer to the audio playback device volume. The volume value ranges between 0 (lowest volume) and 255 (highest volume).
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getPlaybackDeviceVolume(int *volume) = 0;
 
    /** Sets the volume of the microphone.
 
     @param volume Sets the volume of the microphone. The value ranges between 0 (lowest volume) and 255 (highest volume).
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRecordingDeviceVolume(int volume) = 0;
 
    /** Retrieves the volume of the microphone.
 
     @param volume Pointer to the microphone volume. The volume value ranges between 0 (lowest volume) and 255 (highest volume).
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getRecordingDeviceVolume(int *volume) = 0;
 
    /** Mutes the audio playback device.
 
     @param mute Sets whether to mute/unmute the audio playback device:
     - true: Mutes.
     - false: Unmutes.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setPlaybackDeviceMute(bool mute) = 0;
    /** Retrieves the mute status of the audio playback device.
 
     @param mute Pointer to whether the audio playback device is muted/unmuted.
     - true: Muted.
     - false: Unmuted.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getPlaybackDeviceMute(bool *mute) = 0;
    /** Mutes/Unmutes the microphone.
 
     @param mute Sets whether to mute/unmute the microphone:
     - true: Mutes.
     - false: Unmutes.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRecordingDeviceMute(bool mute) = 0;
 
    /** Retrieves the microphone's mute status.
 
     @param mute Pointer to whether the microphone is muted/unmuted.
     - true: Muted.
     - false: Unmuted.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getRecordingDeviceMute(bool *mute) = 0;
 
    /** Starts the microphone test.
 
     This method tests whether the microphone works properly. Once the test starts, the SDK uses the \ref IRtcEngineEventHandler::onAudioVolumeIndication "onAudioVolumeIndication" callback to notify the application with the volume information.
 
     @param indicationInterval Interval period (ms) of the \ref IRtcEngineEventHandler::onAudioVolumeIndication "onAudioVolumeIndication" callback cycle.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startRecordingDeviceTest(int indicationInterval) = 0;
 
    /** Stops the microphone test.
 
     This method stops the microphone test. You must call this method to stop the test after calling the \ref IAudioDeviceManager::startRecordingDeviceTest "startRecordingDeviceTest" method.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopRecordingDeviceTest() = 0;
 
    /** Retrieves the audio playback device associated with the device ID.
 
     @param deviceId Pointer to the ID of the audio playback device.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getPlaybackDevice(char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Retrieves the audio playback device information associated with the device ID and device name.
 
     @param deviceId Pointer to the device ID of the audio playback device.
     @param deviceName Pointer to the device name of the audio playback device.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getPlaybackDeviceInfo(char deviceId[MAX_DEVICE_ID_LENGTH], char deviceName[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Retrieves the audio recording device associated with the device ID.
 
     @param deviceId Pointer to the device ID of the audio recording device.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getRecordingDevice(char deviceId[MAX_DEVICE_ID_LENGTH]) = 0;
 
    /** Retrieves the audio recording device information associated with the device ID and device name.
 
     @param deviceId Pointer to the device ID of the recording audio device.
     @param deviceName Pointer to the device name of the recording audio device.
     @return
     - 0: Success.
     - < 0: Failure.
     */
   virtual int getRecordingDeviceInfo(char deviceId[MAX_DEVICE_ID_LENGTH], char deviceName[MAX_DEVICE_ID_LENGTH]) = 0;
 
   /** Starts the audio device loopback test.
 
   This method tests whether the local audio devices are working properly. After calling this method, the microphone captures the local audio and plays it through the speaker. The \ref IRtcEngineEventHandler::onAudioVolumeIndication "onAudioVolumeIndication" callback returns the local audio volume information at the set interval.
 
   @note This method tests the local audio devices and does not report the network conditions.
 
   @param indicationInterval The time interval (ms) at which the \ref IRtcEngineEventHandler::onAudioVolumeIndication "onAudioVolumeIndication" callback returns.
 
   @return
   - 0: Success.
   - < 0: Failure.
   */
   virtual int startAudioDeviceLoopbackTest(int indicationInterval) = 0;
 
   /** Stops the audio device loopback test.
 
   @note Ensure that you call this method to stop the loopback test after calling the \ref IAudioDeviceManager::startAudioDeviceLoopbackTest "startAudioDeviceLoopbackTest" method.
 
   @return
   - 0: Success.
   - < 0: Failure.
   */
   virtual int stopAudioDeviceLoopbackTest() = 0;
 
   /** Releases all IAudioDeviceManager resources.
   */
    virtual void release() = 0;
};
 
/** The configuration of the log files.
 *
 * @since v3.3.0
 */
struct LogConfig
{
    /** The absolute path of log files.
     *
     * The default file path is:
     * - Android: `/storage/emulated/0/Android/data/<package name>/files/ar_sdk.log`
     * - iOS: `App Sandbox/Library/caches/ar_sdk.log`
     * - macOS:
     *  - Sandbox enabled: `App Sandbox/Library/Logs/ar_sdk.log`, such as `/Users/<username>/Library/Containers/<App Bundle Identifier>/Data/Library/Logs/ar_sdk.log`.
     *  - Sandbox disabled: `~/Library/Logs/ar_sdk.log`.
     * - Windows: `C:\Users\<user_name>\AppData\Local\AR\<process_name>\ar_sdk.log`
     *
     * Ensure that the directory for the log files exists and is writable. You can use this parameter to rename the log files.
     */
    const char* filePath;
    /** The size (KB) of a log file. The default value is 1024 KB. If you set `fileSize` to 1024 KB, the SDK outputs at most 5 MB log files;
     * if you set it to less than 1024 KB, the setting is invalid, and the maximum size of a log file is still 1024 KB.
     */
    int fileSize;
    /** The output log level of the SDK. See #LOG_LEVEL.
     *
     * For example, if you set the log level to WARN, the SDK outputs the logs within levels FATAL, ERROR, and WARN.
     */
    LOG_LEVEL level;
    LogConfig()
    :filePath(NULL)
    ,fileSize(-1)
    ,level(LOG_LEVEL::LOG_LEVEL_INFO)
    {}
};
 
/** Definition of RtcEngineContext.
*/
struct RtcEngineContext
{
    /** The IRtcEngineEventHandler object.
     */
    IRtcEngineEventHandler* eventHandler;
    /** App ID issued to you by AR. Apply for a new App ID from AR if
     * it is missing from your kit.
     */
    const char* appId;
    // For android, it the context(Activity or Application
    // for windows,Video hot plug device
    /** The video window handle. Once set, this parameter enables you to plug
     * or unplug the video devices while they are powered.
     */
    void* context;
    /**
     * The region for connection. This advanced feature applies to scenarios that have regional restrictions.
     *
     * For the regions that AR supports, see #AREA_CODE. After specifying the region, the app that integrates the AR SDK connects to the AR servers within that region.
     */
    unsigned int areaCode;
    /** The configuration of the log files that the SDK outputs. See LogConfig.
     *
     * @since v3.3.0
     *
     * By default, the SDK outputs five log files, `ar_sdk.log`, `ar_sdk_1.log`, `ar_sdk_2.log`, `ar_sdk_3.log`, `ar_sdk_4.log`, each with
     * a default size of 1024 KB. These log files are encoded in UTF-8. The SDK writes the latest logs in `ar_sdk.log`. When `ar_sdk.log` is
     * full, the SDK deletes the log file with the earliest modification time among the other four, renames `ar_sdk.log` to the name of the
     * deleted log file, and creates a new `ar_sdk.log` to record latest logs.
     *
     */
    LogConfig logConfig;
    RtcEngineContext()
    :eventHandler(NULL)
    ,appId(NULL)
    ,context(NULL)
    ,areaCode(rtc::AREA_CODE_GLOB)
    {}
};
 
/** Definition of IMetadataObserver
*/
class IMetadataObserver
{
public:
    /** Metadata type of the observer.
     @note We only support video metadata for now.
     */
    enum METADATA_TYPE
    {
        /** -1: the metadata type is unknown.
         */
        UNKNOWN_METADATA = -1,
        /** 0: the metadata type is video.
         */
        VIDEO_METADATA = 0,
    };
 
    struct Metadata
    {
        /** The User ID.
 
         - For the receiver: the ID of the user who sent the metadata.
         - For the sender: ignore it.
         */
        char* uid;
        /** Buffer size of the sent or received Metadata.
         */
        unsigned int size;
        /** Buffer address of the sent or received Metadata.
         */
        unsigned char *buffer;
        /** Time statmp of the frame following the metadata.
         */
        long long timeStampMs;
    };
 
    virtual ~IMetadataObserver() {};
 
    /** Occurs when the SDK requests the maximum size of the Metadata.
 
     The metadata includes the following parameters:
     - `uid`: ID of the user who sends the metadata.
     - `size`: The size of the sent or received metadata.
     - `buffer`: The sent or received metadata.
     - `timeStampMs`: The timestamp of the metadata.
 
     The SDK triggers this callback after you successfully call the \ref ar::rtc::IRtcEngine::registerMediaMetadataObserver "registerMediaMetadataObserver" method. You need to specify the maximum size of the metadata in the return value of this callback.
 
     @return The maximum size of the buffer of the metadata that you want to use. The highest value is 1024 bytes. Ensure that you set the return value.
     */
    virtual int getMaxMetadataSize() = 0;
 
    /** Occurs when the SDK is ready to receive and send metadata.
 
     @note Ensure that the size of the metadata does not exceed the value set in the \ref ar::rtc::IMetadataObserver::getMaxMetadataSize "getMaxMetadataSize" callback.
 
     @param metadata The Metadata to be sent.
     @return
     - true:  Send.
     - false: Do not send.
     */
    virtual bool onReadyToSendMetadata(Metadata &metadata) = 0;
 
    /** Occurs when the local user receives the metadata.
 
     @param metadata The received Metadata.
     */
    virtual void onMetadataReceived(const Metadata &metadata) = 0;
};
 
/** Encryption mode.
*/
enum ENCRYPTION_MODE
{
    /** 1: (Default) 128-bit AES encryption, XTS mode.
     */
    AES_128_XTS = 1,
    /** 2: 128-bit AES encryption, ECB mode.
     */
    AES_128_ECB = 2,
    /** 3: 256-bit AES encryption, XTS mode.
     */
    AES_256_XTS = 3,
    /** 4: 128-bit SM4 encryption, ECB mode.
     */
    SM4_128_ECB = 4,
    /** Enumerator boundary.
     */
    MODE_END,
};
 
/** Configurations of built-in encryption schemas. */
struct EncryptionConfig{
    /**
     * Encryption mode. The default encryption mode is `AES_128_XTS`. See #ENCRYPTION_MODE.
     */
    ENCRYPTION_MODE encryptionMode;
    /**
     * Encryption key in string type.
     *
     * @note If you do not set an encryption key or set it as NULL, you cannot use the built-in encryption, and the SDK returns #ERR_INVALID_ARGUMENT (-2).
     */
    const char* encryptionKey;
 
    EncryptionConfig() {
        encryptionMode = AES_128_XTS;
        encryptionKey = nullptr;
    }
 
    /// @cond
    const char* getEncryptionString() const {
        switch(encryptionMode)
        {
            case AES_128_XTS:
                return "aes-128-xts";
            case AES_128_ECB:
                return "aes-128-ecb";
            case AES_256_XTS:
                return "aes-256-xts";
            case SM4_128_ECB:
                return "sm4-128-ecb";
            default:
                return "aes-128-xts";
        }
        return "aes-128-xts";
    }
    /// @endcond
};
 
/** IRtcEngine is the base interface class of the AR SDK that provides the main AR SDK methods invoked by your application.
 
Enable the AR SDK's communication functionality through the creation of an IRtcEngine object, then call the methods of this object.
 */
class IRtcEngine
{
protected:
    virtual ~IRtcEngine() {}
public:
 
    /** 初始化 anyRTC SDK 服务.
     *
     * 请确保在调用其他 API 前先调用 createARRtcEngine 和 initialize 创建并初始化 IRtcEngine
     *
     * @param context Pointer to the RTC engine context. 详见 RtcEngineContext.
     *
     * @return
     * - 0(ERR_OK): 方法调用成功.
     * - < 0: 方法调用失败.
     *  - -1(ERR_FAILED): 一般性的错误(未明确归类)。
     *  - -2(ERR_INALID_ARGUMENT): 未提供 IRtcEngineEventHandler 指针。
     *  - -7(ERR_NOT_INITIALIZED): SDK 初始化失败。请检查 context 内容是否正确。
     *  - -22(ERR_RESOURCE_LIMITED): 资源申请失败。当 app 占用资源过多,或系统资源耗尽时,SDK 分配资源失败,会返回该错误
     *  - -101(ERR_INVALID_APP_ID): 不是有效的 App ID.
     */
    virtual int initialize(const RtcEngineContext& context) = 0;
 
    /** 销毁 IRtcEngine 对象并释放资源.
     *
     * 该方法释放 anyRTC SDK 使用的所有资源。有些 app 只在用户需要时才进行实时音视频通信,不需要时则将资源释放出来用于其他操作, 该方法适用于此类情况。调用 release 方法后,你将无法再使用 SDK 的其它方法和回调。如需再次使用实时音视频通信功能, 你必须重新依次调用 createARRtcEngine 和 initialize 方法创建一个新的 IRtcEngine 对象.
     *
     * @note 如需在销毁后再次创建 IRtcEngine 对象,需要等待 release 方法执行结束后再创建实例.
     *
     * @param sync
     * - true: 该方法为同步调用。需要等待 IRtcEngine 资源释放后才能执行其他操作,所以我们建议在子线程中调用该方法,避免主线程阻塞。此外,我们不建议在 SDK 的回调中调用 release,否则由于 SDK 要等待回调返回才能回收相关的对象资源,会造成死锁。SDK 会自动检测这种死锁并转为异步调用,但是检测本身会消耗额外的时间.
     * - false: 该方法为异步调用。不需要等待 IRtcEngine 资源释放后就能执行其他操作。使用异步调用时要注意,不要在该调用后立即卸载 SDK 动态库,否则可能会因为 SDK 的清理线程还没有退出而崩溃.
     */
    virtual void release(bool sync=false) = 0;
 
    /** 设置频道场景.
     *
     * 该方法用于设置 anyRTC IRtcEngine 频道的使用场景。RtcEngine 会针对不同的使用场景采用不同的优化策略,如通信场景偏好流畅,直播场景偏好画质.
     *
     * @warning
     * - 为保证实时音视频质量,我们建议相同频道内的用户使用同一种频道场景.
     * - 该方法必须在 joinChannel 前调用和进行设置,进入频道后无法再设置.(Join之后设置返回0,参数不会生效,生成错误日志)
     * - 不同的频道场景下,SDK 的默认音频路由和默认视频编码码率是不同的,详见 setDefaultAudioRouteToSpeakerphone 和 setVideoEncoderConfiguration 方法中的说明.
     *
     * @param profile 频道使用场景. 详见 #CHANNEL_PROFILE_TYPE
     * @return
     * - 0(ERR_OK): 方法调用成功.
     * - < 0: 方法调用失败.
     *  - -2 (ERR_INVALID_ARGUMENT): 参数无效.
     *  - -7(ERR_NOT_INITIALIZED): SDK 尚未初始化.
     */
    virtual int setChannelProfile(CHANNEL_PROFILE_TYPE profile) = 0;
 
    /** 设置用户角色.
     *
     * 在加入频道前,用户需要通过本方法设置观众(默认)或主播。在加入频道后,用户可以通过本方法切换用户角色.
     *
     * 直播场景下,如果你在加入频道后调用该方法切换用户角色,调用成功后,本地会触发 onClientRoleChanged 回调; 远端会触发 onUserJoined 回调或 onUserOffline (BECOME_AUDIENCE) 回调
     *
     * @note
     * This method applies only to the `LIVE_BROADCASTING` profile.
     *
     * @param role Sets the role of the user. See #CLIENT_ROLE_TYPE.
     *
     * @return
     * - 0(ERR_OK): Success.
     * - < 0: Failure.
     *  - -1(ERR_FAILED): A general error occurs (no specified reason).
     *  - -2(ERR_INALID_ARGUMENT): The parameter is invalid.
     *  - -7(ERR_NOT_INITIALIZED): The SDK is not initialized.
     */
    virtual int setClientRole(CLIENT_ROLE_TYPE role) = 0;
    /// @cond
    /** Sets the role of a user in a live interactive streaming.
     *
     * @since v3.2.0
     *
     * You can call this method either before or after joining the channel to set the user role as audience or host. If
     * you call this method to switch the user role after joining the channel, the SDK triggers the following callbacks:
     * - The local client: \ref IRtcEngineEventHandler::onClientRoleChanged "onClientRoleChanged".
     * - The remote client: \ref IRtcEngineEventHandler::onUserJoined "onUserJoined"
     * or \ref IRtcEngineEventHandler::onUserOffline "onUserOffline".
     *
     * @note
     * - This method applies to the `LIVE_BROADCASTING` profile only (when the `profile` parameter in
     * \ref IRtcEngine::setChannelProfile "setChannelProfile" is set as `CHANNEL_PROFILE_LIVE_BROADCASTING`).
     * - The difference between this method and \ref IRtcEngine::setClientRole(CLIENT_ROLE_TYPE) "setClientRole1" is that
     * this method can set the user level in addition to the user role.
     *  - The user role determines the permissions that the SDK grants to a user, such as permission to send local
     * streams, receive remote streams, and push streams to a CDN address.
     *  - The user level determines the level of services that a user can enjoy within the permissions of the user's
     * role. For example, an audience can choose to receive remote streams with low latency or ultra low latency. Levels
     * affect prices.
     *
     * **Example**
     * ```cpp
     * ClientRoleOptions options;
     * options.audienceLatencyLevel = AUDIENCE_LATENCY_LEVEL_ULTRA_LOW_LATENCY;
     * options.audienceLatencyLevel = AUDIENCE_LATENCY_LEVEL_LOW_LATENCY;
     * arEngine->setClientRole(role, options);
     * ```
     *
     * @param role The role of a user in a live interactive streaming. See #CLIENT_ROLE_TYPE.
     * @param options The detailed options of a user, including user level. See ClientRoleOptions.
     *
     * @return
     * - 0(ERR_OK): Success.
     * - < 0: Failure.
     *  - -1(ERR_FAILED): A general error occurs (no specified reason).
     *  - -2(ERR_INALID_ARGUMENT): The parameter is invalid.
     *  - -7(ERR_NOT_INITIALIZED): The SDK is not initialized.
     */
    virtual int setClientRole(CLIENT_ROLE_TYPE role, const ClientRoleOptions& options) = 0;
    /// @endcond
    /** 加入频道.
 
     该方法让用户加入通话频道,在同一个频道内的用户可以互相通话,多个用户加入同一个频道,可以群聊。 使用不同 App ID 的 App 是不能互通的.
 
     如果已在通话中,用户必须调用 leaveChannel 退出当前通话,才能进入下一个频道.
 
     成功调用该方加入频道后,会触发如下回调:
     - 本地:客户端会触发:onJoinChannelSuccess 回调
     - 远端:通信场景下的用户和直播场景下的主播加入频道后,远端会触发 onUserJoined 回调.
 
     在网络状况不理想的情况下,客户端可能会与 anyRTC 的服务器失去连接;SDK 会自动尝试重连,重连成功后,本地会触发 onRejoinChannelSuccess 回调.
 
     用户成功加入频道后,默认订阅频道内所有其他用户的音频流和视频流,因此产生用量并影响计费。如果想取消订阅,可以通过调用相应的 mute 方法实现
 
     @note 频道内每个用户的用户 ID 必须是唯一的。如果将 uid 设为NULL或空字符串,系统将自动分配一个 uid。如果想要从不同的设备同时接入同一个频道,请确保每个设备上使用的 uid 是不同的.
     @warning 请务必确保用于生成 Token 的 App ID 和 initialize 方法初始化引擎时用的是同一个 App ID,否则会造成旁路推流失败.
 
     @param 动态秘钥 (由应用的服务端生成。在大多数情况下,应用程序ID即可满足安全需求。为了增加更高安全性,还请使用令牌).
     - 安全要求不高: 将值设为 NULL.
     - 安全要求高: 将值设置为 Token。如果你已经启用了 App Certificate, 请务必使用 Token.
     @param channelId 标识通话的频道名称,长度在 64 字节以内的字符串。以下为支持的字符集范围(共 89 个字符):
     - 26 个小写英文字母(All lowercase English letters): a to z.
     - 26 个大写英文字母(All uppercase English letters): A to Z.
     - 10个数字(All numeric characters): 0 to 9.
     - 空格(The space character).
     - 特殊字符(Punctuation characters and other symbols, including): "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
     @param info (非必选项) 开发者需加入的任何附加信息。一般可设置为空字符串,或频道相关信息。该信息不会传递给频道内的其他用户.
     @param uid (非必选项) 用户 ID,最多32位字符串,并保证唯一性。如果不指定(即设为NULL或空字符串),SDK 会自动分配一个,并在 onJoinChannelSuccess 回调方法中返回,App 层必须记住该返回值并维护,SDK 不对该返回值进行维护.
 
     @返回
        - 0(ERR_OK): 方法调用成功。
        - < 0: 方法调用失败。
        - -2(ERR_INALID_ARGUMENT): 参数无效。
        - -3(ERR_NOT_READY): SDK 初始化失败,请尝试重新初始化 SDK。
        - -5(ERR_REFUSED): 调用被拒绝。可能有如下两个原因:
            已经创建了一个同名的 IChannel 频道。
            已经通过 IChannel 加入了一个频道,并在该 IChannel 频道中发布了音视频流。由于通过 IRtcEngine 加入频道会默认发布音视频流,而 SDK 不支持同时在两个频道发布音视频流,因此会报错。
        - -7(ERR_NOT_INITIALIZED): SDK 尚未初始化,就调用该方法。请确认在调用 API 之前已创建 IRtcEngine 对象并完成初始化。
     */
    virtual int joinChannel(const char* token, const char* channelId, const char* info, uid_t uid) = 0;
    /** 快速切换直播频道.
     *
     * 当直播频道中的观众想从一个频道切换到另一个频道时,可以调用该方法,实现快速切换.
     *
     * 成功调用该方切换频道后,本地会先收到离开原频道的回调 onLeaveChannel,再收到成功加入新频道的回调 onJoinChannelSuccess。
     * 用户成功切换频道后,默认订阅频道内所有其他用户的音频流和视频流,因此产生用量并影响计费。如果想取消订阅,可以通过调用相应的 mute 方法实现。
     *
     * @note
     * 该方法仅适用于直播场景中,角色为观众的用户。
     *
     * @param token 在服务器端生成的用于鉴权的 Token:
     * - 安全要求不高:你可以使用控制台生成的临时 Token,详见 获取临时 Token.
     * - 安全要求高:将值设为你的服务端生成的正式 Token,详见 获取正式 Token.
     * @param channelId 标识频道的频道名,最大不超过 64 字节。以下为支持的字符集范围 (共 89 个字符):
     * - The 26 lowercase English letters: a to z.
     * - The 26 uppercase English letters: A to Z.
     * - The 10 numbers: 0 to 9.
     * - The space.
     * - "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".",
     * ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
 
     @return
     - 0(ERR_OK): Success.
     - < 0: Failure.
        - -1(ERR_FAILED): 一般性的错误(未明确归类)。
        - -2(ERR_INALID_ARGUMENT): 参数无效。
        - -5(ERR_REFUSED): 调用被拒绝。可能因为用户角色不是观众。
        - -7(ERR_NOT_INITIALIZED): SDK 尚未初始化。
        - -102(ERR_INVALID_CHANNEL_NAME): 频道名无效。请更换有效的频道名。
        - -113(ERR_NOT_IN_CHANNEL): 用户不在频道内。
 
     */
    virtual int switchChannel(const char* token, const char* channelId) = 0;
    
    /** 离开频道,即挂断或退出通话.
 
     当调用 joinChannel 方法后,必须调用 leaveChannel 结束通话,否则无法开始下一次通话。不管当前是否在通话中,都可以调用 leaveChannel,没有副作用。
 
     该方法会把会话相关的所有资源释放掉。
 
    该方法是异步操作,调用返回时并没有真正退出频道。
 
     在真正退出频道后,SDK 会触发 onLeaveChannel 回调:
     - 成功调用该方法离开频道后,本地会触发 onLeaveChannel 回调;
     - 通信场景下的用户和直播场景下的主播离开频道后,远端会触发 onUserOffline 回调。
 
     @note
     - 如果你调用了 leaveChannel 后立即调用 release,SDK 将无法触发 onLeaveChannel 回调。
     - 如果你在旁路推流时调用 leaveChannel 方法, SDK 将自动调用 removePublishStreamUrl 方法。
 
     @return
     - 0: Success.
     - < 0: Failure.
      - -1(ERR_FAILED): 一般性的错误(未明确归类)。
      - -2(ERR_INALID_ARGUMENT): 参数无效。
      - -7(ERR_NOT_INITIALIZED): SDK 尚未初始化。
     */
    virtual int leaveChannel() = 0;
    
    /** 更新 Token.
 
     该方法用于更新 Token。如果启用了 Token 机制,过一段时间后使用的 Token 会失效。当:
 
     - 发生 onTokenPrivilegeWillExpire 回调时,或发生
     - onConnectionStateChanged 回调报告 CONNECTION_CHANGED_TOKEN_EXPIRED(9) 时。
 
     App 应重新获取 Token,然后调用该方法更新 Token,否则 SDK 无法和服务器建立连接。
 
     @param token Pointer to the new token.
     @return
     - 0: Success.
     - < 0: Failure.
      - -1(ERR_FAILED): 一般性的错误(未明确归类)。
      - -2(ERR_INALID_ARGUMENT): 参数无效。
      - -7(ERR_NOT_INITIALIZED): SDK 尚未初始化。
     */
    virtual int renewToken(const char* token) = 0;
 
    /** 获取设备管理员对象的指针.
 
     @param iid 想要获取的接口的ID.
     @param inter 指向 DeviceManager 对象的指针.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int queryInterface(INTERFACE_ID_TYPE iid, void** inter) = 0;
 
     /** Registers a user account.
 
     Once registered, the user account can be used to identify the local user when the user joins the channel.
     After the user successfully registers a user account, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onLocalUserRegistered "onLocalUserRegistered" callback on the local client,
     reporting the user ID and user account of the local user.
 
     To join a channel with a user account, you can choose either of the following:
 
     - Call the \ref ar::rtc::IRtcEngine::registerLocalUserAccount "registerLocalUserAccount" method to create a user account, and then the \ref ar::rtc::IRtcEngine::joinChannelWithUserAccount "joinChannelWithUserAccount" method to join the channel.
     - Call the \ref ar::rtc::IRtcEngine::joinChannelWithUserAccount "joinChannelWithUserAccount" method to join the channel.
 
     The difference between the two is that for the former, the time elapsed between calling the \ref ar::rtc::IRtcEngine::joinChannelWithUserAccount "joinChannelWithUserAccount" method
     and joining the channel is shorter than the latter.
 
     @note
     - Ensure that you set the `userAccount` parameter. Otherwise, this method does not take effect.
     - Ensure that the value of the `userAccount` parameter is unique in the channel.
     - To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account. If a user joins the channel with the AR Web SDK, ensure that the uid of the user is set to the same parameter type.
 
     @param appId The App ID of your project.
     @param userAccount The user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
     - All lowercase English letters: a to z.
     - All uppercase English letters: A to Z.
     - All numeric characters: 0 to 9.
     - The space character.
     - Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
 
     @return
     - 0: Success.
     - < 0: Failure.
    */
    virtual int registerLocalUserAccount(
        const char* appId, const char* userAccount) = 0;
    /** Joins the channel with a user account.
 
     After the user successfully joins the channel, the SDK triggers the following callbacks:
 
     - The local client: \ref ar::rtc::IRtcEngineEventHandler::onLocalUserRegistered "onLocalUserRegistered" and \ref ar::rtc::IRtcEngineEventHandler::onJoinChannelSuccess "onJoinChannelSuccess" .
     The remote client: \ref ar::rtc::IRtcEngineEventHandler::onUserJoined "onUserJoined" and \ref ar::rtc::IRtcEngineEventHandler::onUserInfoUpdated "onUserInfoUpdated" , if the user joining the channel is in the Communication profile, or is a BROADCASTER in the Live Broadcast profile.
 
     @note To ensure smooth communication, use the same parameter type to identify the user. For example, if a user joins the channel with a user ID, then ensure all the other users use the user ID too. The same applies to the user account.
     If a user joins the channel with the AR Web SDK, ensure that the uid of the user is set to the same parameter type.
 
     @param token The token generated at your server:
     - For low-security requirements: You can use the temporary token generated at Console. For details, see [Get a temporary toke](https://docs.ar.io/en/Voice/token?platform=All%20Platforms#get-a-temporary-token).
     - For high-security requirements: Set it as the token generated at your server. For details, see [Get a token](https://docs.ar.io/en/Voice/token?platform=All%20Platforms#get-a-token).
     @param channelId The channel name. The maximum length of this parameter is 64 bytes. Supported character scopes are:
      The 26 lowercase English letters: a to z.
     - The 26 uppercase English letters: A to Z.
     - The 10 numbers: 0 to 9.
     - The space.
     - "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
     @param userAccount The user account. The maximum length of this parameter is 255 bytes. Ensure that you set this parameter and do not set it as null. Supported character scopes are:
     - The 26 lowercase English letters: a to z.
     - The 26 uppercase English letters: A to Z.
     - The 10 numbers: 0 to 9.
     - The space.
     - "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " {", "}", "|", "~", ",".
 
     @return
     - 0: Success.
     - < 0: Failure.
        - #ERR_INVALID_ARGUMENT (-2)
        - #ERR_NOT_READY (-3)
        - #ERR_REFUSED (-5) 
     */
    virtual int joinChannelWithUserAccount(const char* token,
                                           const char* channelId,
                                           const char* userAccount) = 0;
    
    /** Gets the user information by passing in the user account.
 
     After a remote user joins the channel, the SDK gets the user ID and user account of the remote user, caches them
     in a mapping table object (`userInfo`), and triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserInfoUpdated "onUserInfoUpdated" callback on the local client.
 
     After receiving the o\ref ar::rtc::IRtcEngineEventHandler::onUserInfoUpdated "onUserInfoUpdated" callback, you can call this method to get the user ID of the
     remote user from the `userInfo` object by passing in the user account.
 
     @param userAccount The user account of the user. Ensure that you set this parameter.
     @param[in/out] userInfo A userInfo object that identifies the user:
     - Input: A userInfo object.
     - Output: A userInfo object that contains the user account and user ID of the user.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getUserInfoByUserAccount(const char* userAccount, UserInfo* userInfo) = 0;
    /** Gets the user information by passing in the user ID.
 
     After a remote user joins the channel, the SDK gets the user ID and user account of the remote user,
     caches them in a mapping table object (`userInfo`), and triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserInfoUpdated "onUserInfoUpdated" callback on the local client.
 
     After receiving the \ref ar::rtc::IRtcEngineEventHandler::onUserInfoUpdated "onUserInfoUpdated" callback, you can call this method to get the user account of the remote user
     from the `userInfo` object by passing in the user ID.
 
     @param uid The user ID of the remote user. Ensure that you set this parameter.
     @param[in/out] userInfo A userInfo object that identifies the user:
     - Input: A userInfo object.
     - Output: A userInfo object that contains the user account and user ID of the user.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getUserInfoByUid(uid_t uid, UserInfo* userInfo) = 0;
 
    /** **DEPRECATED** Starts an audio call test.
 
     This method is deprecated as of v2.4.0.
 
     This method starts an audio call test to check whether the audio devices (for example, headset and speaker) and the network connection are working properly.
 
     To conduct the test:
 
     - The user speaks and the recording is played back within 10 seconds.
     - If the user can hear the recording within 10 seconds, the audio devices and network connection are working properly.
 
     @note
     - After calling this method, always call the \ref IRtcEngine::stopEchoTest "stopEchoTest" method to end the test. Otherwise, the application cannot run the next echo test.
     - In the Live-broadcast profile, only the hosts can call this method. If the user switches from the Communication to Live-broadcast profile, the user must call the \ref IRtcEngine::setClientRole "setClientRole" method to change the user role from the audience (default) to the host before calling this method.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startEchoTest() = 0;
 
    /** 开始语音通话回路测试.
 
    该方法启动语音通话测试,目的是测试系统的音频设备(耳麦、扬声器等)和网络连接是否正常。 
    
    在测试过程中,用户先说一段话,声音会在设置的时间间隔(单位为秒)后回放出来。 如果用户能正常听到自己刚才说的话,就表示系统音频设备和网络连接都是正常的。
 
    @note
    - 请在加入频道前调用该方法。
    - 调用 startEchoTest 后必须调用 stopEchoTest 以结束测试,否则不能进行下一次回声测试,也无法加入频道。
    - 直播场景下,该方法仅能由用户角色为主播的用户调用。
    @param intervalInSeconds 设置返回语音通话回路测试结果的时间间隔,取值范围为 [2, 10],单位为秒,默认为 10 秒。
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
  virtual int startEchoTest(int intervalInSeconds) = 0;
 
    /** 停止语音通话回路测试。
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopEchoTest() = 0;
 
    /** Enables the video module.
 
     Call this method either before joining a channel or during a call. If this method is called before joining a channel, the call starts in the video mode. If this method is called during an audio call, the audio mode switches to the video mode. To disable the video module, call the \ref IRtcEngine::disableVideo "disableVideo" method.
 
     A successful \ref ar::rtc::IRtcEngine::enableVideo "enableVideo" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserEnableVideo "onUserEnableVideo" (true) callback on the remote client.
     @note
     - This method affects the internal engine and can be called after the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method.
     - This method resets the internal engine and takes some time to take effect. We recommend using the following API methods to control the video engine modules separately:
         - \ref IRtcEngine::enableLocalVideo "enableLocalVideo": Whether to enable the camera to create the local video stream.
         - \ref IRtcEngine::muteLocalVideoStream "muteLocalVideoStream": Whether to publish the local video stream.
         - \ref IRtcEngine::muteRemoteVideoStream "muteRemoteVideoStream": Whether to subscribe to and play the remote video stream.
         - \ref IRtcEngine::muteAllRemoteVideoStreams "muteAllRemoteVideoStreams": Whether to subscribe to and play all remote video streams.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableVideo() = 0;
 
    /** Disables the video module.
 
    This method can be called before joining a channel or during a call. If this method is called before joining a channel, the call starts in audio mode. If this method is called during a video call, the video mode switches to the audio mode. To enable the video module, call the \ref IRtcEngine::enableVideo "enableVideo" method.
 
    A successful \ref ar::rtc::IRtcEngine::disableVideo "disableVideo" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserEnableVideo "onUserEnableVideo" (false) callback on the remote client.
     @note
     - This method affects the internal engine and can be called after the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method.
     - This method resets the internal engine and takes some time to take effect. We recommend using the following API methods to control the video engine modules separately:
         - \ref IRtcEngine::enableLocalVideo "enableLocalVideo": Whether to enable the camera to create the local video stream.
         - \ref IRtcEngine::muteLocalVideoStream "muteLocalVideoStream": Whether to publish the local video stream.
         - \ref IRtcEngine::muteRemoteVideoStream "muteRemoteVideoStream": Whether to subscribe to and play the remote video stream.
         - \ref IRtcEngine::muteAllRemoteVideoStreams "muteAllRemoteVideoStreams": Whether to subscribe to and play all remote video streams.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int disableVideo() = 0;
 
    /** **DEPRECATED** Sets the video profile.
 
     This method is deprecated as of v2.3. Use the \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration" method instead.
 
     Each video profile includes a set of parameters, such as the resolution, frame rate, and bitrate. If the camera device does not support the specified resolution, the SDK automatically chooses a suitable camera resolution, keeping the encoder resolution specified by the *setVideoProfile* method.
 
     @note
     - If you do not need to set the video profile after joining the channel, call this method before the \ref IRtcEngine::enableVideo "enableVideo" method to reduce the render time of the first video frame.
     - Always set the video profile before calling the \ref IRtcEngine::joinChannel "joinChannel" or \ref IRtcEngine::startPreview "startPreview" method.
 
     @param profile Sets the video profile. See #VIDEO_PROFILE_TYPE.
     @param swapWidthAndHeight Sets whether to swap the width and height of the video stream:
     - true: Swap the width and height.
     - false: (Default) Do not swap the width and height.
     The width and height of the output video are consistent with the set video profile.
     @note Since the landscape or portrait mode of the output video can be decided directly by the video profile, We recommend setting *swapWidthAndHeight* to *false* (default).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setVideoProfile(VIDEO_PROFILE_TYPE profile, bool swapWidthAndHeight) = 0;
 
    /** Sets the video encoder configuration.
 
     Each video encoder configuration corresponds to a set of video parameters, including the resolution, frame rate, bitrate, and video orientation.
 
     The parameters specified in this method are the maximum values under ideal network conditions. If the video engine cannot render the video using the specified parameters due to poor network conditions, the parameters further down the list are considered until a successful configuration is found.
 
     @note If you do not need to set the video encoder configuration after joining the channel, you can call this method before the \ref IRtcEngine::enableVideo "enableVideo" method to reduce the render time of the first video frame.
 
     @param config Sets the local video encoder configuration. See VideoEncoderConfiguration.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setVideoEncoderConfiguration(const VideoEncoderConfiguration& config) = 0;
    /** Sets the camera capture configuration.
 
     For a video call or live broadcast, generally the SDK controls the camera output parameters. When the default camera capturer settings do not meet special requirements or cause performance problems, we recommend using this method to set the camera capturer configuration:
 
     - If the resolution or frame rate of the captured raw video data are higher than those set by \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration", processing video frames requires extra CPU and RAM usage and degrades performance. We recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE = 1 to avoid such problems.
     - If you do not need local video preview or are willing to sacrifice preview quality, we recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE = 1 to optimize CPU and RAM usage.
     - If you want better quality for the local video preview, we recommend setting config as CAPTURER_OUTPUT_PREFERENCE_PREVIEW = 2.
 
     @note Call this method before enabling the local camera. That said, you can call this method before calling \ref ar::rtc::IRtcEngine::joinChannel "joinChannel", \ref ar::rtc::IRtcEngine::enableVideo "enableVideo", or \ref IRtcEngine::enableLocalVideo "enableLocalVideo", depending on which method you use to turn on your local camera.
 
     @param config Sets the camera capturer configuration. See CameraCapturerConfiguration.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setCameraCapturerConfiguration(const CameraCapturerConfiguration& config) = 0;
 
    /** Initializes the local video view.
 
     This method initializes the video view of a local stream on the local device. It affects only the video view that the local user sees, not the published local video stream.
     
     Call this method to bind the local video stream to a video view and to set the rendering and mirror modes of the video view.
     The binding is still valid after the user leaves the channel, which means that the window still displays. To unbind the view, set the *view* in VideoCanvas to NULL.
     
     @note 
     - Call this method before joining a channel.
     - To update the rendering or mirror mode of the local video view during a call, use the \ref IRtcEngine::setLocalRenderMode "setLocalRenderMode" method.
     @param canvas Pointer to the local video view and settings. See VideoCanvas.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setupLocalVideo(const VideoCanvas& canvas) = 0;
 
    /** Initializes the video view of a remote user.
 
     This method initializes the video view of a remote stream on the local device. It affects only the video view that the local user sees.
 
     Call this method to bind the remote video stream to a video view and to set the rendering and mirror modes of the video view.
 
     The application specifies the uid of the remote video in this method before the remote user joins the channel. If the remote uid is unknown to the application, set it after the application receives the \ref IRtcEngineEventHandler::onUserJoined "onUserJoined" callback.
     If the Video Recording function is enabled, the Video Recording Service joins the channel as a dummy client, causing other clients to also receive the \ref IRtcEngineEventHandler::onUserJoined "onUserJoined" callback. Do not bind the dummy client to the application view because the dummy client does not send any video streams. If your application does not recognize the dummy client, bind the remote user to the view when the SDK triggers the \ref IRtcEngineEventHandler::onFirstRemoteVideoDecoded "onFirstRemoteVideoDecoded" callback.
     To unbind the remote user from the view, set the view in VideoCanvas to NULL. Once the remote user leaves the channel, the SDK unbinds the remote user.
 
     @note To update the rendering or mirror mode of the remote video view during a call, use the \ref IRtcEngine::setRemoteRenderMode "setRemoteRenderMode" method.
 
     @param canvas Pointer to the remote video view and settings. See VideoCanvas.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setupRemoteVideo(const VideoCanvas& canvas) = 0;
 
    /** Starts the local video preview before joining the channel.
 
     Before calling this method, you must:
 
     - Call the \ref IRtcEngine::setupLocalVideo "setupLocalVideo" method to set up the local preview window and configure the attributes.
     - Call the \ref IRtcEngine::enableVideo "enableVideo" method to enable video.
 
     @note Once the startPreview method is called to start the local video preview, if you leave the channel by calling the \ref IRtcEngine::leaveChannel "leaveChannel" method, the local video preview remains until you call the \ref IRtcEngine::stopPreview "stopPreview" method to disable it.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startPreview() = 0;
 
    /** Prioritizes a remote user's stream.
 
    Use this method with the \ref IRtcEngine::setRemoteSubscribeFallbackOption "setRemoteSubscribeFallbackOption" method. If the fallback function is enabled for a subscribed stream, the SDK ensures the high-priority user gets the best possible stream quality.
 
    @note The AR SDK supports setting @p userPriority as high for one user only.
 
    @param  uid  The ID of the remote user.
    @param  userPriority Sets the priority of the remote user. See #PRIORITY_TYPE.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteUserPriority(uid_t uid, PRIORITY_TYPE userPriority) = 0;
 
    /** Stops the local video preview and disables video.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopPreview() = 0;
 
    /** Enables the audio module.
 
    The audio mode is enabled by default.
 
     @note
     - This method affects the internal engine and can be called after the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method. You can call this method either before or after joining a channel.
     - This method resets the internal engine and takes some time to take effect. We recommend using the following API methods to control the audio engine modules separately:
         - \ref IRtcEngine::enableLocalAudio "enableLocalAudio": Whether to enable the microphone to create the local audio stream.
         - \ref IRtcEngine::muteLocalAudioStream "muteLocalAudioStream": Whether to publish the local audio stream.
         - \ref IRtcEngine::muteRemoteAudioStream "muteRemoteAudioStream": Whether to subscribe to and play the remote audio stream.
         - \ref IRtcEngine::muteAllRemoteAudioStreams "muteAllRemoteAudioStreams": Whether to subscribe to and play all remote audio streams.
 
    @return
    - 0: Success.
    - < 0: Failure.
    */
    virtual int enableAudio() = 0;
 
    /** Disables/Re-enables the local audio function.
 
    The audio function is enabled by default. This method disables or re-enables the local audio function, that is, to stop or restart local audio capturing.
 
    This method does not affect receiving or playing the remote audio streams,and enableLocalAudio(false) is applicable to scenarios where the user wants to 
    receive remote audio streams without sending any audio stream to other users in the channel.
 
    The SDK triggers the \ref IRtcEngineEventHandler::onMicrophoneEnabled "onMicrophoneEnabled" callback once the local audio function is disabled or enabled.
 
     @note
     - Call this method after the \ref IRtcEngine::joinChannel "joinChannel" method.
     - This method is different from the \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" method:
 
        - \ref ar::rtc::IRtcEngine::enableLocalAudio "enableLocalAudio": Disables/Re-enables the local audio capturing and processing. 
        If you disable or re-enable local audio recording using the `enableLocalAudio` method, the local user may hear a pause in the remote audio playback.
        - \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream": Sends/Stops sending the local audio streams.
     
     @param enabled Sets whether to disable/re-enable the local audio function:
     - true: (Default) Re-enable the local audio function, that is, to start the local audio capturing device (for example, the microphone).
     - false: Disable the local audio function, that is, to stop local audio capturing.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableLocalAudio(bool enabled) = 0;
 
    /** Disables the audio module.
 
     @note
     - This method affects the internal engine and can be called after the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method. You can call this method either before or after joining a channel.
     - This method resets the internal engine and takes some time to take effect. We recommend using the \ref ar::rtc::IRtcEngine::enableLocalAudio "enableLocalAudio" and \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" methods to capture, process, and send the local audio streams.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int disableAudio() = 0;
 
    /** Sets the audio parameters and application scenarios.
 
     @note
     - The *setAudioProfile* method must be called before the \ref IRtcEngine::joinChannel "joinChannel" method.
     - In the Communication and Live-broadcast profiles, the bitrate may be different from your settings due to network self-adaptation.
     - In scenarios requiring high-quality audio, for example, a music teaching scenario, we recommend setting profile as AUDIO_PROFILE_MUSIC_HIGH_QUALITY (4) and  scenario as AUDIO_SCENARIO_GAME_STREAMING (3).
 
     @param  profile Sets the sample rate, bitrate, encoding mode, and the number of channels. See #AUDIO_PROFILE_TYPE.
     @param  scenario Sets the audio application scenario. See #AUDIO_SCENARIO_TYPE. Under different audio scenarios, the device uses different volume tracks, i.e. either the in-call volume or the media volume. For details, see [What is the difference between the in-call volume and the media volume?](https://docs.ar.io/en/faq/system_volume).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setAudioProfile(AUDIO_PROFILE_TYPE profile, AUDIO_SCENARIO_TYPE scenario) = 0;
    /** Stops/Resumes sending the local audio stream.
 
     A successful \ref ar::rtc::IRtcEngine::muteLocalAudioStream "muteLocalAudioStream" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserMuteAudio "onUserMuteAudio" callback on the remote client.
     @note 
     - When @p mute is set as @p true, this method does not disable the microphone, which does not affect any ongoing recording.
     - If you call \ref ar::rtc::IRtcEngine::setChannelProfile "setChannelProfile" after this method, the SDK resets whether or not to mute the local audio according to the channel profile and user role. Therefore, we recommend calling this method after the `setChannelProfile` method.
 
     @param mute Sets whether to send/stop sending the local audio stream:
     - true: Stops sending the local audio stream.
     - false: (Default) Sends the local audio stream.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int muteLocalAudioStream(bool mute) = 0;
    /** Stops/Resumes receiving all remote users' audio streams.
 
     @param mute Sets whether to receive/stop receiving all remote users' audio streams.
     - true: Stops receiving all remote users' audio streams.
     - false: (Default) Receives all remote users' audio streams.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int muteAllRemoteAudioStreams(bool mute) = 0;
    /** Stops/Resumes receiving all remote users' audio streams by default.
 
     You can call this method either before or after joining a channel. If you call `setDefaultMuteAllRemoteAudioStreams (true)` after joining a channel, the remote audio streams of all subsequent users are not received.
 
     @note If you want to resume receiving the audio stream, call \ref ar::rtc::IRtcEngine::muteRemoteAudioStream "muteRemoteAudioStream (false)",
     and specify the ID of the remote user whose audio stream you want to receive.
     To receive the audio streams of multiple remote users, call `muteRemoteAudioStream (false)` as many times.
     Calling `setDefaultMuteAllRemoteAudioStreams (false)` resumes receiving the audio streams of subsequent users only.
 
     @param mute Sets whether to receive/stop receiving all remote users' audio streams by default:
     - true:  Stops receiving all remote users' audio streams by default.
     - false: (Default) Receives all remote users' audio streams by default.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setDefaultMuteAllRemoteAudioStreams(bool mute) = 0;
    
    /** Adjusts the playback volume of a specified remote user.
 
     You can call this method as many times as necessary to adjust the playback volume of different remote users, or to repeatedly adjust the playback volume of the same remote user.
     
     @note
     - Call this method after joining a channel.
     - The playback volume here refers to the mixed volume of a specified remote user.
     - This method can only adjust the playback volume of one specified remote user at a time. To adjust the playback volume of different remote users, call the method as many times, once for each remote user.
 
     @param uid The ID of the remote user.
     @param volume The playback volume of the specified remote user. The value ranges from 0 to 100:
     - 0: Mute.
     - 100: Original volume.
 
     @return
     - 0: Success.
     - < 0: Failure. 
     */
    virtual int adjustUserPlaybackSignalVolume(AR::uid_t uid, int volume) = 0;
    /** Stops/Resumes receiving a specified remote user's audio stream.
 
     @note If you called the \ref ar::rtc::IRtcEngine::muteAllRemoteAudioStreams "muteAllRemoteAudioStreams" method and set @p mute as @p true to stop receiving all remote users' audio streams, call the *muteAllRemoteAudioStreams* method and set @p mute as @p false before calling this method. The *muteAllRemoteAudioStreams* method sets all remote audio streams, while the *muteRemoteAudioStream* method sets a specified remote audio stream.
 
     @param userId User ID of the specified remote user sending the audio.
     @param mute Sets whether to receive/stop receiving a specified remote user's audio stream:
     - true: Stops receiving the specified remote user's audio stream.
     - false: (Default) Receives the specified remote user's audio stream.
 
     @return
     - 0: Success.
     - < 0: Failure.
 
     */
    virtual int muteRemoteAudioStream(uid_t userId, bool mute) = 0;
    /** Stops/Resumes sending the local video stream.
 
     A successful \ref ar::rtc::IRtcEngine::muteLocalVideoStream "muteLocalVideoStream" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserMuteVideo "onUserMuteVideo" callback on the remote client.
     
     @note 
     - When set to *true*, this method does not disable the camera which does not affect the retrieval of the local video streams. This method executes faster than the \ref ar::rtc::IRtcEngine::enableLocalVideo "enableLocalVideo" method which controls the sending of the local video stream.
     - If you call \ref ar::rtc::IRtcEngine::setChannelProfile "setChannelProfile" after this method, the SDK resets whether or not to mute the local video according to the channel profile and user role. Therefore, we recommend calling this method after the `setChannelProfile` method.
 
     @param mute Sets whether to send/stop sending the local video stream:
     - true: Stop sending the local video stream.
     - false: (Default) Send the local video stream.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int muteLocalVideoStream(bool mute) = 0;
    /** Enables/Disables the local video capture.
 
     This method disables or re-enables the local video capturer, and does not affect receiving the remote video stream.
 
     After you call the \ref ar::rtc::IRtcEngine::enableVideo "enableVideo" method, the local video capturer is enabled by default. You can call \ref ar::rtc::IRtcEngine::enableLocalVideo "enableLocalVideo(false)" to disable the local video capturer. If you want to re-enable it, call \ref ar::rtc::IRtcEngine::enableLocalVideo "enableLocalVideo(true)".
 
     After the local video capturer is successfully disabled or re-enabled, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onUserEnableLocalVideo "onUserEnableLocalVideo" callback on the remote client.
     
     @note This method affects the internal engine and can be called after the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method.
 
     @param enabled Sets whether to disable/re-enable the local video, including the capturer, renderer, and sender:
     - true: (Default) Re-enable the local video.
     - false: Disable the local video. Once the local video is disabled, the remote users can no longer receive the video stream of this user, while this user can still receive the video streams of the other remote users.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableLocalVideo(bool enabled) = 0;
    /** Stops/Resumes receiving all video stream from a specified remote user.
 
     @param  mute Sets whether to receive/stop receiving all remote users' video streams:
     - true: Stop receiving all remote users' video streams.
     - false: (Default) Receive all remote users' video streams.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int muteAllRemoteVideoStreams(bool mute) = 0;
    /** Stops/Resumes receiving all remote users' video streams by default.
 
     @param mute Sets whether to receive/stop receiving all remote users' video streams by default:
     - true: Stop receiving all remote users' video streams by default.
     - false: (Default) Receive all remote users' video streams by default.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setDefaultMuteAllRemoteVideoStreams(bool mute) = 0;
    /** Stops/Resumes receiving the video stream from a specified remote user.
 
     @note If you called the \ref ar::rtc::IRtcEngine::muteAllRemoteVideoStreams "muteAllRemoteVideoStreams" method and set @p mute as @p true to stop receiving all remote video streams, call the *muteAllRemoteVideoStreams* method and set @p mute as @p false before calling this method.
 
     @param userId User ID of the specified remote user.
     @param mute Sets whether to stop/resume receiving the video stream from a specified remote user:
     - true: Stop receiving the specified remote user's video stream.
     - false: (Default) Receive the specified remote user's video stream.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int muteRemoteVideoStream(uid_t userId, bool mute) = 0;
    /** Sets the remote user's video stream type received by the local user when the remote user sends dual streams.
 
     This method allows the application to adjust the corresponding video-stream type based on the size of the video window to reduce the bandwidth and resources.
 
     - If the remote user enables the dual-stream mode by calling the \ref ar::rtc::IRtcEngine::enableDualStreamMode "enableDualStreamMode" method, the SDK receives the high-stream video by default.
     - If the dual-stream mode is not enabled, the SDK receives the high-stream video by default.
 
     The method result returns in the \ref ar::rtc::IRtcEngineEventHandler::onApiCallExecuted "onApiCallExecuted" callback. The SDK receives the high-stream video by default to reduce the bandwidth. If needed, users may use this method to switch to the low-stream video.
     By default, the aspect ratio of the low-stream video is the same as the high-stream video. Once the resolution of the high-stream video is set, the system automatically sets the resolution, frame rate, and bitrate of the low-stream video.
 
     @param userId ID of the remote user sending the video stream.
     @param streamType  Sets the video-stream type. See #REMOTE_VIDEO_STREAM_TYPE.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteVideoStreamType(uid_t userId, REMOTE_VIDEO_STREAM_TYPE streamType) = 0;
    /** Sets the default video-stream type for the video received by the local user when the remote user sends dual streams.
 
     - If the dual-stream mode is enabled by calling the \ref ar::rtc::IRtcEngine::enableDualStreamMode "enableDualStreamMode" method, the user receives the high-stream video by default. The @p setRemoteDefaultVideoStreamType method allows the application to adjust the corresponding video-stream type according to the size of the video window, reducing the bandwidth and resources.
     - If the dual-stream mode is not enabled, the user receives the high-stream video by default.
 
     The result after calling this method is returned in the \ref ar::rtc::IRtcEngineEventHandler::onApiCallExecuted "onApiCallExecuted" callback. The AR SDK receives the high-stream video by default to reduce the bandwidth. If needed, users can switch to the low-stream video through this method.
 
     @param streamType Sets the default video-stream type. See #REMOTE_VIDEO_STREAM_TYPE.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteDefaultVideoStreamType(REMOTE_VIDEO_STREAM_TYPE streamType) = 0;
 
    /** Enables the \ref ar::rtc::IRtcEngineEventHandler::onAudioVolumeIndication "onAudioVolumeIndication" callback at a set time interval to report on which users are speaking and the speakers' volume.
 
     Once this method is enabled, the SDK returns the volume indication in the \ref ar::rtc::IRtcEngineEventHandler::onAudioVolumeIndication "onAudioVolumeIndication" callback at the set time interval, whether or not any user is speaking in the channel.
 
     @param interval Sets the time interval between two consecutive volume indications:
     - &le; 0: Disables the volume indication.
     - > 0: Time interval (ms) between two consecutive volume indications. We recommend setting @p interval &gt; 200 ms. Do not set @p interval &lt; 10 ms, or the *onAudioVolumeIndication* callback will not be triggered.
     @param smooth  Smoothing factor sets the sensitivity of the audio volume indicator. The value ranges between 0 and 10. The greater the value, the more sensitive the indicator. The recommended value is 3.
     @param report_vad
     
     - true: Enable the voice activity detection of the local user. Once it is enabled, the `vad` parameter of the `onAudioVolumeIndication` callback reports the voice activity status of the local user.
     - false: (Default) Disable the voice activity detection of the local user. Once it is disabled, the `vad` parameter of the `onAudioVolumeIndication` callback does not report the voice activity status of the local user, except for the scenario where the engine automatically detects the voice activity of the local user.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableAudioVolumeIndication(int interval, int smooth, bool report_vad) = 0;
    /** **DEPRECATED** Starts an audio recording.
     * Use \ref IRtcEngine::startAudioRecording(const char* filePath, int sampleRate, AUDIO_RECORDING_QUALITY_TYPE quality) "startAudioRecording"2 instead.
 
     The SDK allows recording during a call. Supported formats:
 
     - .wav: Large file size with high fidelity.
     - .aac: Small file size with low fidelity.
 
     This method has a fixed sample rate of 32 kHz.
 
     Ensure that the directory to save the recording file exists and is writable.
     This method is usually called after the \ref ar::rtc::IRtcEngine::joinChannel "joinChannel" method.
     The recording automatically stops when the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method is called.
 
     @param filePath Pointer to the absolute file path of the recording file. The string of the file name is in UTF-8.
     @param quality Sets the audio recording quality. See #AUDIO_RECORDING_QUALITY_TYPE.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startAudioRecording(const char* filePath, AUDIO_RECORDING_QUALITY_TYPE quality) = 0;
 
    /** Starts an audio recording on the client.
     * 
     * The SDK allows recording during a call. After successfully calling this method, you can record the audio of all the users in the channel and get an audio recording file. 
     * Supported formats of the recording file are as follows:
     * - .wav: Large file size with high fidelity.
     * - .aac: Small file size with low fidelity.
     * 
     * @note
     * - Ensure that the directory you use to save the recording file exists and is writable.
     * - This method is usually called after the `joinChannel` method. The recording automatically stops when you call the `leaveChannel` method.
     * - For better recording effects, set quality as #AUDIO_RECORDING_QUALITY_MEDIUM or #AUDIO_RECORDING_QUALITY_HIGH when `sampleRate` is 44.1 kHz or 48 kHz.
     * 
     * @param filePath Pointer to the absolute file path of the recording file. The string of the file name is in UTF-8.
     * @param sampleRate Sample rate (kHz) of the recording file. Supported values are as follows:
     * - 16
     * - (Default) 32
     * - 44.1
     * - 48
     * @param quality Sets the audio recording quality. See #AUDIO_RECORDING_QUALITY_TYPE.
     * 
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int startAudioRecording(const char* filePath, int sampleRate, AUDIO_RECORDING_QUALITY_TYPE quality) = 0;
    /** Stops an audio recording on the client.
 
     You can call this method before calling the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method else, the recording automatically stops when the \ref ar::rtc::IRtcEngine::leaveChannel "leaveChannel" method is called.
 
     @return
     - 0: Success
     - < 0: Failure.
     */
    virtual int stopAudioRecording() = 0;
    /** Starts playing and mixing the music file.
 
     This method mixes the specified local audio file with the audio stream from the microphone, or replaces the microphone's audio stream with the specified local audio file. You can choose whether the other user can hear the local audio playback and specify the number of playback loops. This method also supports online music playback.
 
     When the audio mixing file playback finishes after calling this method, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onAudioMixingFinished "onAudioMixingFinished" callback.
 
     A successful \ref ar::rtc::IRtcEngine::startAudioMixing "startAudioMixing" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onAudioMixingStateChanged "onAudioMixingStateChanged" (PLAY) callback on the local client.
 
     When the audio mixing file playback finishes, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onAudioMixingStateChanged "onAudioMixingStateChanged" (STOPPED) callback on the local client.
     @note
     - Call this method when you are in a channel.
     - If the local audio mixing file does not exist, or if the SDK does not support the file format or cannot access the music file URL, the SDK returns WARN_AUDIO_MIXING_OPEN_ERROR = 701.
 
     @param filePath Pointer to the absolute path of the local or online audio file to mix. Supported audio formats: 3GP, ASF, ADTS, AVI, MP3, MPEG-4, SAMI, and WAVE. For more information, see [Supported Media Formats in Media Foundation](https://docs.microsoft.com/en-us/windows/desktop/medfound/supported-media-formats-in-media-foundation).
     @param loopback Sets which user can hear the audio mixing:
     - true: Only the local user can hear the audio mixing.
     - false: Both users can hear the audio mixing.
     @param replace Sets the audio mixing content:
     - true: Only the specified audio file is published; the audio stream received by the microphone is not published.
     - false: The local audio file is mixed with the audio stream from the microphone.
     @param cycle Sets the number of playback loops:
     - Positive integer: Number of playback loops.
     - -1: Infinite playback loops.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startAudioMixing(const char* filePath, bool loopback, bool replace, int cycle) = 0;
    /** Stops playing and mixing the music file.
 
     Call this method when you are in a channel.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopAudioMixing() = 0;
    /** Pauses playing and mixing the music file.
 
     Call this method when you are in a channel.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int pauseAudioMixing() = 0;
    /** Resumes playing and mixing the music file.
 
     Call this method when you are in a channel.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int resumeAudioMixing() = 0;
    /** **DEPRECATED** AR does not recommend using this method.
 
     Sets the high-quality audio preferences. Call this method and set all parameters before joining a channel.
 
     Do not call this method again after joining a channel.
 
     @param fullband Sets whether to enable/disable full-band codec (48-kHz sample rate). Not compatible with SDK versions before v1.7.4:
     - true: Enable full-band codec.
     - false: Disable full-band codec.
     @param  stereo Sets whether to enable/disable stereo codec. Not compatible with SDK versions before v1.7.4:
     - true: Enable stereo codec.
     - false: Disable stereo codec.
     @param fullBitrate Sets whether to enable/disable high-bitrate mode. Recommended in voice-only mode:
     - true: Enable high-bitrate mode.
     - false: Disable high-bitrate mode.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setHighQualityAudioParameters(bool fullband, bool stereo, bool fullBitrate) = 0;
    /** Adjusts the volume during audio mixing.
 
     Call this method when you are in a channel.
 
     @note Calling this method does not affect the volume of audio effect file playback invoked by the \ref ar::rtc::IRtcEngine::playEffect "playEffect" method.
 
     @param volume Audio mixing volume. The value ranges between 0 and 100 (default).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int adjustAudioMixingVolume(int volume) = 0;
    /** Adjusts the audio mixing volume for local playback.
 
     @note Call this method when you are in a channel.
 
     @param volume Audio mixing volume for local playback. The value ranges between 0 and 100 (default).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int adjustAudioMixingPlayoutVolume(int volume) = 0;
    /** Retrieves the audio mixing volume for local playback.
 
     This method helps troubleshoot audio volume related issues.
 
     @note Call this method when you are in a channel.
 
     @return
     - &ge; 0: The audio mixing volume, if this method call succeeds. The value range is [0,100].
     - < 0: Failure.
     */
    virtual int getAudioMixingPlayoutVolume() = 0;
    /** Adjusts the audio mixing volume for publishing (for remote users).
 
     @note Call this method when you are in a channel.
 
     @param volume Audio mixing volume for publishing. The value ranges between 0 and 100 (default).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int adjustAudioMixingPublishVolume(int volume) = 0;
    /** Retrieves the audio mixing volume for publishing.
 
     This method helps troubleshoot audio volume related issues.
 
     @note Call this method when you are in a channel.
 
     @return
     - &ge; 0: The audio mixing volume for publishing, if this method call succeeds. The value range is [0,100].
     - < 0: Failure.
     */
    virtual int getAudioMixingPublishVolume() = 0;
 
    /** Retrieves the duration (ms) of the music file.
 
     Call this method when you are in a channel.
 
     @return
     - &ge; 0: The audio mixing duration, if this method call succeeds.
     - < 0: Failure.
     */
    virtual int getAudioMixingDuration() = 0;
    /** Retrieves the playback position (ms) of the music file.
 
     Call this method when you are in a channel.
 
     @return
     - &ge; 0: The current playback position of the audio mixing, if this method call succeeds.
     - < 0: Failure.
     */
    virtual int getAudioMixingCurrentPosition() = 0;
    /** Sets the playback position of the music file to a different starting position (the default plays from the beginning).
 
     @param pos The playback starting position (ms) of the music file.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setAudioMixingPosition(int pos /*in ms*/) = 0;
    /** Sets the pitch of the local music file.
     * @since v3.0.1
     *
     * When a local music file is mixed with a local human voice, call this method to set the pitch of the local music file only.
     *
     * @note
     * Call this method after calling `startAudioMixing`.
     *
     * @param pitch Sets the pitch of the local music file by chromatic scale. The default value is 0,
     * which means keeping the original pitch. The value ranges from -12 to 12, and the pitch value between
     * consecutive values is a chromatic value. The greater the absolute value of this parameter, the
     * higher or lower the pitch of the local music file.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int setAudioMixingPitch(int pitch) = 0;
    /** Retrieves the volume of the audio effects.
 
     The value ranges between 0.0 and 100.0.
 
     @return
     - &ge; 0: Volume of the audio effects, if this method call succeeds.
 
     - < 0: Failure.
     */
    virtual int getEffectsVolume() = 0;
    /** Sets the volume of the audio effects.
 
     @param volume Sets the volume of the audio effects. The value ranges between 0 and 100 (default).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setEffectsVolume(int volume) = 0;
    /** Sets the volume of a specified audio effect.
 
     @param soundId ID of the audio effect. Each audio effect has a unique ID.
     @param volume Sets the volume of the specified audio effect. The value ranges between 0 and 100 (default).
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setVolumeOfEffect(int soundId, int volume) = 0;
 
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
    /**
     * Enables/Disables face detection for the local user. Applies to Android and iOS only.
     * @since v3.0.1
     *
     * Once face detection is enabled, the SDK triggers the \ref IRtcEngineEventHandler::onFacePositionChanged "onFacePositionChanged" callback
     * to report the face information of the local user, which includes the following aspects:
     * - The width and height of the local video.
     * - The position of the human face in the local video.
     * - The distance between the human face and the device screen.
     *
     * @param enable Determines whether to enable the face detection function for the local user:
     * - true: Enable face detection.
     * - false: (Default) Disable face detection.
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int enableFaceDetection(bool enable) = 0;
#endif
    /** Plays a specified local or online audio effect file.
 
     This method allows you to set the loop count, pitch, pan, and gain of the audio effect file, as well as whether the remote user can hear the audio effect.
 
     To play multiple audio effect files simultaneously, call this method multiple times with different soundIds and filePaths. We recommend playing no more than three audio effect files at the same time.
 
     @param soundId ID of the specified audio effect. Each audio effect has a unique ID.
 
     @note
     - If the audio effect is preloaded into the memory through the \ref IRtcEngine::preloadEffect "preloadEffect" method, the value of @p soundID must be the same as that in the *preloadEffect* method.
     - Playing multiple online audio effect files simultaneously is not supported on macOS and Windows.
 
     @param filePath The absolute path to the local audio effect file or the URL of the online audio effect file.
     @param loopCount Sets the number of times the audio effect loops:
     - 0: Play the audio effect once.
     - 1: Play the audio effect twice.
     - -1: Play the audio effect in an indefinite loop until the \ref IRtcEngine::stopEffect "stopEffect" or \ref IRtcEngine::stopAllEffects "stopAllEffects" method is called.
     @param pitch Sets the pitch of the audio effect. The value ranges between 0.5 and 2. The default value is 1 (no change to the pitch). The lower the value, the lower the pitch.
     @param pan Sets the spatial position of the audio effect. The value ranges between -1.0 and 1.0:
     - 0.0: The audio effect displays ahead.
     - 1.0: The audio effect displays to the right.
     - -1.0: The audio effect displays to the left.
     @param gain  Sets the volume of the audio effect. The value ranges between 0 and 100 (default). The lower the value, the lower the volume of the audio effect.
     @param publish Sets whether or not to publish the specified audio effect to the remote stream:
     - true: The locally played audio effect is published to the AR Cloud and the remote users can hear it.
     - false: The locally played audio effect is not published to the AR Cloud and the remote users cannot hear it.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int playEffect(int soundId, const char* filePath, int loopCount, double pitch, double pan, int gain, bool publish = false) = 0;
    /** Stops playing a specified audio effect.
 
     @param soundId ID of the audio effect to stop playing. Each audio effect has a unique ID.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopEffect(int soundId) = 0;
    /** Stops playing all audio effects.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int stopAllEffects() = 0;
 
    /** Preloads a specified audio effect file into the memory.
 
     @note This method does not support online audio effect files.
 
     To ensure smooth communication, limit the size of the audio effect file. We recommend using this method to preload the audio effect before calling the \ref IRtcEngine::joinChannel "joinChannel" method.
 
     Supported audio formats: mp3, aac, m4a, 3gp, and wav.
 
     @param soundId ID of the audio effect. Each audio effect has a unique ID.
     @param filePath Pointer to the absolute path of the audio effect file.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int preloadEffect(int soundId, const char* filePath) = 0;
    /** Releases a specified preloaded audio effect from the memory.
 
     @param soundId ID of the audio effect. Each audio effect has a unique ID.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int unloadEffect(int soundId) = 0;
    /** Pauses a specified audio effect.
 
     @param soundId ID of the audio effect. Each audio effect has a unique ID.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int pauseEffect(int soundId) = 0;
    /** Pauses all audio effects.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int pauseAllEffects() = 0;
    /** Resumes playing a specified audio effect.
 
     @param soundId ID of the audio effect. Each audio effect has a unique ID.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int resumeEffect(int soundId) = 0;
    /** Resumes playing all audio effects.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int resumeAllEffects() = 0;
    /** Enables/Disables stereo panning for remote users.
 
     Ensure that you call this method before joinChannel to enable stereo panning for remote users so that the local user can track the position of a remote user by calling \ref ar::rtc::IRtcEngine::setRemoteVoicePosition "setRemoteVoicePosition".
 
     @param enabled Sets whether or not to enable stereo panning for remote users:
     - true: enables stereo panning.
     - false: disables stereo panning.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableSoundPositionIndication(bool enabled) = 0;
    /** Sets the sound position and gain of a remote user.
 
     When the local user calls this method to set the sound position of a remote user, the sound difference between the left and right channels allows the local user to track the real-time position of the remote user, creating a real sense of space. This method applies to massively multiplayer online games, such as Battle Royale games.
 
     @note
     - For this method to work, enable stereo panning for remote users by calling the \ref ar::rtc::IRtcEngine::enableSoundPositionIndication "enableSoundPositionIndication" method before joining a channel.
     - This method requires hardware support. For the best sound positioning, we recommend using a stereo speaker.
 
     @param uid The ID of the remote user.
     @param pan The sound position of the remote user. The value ranges from -1.0 to 1.0:
     - 0.0: the remote sound comes from the front.
     - -1.0: the remote sound comes from the left.
     - 1.0: the remote sound comes from the right.
     @param gain Gain of the remote user. The value ranges from 0.0 to 100.0. The default value is 100.0 (the original gain of the remote user). The smaller the value, the less the gain.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteVoicePosition(uid_t uid, double pan, double gain) = 0;
 
    /** Changes the voice pitch of the local speaker.
 
     @param pitch Sets the voice pitch. The value ranges between 0.5 and 2.0. The lower the value, the lower the voice pitch. The default value is 1.0 (no change to the local voice pitch).
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalVoicePitch(double pitch) = 0;
    /** Sets the local voice equalization effect.
 
     @param bandFrequency Sets the band frequency. The value ranges between 0 and 9, representing the respective 10-band center frequencies of the voice effects, including 31, 62, 125, 500, 1k, 2k, 4k, 8k, and 16k Hz. See #AUDIO_EQUALIZATION_BAND_FREQUENCY.
     @param bandGain  Sets the gain of each band in dB. The value ranges between -15 and 15.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalVoiceEqualization(AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, int bandGain) = 0;
    /**  Sets the local voice reverberation.
 
     v2.4.0 adds the \ref ar::rtc::IRtcEngine::setLocalVoiceReverbPreset "setLocalVoiceReverbPreset" method, a more user-friendly method for setting the local voice reverberation. You can use this method to set the local reverberation effect, such as pop music, R&B, rock music, and hip-hop.
 
     @param reverbKey Sets the reverberation key. See #AUDIO_REVERB_TYPE.
     @param value Sets the value of the reverberation key.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalVoiceReverb(AUDIO_REVERB_TYPE reverbKey, int value) = 0;
    /** Sets the local voice changer option.
 
     @note Do not use this method together with the \ref ar::rtc::IRtcEngine::setLocalVoiceReverbPreset "setLocalVoiceReverbPreset" method, because the method called later overrides the one called earlier.
 
     @param voiceChanger Sets the local voice changer option. See #VOICE_CHANGER_PRESET.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalVoiceChanger(VOICE_CHANGER_PRESET voiceChanger) = 0;
    /** Sets the preset local voice reverberation effect.
 
     @note
     - Do not use this method together with \ref ar::rtc::IRtcEngine::setLocalVoiceReverb "setLocalVoiceReverb".
     - Do not use this method together with the \ref ar::rtc::IRtcEngine::setLocalVoiceChanger "setLocalVoiceChanger" method, because the method called later overrides the one called earlier.
 
     @param reverbPreset Sets the preset audio reverberation configuration. See #AUDIO_REVERB_PRESET.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalVoiceReverbPreset(AUDIO_REVERB_PRESET reverbPreset) = 0;
    /** Sets an SDK preset voice beautifier effect.
     *
     * @since v3.2.0
     *
     * Call this method to set an SDK preset voice beautifier effect for the local user who sends an audio stream. After
     * setting a voice beautifier effect, all users in the channel can hear the effect.
     *
     * You can set different voice beautifier effects for different scenarios. See *Set the Voice Beautifier and Audio Effects*.
     *
     * To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile" and
     * setting the `scenario` parameter to `AUDIO_SCENARIO_GAME_STREAMING(3)` and the `profile` parameter to
     * `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before calling this method.
     *
     * @note
     * - You can call this method either before or after joining a channel.
     * - Do not set the `profile` parameter of \ref IRtcEngine::setAudioProfile "setAudioProfile" to `AUDIO_PROFILE_SPEECH_STANDARD(1)`
     * or `AUDIO_PROFILE_IOT(6)`; otherwise, this method call fails.
     * - This method works best with the human voice. AR does not recommend using this method for audio containing music.
     * - After calling this method, AR recommends not calling the following methods, because they can override \ref IRtcEngine::setAudioEffectParameters "setAudioEffectParameters":
     *  - \ref IRtcEngine::setAudioEffectPreset "setAudioEffectPreset"
     *  - \ref IRtcEngine::setVoiceBeautifierPreset "setVoiceBeautifierPreset"
     *  - \ref IRtcEngine::setLocalVoiceReverbPreset "setLocalVoiceReverbPreset"
     *  - \ref IRtcEngine::setLocalVoiceChanger "setLocalVoiceChanger"
     *  - \ref IRtcEngine::setLocalVoicePitch "setLocalVoicePitch"
     *  - \ref IRtcEngine::setLocalVoiceEqualization "setLocalVoiceEqualization"
     *  - \ref IRtcEngine::setLocalVoiceReverb "setLocalVoiceReverb"
     *
     * @param preset The options for SDK preset voice beautifier effects: #VOICE_BEAUTIFIER_PRESET.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int setVoiceBeautifierPreset(VOICE_BEAUTIFIER_PRESET preset) = 0;
    /** Sets an SDK preset audio effect.
     *
     * @since v3.2.0
     *
     * Call this method to set an SDK preset audio effect for the local user who sends an audio stream. This audio effect
     * does not change the gender characteristics of the original voice. After setting an audio effect, all users in the
     * channel can hear the effect.
     *
     * You can set different audio effects for different scenarios. See *Set the Voice Beautifier and Audio Effects*.
     *
     * To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `scenario` parameter to `AUDIO_SCENARIO_GAME_STREAMING(3)` before calling this method.
     *
     * @note
     * - You can call this method either before or after joining a channel.
     * - Do not set the profile `parameter` of `setAudioProfile` to `AUDIO_PROFILE_SPEECH_STANDARD(1)` or `AUDIO_PROFILE_IOT(6)`;
     * otherwise, this method call fails.
     * - This method works best with the human voice. AR does not recommend using this method for audio containing music.
     * - If you call this method and set the `preset` parameter to enumerators except `ROOM_ACOUSTICS_3D_VOICE` or `PITCH_CORRECTION`,
     * do not call \ref IRtcEngine::setAudioEffectParameters "setAudioEffectParameters"; otherwise, `setAudioEffectParameters`
     * overrides this method.
     * - After calling this method, AR recommends not calling the following methods, because they can override `setAudioEffectPreset`:
     *  - \ref IRtcEngine::setVoiceBeautifierPreset "setVoiceBeautifierPreset"
     *  - \ref IRtcEngine::setLocalVoiceReverbPreset "setLocalVoiceReverbPreset"
     *  - \ref IRtcEngine::setLocalVoiceChanger "setLocalVoiceChanger"
     *  - \ref IRtcEngine::setLocalVoicePitch "setLocalVoicePitch"
     *  - \ref IRtcEngine::setLocalVoiceEqualization "setLocalVoiceEqualization"
     *  - \ref IRtcEngine::setLocalVoiceReverb "setLocalVoiceReverb"
     *
     * @param preset The options for SDK preset audio effects. See #AUDIO_EFFECT_PRESET.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int setAudioEffectPreset(AUDIO_EFFECT_PRESET preset) = 0;
    /** Sets parameters for SDK preset audio effects.
     *
     * @since v3.2.0
     *
     * Call this method to set the following parameters for the local user who send an audio stream:
     * - 3D voice effect: Sets the cycle period of the 3D voice effect.
     * - Pitch correction effect: Sets the basic mode and tonic pitch of the pitch correction effect. Different songs
     * have different modes and tonic pitches. AR recommends bounding this method with interface elements to enable
     * users to adjust the pitch correction interactively.
     *
     * After setting parameters, all users in the channel can hear the relevant effect.
     *
     * You can call this method directly or after \ref IRtcEngine::setAudioEffectPreset "setAudioEffectPreset". If you
     * call this method after \ref IRtcEngine::setAudioEffectPreset "setAudioEffectPreset", ensure that you set the preset
     * parameter of `setAudioEffectPreset` to `ROOM_ACOUSTICS_3D_VOICE` or `PITCH_CORRECTION` and then call this method
     * to set the same enumerator; otherwise, this method overrides `setAudioEffectPreset`.
     *
     * @note
     * - You can call this method either before or after joining a channel.
     * - To achieve better audio effect quality, AR recommends calling \ref IRtcEngine::setAudioProfile "setAudioProfile"
     * and setting the `scenario` parameter to `AUDIO_SCENARIO_GAME_STREAMING(3)` before calling this method.
     * - Do not set the `profile` parameter of \ref IRtcEngine::setAudioProfile "setAudioProfile" to `AUDIO_PROFILE_SPEECH_STANDARD(1)` or
     * `AUDIO_PROFILE_IOT(6)`; otherwise, this method call fails.
     * - This method works best with the human voice. AR does not recommend using this method for audio containing music.
     * - After calling this method, AR recommends not calling the following methods, because they can override `setAudioEffectParameters`:
     *  - \ref IRtcEngine::setAudioEffectPreset "setAudioEffectPreset"
     *  - \ref IRtcEngine::setVoiceBeautifierPreset "setVoiceBeautifierPreset"
     *  - \ref IRtcEngine::setLocalVoiceReverbPreset "setLocalVoiceReverbPreset"
     *  - \ref IRtcEngine::setLocalVoiceChanger "setLocalVoiceChanger"
     *  - \ref IRtcEngine::setLocalVoicePitch "setLocalVoicePitch"
     *  - \ref IRtcEngine::setLocalVoiceEqualization "setLocalVoiceEqualization"
     *  - \ref IRtcEngine::setLocalVoiceReverb "setLocalVoiceReverb"
     *
     * @param preset The options for SDK preset audio effects:
     * - 3D voice effect: `ROOM_ACOUSTICS_3D_VOICE`.
     *  - Call \ref IRtcEngine::setAudioProfile "setAudioProfile" and set the `profile` parameter to `AUDIO_PROFILE_MUSIC_STANDARD_STEREO(3)`
     * or `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before setting this enumerator; otherwise, the enumerator setting does not take effect.
     *  - If the 3D voice effect is enabled, users need to use stereo audio playback devices to hear the anticipated voice effect.
     * - Pitch correction effect: `PITCH_CORRECTION`. To achieve better audio effect quality, AR recommends calling
     * \ref IRtcEngine::setAudioProfile "setAudioProfile" and setting the `profile` parameter to `AUDIO_PROFILE_MUSIC_HIGH_QUALITY(4)` or
     * `AUDIO_PROFILE_MUSIC_HIGH_QUALITY_STEREO(5)` before setting this enumerator.
     * @param param1
     * - If you set `preset` to `ROOM_ACOUSTICS_3D_VOICE`, the `param1` sets the cycle period of the 3D voice effect.
     * The value range is [1,60] and the unit is a second. The default value is 10 seconds, indicating that the voice moves
     * around you every 10 seconds.
     * - If you set `preset` to `PITCH_CORRECTION`, `param1` sets the basic mode of the pitch correction effect:
     *  - `1`: (Default) Natural major scale.
     *  - `2`: Natural minor scale.
     *  - `3`: Japanese pentatonic scale.
     * @param param2
     * - If you set `preset` to `ROOM_ACOUSTICS_3D_VOICE`, you do not need to set `param2`.
     * - If you set `preset` to `PITCH_CORRECTION`, `param2` sets the tonic pitch of the pitch correction effect:
     *  - `1`: A
     *  - `2`: A#
     *  - `3`: B
     *  - `4`: (Default) C
     *  - `5`: C#
     *  - `6`: D
     *  - `7`: D#
     *  - `8`: E
     *  - `9`: F
     *  - `10`: F#
     *  - `11`: G
     *  - `12`: G#
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int setAudioEffectParameters(AUDIO_EFFECT_PRESET preset, int param1, int param2) = 0;
    /** Sets the log files that the SDK outputs.
     *
     * By default, the SDK outputs five log files, `arsdk.log`, `arsdk_1.log`, `arsdk_2.log`, `arsdk_3.log`, `arsdk_4.log`, each with a default size of 1024 KB.
     * These log files are encoded in UTF-8. The SDK writes the latest logs in `arsdk.log`. When `arsdk.log` is full, the SDK deletes the log file with the earliest
     * modification time among the other four, renames `arsdk.log` to the name of the deleted log file, and create a new `arsdk.log` to record latest logs.
     *
     * @note Ensure that you call this method immediately after calling \ref ar::rtc::IRtcEngine::initialize "initialize" , otherwise the output logs may not be complete.
     *
     * @see \ref IRtcEngine::setLogFileSize "setLogFileSize"
     * @see \ref IRtcEngine::setLogFilter "setLogFilter"
     *
     * @param filePath The absolute path of log files. The default file path is `C: \Users\<user_name>\AppData\Local\AR\<process_name>\arsdk.log`.
     * Ensure that the directory for the log files exists and is writable. You can use this parameter to rename the log files.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int setLogFile(const char* filePath) = 0;
    /** Sets the output log level of the SDK.
 
     You can use one or a combination of the log filter levels. The log level follows the sequence of OFF, CRITICAL, ERROR, WARNING, INFO, and DEBUG. Choose a level to see the logs preceding that level.
 
     If you set the log level to WARNING, you see the logs within levels CRITICAL, ERROR, and WARNING.
 
     @param filter Sets the log filter level. See #LOG_FILTER_TYPE.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLogFilter(unsigned int filter) = 0;
    /** Sets the log file size (KB).
 
     The SDK has two log files, each with a default size of 512 KB. If you set @p fileSizeInBytes as 1024 KB, the SDK outputs log files with a total maximum size of 2 MB. If the total size of the log files exceed the set value, the new output log files overwrite the old output log files.
 
     @param fileSizeInKBytes The SDK log file size (KB).
     @return
     - 0: Success.
     - <0: Failure.
     */
    virtual int setLogFileSize(unsigned int fileSizeInKBytes) = 0;
    /** 
     @deprecated This method is deprecated, use the \ref IRtcEngine::setLocalRenderMode(RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) "setLocalRenderMode"2 method instead.
     Sets the local video display mode.
 
     This method can be called multiple times during a call to change the display mode.
 
     @param renderMode  Sets the local video display mode. See #RENDER_MODE_TYPE.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalRenderMode(RENDER_MODE_TYPE renderMode) = 0;
    /** Updates the display mode of the local video view.
 
     After initializing the local video view, you can call this method to update its rendering and mirror modes. It affects only the video view that the local user sees, not the published local video stream.
     
     @note
     - Ensure that you have called the \ref IRtcEngine::setupLocalVideo "setupLocalVideo" method to initialize the local video view before calling this method.
     @param renderMode The rendering mode of the local video view. See #RENDER_MODE_TYPE.
     @param mirrorMode 
     - The mirror mode of the local video view. See #VIDEO_MIRROR_MODE_TYPE. 
     - **Note**: If you use a front camera, the SDK enables the mirror mode by default; if you use a rear camera, the SDK disables the mirror mode by default.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalRenderMode(RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0;
    /** 
     @deprecated This method is deprecated, use the \ref IRtcEngine::setRemoteRenderMode(uid_t userId, RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) "setRemoteRenderMode"2 method instead.
     Sets the video display mode of a specified remote user.
 
     This method can be called multiple times during a call to change the display mode.
 
     @param userId ID of the remote user.
     @param renderMode  Sets the video display mode. See #RENDER_MODE_TYPE.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteRenderMode(uid_t userId, RENDER_MODE_TYPE renderMode) = 0;
    /** Updates the display mode of the video view of a remote user.
 
     After initializing the video view of a remote user, you can call this method to update its rendering and mirror modes. This method affects only the video view that the local user sees.
 
     @note
     - Ensure that you have called the \ref IRtcEngine::setupRemoteVideo "setupRemoteVideo" method to initialize the remote video view before calling this method.
     - During a call, you can call this method as many times as necessary to update the display mode of the video view of a remote user.
 
     @param userId The ID of the remote user.
     @param renderMode The rendering mode of the remote video view. See #RENDER_MODE_TYPE.
     @param mirrorMode 
     - The mirror mode of the remote video view. See #VIDEO_MIRROR_MODE_TYPE.
     - **Note**: The SDK disables the mirror mode by default.
     
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteRenderMode(uid_t userId, RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0;
    /** 
     @deprecated This method is deprecated, use the \ref IRtcEngine::setupLocalVideo "setupLocalVideo" 
     or \ref IRtcEngine::setLocalRenderMode(RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) "setLocalRenderMode" method instead.
     Sets the local video mirror mode.
 
     You must call this method before calling the \ref ar::rtc::IRtcEngine::startPreview "startPreview" method, otherwise the mirror mode will not work.
 
     @warning
     - Call this method after calling the \ref ar::rtc::IRtcEngine::setupLocalVideo "setupLocalVideo" method to initialize the local video view.
     - During a call, you can call this method as many times as necessary to update the mirror mode of the local video view.
 
     @param mirrorMode Sets the local video mirror mode. See #VIDEO_MIRROR_MODE_TYPE.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalVideoMirrorMode(VIDEO_MIRROR_MODE_TYPE mirrorMode) = 0;
    /** Sets the stream mode to the single-stream (default) or dual-stream mode. (Live broadcast only.)
 
     If the dual-stream mode is enabled, the receiver can choose to receive the high stream (high-resolution and high-bitrate video stream), or the low stream (low-resolution and low-bitrate video stream).
 
     @param enabled Sets the stream mode:
     - true: Dual-stream mode.
     - false: (Default) Single-stream mode.
     */
    virtual int enableDualStreamMode(bool enabled) = 0;
    /** Sets the external audio source. Please call this method before \ref ar::rtc::IRtcEngine::joinChannel "joinChannel".
 
     @param enabled Sets whether to enable/disable the external audio source:
     - true: Enables the external audio source.
     - false: (Default) Disables the external audio source.
     @param sampleRate Sets the sample rate (Hz) of the external audio source, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
     @param channels Sets the number of audio channels of the external audio source:
     - 1: Mono.
     - 2: Stereo.
     
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setExternalAudioSource(bool enabled, int sampleRate, int channels) = 0;
    /** Sets the external audio sink.
     * This method applies to scenarios where you want to use external audio
     * data for playback. After enabling the external audio sink, you can call
     * the \ref AM::IMediaEngine::pullAudioFrame "pullAudioFrame" method to pull the remote audio data, process
     * it, and play it with the audio effects that you want.
     *
     * @note
     * Once you enable the external audio sink, the app will not retrieve any
     * audio data from the
     * \ref AM::IAudioFrameObserver::onPlaybackAudioFrame "onPlaybackAudioFrame" callback.
     *
     * @param enabled
     * - true: Enables the external audio sink.
     * - false: (Default) Disables the external audio sink.
     * @param sampleRate Sets the sample rate (Hz) of the external audio sink, which can be set as 16000, 32000, 44100 or 48000.
     * @param channels Sets the number of audio channels of the external
     * audio sink:
     * - 1: Mono.
     * - 2: Stereo.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int setExternalAudioSink(bool enabled, int sampleRate, int channels) = 0;
    /** Sets the audio recording format for the \ref AM::IAudioFrameObserver::onRecordAudioFrame "onRecordAudioFrame" callback. 
    
 
     @param sampleRate Sets the sample rate (@p samplesPerSec) returned in the *onRecordAudioFrame* callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
     @param channel Sets the number of audio channels (@p channels) returned in the *onRecordAudioFrame* callback:
     - 1: Mono
     - 2: Stereo
     @param mode Sets the use mode (see #RAW_AUDIO_FRAME_OP_MODE_TYPE) of the *onRecordAudioFrame* callback.
     @param samplesPerCall Sets the number of samples returned in the *onRecordAudioFrame* callback. `samplesPerCall` is usually set as 1024 for RTMP streaming.
 
 
     @note The SDK triggers the `onRecordAudioFrame` callback according to the sample interval. Ensure that the sample interval >= 0.01 (s). And, Sample interval (sec) = `samplePerCall`/(`sampleRate` x `channel`). 
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRecordingAudioFrameParameters(int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall) = 0;
    /** Sets the audio playback format for the \ref AM::IAudioFrameObserver::onPlaybackAudioFrame "onPlaybackAudioFrame" callback.
     
     
     @param sampleRate Sets the sample rate (@p samplesPerSec) returned in the *onPlaybackAudioFrame* callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
     @param channel Sets the number of channels (@p channels) returned in the *onPlaybackAudioFrame* callback:
     - 1: Mono
     - 2: Stereo
     @param mode Sets the use mode (see #RAW_AUDIO_FRAME_OP_MODE_TYPE) of the *onPlaybackAudioFrame* callback.
     @param samplesPerCall Sets the number of samples returned in the *onPlaybackAudioFrame* callback. `samplesPerCall` is usually set as 1024 for RTMP streaming.
     
     @note The SDK triggers the `onPlaybackAudioFrame` callback according to the sample interval. Ensure that the sample interval >= 0.01 (s). And, Sample interval (sec) = `samplePerCall`/(`sampleRate` x `channel`).
     
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setPlaybackAudioFrameParameters(int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall) = 0;
    /** Sets the mixed audio format for the \ref AM::IAudioFrameObserver::onMixedAudioFrame "onMixedAudioFrame" callback.
     
    
     @param sampleRate Sets the sample rate (@p samplesPerSec) returned in the *onMixedAudioFrame* callback, which can be set as 8000, 16000, 32000, 44100, or 48000 Hz.
     @param samplesPerCall Sets the number of samples (`samples`) returned in the *onMixedAudioFrame* callback. `samplesPerCall` is usually set as 1024 for RTMP streaming.
     
     @note The SDK triggers the `onMixedAudioFrame` callback according to the sample interval. Ensure that the sample interval >= 0.01 (s). And, Sample interval (sec) = `samplePerCall`/(`sampleRate` x `channels`).
    
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setMixedAudioFrameParameters(int sampleRate, int samplesPerCall) = 0;
    /** Adjusts the recording volume.
 
     @param volume Recording volume. The value ranges between 0 and 400:
     - 0: Mute.
     - 100: Original volume.
     - 400: (Maximum) Four times the original volume with signal clipping protection.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int adjustRecordingSignalVolume(int volume) = 0;
    /** Adjusts the playback volume of all remote users.
     
     @note 
     - This method adjusts the playback volume that is the mixed volume of all remote users.
     - (Since v2.3.2) To mute the local audio playback, call both the `adjustPlaybackSignalVolume` and \ref IRtcEngine::adjustAudioMixingVolume "adjustAudioMixingVolume" methods and set the volume as `0`.
 
     @param volume The playback volume of all remote users. The value ranges from 0 to 400:
     - 0: Mute.
     - 100: Original volume.
     - 400: (Maximum) Four times the original volume with signal clipping protection.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int adjustPlaybackSignalVolume(int volume) = 0;
 
    /** 
     @deprecated This method is deprecated. As of v3.0.0, the Native SDK automatically enables interoperability with the Web SDK, so you no longer need to call this method.
     Enables interoperability with the AR Web SDK.
 
     @note 
     - This method applies only to the Live-broadcast profile. In the Communication profile, interoperability with the AR Web SDK is enabled by default.
     - If the channel has Web SDK users, ensure that you call this method, or the video of the Native user will be a black screen for the Web user.
 
     @param enabled Sets whether to enable/disable interoperability with the AR Web SDK:
     - true: Enable.
     - false: (Default) Disable.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableWebSdkInteroperability(bool enabled) = 0;
    //only for live broadcast
    /** **DEPRECATED** Sets the preferences for the high-quality video. (Live broadcast only).
 
     This method is deprecated as of v2.4.0.
 
     @param preferFrameRateOverImageQuality Sets the video quality preference:
     - true: Frame rate over image quality.
     - false: (Default) Image quality over frame rate.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setVideoQualityParameters(bool preferFrameRateOverImageQuality) = 0;
    /** Sets the fallback option for the locally published video stream based on the network conditions.
 
     If `option` is set as #STREAM_FALLBACK_OPTION_AUDIO_ONLY (2), the SDK will:
 
     - Disable the upstream video but enable audio only when the network conditions deteriorate and cannot support both video and audio.
     - Re-enable the video when the network conditions improve.
     
     When the locally published video stream falls back to audio only or when the audio-only stream switches back to the video, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onLocalPublishFallbackToAudioOnly "onLocalPublishFallbackToAudioOnly" callback.
 
     @note AR does not recommend using this method for CDN live streaming, because the remote CDN live user will have a noticeable lag when the locally published video stream falls back to audio only.
 
     @param option Sets the fallback option for the locally published video stream:
     - #STREAM_FALLBACK_OPTION_DISABLED (0): (Default) No fallback behavior for the locally published video stream when the uplink network condition is poor. The stream quality is not guaranteed.
     - #STREAM_FALLBACK_OPTION_AUDIO_ONLY (2): The locally published video stream falls back to audio only when the uplink network condition is poor.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLocalPublishFallbackOption(STREAM_FALLBACK_OPTIONS option) = 0;
    /** Sets the fallback option for the remotely subscribed video stream based on the network conditions.
 
     The default setting for `option` is #STREAM_FALLBACK_OPTION_VIDEO_STREAM_LOW (1), where the remotely subscribed video stream falls back to the low-stream video (low resolution and low bitrate) under poor downlink network conditions.
 
     If `option` is set as #STREAM_FALLBACK_OPTION_AUDIO_ONLY (2), the SDK automatically switches the video from a high-stream to a low-stream, or disables the video when the downlink network conditions cannot support both audio and video to guarantee the quality of the audio. The SDK monitors the network quality and restores the video stream when the network conditions improve.
 
     When the remotely subscribed video stream falls back to audio only or when the audio-only stream switches back to the video stream, the SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onRemoteSubscribeFallbackToAudioOnly "onRemoteSubscribeFallbackToAudioOnly" callback.
 
     @param  option  Sets the fallback option for the remotely subscribed video stream. See #STREAM_FALLBACK_OPTIONS.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setRemoteSubscribeFallbackOption(STREAM_FALLBACK_OPTIONS option) = 0;
 
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
    /** Switches between front and rear cameras.
 
     @note This method is for Android and iOS only.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int switchCamera() = 0;
    /** Switches between front and rear cameras.
 
     @note This method is for Android and iOS only, and it is private.
     
     @param direction Sets the camera to be used:
     - CAMERA_DIRECTION.CAMERA_REAR: Use the rear camera.
     - CAMERA_DIRECTION.CAMERA_FRONT: Use the front camera.
     
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int switchCamera(CAMERA_DIRECTION direction) = 0;
    /** Sets the default audio playback route.
 
     This method sets whether the received audio is routed to the earpiece or speakerphone by default before joining a channel.
     If a user does not call this method, the audio is routed to the earpiece by default. If you need to change the default audio route after joining a channel, call the \ref IRtcEngine::setEnableSpeakerphone "setEnableSpeakerphone" method.
 
     The default setting for each profile:
     - `COMMUNICATION`: In a voice call, the default audio route is the earpiece. In a video call, the default audio route is the speakerphone. If a user who is in the `COMMUNICATION` profile calls
     the \ref IRtcEngine.disableVideo "disableVideo" method or if the user calls
     the \ref IRtcEngine.muteLocalVideoStream "muteLocalVideoStream" and
     \ref IRtcEngine.muteAllRemoteVideoStreams "muteAllRemoteVideoStreams" methods, the
     default audio route switches back to the earpiece automatically.
     - `LIVE_BROADCASTING`: Speakerphone.
 
     @note
     - This method is for Android and iOS only.
     - This method only works in audio mode.
     - Call this method before calling the \ref IRtcEngine::joinChannel "joinChannel" method.
     - Regardless of whether the audio is routed to the speakerphone or earpiece by default, once a headset is plugged in or Bluetooth device is connected, the default audio route changes. The default audio route switches to the earpiece once removing the headset or disconnecting the Bluetooth device.
 
     @param defaultToSpeaker Sets the default audio route:
     - true: Route the audio to the speakerphone. If the playback device connects to the earpiece or Bluetooth, the audio cannot be routed to the speakerphone.
     - false: (Default) Route the audio to the earpiece. If a headset is plugged in, the audio is routed to the headset.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setDefaultAudioRouteToSpeakerphone(bool defaultToSpeaker) = 0;
    /** Enables/Disables the audio playback route to the speakerphone.
 
     This method sets whether the audio is routed to the speakerphone or earpiece.
 
     See the default audio route explanation in the \ref IRtcEngine::setDefaultAudioRouteToSpeakerphone "setDefaultAudioRouteToSpeakerphone" method and check whether it is necessary to call this method.
 
     @note
     - This method is for Android and iOS only.
     - Ensure that you have successfully called the \ref IRtcEngine::joinChannel "joinChannel" method before calling this method.
     - After calling this method, the SDK returns the \ref IRtcEngineEventHandler::onAudioRouteChanged "onAudioRouteChanged" callback to indicate the changes.
     - This method does not take effect if a headset is used.
 
     @param speakerOn Sets whether to route the audio to the speakerphone or earpiece:
     - true: Route the audio to the speakerphone.
     - false: Route the audio to the earpiece.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setEnableSpeakerphone(bool speakerOn) = 0;
    /** Enables in-ear monitoring (for Android and iOS only).
     @param enabled Sets whether to enable/disable in-ear monitoring:
     - true: Enable.
     - false: (Default) Disable.
     
     * @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableInEarMonitoring(bool enabled) = 0;
    /** Sets the volume of the in-ear monitor.
 
     @param volume Sets the volume of the in-ear monitor. The value ranges between 0 and 100 (default).
 
     @note This method is for Android and iOS only.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setInEarMonitoringVolume(int volume) = 0;
    /** Checks whether the speakerphone is enabled.
 
     @note This method is for Android and iOS only.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual bool isSpeakerphoneEnabled() = 0;
    
    virtual bool isCameraZoomSupported() = 0;
    virtual bool isCameraTorchSupported() = 0;
    virtual bool isCameraFocusPositionInPreviewSupported() = 0;
    virtual bool isCameraExposurePositionSupported() = 0;
    virtual bool isCameraAutoFocusFaceModeSupported() = 0;
    virtual float setCameraZoomFactor(float zoomFactor) = 0;
    virtual bool setCameraFocusPositionInPreview(float x, float y) = 0;
    virtual bool setCameraExposurePosition(float x, float y) = 0;
    virtual bool setCameraTorchOn(bool enabled) = 0;
    virtual bool setCameraAutoFocusFaceModeEnabled(bool enabled) = 0;
    
#endif
 
#if (defined(__APPLE__) && TARGET_OS_IOS)
    /** Sets the audio session’s operational restriction.
 
     The SDK and the app can both configure the audio session by default. The app may occasionally use other apps or third-party components to manipulate the audio session and restrict the SDK from doing so. This method allows the app to restrict the SDK’s manipulation of the audio session.
 
     You can call this method at any time to return the control of the audio sessions to the SDK.
 
     @note
     - This method is for iOS only.
     - This method restricts the SDK’s manipulation of the audio session. Any operation to the audio session relies solely on the app, other apps, or third-party components.
 
     @param restriction The operational restriction (bit mask) of the SDK on the audio session. See #AUDIO_SESSION_OPERATION_RESTRICTION.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setAudioSessionOperationRestriction(AUDIO_SESSION_OPERATION_RESTRICTION restriction) = 0;
#endif
 
#if (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE) || defined(_WIN32)
    /** Enables loopback recording.
 
     If you enable loopback recording, the output of the sound card is mixed into the audio stream sent to the other end.
 
     @param enabled Sets whether to enable/disable loopback recording.
     - true: Enable loopback recording.
     - false: (Default) Disable loopback recording.
     @param deviceName Pointer to the device name of the sound card. The default value is NULL (the default sound card).
 
     @note
     - This method is for macOS and Windows only.
     - macOS does not support loopback recording of the default sound card. If you need to use this method, please use a virtual sound card and pass its name to the deviceName parameter. AR has tested and recommends using soundflower.
 
     */
    virtual int enableLoopbackRecording(bool enabled, const char* deviceName = NULL) = 0;
 
#if (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
    /** Shares the whole or part of a screen by specifying the display ID.
 
     @note This method is for macOS only.
 
     @param  displayId The display ID of the screen to be shared. This parameter specifies which screen you want to share.
     @param  regionRect (Optional) Sets the relative location of the region to the screen. NIL means sharing the whole screen. See Rectangle. If the specified region overruns the screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen.
     @param  captureParams Sets the screen sharing encoding parameters. See ScreenCaptureParameters.
 
 
     @return
     - 0: Success.
     - < 0: Failure:
        - #ERR_INVALID_ARGUMENT: the argument is invalid.
     */
    virtual int startScreenCaptureByDisplayId(unsigned int displayId, const Rectangle& regionRect, const ScreenCaptureParameters& captureParams) = 0;
#endif
 
#if defined(_WIN32)
    /** Shares the whole or part of a screen by specifying the screen rect.
 
     @param  screenRect Sets the relative location of the screen to the virtual screen. For information on how to get screenRect, see [Share the Screen](https://docs.ar.io/en/Video/screensharing_windows?platform=Windows).
     @param  regionRect (Optional) Sets the relative location of the region to the screen. NULL means sharing the whole screen. See Rectangle. If the specified region overruns the screen, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen.
     @param  captureParams Sets the screen sharing encoding parameters. See ScreenCaptureParameters.
 
     @return
     - 0: Success.
     - < 0: Failure:
        - ERR_INVALID_STATE: the screen sharing state is invalid, probably because another screen or window is being shared. Call \ref ar::rtc::IRtcEngine::stopScreenCapture "stopScreenCapture" to stop the current screen sharing.
        - ERR_INVALID_ARGUMENT: the argument is invalid.
     */
    virtual int startScreenCaptureByScreenRect(const Rectangle& screenRect, const Rectangle& regionRect, const ScreenCaptureParameters& captureParams) = 0;
#endif
 
    /** Shares the whole or part of a window by specifying the window ID.
 
     Since v3.0.0, this method supports sharing with common Windows platforms. AR tests the mainstream Windows applications, see details as follows:
 
     <table>
         <tr>
             <td><b>OS version</b></td>
             <td><b>Software</b></td>
             <td><b>Software name</b></td>
             <td><b>Whether support</b></td>
         </tr>
         <tr>
             <td rowspan="8">win10</td>
             <td >Chrome</td>
             <td>76.0.3809.100</td>
             <td>No</td>
         </tr>
         <tr>
             <td>Office Word</td>
             <td rowspan="3">18.1903.1152.0</td>
             <td>Yes</td>
         </tr>
             <tr>
             <td>Office Excel</td>
             <td>No</td>
         </tr>
         <tr>
             <td>Office PPT</td>
             <td>No</td>
         </tr>
      <tr>
             <td>WPS Word</td>
             <td rowspan="3">11.1.0.9145</td>
             <td rowspan="3">Yes</td>
         </tr>
             <tr>
             <td>WPS Excel</td>
         </tr>
         <tr>
             <td>WPS PPT</td>
         </tr>
             <tr>
             <td>Media Player (come with the system)</td>
             <td>All</td>
             <td>Yes</td>
         </tr>
          <tr>
             <td rowspan="8">win8</td>
             <td >Chrome</td>
             <td>All</td>
             <td>Yes</td>
         </tr>
         <tr>
             <td>Office Word</td>
             <td rowspan="3">All</td>
             <td rowspan="3">Yes</td>
         </tr>
             <tr>
             <td>Office Excel</td>
         </tr>
         <tr>
             <td>Office PPT</td>
         </tr>
      <tr>
             <td>WPS Word</td>
             <td rowspan="3">11.1.0.9098</td>
             <td rowspan="3">Yes</td>
         </tr>
             <tr>
             <td>WPS Excel</td>
         </tr>
         <tr>
             <td>WPS PPT</td>
         </tr>
             <tr>
             <td>Media Player(come with the system)</td>
             <td>All</td>
             <td>Yes</td>
         </tr>
       <tr>
             <td rowspan="8">win7</td>
             <td >Chrome</td>
             <td>73.0.3683.103</td>
             <td>No</td>
         </tr>
         <tr>
             <td>Office Word</td>
             <td rowspan="3">All</td>
             <td rowspan="3">Yes</td>
         </tr>
             <tr>
             <td>Office Excel</td>
         </tr>
         <tr>
             <td>Office PPT</td>
         </tr>
      <tr>
             <td>WPS Word</td>
             <td rowspan="3">11.1.0.9098</td>
             <td rowspan="3">No</td>
         </tr>
             <tr>
             <td>WPS Excel</td>
         </tr>
         <tr>
             <td>WPS PPT</td>
         </tr>
             <tr>
             <td>Media Player(come with the system)</td>
             <td>All</td>
             <td>No</td>
         </tr>
     </table>
 
     @param  windowId The ID of the window to be shared. For information on how to get the windowId, see the advanced guide *Share Screen*.
     @param  regionRect (Optional) The relative location of the region to the window. NULL/NIL means sharing the whole window. See Rectangle. If the specified region overruns the window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole window.
     @param  captureParams Window sharing encoding parameters. See ScreenCaptureParameters.
 
     @return
     - 0: Success.
     - < 0: Failure:
        - #ERR_INVALID_ARGUMENT: the argument is invalid.
     */
    virtual int startScreenCaptureByWindowId(view_t windowId, const Rectangle& regionRect, const ScreenCaptureParameters& captureParams) = 0;
 
    /** Sets the content hint for screen sharing.
 
    A content hint suggests the type of the content being shared, so that the SDK applies different optimization algorithm to different types of content.
 
     @param  contentHint Sets the content hint for screen sharing. See VideoContentHint.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setScreenCaptureContentHint(VideoContentHint contentHint) = 0;
 
    /** Updates the screen sharing parameters.
 
     @param  captureParams Sets the screen sharing encoding parameters. See ScreenCaptureParameters.
 
     @return
     - 0: Success.
     - < 0: Failure:
        - #ERR_NOT_READY: no screen or windows is being shared.
     */
    virtual int updateScreenCaptureParameters(const ScreenCaptureParameters& captureParams) = 0;
 
    /** Updates the screen sharing region.
 
     @param  regionRect Sets the relative location of the region to the screen or window. NULL means sharing the whole screen or window. See Rectangle. If the specified region overruns the screen or window, the SDK shares only the region within it; if you set width or height as 0, the SDK shares the whole screen or window.
 
     @return
     - 0: Success.
     - < 0: Failure:
        - #ERR_NOT_READY: no screen or window is being shared.
     */
    virtual int updateScreenCaptureRegion(const Rectangle& regionRect) = 0;
 
    /** Stop screen sharing.
 
     @return
     - 0: Success.
     - < 0: Failure.
    */
    virtual int stopScreenCapture() = 0;
 
#if defined(__APPLE__)
    typedef unsigned int WindowIDType;
#elif defined(_WIN32)
    typedef HWND WindowIDType;
#endif
 
    /** **DEPRECATED** Starts screen sharing.
 
     This method is deprecated as of v2.4.0. See the following methods instead:
 
     - \ref ar::rtc::IRtcEngine::startScreenCaptureByDisplayId "startScreenCaptureByDisplayId"
     - \ref ar::rtc::IRtcEngine::startScreenCaptureByScreenRect "startScreenCaptureByScreenRect"
     - \ref ar::rtc::IRtcEngine::startScreenCaptureByWindowId "startScreenCaptureByWindowId"
 
     This method shares the whole screen, specified window, or specified region:
 
     - Whole screen: Set @p windowId as 0 and @p rect as NULL.
     - Specified window: Set @p windowId as a value other than 0. Each window has a @p windowId that is not 0.
     - Specified region: Set @p windowId as 0 and @p rect not as NULL. In this case, you can share the specified region, for example by dragging the mouse or implementing your own logic.
 
     @note The specified region is a region on the whole screen. Currently, sharing a specified region in a specific window is not supported.
     *captureFreq* is the captured frame rate once the screen-sharing function is enabled. The mandatory value ranges between 1 fps and 15 fps.
 
     @param windowId Sets the screen sharing area. See WindowIDType.
     @param captureFreq (Mandatory) The captured frame rate. The value ranges between 1 fps and 15 fps.
     @param rect Specifies the screen-sharing region. @p rect is valid when @p windowsId is set as 0. When @p rect is set as NULL, the whole screen is shared.
     @param bitrate The captured bitrate.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startScreenCapture(WindowIDType windowId, int captureFreq, const Rect *rect, int bitrate) = 0;
 
    /** **DEPRECATED** Updates the screen capture region.
 
     @param rect Specifies the required region inside the screen or window.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int updateScreenCaptureRegion(const Rect *rect) = 0;
#endif
 
#if defined(_WIN32)||defined(__ANDROID__) || (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_MAC))
    /** Sets a custom video source.
     *
     * During real-time communication, the AR SDK enables the default video input device, that is, the built-in camera to
     * capture video. If you need a custom video source, implement the IVideoSource class first, and call this method to add
     * the custom video source to the SDK.
     *
     * @param source The custom video source. See IVideoSource.
     *
     * @return
     * - true: The custom video source is added to the SDK.
     * - false: The custom video source is not added to the SDK.
     */
    virtual bool setVideoSource(IVideoSource *source) = 0;
#endif
 
    /** Retrieves the current call ID.
 
     When a user joins a channel on a client, a @p callId is generated to identify the call from the client. Feedback methods, such as \ref IRtcEngine::rate "rate" and \ref IRtcEngine::complain "complain", must be called after the call ends to submit feedback to the SDK.
 
     The \ref IRtcEngine::rate "rate" and \ref IRtcEngine::complain "complain" methods require the @p callId parameter retrieved from the *getCallId* method during a call. @p callId is passed as an argument into the \ref IRtcEngine::rate "rate" and \ref IRtcEngine::complain "complain" methods after the call ends.
 
     @param callId Pointer to the current call ID.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getCallId(ar::util::AString& callId) = 0;
 
    /** Allows a user to rate a call after the call ends.
 
     @param callId Pointer to the ID of the call, retrieved from the \ref IRtcEngine::getCallId "getCallId" method.
     @param rating  Rating of the call. The value is between 1 (lowest score) and 5 (highest score). If you set a value out of this range, the #ERR_INVALID_ARGUMENT (2) error returns.
     @param description (Optional) Pointer to the description of the rating, with a string length of less than 800 bytes.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int rate(const char* callId, int rating, const char* description) = 0;
 
    /** Allows a user to complain about the call quality after a call ends.
 
    @param callId Pointer to the ID of the call, retrieved from the \ref IRtcEngine::getCallId "getCallId" method.
    @param description (Optional) Pointer to the description of the complaint, with a string length of less than 800 bytes.
 
    @return
    - 0: Success.
    - < 0: Failure.
 
    */
    virtual int complain(const char* callId, const char* description) = 0;
 
    /** Retrieves the SDK version number.
 
     @param build Pointer to the build number.
     @return The version of the current SDK in the string format. For example, 2.3.1.
     */
    virtual const char* getVersion(int* build) = 0;
 
    /**  Enables the network connection quality test.
 
     This method tests the quality of the users' network connections and is disabled by default.
 
     Before a user joins a channel or before an audience switches to a host, call this method to check the uplink network quality.
 
     This method consumes additional network traffic, and hence may affect communication quality.
 
     Call the \ref IRtcEngine::disableLastmileTest "disableLastmileTest" method to disable this test after receiving the \ref IRtcEngineEventHandler::onLastmileQuality "onLastmileQuality" callback, and before joining a channel.
 
     @note
     - Do not call any other methods before receiving the \ref IRtcEngineEventHandler::onLastmileQuality "onLastmileQuality" callback. Otherwise, the callback may be interrupted by other methods, and hence may not be triggered.
     - A host should not call this method after joining a channel (when in a call).
     - If you call this method to test the last-mile quality, the SDK consumes the bandwidth of a video stream, whose bitrate corresponds to the bitrate you set in the \ref ar::rtc::IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration" method. After you join the channel, whether you have called the `disableLastmileTest` method or not, the SDK automatically stops consuming the bandwidth.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int enableLastmileTest() = 0;
 
    /** Disables the network connection quality test.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int disableLastmileTest() = 0;
 
    /** Starts the last-mile network probe test.
 
    This method starts the last-mile network probe test before joining a channel to get the uplink and downlink last-mile network statistics, including the bandwidth, packet loss, jitter, and round-trip time (RTT).
 
    Call this method to check the uplink network quality before users join a channel or before an audience switches to a host.
    Once this method is enabled, the SDK returns the following callbacks:
    - \ref IRtcEngineEventHandler::onLastmileQuality "onLastmileQuality": the SDK triggers this callback within two seconds depending on the network conditions. This callback rates the network conditions and is more closely linked to the user experience.
    - \ref IRtcEngineEventHandler::onLastmileProbeResult "onLastmileProbeResult": the SDK triggers this callback within 30 seconds depending on the network conditions. This callback returns the real-time statistics of the network conditions and is more objective.
 
    @note
    - This method consumes extra network traffic and may affect communication quality. We do not recommend calling this method together with enableLastmileTest.
    - Do not call other methods before receiving the \ref IRtcEngineEventHandler::onLastmileQuality "onLastmileQuality" and \ref IRtcEngineEventHandler::onLastmileProbeResult "onLastmileProbeResult" callbacks. Otherwise, the callbacks may be interrupted.
    - In the Live-broadcast profile, a host should not call this method after joining a channel.
 
    @param config Sets the configurations of the last-mile network probe test. See LastmileProbeConfig.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int startLastmileProbeTest(const LastmileProbeConfig& config) = 0;
 
    /** Stops the last-mile network probe test. */
    virtual int stopLastmileProbeTest() = 0;
 
    /** Retrieves the warning or error description.
 
     @param code Warning code or error code returned in the \ref ar::rtc::IRtcEngineEventHandler::onWarning "onWarning" or \ref ar::rtc::IRtcEngineEventHandler::onError "onError" callback.
     
     @return #WARN_CODE_TYPE or #ERROR_CODE_TYPE.
     */
    virtual const char* getErrorDescription(int code) = 0;
 
    /** Enables built-in encryption with an encryption password before users join a channel.
 
     All users in a channel must use the same encryption password. The encryption password is automatically cleared once a user leaves the channel.
 
     If an encryption password is not specified, the encryption functionality will be disabled.
 
     @note
     - Do not use this method for CDN live streaming.
     - For optimal transmission, ensure that the encrypted data size does not exceed the original data size + 16 bytes. 16 bytes is the maximum padding size for AES encryption.
 
     @param secret Pointer to the encryption password.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setEncryptionSecret(const char* secret) = 0;
 
    /** Sets the built-in encryption mode.
 
     The AR SDK supports built-in encryption, which is set to the @p aes-128-xts mode by default. Call this method to use other encryption modes.
 
     All users in the same channel must use the same encryption mode and password.
 
     Refer to the information related to the AES encryption algorithm on the differences between the encryption modes.
 
     @note Call the \ref IRtcEngine::setEncryptionSecret "setEncryptionSecret" method to enable the built-in encryption function before calling this method.
 
     @param encryptionMode Pointer to the set encryption mode:
     - "aes-128-xts": (Default) 128-bit AES encryption, XTS mode.
     - "aes-128-ecb": 128-bit AES encryption, ECB mode.
     - "aes-256-xts": 256-bit AES encryption, XTS mode.
     - "": When encryptionMode is set as NULL, the encryption mode is set as "aes-128-xts" by default.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setEncryptionMode(const char* encryptionMode) = 0;
 
    /** Enables/Disables the built-in encryption.
     *
     * @since v3.1.0
     *
     * In scenarios requiring high security, AR recommends calling this method to enable the built-in encryption before joining a channel.
     *
     * All users in the same channel must use the same encryption mode and encryption key. Once all users leave the channel, the encryption key of this channel is automatically cleared.
     *
     * @note
     * - If you enable the built-in encryption, you cannot use the RTMP streaming function.
     * - AR supports four encryption modes. If you choose an encryption mode (excepting `SM4_128_ECB` mode), you need to add an external encryption library when integrating the SDK. See the advanced guide *Channel Encryption*.
     *
     * @param enabled Whether to enable the built-in encryption:
     * - true: Enable the built-in encryption.
     * - false: Disable the built-in encryption.
     * @param config Configurations of built-in encryption schemas. See EncryptionConfig.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     *  - -2(ERR_INVALID_ARGUMENT): An invalid parameter is used. Set the parameter with a valid value.
     *  - -4(ERR_NOT_SUPPORTED): The encryption mode is incorrect or the SDK fails to load the external encryption library. Check the enumeration or reload the external encryption library.
     *  - -7(ERR_NOT_INITIALIZED): The SDK is not initialized. Initialize the `IRtcEngine` instance before calling this method.
     */
    virtual int enableEncryption(bool enabled, const EncryptionConfig& config) = 0;
 
    /** Registers a packet observer.
 
     The AR SDK allows your application to register a packet observer to receive callbacks for voice or video packet transmission.
     
     @note
     - The size of the packet sent to the network after processing should not exceed 1200 bytes, otherwise, the packet may fail to be sent.
     - Ensure that both receivers and senders call this method, otherwise, you may meet undefined behaviors such as no voice and black screen.
     - When you use CDN live streaming, recording or storage functions, AR doesn't recommend calling this method.
 
     @param observer Pointer to the registered packet observer. See IPacketObserver.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int registerPacketObserver(IPacketObserver* observer) = 0;
 
    /** Creates a data stream.
 
     Each user can create up to five data streams during the lifecycle of the IRtcEngine.
 
     @note Set both the @p reliable and @p ordered parameters to true or false. Do not set one as true and the other as false.
 
     @param streamId Pointer to the ID of the created data stream.
     @param reliable Sets whether or not the recipients are guaranteed to receive the data stream from the sender within five seconds:
     - true: The recipients receive the data stream from the sender within five seconds. If the recipient does not receive the data stream within five seconds, an error is reported to the application.
     - false: There is no guarantee that the recipients receive the data stream within five seconds and no error message is reported for any delay or missing data stream.
     @param ordered Sets whether or not the recipients receive the data stream in the sent order:
     - true: The recipients receive the data stream in the sent order.
     - false: The recipients do not receive the data stream in the sent order.
 
     @return
     - Returns 0: Success.
     - < 0: Failure.
     */
    virtual int createDataStream(int* streamId, bool reliable, bool ordered) = 0;
 
    /** Sends data stream messages to all users in a channel.
 
     The SDK has the following restrictions on this method:
     - Up to 30 packets can be sent per second in a channel with each packet having a maximum size of 1 kB.
     - Each client can send up to 6 kB of data per second.
     - Each user can have up to five data streams simultaneously.
 
     A successful \ref ar::rtc::IRtcEngine::sendStreamMessage "sendStreamMessage" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onStreamMessage "onStreamMessage" callback on the remote client, from which the remote user gets the stream message.
 
     A failed \ref ar::rtc::IRtcEngine::sendStreamMessage "sendStreamMessage" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onStreamMessageError "onStreamMessage" callback on the remote client.
     @note This method applies only to the Communication profile or to the hosts in the Live-broadcast profile. If an audience in the Live-broadcast profile calls this method, the audience may be switched to a host.
 
     @param  streamId  ID of the sent data stream, returned in the \ref IRtcEngine::createDataStream "createDataStream" method.
     @param data Pointer to the sent data.
     @param length Length of the sent data.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int sendStreamMessage(int streamId, const char* data, size_t length) = 0;
 
    /** Publishes the local stream to a specified CDN live RTMP address.  (CDN live only.)
 
     The SDK returns the result of this method call in the \ref IRtcEngineEventHandler::onStreamPublished "onStreamPublished" callback.
 
     The \ref ar::rtc::IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onRtmpStreamingStateChanged "onRtmpStreamingStateChanged" callback on the local client to report the state of adding a local stream to the CDN.
     @note
     - Ensure that the user joins the channel before calling this method.
     - Ensure that you enable the RTMP Converter service before using this function. See [Prerequisites](https://docs.ar.io/en/Interactive%20Broadcast/cdn_streaming_windows?platform=Windows#prerequisites).
     - This method adds only one stream RTMP URL address each time it is called.
     - This method applies to Live Broadcast only.
 
     @param url The CDN streaming URL in the RTMP format. The maximum length of this parameter is 1024 bytes. The RTMP URL address must not contain special characters, such as Chinese language characters.
     @param  transcodingEnabled Sets whether transcoding is enabled/disabled:
     - true: Enable transcoding. To [transcode](https://docs.ar.io/en/AR%20Platform/terms?platform=All%20Platforms#transcoding) the audio or video streams when publishing them to CDN live, often used for combining the audio and video streams of multiple hosts in CDN live. If you set this parameter as `true`, ensure that you call the \ref IRtcEngine::setLiveTranscoding "setLiveTranscoding" method before this method.
     - false: Disable transcoding.
 
     @return
     - 0: Success.
     - < 0: Failure.
          - #ERR_INVALID_ARGUMENT (2): The RTMP URL address is NULL or has a string length of 0.
          - #ERR_NOT_INITIALIZED (7): You have not initialized the RTC engine when publishing the stream.
     */
    virtual int addPublishStreamUrl(const char *url, bool transcodingEnabled) = 0;
 
    /** Removes an RTMP stream from the CDN. (CDN live only.)
 
     This method removes the RTMP URL address (added by the \ref IRtcEngine::addPublishStreamUrl "addPublishStreamUrl" method) from a CDN live stream. The SDK returns the result of this method call in the \ref IRtcEngineEventHandler::onStreamUnpublished "onStreamUnpublished" callback.
 
     The \ref ar::rtc::IRtcEngine::removePublishStreamUrl "removePublishStreamUrl" method call triggers the \ref ar::rtc::IRtcEngineEventHandler::onRtmpStreamingStateChanged "onRtmpStreamingStateChanged" callback on the local client to report the state of removing an RTMP stream from the CDN.
     @note
     - This method removes only one RTMP URL address each time it is called.
     - The RTMP URL address must not contain special characters, such as Chinese language characters.
     - This method applies to Live Broadcast only.
 
     @param url The RTMP URL address to be removed. The maximum length of this parameter is 1024 bytes.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int removePublishStreamUrl(const char *url) = 0;
 
    /** Sets the video layout and audio settings for CDN live. (CDN live only.)
     
     The SDK triggers the \ref ar::rtc::IRtcEngineEventHandler::onTranscodingUpdated "onTranscodingUpdated" callback when you call the `setLiveTranscoding` method to update the transcoding setting.
     
     @note
     - This method applies to Live Broadcast only.
     - Ensure that you enable the RTMP Converter service before using this function. See [Prerequisites](https://docs.ar.io/en/Interactive%20Broadcast/cdn_streaming_windows?platform=Windows#prerequisites).
     - If you call the `setLiveTranscoding` method to update the transcoding setting for the first time, the SDK does not trigger the `onTranscodingUpdated` callback.
  
     @param transcoding Sets the CDN live audio/video transcoding settings. See LiveTranscoding.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setLiveTranscoding(const LiveTranscoding &transcoding) = 0;
 
    /** **DEPRECATED** Adds a watermark image to the local video or CDN live stream.
 
     This method is deprecated from v2.9.1. Use \ref ar::rtc::IRtcEngine::addVideoWatermark(const char* watermarkUrl, const WatermarkOptions& options) "addVideoWatermark"2 instead.
 
     This method adds a PNG watermark image to the local video stream for the recording device, channel audience, and CDN live audience to view and capture.
 
     To add the PNG file to the CDN live publishing stream, see the \ref IRtcEngine::setLiveTranscoding "setLiveTranscoding" method.
 
     @param watermark Pointer to the watermark image to be added to the local video stream. See RtcImage.
 
     @note
     - The URL descriptions are different for the local video and CDN live streams:
        - In a local video stream, @p url in RtcImage refers to the absolute path of the added watermark image file in the local video stream.
        - In a CDN live stream, @p url in RtcImage refers to the URL address of the added watermark image in the CDN live broadcast.
     - The source file of the watermark image must be in the PNG file format. If the width and height of the PNG file differ from your settings in this method, the PNG file will be cropped to conform to your settings.
     - The AR SDK supports adding only one watermark image onto a local video or CDN live stream. The newly added watermark image replaces the previous one.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int addVideoWatermark(const RtcImage& watermark) = 0;
 
    /** Adds a watermark image to the local video.
 
     This method adds a PNG watermark image to the local video in a live broadcast. Once the watermark image is added, all the audience in the channel (CDN audience included), 
     and the recording device can see and capture it. AR supports adding only one watermark image onto the local video, and the newly watermark image replaces the previous one.
 
     The watermark position depends on the settings in the \ref IRtcEngine::setVideoEncoderConfiguration "setVideoEncoderConfiguration" method:
     - If the orientation mode of the encoding video is #ORIENTATION_MODE_FIXED_LANDSCAPE, or the landscape mode in #ORIENTATION_MODE_ADAPTIVE, the watermark uses the landscape orientation.
     - If the orientation mode of the encoding video is #ORIENTATION_MODE_FIXED_PORTRAIT, or the portrait mode in #ORIENTATION_MODE_ADAPTIVE, the watermark uses the portrait orientation.
     - When setting the watermark position, the region must be less than the dimensions set in the `setVideoEncoderConfiguration` method. Otherwise, the watermark image will be cropped.
 
     @note
     - Ensure that you have called the \ref ar::rtc::IRtcEngine::enableVideo "enableVideo" method to enable the video module before calling this method.
     - If you only want to add a watermark image to the local video for the audience in the CDN live broadcast channel to see and capture, you can call this method or the \ref ar::rtc::IRtcEngine::setLiveTranscoding "setLiveTranscoding" method.
     - This method supports adding a watermark image in the PNG file format only. Supported pixel formats of the PNG image are RGBA, RGB, Palette, Gray, and Alpha_gray.
     - If the dimensions of the PNG image differ from your settings in this method, the image will be cropped or zoomed to conform to your settings.
     - If you have enabled the local video preview by calling the \ref ar::rtc::IRtcEngine::startPreview "startPreview" method, you can use the `visibleInPreview` member in the WatermarkOptions class to set whether or not the watermark is visible in preview.
     - If you have mirrored the local video by calling the \ref ar::rtc::IRtcEngine::setupLocalVideo "setupLocalVideo" or \ref ar::rtc::IRtcEngine::setLocalRenderMode(RENDER_MODE_TYPE renderMode, VIDEO_MIRROR_MODE_TYPE mirrorMode) "setLocalRenderMode" method, the watermark image in preview is also mirrored.
     
     @param watermarkUrl The local file path of the watermark image to be added. This method supports adding a watermark image from the local absolute or relative file path.
     @param options Pointer to the watermark's options to be added. See WatermarkOptions for more infomation.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int addVideoWatermark(const char* watermarkUrl, const WatermarkOptions& options) = 0;
 
    /** Removes the watermark image from the video stream added by the \ref ar::rtc::IRtcEngine::addVideoWatermark(const char* watermarkUrl, const WatermarkOptions& options) "addVideoWatermark" method.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int clearVideoWatermarks() = 0;
 
    /** Enables/Disables image enhancement and sets the options.
 
    @note 
    - Call this method after calling the enableVideo method.
    - Currently this method does not apply for macOS.
 
    @param enabled Sets whether or not to enable image enhancement:
    - true: enables image enhancement.
    - false: disables image enhancement.
    @param options Sets the image enhancement option. See BeautyOptions.
    */
    virtual int setBeautyEffectOptions(bool enabled, BeautyOptions options) = 0;
 
    /** Adds a voice or video stream URL address to a live broadcast.
 
    The \ref IRtcEngineEventHandler::onStreamPublished "onStreamPublished" callback returns the inject status. If this method call is successful, the server pulls the voice or video stream and injects it into a live channel. This is applicable to scenarios where all audience members in the channel can watch a live show and interact with each other.
 
     The \ref ar::rtc::IRtcEngine::addInjectStreamUrl "addInjectStreamUrl" method call triggers the following callbacks:
    - The local client:
      - \ref ar::rtc::IRtcEngineEventHandler::onStreamInjectedStatus "onStreamInjectedStatus" , with the state of the injecting the online stream.
      - \ref ar::rtc::IRtcEngineEventHandler::onUserJoined "onUserJoined" (uid: 666), if the method call is successful and the online media stream is injected into the channel.
    - The remote client:
      - \ref ar::rtc::IRtcEngineEventHandler::onUserJoined "onUserJoined" (uid: 666), if the method call is successful and the online media stream is injected into the channel.
 
     @note
     - Ensure that you enable the RTMP Converter service before using this function. See [Prerequisites](https://docs.ar.io/en/Interactive%20Broadcast/cdn_streaming_windows?platform=Windows#prerequisites).
     - This method applies to the Native SDK v2.4.1 and later.
 
     @param url Pointer to the URL address to be added to the ongoing live broadcast. Valid protocols are RTMP, HLS, and FLV.
     - Supported FLV audio codec type: AAC.
     - Supported FLV video codec type: H264 (AVC).
     @param config Pointer to the InjectStreamConfig object that contains the configuration of the added voice or video stream.
 
     @return
     - 0: Success.
     - < 0: Failure.
        - #ERR_INVALID_ARGUMENT (2): The injected URL does not exist. Call this method again to inject the stream and ensure that the URL is valid.
        - #ERR_NOT_READY (3): The user is not in the channel.
        - #ERR_NOT_SUPPORTED (4): The channel profile is not live broadcast. Call the \ref ar::rtc::IRtcEngine::setChannelProfile "setChannelProfile" method and set the channel profile to live broadcast before calling this method.
        - #ERR_NOT_INITIALIZED (7): The SDK is not initialized. Ensure that the IRtcEngine object is initialized before calling this method.
     */
    virtual int addInjectStreamUrl(const char* url, const InjectStreamConfig& config) = 0;
    /** Starts to relay media streams across channels.
     *
     * After a successful method call, the SDK triggers the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged
     *  "onChannelMediaRelayStateChanged" and
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent
     * "onChannelMediaRelayEvent" callbacks, and these callbacks return the
     * state and events of the media stream relay.
     * - If the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged
     *  "onChannelMediaRelayStateChanged" callback returns
     * #RELAY_STATE_RUNNING (2) and #RELAY_OK (0), and the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent
     * "onChannelMediaRelayEvent" callback returns
     * #RELAY_EVENT_PACKET_SENT_TO_DEST_CHANNEL (4), the broadcaster starts
     * sending data to the destination channel.
     * - If the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged
     *  "onChannelMediaRelayStateChanged" callback returns
     * #RELAY_STATE_FAILURE (3), an exception occurs during the media stream
     * relay.
     *
     * @note
     * - Call this method after the \ref joinChannel() "joinChannel" method.
     * - This method takes effect only when you are a broadcaster in a
     * Live-broadcast channel.
     * - After a successful method call, if you want to call this method
     * again, ensure that you call the
     * \ref stopChannelMediaRelay() "stopChannelMediaRelay" method to quit the
     * current relay.
     * - Contact sales-us@ar.io before implementing this function.
     * - We do not support string user accounts in this API.
     *
     * @param configuration The configuration of the media stream relay:
     * ChannelMediaRelayConfiguration.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int startChannelMediaRelay(const ChannelMediaRelayConfiguration &configuration) = 0;
    /** Updates the channels for media stream relay. After a successful
     * \ref startChannelMediaRelay() "startChannelMediaRelay" method call, if
     * you want to relay the media stream to more channels, or leave the
     * current relay channel, you can call the
     * \ref updateChannelMediaRelay() "updateChannelMediaRelay" method.
     *
     * After a successful method call, the SDK triggers the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayEvent
     *  "onChannelMediaRelayEvent" callback with the
     * #RELAY_EVENT_PACKET_UPDATE_DEST_CHANNEL (7) state code.
     *
     * @note
     * Call this method after the
     * \ref startChannelMediaRelay() "startChannelMediaRelay" method to update
     * the destination channel.
     *
     * @param configuration The media stream relay configuration:
     * ChannelMediaRelayConfiguration.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int updateChannelMediaRelay(const ChannelMediaRelayConfiguration &configuration) = 0;
    /** Stops the media stream relay.
     *
     * Once the relay stops, the broadcaster quits all the destination
     * channels.
     *
     * After a successful method call, the SDK triggers the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged
     *  "onChannelMediaRelayStateChanged" callback. If the callback returns
     * #RELAY_STATE_IDLE (0) and #RELAY_OK (0), the broadcaster successfully
     * stops the relay.
     *
     * @note
     * If the method call fails, the SDK triggers the
     * \ref ar::rtc::IRtcEngineEventHandler::onChannelMediaRelayStateChanged
     *  "onChannelMediaRelayStateChanged" callback with the
     * #RELAY_ERROR_SERVER_NO_RESPONSE (2) or
     * #RELAY_ERROR_SERVER_CONNECTION_LOST (8) state code. You can leave the
     * channel by calling the \ref leaveChannel() "leaveChannel" method, and
     * the media stream relay automatically stops.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int stopChannelMediaRelay() = 0;
 
    /** Removes the voice or video stream URL address from a live broadcast.
 
     This method removes the URL address (added by the \ref IRtcEngine::addInjectStreamUrl "addInjectStreamUrl" method) from the live broadcast.
 
     @note If this method is called successfully, the SDK triggers the \ref IRtcEngineEventHandler::onUserOffline "onUserOffline" callback and returns a stream uid of 666.
 
     @param url Pointer to the URL address of the added stream to be removed.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int removeInjectStreamUrl(const char* url) = 0;
    virtual bool registerEventHandler(IRtcEngineEventHandler *eventHandler) = 0;
    virtual bool unregisterEventHandler(IRtcEngineEventHandler *eventHandler) = 0;
    /** AR supports reporting and analyzing customized messages.
     *
     * @since v3.1.0
     *
     * This function is in the beta stage with a free trial. The ability provided in its beta test version is reporting a maximum of 10 message pieces within 6 seconds, with each message piece not exceeding 256 bytes.
     * To try out this function, contact [support@ar.io](mailto:support@ar.io) and discuss the format of customized messages with us.
     */
    virtual int sendCustomReportMessage(const char *id, const char* category, const char* event, const char* label, int value) = 0;
    /** Gets the current connection state of the SDK.
 
     @return #CONNECTION_STATE_TYPE.
     */
    virtual CONNECTION_STATE_TYPE getConnectionState() = 0;
    /// @cond
    /** Enables/Disables the super-resolution algorithm for a remote user's video stream.
     *
     * @since v3.2.0
     *
     * The algorithm effectively improves the resolution of the specified remote user's video stream. When the original
     * resolution of the remote video stream is axb pixels, you can receive and render the stream at a higher
     * resolution (2ax2b pixels) by enabling the algorithm.
     *
     * After calling this method, the SDK triggers the
     * \ref IRtcEngineEventHandler::onUserSuperResolutionEnabled "onUserSuperResolutionEnabled" callback to report
     * whether you have successfully enabled the super-resolution algorithm.
     *
     * @warning The super-resolution algorithm requires extra system resources.
     * To balance the visual experience and system usage, the SDK poses the following restrictions:
     * - The algorithm can only be used for a single user at a time.
     * - On the Android platform, the original resolution of the remote video must not exceed 640x360 pixels.
     * - On the iOS platform, the original resolution of the remote video must not exceed 640x480 pixels.
     * If you exceed these limitations, the SDK triggers the \ref IRtcEngineEventHandler::onWarning "onWarning"
     * callback with the corresponding warning codes:
     * - #WARN_SUPER_RESOLUTION_STREAM_OVER_LIMITATION (1610): The origin resolution of the remote video is beyond the range where the super-resolution algorithm can be applied.
     * - #WARN_SUPER_RESOLUTION_USER_COUNT_OVER_LIMITATION (1611): Another user is already using the super-resolution algorithm.
     * - #WARN_SUPER_RESOLUTION_DEVICE_NOT_SUPPORTED (1612): The device does not support the super-resolution algorithm.
     *
     * @note
     * - This method applies to Android and iOS only.
     * - Requirements for the user's device:
     *  - Android: The following devices are known to support the method:
     *    - VIVO: V1821A, NEX S, 1914A, 1916A, and 1824BA
     *    - OPPO: PCCM00
     *    - OnePlus: A6000
     *    - Xiaomi: Mi 8, Mi 9, MIX3, and Redmi K20 Pro
     *    - SAMSUNG: SM-G9600, SM-G9650, SM-N9600, SM-G9708, SM-G960U, and SM-G9750
     *    - HUAWEI: SEA-AL00, ELE-AL00, VOG-AL00, YAL-AL10, HMA-AL00, and EVR-AN00
     *  - iOS: This method is supported on devices running iOS 12.0 or later. The following
     * device models are known to support the method:
     *      - iPhone XR
     *      - iPhone XS
     *      - iPhone XS Max
     *      - iPhone 11
     *      - iPhone 11 Pro
     *      - iPhone 11 Pro Max
     *      - iPad Pro 11-inch (3rd Generation)
     *      - iPad Pro 12.9-inch (3rd Generation)
     *      - iPad Air 3 (3rd Generation)
     *
     * @param userId The ID of the remote user.
     * @param enable Whether to enable the super-resolution algorithm:
     * - true: Enable the super-resolution algorithm.
     * - false: Disable the super-resolution algorithm.
     *
     * @return
     * - 0: Success.
     * - < 0: Failure.
     */
    virtual int enableRemoteSuperResolution(uid_t userId, bool enable) = 0;
    /// @endcond
 
    /** Registers the metadata observer.
 
     Registers the metadata observer. You need to implement the IMetadataObserver class and specify the metadata type in this method. A successful call of this method triggers the \ref ar::rtc::IMetadataObserver::getMaxMetadataSize "getMaxMetadataSize" callback.
     This method enables you to add synchronized metadata in the video stream for more diversified live broadcast interactions, such as sending shopping links, digital coupons, and online quizzes.
 
     @note
     - Call this method before the joinChannel method.
     - This method applies to the Live-broadcast channel profile.
 
     @param observer The IMetadataObserver class. See the definition of IMetadataObserver for details.
     @param type See \ref IMetadataObserver::METADATA_TYPE "METADATA_TYPE". The SDK supports VIDEO_METADATA (0) only for now.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int registerMediaMetadataObserver(IMetadataObserver *observer, IMetadataObserver::METADATA_TYPE type) = 0;
    /** Provides technical preview functionalities or special customizations by configuring the SDK with JSON options.
 
     The JSON options are not public by default. AR is working on making commonly used JSON options public in a standard way.
 
     @param parameters Sets the parameter as a JSON string in the specified format.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setParameters(const char* parameters) = 0;
};
 
 
class IRtcEngineParameter
{
public:
    virtual ~IRtcEngineParameter () {}
    /**
    * Releases all IRtcEngineParameter resources.
    */
    virtual void release() = 0;
 
    /** Sets the bool value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Sets the value.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setBool(const char* key, bool value) = 0;
 
    /** Sets the int value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Sets the value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setInt(const char* key, int value) = 0;
 
    /** Sets the unsigned int value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Sets the value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setUInt(const char* key, unsigned int value) = 0;
 
    /** Sets the double value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Sets the value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setNumber(const char* key, double value) = 0;
 
    /** Sets the string value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the set value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setString(const char* key, const char* value) = 0;
 
    /** Sets the object value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the set value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setObject(const char* key, const char* value) = 0;
 
    /** Retrieves the bool value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getBool(const char* key, bool& value) = 0;
 
    /** Retrieves the int value of the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getInt(const char* key, int& value) = 0;
 
    /** Retrieves the unsigned int value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getUInt(const char* key, unsigned int& value) = 0;
 
    /** Retrieves the double value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getNumber(const char* key, double& value) = 0;
 
    /** Retrieves the string value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
 
     @return
     - 0: Success.
     - < 0: Failure.
    */
    virtual int getString(const char* key, ar::util::AString& value) = 0;
 
    /** Retrieves a child object value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getObject(const char* key, ar::util::AString& value) = 0;
 
    /** Retrieves the array value of a specified key in the JSON format.
 
     @param key Pointer to the name of the key.
     @param value Pointer to the retrieved value.
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int getArray(const char* key, ar::util::AString& value) = 0;
 
    /** Provides the technical preview functionalities or special customizations by configuring the SDK with JSON options.
 
     @param parameters Pointer to the set parameters in a JSON string.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setParameters(const char* parameters) = 0;
 
    /** Sets the profile to control the RTC engine.
 
     @param profile Pointer to the set profile.
     @param merge Sets whether to merge the profile data with the original value:
     - true: Merge the profile data with the original value.
     - false: Do not merge the profile data with the original value.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    virtual int setProfile(const char* profile, bool merge) = 0;
 
    virtual int convertPath(const char* filePath, ar::util::AString& value) = 0;
};
 
class AAudioDeviceManager : public ar::util::AutoPtr<IAudioDeviceManager>
{
public:
    AAudioDeviceManager(IRtcEngine* engine)
    {
        queryInterface(engine, AR_IID_AUDIO_DEVICE_MANAGER);
    }
};
 
class AVideoDeviceManager : public ar::util::AutoPtr<IVideoDeviceManager>
{
public:
    AVideoDeviceManager(IRtcEngine* engine)
    {
        queryInterface(engine, AR_IID_VIDEO_DEVICE_MANAGER);
    }
};
 
class AParameter : public ar::util::AutoPtr<IRtcEngineParameter>
{
public:
    AParameter(IRtcEngine& engine) { initialize(&engine); }
    AParameter(IRtcEngine* engine) { initialize(engine); }
    AParameter(IRtcEngineParameter* p) :ar::util::AutoPtr<IRtcEngineParameter>(p) {}
private:
    bool initialize(IRtcEngine* engine)
    {
        IRtcEngineParameter* p = NULL;
        if (engine && !engine->queryInterface(AR_IID_RTC_ENGINE_PARAMETER, (void**)&p))
            reset(p);
        return p != NULL;
    }
};
/** **DEPRECATED** The RtcEngineParameters class is deprecated, use the IRtcEngine class instead.
*/
class RtcEngineParameters
{
public:
    RtcEngineParameters(IRtcEngine& engine)
        :m_parameter(&engine){}
    RtcEngineParameters(IRtcEngine* engine)
        :m_parameter(engine){}
 
    
    int enableLocalVideo(bool enabled) {
        return setParameters("{\"rtc.video.capture\":%s,\"che.video.local.capture\":%s,\"che.video.local.render\":%s,\"che.video.local.send\":%s}", enabled ? "true" : "false", enabled ? "true" : "false", enabled ? "true" : "false", enabled ? "true" : "false");
    }
 
 
   
    int muteLocalVideoStream(bool mute) {
        return setParameters("{\"rtc.video.mute_me\":%s,\"che.video.local.send\":%s}", mute ? "true" : "false", mute ? "false" : "true");
    }
 
    
    int muteAllRemoteVideoStreams(bool mute) {
        return m_parameter ? m_parameter->setBool("rtc.video.mute_peers", mute) : -ERR_NOT_INITIALIZED;
    }
 
 
    
    int setDefaultMuteAllRemoteVideoStreams(bool mute) {
        return m_parameter ? m_parameter->setBool("rtc.video.set_default_mute_peers", mute) : -ERR_NOT_INITIALIZED;
    }
 
    
    int muteRemoteVideoStream(uid_t uid, bool mute) {
        return setObject("rtc.video.mute_peer", "{\"uid\":%u,\"mute\":%s}", uid, mute ? "true" : "false");
    }
 
   
    int setPlaybackDeviceVolume(int volume) {// [0,255]
        return m_parameter ? m_parameter->setInt("che.audio.output.volume", volume) : -ERR_NOT_INITIALIZED;
    }
 
    
    int startAudioRecording(const char* filePath, AUDIO_RECORDING_QUALITY_TYPE quality) {
        return startAudioRecording(filePath, 32000, quality);
    }
 
    int startAudioRecording(const char* filePath, int sampleRate, AUDIO_RECORDING_QUALITY_TYPE quality) {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
#if defined(_WIN32)
        util::AString path;
        if (!m_parameter->convertPath(filePath, path))
            filePath = path->c_str();
        else
            return -ERR_INVALID_ARGUMENT;
#endif
        return setObject("che.audio.start_recording", "{\"filePath\":\"%s\",\"sampleRate\":%d,\"quality\":%d}", filePath, sampleRate, quality);
    }
 
    
    int stopAudioRecording() {
        return m_parameter ? m_parameter->setBool("che.audio.stop_recording", true) : -ERR_NOT_INITIALIZED;
    }
 
    
    int startAudioMixing(const char* filePath, bool loopback, bool replace, int cycle) {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
#if defined(_WIN32)
        util::AString path;
        if (!m_parameter->convertPath(filePath, path))
            filePath = path->c_str();
        else
            return -ERR_INVALID_ARGUMENT;
#endif
        return setObject("che.audio.start_file_as_playout", "{\"filePath\":\"%s\",\"loopback\":%s,\"replace\":%s,\"cycle\":%d}",
                         filePath,
                         loopback?"true":"false",
                         replace?"true":"false",
                         cycle);
    }
 
   
    int stopAudioMixing() {
        return m_parameter ? m_parameter->setBool("che.audio.stop_file_as_playout", true) : -ERR_NOT_INITIALIZED;
    }
 
    
    int pauseAudioMixing() {
        return m_parameter ? m_parameter->setBool("che.audio.pause_file_as_playout", true) : -ERR_NOT_INITIALIZED;
    }
 
    
    int resumeAudioMixing() {
        return m_parameter ? m_parameter->setBool("che.audio.pause_file_as_playout", false) : -ERR_NOT_INITIALIZED;
    }
 
    
    int adjustAudioMixingVolume(int volume) {
        int ret = adjustAudioMixingPlayoutVolume(volume);
        if (ret == 0) {
            adjustAudioMixingPublishVolume(volume);
        }
        return ret;
    }
 
    
    int adjustAudioMixingPlayoutVolume(int volume) {
        return m_parameter ? m_parameter->setInt("che.audio.set_file_as_playout_volume", volume) : -ERR_NOT_INITIALIZED;
    }
 
    
    int getAudioMixingPlayoutVolume() {
        int volume = 0;
        int r = m_parameter ? m_parameter->getInt("che.audio.get_file_as_playout_volume", volume) : -ERR_NOT_INITIALIZED;
        if (r == 0)
            r = volume;
        return r;
    }
 
    
    int adjustAudioMixingPublishVolume(int volume) {
        return m_parameter ? m_parameter->setInt("che.audio.set_file_as_playout_publish_volume", volume) : -ERR_NOT_INITIALIZED;
    }
 
   
    int getAudioMixingPublishVolume() {
        int volume = 0;
        int r = m_parameter ? m_parameter->getInt("che.audio.get_file_as_playout_publish_volume", volume) : -ERR_NOT_INITIALIZED;
        if (r == 0)
            r = volume;
        return r;
    }
 
    
    int getAudioMixingDuration() {
        int duration = 0;
        int r = m_parameter ? m_parameter->getInt("che.audio.get_mixing_file_length_ms", duration) : -ERR_NOT_INITIALIZED;
        if (r == 0)
            r = duration;
        return r;
    }
 
    
    int getAudioMixingCurrentPosition() {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
        int pos = 0;
        int r = m_parameter->getInt("che.audio.get_mixing_file_played_ms", pos);
        if (r == 0)
            r = pos;
        return r;
    }
    
    int setAudioMixingPosition(int pos /*in ms*/) {
        return m_parameter ? m_parameter->setInt("che.audio.mixing.file.position", pos) : -ERR_NOT_INITIALIZED;
    }
 
    int setAudioMixingPitch(int pitch) {
        if (!m_parameter) {
            return -ERR_NOT_INITIALIZED;
        }
        if (pitch > 12 || pitch < -12) {
            return -ERR_INVALID_ARGUMENT;
        }
        return m_parameter->setInt("che.audio.set_playout_file_pitch_semitones", pitch);
    }
 
    int getEffectsVolume() {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
        int volume = 0;
        int r = m_parameter->getInt("che.audio.game_get_effects_volume", volume);
        if (r == 0)
            r = volume;
        return r;
    }
 
    
    int setEffectsVolume(int volume) {
        return m_parameter ? m_parameter->setInt("che.audio.game_set_effects_volume", volume) : -ERR_NOT_INITIALIZED;
    }
 
   
    int setVolumeOfEffect(int soundId, int volume) {
        return setObject(
                         "che.audio.game_adjust_effect_volume",
                         "{\"soundId\":%d,\"gain\":%d}",
                         soundId, volume);
    }
 
    
    int playEffect(int soundId, const char* filePath, int loopCount, double pitch, double pan, int gain, bool publish = false) {
#if defined(_WIN32)
        util::AString path;
        if (!m_parameter->convertPath(filePath, path))
            filePath = path->c_str();
        else if (!filePath)
            filePath = "";
#endif
        return setObject(
                         "che.audio.game_play_effect",
                         "{\"soundId\":%d,\"filePath\":\"%s\",\"loopCount\":%d, \"pitch\":%lf,\"pan\":%lf,\"gain\":%d, \"send2far\":%d}",
                         soundId, filePath, loopCount, pitch, pan, gain, publish);
    }
 
    
    int stopEffect(int soundId) {
        return m_parameter ? m_parameter->setInt(
                                                 "che.audio.game_stop_effect", soundId) : -ERR_NOT_INITIALIZED;
    }
 
   
    int stopAllEffects() {
        return m_parameter ? m_parameter->setBool(
                                                  "che.audio.game_stop_all_effects", true) : -ERR_NOT_INITIALIZED;
    }
 
    
    int preloadEffect(int soundId, char* filePath) {
        return setObject(
                         "che.audio.game_preload_effect",
                         "{\"soundId\":%d,\"filePath\":\"%s\"}",
                         soundId, filePath);
    }
 
    
    int unloadEffect(int soundId) {
        return m_parameter ? m_parameter->setInt(
                                                 "che.audio.game_unload_effect", soundId) : -ERR_NOT_INITIALIZED;
    }
 
    
    int pauseEffect(int soundId) {
        return m_parameter ? m_parameter->setInt(
                                                 "che.audio.game_pause_effect", soundId) : -ERR_NOT_INITIALIZED;
    }
 
    
    int pauseAllEffects() {
        return m_parameter ? m_parameter->setBool(
                                                  "che.audio.game_pause_all_effects", true) : -ERR_NOT_INITIALIZED;
    }
 
    
    int resumeEffect(int soundId) {
        return m_parameter ? m_parameter->setInt(
                                                 "che.audio.game_resume_effect", soundId) : -ERR_NOT_INITIALIZED;
    }
 
    
    int resumeAllEffects() {
        return m_parameter ? m_parameter->setBool(
                                                  "che.audio.game_resume_all_effects", true) : -ERR_NOT_INITIALIZED;
    }
 
 
    int enableSoundPositionIndication(bool enabled) {
        return m_parameter ? m_parameter->setBool(
                                                  "che.audio.enable_sound_position", enabled) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setRemoteVoicePosition(uid_t uid, double pan, double gain) {
        return setObject("che.audio.game_place_sound_position", "{\"uid\":%u,\"pan\":%lf,\"gain\":%lf}", uid, pan, gain);
    }
 
    
    int setLocalVoicePitch(double pitch) {
        return m_parameter ? m_parameter->setInt(
                                                 "che.audio.morph.pitch_shift",
                                                 static_cast<int>(pitch * 100)) : -ERR_NOT_INITIALIZED;
    }
    
    int setLocalVoiceEqualization(AUDIO_EQUALIZATION_BAND_FREQUENCY bandFrequency, int bandGain) {
        return setObject(
                         "che.audio.morph.equalization",
                         "{\"index\":%d,\"gain\":%d}",
                         static_cast<int>(bandFrequency), bandGain);
    }
    
    int setLocalVoiceReverb(AUDIO_REVERB_TYPE reverbKey, int value) {
        return setObject(
                         "che.audio.morph.reverb",
                         "{\"key\":%d,\"value\":%d}",
                         static_cast<int>(reverbKey), value);
    }
 
    
    int setLocalVoiceChanger(VOICE_CHANGER_PRESET voiceChanger) {
        if(!m_parameter)
            return -ERR_NOT_INITIALIZED;
        if(voiceChanger == 0x00000000) {
            return m_parameter->setInt("che.audio.morph.voice_changer", static_cast<int>(voiceChanger));
        }
        else if(voiceChanger > 0x00000000 && voiceChanger < 0x00100000) {
            return m_parameter->setInt("che.audio.morph.voice_changer", static_cast<int>(voiceChanger));
        }
        else if(voiceChanger > 0x00100000 && voiceChanger < 0x00200000) {
            return m_parameter->setInt("che.audio.morph.voice_changer", static_cast<int>(voiceChanger - 0x00100000 + 6));
        }
        else if(voiceChanger > 0x00200000 && voiceChanger < 0x00300000) {
            return m_parameter->setInt("che.audio.morph.beauty_voice", static_cast<int>(voiceChanger - 0x00200000));
        }
        else {
            return -ERR_INVALID_ARGUMENT;
        }
    }
 
    
    int setLocalVoiceReverbPreset(AUDIO_REVERB_PRESET reverbPreset) {
        if(!m_parameter)
            return -ERR_NOT_INITIALIZED;
        if(reverbPreset == 0x00000000) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", static_cast<int>(reverbPreset));
        }
        else if(reverbPreset > 0x00000000 && reverbPreset < 0x00100000) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", static_cast<int>(reverbPreset + 8));
        }
        else if(reverbPreset > 0x00100000 && reverbPreset < 0x00200000) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", static_cast<int>(reverbPreset - 0x00100000));
        }
        else if(reverbPreset > 0x00200000 && reverbPreset < 0x00200002) {
            return m_parameter->setInt("che.audio.morph.virtual_stereo", static_cast<int>(reverbPreset - 0x00200000));
        }
        else if (reverbPreset > (AUDIO_REVERB_PRESET) 0x00300000 && reverbPreset < (AUDIO_REVERB_PRESET) 0x00300002)
            return setObject( "che.audio.morph.electronic_voice", "{\"key\":%d,\"value\":%d}", 1, 4);
        else if (reverbPreset > (AUDIO_REVERB_PRESET) 0x00400000 && reverbPreset < (AUDIO_REVERB_PRESET) 0x00400002)
            return m_parameter->setInt("che.audio.morph.threedim_voice", 10);
        else {
            return -ERR_INVALID_ARGUMENT;
        }
    }
 
    int setAudioEffectPreset(AUDIO_EFFECT_PRESET preset){
        if(!m_parameter)
            return -ERR_NOT_INITIALIZED;
        if(preset == AUDIO_EFFECT_OFF) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 0);
        }
        if(preset == ROOM_ACOUSTICS_KTV){
            return m_parameter->setInt("che.audio.morph.reverb_preset", 1);
        }
        if(preset == ROOM_ACOUSTICS_VOCAL_CONCERT) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 2);
        }
        if(preset == ROOM_ACOUSTICS_STUDIO) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 5);
        }
        if(preset == ROOM_ACOUSTICS_PHONOGRAPH) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 8);
        }
        if(preset == ROOM_ACOUSTICS_VIRTUAL_STEREO) {
            return m_parameter->setInt("che.audio.morph.virtual_stereo", 1);
        }
        if(preset == ROOM_ACOUSTICS_SPACIAL) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 15);
        }
        if(preset == ROOM_ACOUSTICS_ETHEREAL) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 5);
        }
        if(preset == ROOM_ACOUSTICS_3D_VOICE) {
            return m_parameter->setInt("che.audio.morph.threedim_voice", 10);
        }
        if(preset == VOICE_CHANGER_EFFECT_UNCLE) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 3);
        }
        if(preset == VOICE_CHANGER_EFFECT_OLDMAN) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 1);
        }
        if(preset == VOICE_CHANGER_EFFECT_BOY) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 2);
        }
        if(preset == VOICE_CHANGER_EFFECT_SISTER) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 4);
        }
        if(preset == VOICE_CHANGER_EFFECT_GIRL) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 3);
        }
        if(preset == VOICE_CHANGER_EFFECT_PIGKING) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 4);
        }
        if(preset == VOICE_CHANGER_EFFECT_HULK) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 6);
        }
        if(preset == STYLE_TRANSFORMATION_RNB) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 7);
        }
        if(preset == STYLE_TRANSFORMATION_POPULAR) {
            return m_parameter->setInt("che.audio.morph.reverb_preset", 6);
        }
        if(preset == PITCH_CORRECTION) {
            return setObject( "che.audio.morph.electronic_voice", "{\"key\":%d,\"value\":%d}", 1, 4);
        }
        return -ERR_INVALID_ARGUMENT;
    }
 
    int setVoiceBeautifierPreset(VOICE_BEAUTIFIER_PRESET preset) {
        if(!m_parameter)
            return -ERR_NOT_INITIALIZED;
        if(preset == VOICE_BEAUTIFIER_OFF) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 0);
        }
        if(preset == CHAT_BEAUTIFIER_MAGNETIC) {
            return m_parameter->setInt("che.audio.morph.beauty_voice", 1);
        }
        if(preset == CHAT_BEAUTIFIER_FRESH) {
            return m_parameter->setInt("che.audio.morph.beauty_voice", 2);
        }
        if(preset == CHAT_BEAUTIFIER_VITALITY) {
            return m_parameter->setInt("che.audio.morph.beauty_voice", 3);
        }
        /*if(preset == SINGING_BEAUTIFICATION_MAN) {
            return m_parameter->setInt("che.audio.morph.beauty_sing", 1);
        }
        if(preset == SINGING_BEAUTIFICATION_WOMAN) {
            return m_parameter->setInt("che.audio.morph.beauty_sing", 2);
        }*/
        if(preset == TIMBRE_TRANSFORMATION_VIGOROUS) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 7);
        }
        if(preset == TIMBRE_TRANSFORMATION_DEEP) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 8);
        }
        if(preset == TIMBRE_TRANSFORMATION_MELLOW) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 9);
        }
        if(preset == TIMBRE_TRANSFORMATION_FALSETTO) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 10);
        }
        if(preset == TIMBRE_TRANSFORMATION_FULL) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 11);
        }
        if(preset == TIMBRE_TRANSFORMATION_CLEAR) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 12);
        }
        if(preset == TIMBRE_TRANSFORMATION_RESOUNDING) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 13);
        }
        if(preset == TIMBRE_TRANSFORMATION_RINGING) {
            return m_parameter->setInt("che.audio.morph.voice_changer", 14);
        }
        return -ERR_INVALID_ARGUMENT;
    }
 
    int setAudioEffectParameters(AUDIO_EFFECT_PRESET preset, int param1, int param2){
        if(!m_parameter)
            return -ERR_NOT_INITIALIZED;
        if(preset == PITCH_CORRECTION){
            return setObject( "che.audio.morph.electronic_voice", "{\"key\":%d,\"value\":%d}", param1, param2);
        }
        if(preset == ROOM_ACOUSTICS_3D_VOICE){
            return m_parameter->setInt("che.audio.morph.threedim_voice", param1);
        }
        return -ERR_INVALID_ARGUMENT;
    }
 
    /** **DEPRECATED** Use \ref IRtcEngine::disableAudio "disableAudio" instead. Disables the audio function in the channel.
 
     @return
     - 0: Success.
     - < 0: Failure.
     */
    int pauseAudio() {
        return m_parameter ? m_parameter->setBool("che.pause.audio", true) : -ERR_NOT_INITIALIZED;
    }
 
    
    int resumeAudio() {
        return m_parameter ? m_parameter->setBool("che.pause.audio", false) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setHighQualityAudioParameters(bool fullband, bool stereo, bool fullBitrate) {
        return setObject("che.audio.codec.hq", "{\"fullband\":%s,\"stereo\":%s,\"fullBitrate\":%s}", fullband ? "true" : "false", stereo ? "true" : "false", fullBitrate ? "true" : "false");
    }
 
    
    int adjustRecordingSignalVolume(int volume) {//[0, 400]: e.g. 50~0.5x 100~1x 400~4x
        if (volume < 0)
            volume = 0;
        else if (volume > 400)
            volume = 400;
        return m_parameter ? m_parameter->setInt("che.audio.record.signal.volume", volume) : -ERR_NOT_INITIALIZED;
    }
 
    
    int adjustPlaybackSignalVolume(int volume) {//[0, 400]
        if (volume < 0)
            volume = 0;
        else if (volume > 400)
            volume = 400;
        return m_parameter ? m_parameter->setInt("che.audio.playout.signal.volume", volume) : -ERR_NOT_INITIALIZED;
    }
 
    
    int enableAudioVolumeIndication(int interval, int smooth, bool report_vad) { // in ms: <= 0: disable, > 0: enable, interval in ms
        if (interval < 0)
            interval = 0;
        return setObject("che.audio.volume_indication", "{\"interval\":%d,\"smooth\":%d,\"vad\":%d}", interval, smooth, report_vad);
    }
 
    
    int muteLocalAudioStream(bool mute) {
        return setParameters("{\"rtc.audio.mute_me\":%s,\"che.audio.mute_me\":%s}", mute ? "true" : "false", mute ? "true" : "false");
    }
    // mute/unmute all peers. unmute will clear all muted peers specified mutePeer() interface
 
    
    int muteRemoteAudioStream(uid_t uid, bool mute) {
        return setObject("rtc.audio.mute_peer", "{\"uid\":%u,\"mute\":%s}", uid, mute?"true":"false");
    }
 
    
    int muteAllRemoteAudioStreams(bool mute) {
        return m_parameter ? m_parameter->setBool("rtc.audio.mute_peers", mute) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setDefaultMuteAllRemoteAudioStreams(bool mute) {
        return m_parameter ? m_parameter->setBool("rtc.audio.set_default_mute_peers", mute) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setExternalAudioSource(bool enabled, int sampleRate, int channels) {
        if (enabled)
            return setParameters("{\"che.audio.external_capture\":true,\"che.audio.external_capture.push\":true,\"che.audio.set_capture_raw_audio_format\":{\"sampleRate\":%d,\"channelCnt\":%d,\"mode\":%d}}", sampleRate, channels, RAW_AUDIO_FRAME_OP_MODE_TYPE::RAW_AUDIO_FRAME_OP_MODE_READ_WRITE);
        else
            return setParameters("{\"che.audio.external_capture\":false,\"che.audio.external_capture.push\":false}");
    }
 
    
    int setExternalAudioSink(bool enabled, int sampleRate, int channels) {
        if (enabled)
            return setParameters("{\"che.audio.external_render\":true,\"che.audio.external_render.pull\":true,\"che.audio.set_render_raw_audio_format\":{\"sampleRate\":%d,\"channelCnt\":%d,\"mode\":%d}}", sampleRate, channels, RAW_AUDIO_FRAME_OP_MODE_TYPE::RAW_AUDIO_FRAME_OP_MODE_READ_ONLY);
        else
            return setParameters("{\"che.audio.external_render\":false,\"che.audio.external_render.pull\":false}");
    }
 
    
    int setLogFile(const char* filePath) {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
#if defined(_WIN32)
        util::AString path;
        if (!m_parameter->convertPath(filePath, path))
            filePath = path->c_str();
        else if (!filePath)
            filePath = "";
#endif
        return m_parameter->setString("rtc.log_file", filePath);
    }
 
    
    int setLogFilter(unsigned int filter) {
        return m_parameter ? m_parameter->setUInt("rtc.log_filter", filter&LOG_FILTER_MASK) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setLogFileSize(unsigned int fileSizeInKBytes) {
        return m_parameter ? m_parameter->setUInt("rtc.log_size", fileSizeInKBytes) : -ERR_NOT_INITIALIZED;
    }
 
   
    int setLocalRenderMode(RENDER_MODE_TYPE renderMode) {
        return setRemoteRenderMode(0, renderMode);
    }
 
    
    int setRemoteRenderMode(uid_t uid, RENDER_MODE_TYPE renderMode) {
        return setParameters("{\"che.video.render_mode\":[{\"uid\":%u,\"renderMode\":%d}]}", uid, renderMode);
    }
 
    
    int setCameraCapturerConfiguration(const CameraCapturerConfiguration& config) {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
        return m_parameter->setInt("che.video.camera_capture_mode", (int)config.preference);
    }
 
    
    int enableDualStreamMode(bool enabled) {
        return setParameters("{\"rtc.dual_stream_mode\":%s,\"che.video.enableLowBitRateStream\":%d}", enabled ? "true" : "false", enabled ? 1 : 0);
    }
 
    
    int setRemoteVideoStreamType(uid_t uid, REMOTE_VIDEO_STREAM_TYPE streamType) {
        return setParameters("{\"rtc.video.set_remote_video_stream\":{\"uid\":%u,\"stream\":%d}, \"che.video.setstream\":{\"uid\":%u,\"stream\":%d}}", uid, streamType, uid, streamType);
//        return setObject("rtc.video.set_remote_video_stream", "{\"uid\":%u,\"stream\":%d}", uid, streamType);
    }
 
    
    int setRemoteDefaultVideoStreamType(REMOTE_VIDEO_STREAM_TYPE streamType) {
        return m_parameter ? m_parameter->setInt("rtc.video.set_remote_default_video_stream_type", streamType) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setRecordingAudioFrameParameters(int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall) {
        return setObject("che.audio.set_capture_raw_audio_format", "{\"sampleRate\":%d,\"channelCnt\":%d,\"mode\":%d,\"samplesPerCall\":%d}", sampleRate, channel, mode, samplesPerCall);
    }
    
    int setPlaybackAudioFrameParameters(int sampleRate, int channel, RAW_AUDIO_FRAME_OP_MODE_TYPE mode, int samplesPerCall) {
        return setObject("che.audio.set_render_raw_audio_format", "{\"sampleRate\":%d,\"channelCnt\":%d,\"mode\":%d,\"samplesPerCall\":%d}", sampleRate, channel, mode, samplesPerCall);
    }
    
    int setMixedAudioFrameParameters(int sampleRate, int samplesPerCall) {
        return setObject("che.audio.set_mixed_raw_audio_format", "{\"sampleRate\":%d,\"samplesPerCall\":%d}", sampleRate, samplesPerCall);
    }
 
    
    int enableWebSdkInteroperability(bool enabled) {//enable interoperability with zero-plugin web sdk
        return setParameters("{\"rtc.video.web_h264_interop_enable\":%s,\"che.video.web_h264_interop_enable\":%s}", enabled ? "true" : "false", enabled ? "true" : "false");
    }
 
    //only for live broadcast
    
    int setVideoQualityParameters(bool preferFrameRateOverImageQuality) {
        return setParameters("{\"rtc.video.prefer_frame_rate\":%s,\"che.video.prefer_frame_rate\":%s}", preferFrameRateOverImageQuality ? "true" : "false", preferFrameRateOverImageQuality ? "true" : "false");
    }
 
    
    int setLocalVideoMirrorMode(VIDEO_MIRROR_MODE_TYPE mirrorMode) {
        if (!m_parameter) return -ERR_NOT_INITIALIZED;
        const char *value;
        switch (mirrorMode) {
            case VIDEO_MIRROR_MODE_AUTO:
                value = "default";
                break;
            case VIDEO_MIRROR_MODE_ENABLED:
                value = "forceMirror";
                break;
            case VIDEO_MIRROR_MODE_DISABLED:
                value = "disableMirror";
                break;
            default:
                return -ERR_INVALID_ARGUMENT;
        }
        return m_parameter->setString("che.video.localViewMirrorSetting", value);
    }
 
   
    int setLocalPublishFallbackOption(STREAM_FALLBACK_OPTIONS option) {
        return m_parameter ? m_parameter->setInt("rtc.local_publish_fallback_option", option) : -ERR_NOT_INITIALIZED;
    }
 
    
    int setRemoteSubscribeFallbackOption(STREAM_FALLBACK_OPTIONS option) {
        return m_parameter ? m_parameter->setInt("rtc.remote_subscribe_fallback_option", option) : -ERR_NOT_INITIALIZED;
    }
 
#if (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE) || defined(_WIN32)
    
    int enableLoopbackRecording(bool enabled, const char* deviceName = NULL) {
        if (!deviceName) {
            return setParameters("{\"che.audio.loopback.recording\":%s}", enabled ? "true" : "false");
        }
        else {
            return setParameters("{\"che.audio.loopback.deviceName\":\"%s\",\"che.audio.loopback.recording\":%s}", deviceName, enabled ? "true" : "false");
        }
    }
#endif
 
    
    int setInEarMonitoringVolume(int volume) {
        return m_parameter ? m_parameter->setInt("che.audio.headset.monitoring.parameter", volume) : -ERR_NOT_INITIALIZED;
    }
 
protected:
    AParameter& parameter() {
        return m_parameter;
    }
    int setParameters(const char* format, ...) {
        char buf[512];
        va_list args;
        va_start(args, format);
        vsnprintf(buf, sizeof(buf)-1, format, args);
        va_end(args);
        return m_parameter ? m_parameter->setParameters(buf) : -ERR_NOT_INITIALIZED;
    }
    int setObject(const char* key, const char* format, ...) {
        char buf[512];
        va_list args;
        va_start(args, format);
        vsnprintf(buf, sizeof(buf)-1, format, args);
        va_end(args);
        return m_parameter ? m_parameter->setObject(key, buf) : -ERR_NOT_INITIALIZED;
    }
    int stopAllRemoteVideo() {
        return m_parameter ? m_parameter->setBool("che.video.peer.stop_render", true) : -ERR_NOT_INITIALIZED;
    }
private:
    AParameter m_parameter;
};
 
} //namespace rtc
} // namespace ar
 
 
#define getARRtcEngineVersion getARSdkVersion
 
////////////////////////////////////////////////////////
/** \addtogroup createARRtcEngine
 @{
 */
////////////////////////////////////////////////////////
 
/** Creates the IRtcEngine object and returns the pointer.
 * 
 * @return Pointer to the IRtcEngine object.
 */ 
AR_API ar::rtc::IRtcEngine* AR_CALL createARRtcEngine();
 
////////////////////////////////////////////////////////
/** @} */
////////////////////////////////////////////////////////
 
#define getARRtcEngineErrorDescription getARSdkErrorDescription
#define setARRtcEngineExternalSymbolLoader setARSdkExternalSymbolLoader
 
#endif