objc2-av-foundation 0.3.2

Bindings to the AVFoundation framework
Documentation
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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-graphics")]
use objc2_core_graphics::*;
#[cfg(feature = "objc2-core-media")]
use objc2_core_media::*;
#[cfg(feature = "objc2-core-video")]
use objc2_core_video::*;
use objc2_foundation::*;

use crate::*;

/// Constants indicating how photo quality should be prioritized against speed.
///
///
/// Indicates that speed of photo delivery is most important, even at the expense of quality.
///
/// Indicates that photo quality and speed of delivery are balanced in priority.
///
/// Indicates that photo quality is paramount, even at the expense of shot-to-shot time.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotoqualityprioritization?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVCapturePhotoQualityPrioritization(pub NSInteger);
impl AVCapturePhotoQualityPrioritization {
    #[doc(alias = "AVCapturePhotoQualityPrioritizationSpeed")]
    pub const Speed: Self = Self(1);
    #[doc(alias = "AVCapturePhotoQualityPrioritizationBalanced")]
    pub const Balanced: Self = Self(2);
    #[doc(alias = "AVCapturePhotoQualityPrioritizationQuality")]
    pub const Quality: Self = Self(3);
}

unsafe impl Encode for AVCapturePhotoQualityPrioritization {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for AVCapturePhotoQualityPrioritization {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// Constants indicating whether the output is ready to receive capture requests.
///
///
/// Indicates that the session is not running and the output is not ready to receive requests.
///
/// Indicates that the output is ready to receive new requests.
///
/// Indicates that the output is not ready to receive requests and may be ready shortly.
///
/// Indicates that the output is not ready to receive requests for a longer duration because it is busy capturing.
///
/// Indicates that the output is not ready to receive requests for a longer duration because it is busy processing.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutputcapturereadiness?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVCapturePhotoOutputCaptureReadiness(pub NSInteger);
impl AVCapturePhotoOutputCaptureReadiness {
    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessSessionNotRunning")]
    pub const SessionNotRunning: Self = Self(0);
    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessReady")]
    pub const Ready: Self = Self(1);
    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessNotReadyMomentarily")]
    pub const NotReadyMomentarily: Self = Self(2);
    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessNotReadyWaitingForCapture")]
    pub const NotReadyWaitingForCapture: Self = Self(3);
    #[doc(alias = "AVCapturePhotoOutputCaptureReadinessNotReadyWaitingForProcessing")]
    pub const NotReadyWaitingForProcessing: Self = Self(4);
}

unsafe impl Encode for AVCapturePhotoOutputCaptureReadiness {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for AVCapturePhotoOutputCaptureReadiness {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

extern_class!(
    /// AVCapturePhotoOutput is a concrete subclass of AVCaptureOutput that supersedes AVCaptureStillImageOutput as the preferred interface for capturing photos. In addition to capturing all flavors of still image supported by AVCaptureStillImageOutput, it supports Live Photo capture, preview-sized image delivery, wide color, RAW, RAW+JPG and RAW+DNG formats.
    ///
    ///
    /// Taking a photo is multi-step process. Clients wishing to build a responsive UI need to know about the progress of a photo capture request as it advances from capture to processing to finished delivery. AVCapturePhotoOutput informs clients of photo capture progress through a delegate protocol. To take a picture, a client instantiates and configures an AVCapturePhotoSettings object, then calls AVCapturePhotoOutput's -capturePhotoWithSettings:delegate:, passing a delegate to be informed when events relating to the photo capture occur (e.g., the photo is about to be captured, the photo has been captured but not processed yet, the Live Photo movie is ready, etc.).
    ///
    /// Some AVCapturePhotoSettings properties can be set to "Auto", such as flashMode. When set to AVCaptureFlashModeAuto, the photo output decides at capture time whether the current scene and lighting conditions require use of the flash. Thus the client doesn't know with certainty which features will be enabled when making the capture request. With the first and each subsequent delegate callback, the client is provided an AVCaptureResolvedPhotoSettings instance that indicates the settings that were applied to the capture. All "Auto" features have now been resolved to on or off. The AVCaptureResolvedPhotoSettings object passed in the client's delegate callbacks has a uniqueID identical to the AVCapturePhotoSettings request. This uniqueID allows clients to pair unresolved and resolved settings objects. See AVCapturePhotoCaptureDelegate below for a detailed discussion of the delegate callbacks.
    ///
    /// Enabling certain photo features (Live Photo capture and high resolution capture) requires a reconfiguration of the capture render pipeline. Clients wishing to opt in for these features should call -setLivePhotoCaptureEnabled: and/or -setHighResolutionCaptureEnabled: before calling -startRunning on the AVCaptureSession. Changing any of these properties while the session is running requires a disruptive reconfiguration of the capture render pipeline. Live Photo captures in progress will be ended immediately; unfulfilled photo requests will be aborted; video preview will temporarily freeze. If you wish to capture Live Photos containing sound, you must add an audio AVCaptureDeviceInput to your AVCaptureSession.
    ///
    /// Simultaneous Live Photo capture and MovieFileOutput capture is not supported. If an AVCaptureMovieFileOutput is added to your session, AVCapturePhotoOutput's livePhotoCaptureSupported property returns NO. Note that simultaneous Live Photo capture and AVCaptureVideoDataOutput is supported.
    ///
    /// AVCaptureStillImageOutput and AVCapturePhotoOutput may not both be added to a capture session. You must use one or the other. If you add both to a session, a NSInvalidArgumentException is thrown.
    ///
    /// AVCapturePhotoOutput implicitly supports wide color photo capture, following the activeColorSpace of the source AVCaptureDevice. If the source device's activeColorSpace is AVCaptureColorSpace_P3_D65, photos are encoded with wide color information, unless you've specified an output format of '420v', which does not support wide color.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutput?language=objc)
    #[unsafe(super(AVCaptureOutput, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "AVCaptureOutputBase")]
    pub struct AVCapturePhotoOutput;
);

#[cfg(feature = "AVCaptureOutputBase")]
extern_conformance!(
    unsafe impl NSObjectProtocol for AVCapturePhotoOutput {}
);

#[cfg(feature = "AVCaptureOutputBase")]
impl AVCapturePhotoOutput {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        /// Method for initiating a photo capture request with progress monitoring through the supplied delegate.
        ///
        ///
        /// Parameter `settings`: An AVCapturePhotoSettings object you have configured. May not be nil.
        ///
        /// Parameter `delegate`: An object conforming to the AVCapturePhotoCaptureDelegate protocol. This object's delegate methods are called back as the photo advances from capture to processing to finished delivery. May not be nil.
        ///
        ///
        /// This method initiates a photo capture. The receiver copies your provided settings to prevent unintentional mutation. It is illegal to re-use settings. The receiver throws an NSInvalidArgumentException if your settings.uniqueID matches that of any previously used settings. This method is used to initiate all flavors of photo capture: single photo, RAW capture with or without a processed image (such as a JPEG), bracketed capture, and Live Photo.
        ///
        /// Clients need not wait for a capture photo request to complete before issuing another request. This is true for single photo captures as well as Live Photos, where movie complements of adjacent photo captures are allowed to overlap.
        ///
        /// This method validates your settings and enforces the following rules in order to ensure deterministic behavior. If any of these rules are violated, a NSInvalidArgumentException is thrown.
        /// RAW rules:
        /// See +isBayerRAWPixelFormat: and +isAppleProRAWPixelFormat: on the difference between Bayer RAW and Apple ProRAW pixel formats.
        /// Common RAW rules:
        /// - If rawPhotoPixelFormatType is non-zero, it must be present in the receiver's -availableRawPhotoPixelFormatTypes array.
        /// - If rawPhotoPixelFormatType is non-zero, your delegate must respond to -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:.
        /// - If rawPhotoPixelFormatType is non-zero, highResolutionPhotoEnabled may be YES or NO, but the setting only applies to the processed image, if you've specified one.
        /// - If rawPhotoPixelFormatType is non-zero, constantColorEnabled must be set to NO.
        /// - If rawFileType is specified, it must be present in -availableRawPhotoFileTypes and must support the rawPhotoPixelFormatType specified using -supportedRawPhotoPixelFormatTypesForFileType:.
        /// Bayer RAW rules (isBayerRAWPixelFormat: returns yes for rawPhotoPixelFormatType):
        /// - photoQualityPrioritization must be set to AVCapturePhotoQualityPrioritizationSpeed (deprecated autoStillImageStabilizationEnabled must be set to NO).
        /// - the videoZoomFactor of the source device and the videoScaleAndCropFactor of the photo output's video connection must both be 1.0. Ensure no zoom is applied before requesting a RAW capture, and don't change the zoom during RAW capture.
        /// Apple ProRAW rules (isAppleProRAWPixelFormat: returns yes for rawPhotoPixelFormatType):
        /// - livePhotoMovieFileURL must be nil in AVCapturePhotoSettings settings
        /// - autoContentAwareDistortionCorrectionEnabled will automatically be disabled in AVCapturePhotoSettings
        /// - autoRedEyeReductionEnabled will automatically be disabled in AVCapturePhotoSettings
        /// - portraitEffectsMatteDeliveryEnabled will automatically be disabled in AVCapturePhotoSettings
        /// - enabledSemanticSegmentationMatteTypes will automatically be cleared in AVCapturePhotoSettings
        /// Processed Format rules:
        /// - If format is non-nil, a kCVPixelBufferPixelFormatTypeKey or AVVideoCodecKey must be present. You cannot specify both.
        /// - If format has a kCVPixelBufferPixelFormatTypeKey, its value must be present in the receiver's -availablePhotoPixelFormatTypes array.
        /// - If format has an AVVideoCodecKey, its value must be present in the receiver's -availablePhotoCodecTypes array.
        /// - If format is non-nil, your delegate must respond to -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:.
        /// - If processedFileType is specified, it must be present in -availablePhotoFileTypes and must support the format's specified kCVPixelBufferPixelFormatTypeKey (using -supportedPhotoPixelFormatTypesForFileType:) or AVVideoCodecKey (using -supportedPhotoCodecTypesForFileType:).
        /// - The photoQualityPrioritization you specify may not be a greater number than the photo output's maxPhotoQualityPrioritization. You must set your AVCapturePhotoOutput maxPhotoQualityPrioritization up front.
        /// Flash rules:
        /// - The specified flashMode must be present in the receiver's -supportedFlashModes array.
        /// Live Photo rules:
        /// - The receiver's livePhotoCaptureEnabled must be YES if settings.livePhotoMovieURL is non-nil.
        /// - If settings.livePhotoMovieURL is non-nil, the receiver's livePhotoCaptureSuspended property must be set to NO.
        /// - If settings.livePhotoMovieURL is non-nil, it must be a file URL that's accessible to your app's sandbox.
        /// - If settings.livePhotoMovieURL is non-nil, your delegate must respond to -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:.
        /// Bracketed capture rules:
        /// - bracketedSettings.count must be
        /// <
        /// = the receiver's maxBracketedCapturePhotoCount property.
        /// - For manual exposure brackets, ISO value must be within the source device activeFormat's minISO and maxISO values.
        /// - For manual exposure brackets, exposureDuration value must be within the source device activeFormat's minExposureDuration and maxExposureDuration values.
        /// - For auto exposure brackets, exposureTargetBias value must be within the source device's minExposureTargetBias and maxExposureTargetBias values.
        /// Deferred Photo Delivery rules:
        /// - If the receiver's autoDeferredPhotoDeliveryEnabled is YES, your delegate must respond to -captureOutput:didFinishCapturingDeferredPhotoProxy:error:.
        /// - The maxPhotoDimensions setting for 24MP (5712, 4284), when supported, is only serviced as 24MP via deferred photo delivery.
        /// Color space rules:
        /// - Photo capture is not supported when AVCaptureDevice has selected AVCaptureColorSpace_AppleLog or AVCaptureColorSpace_AppleLog2 as color space.
        #[unsafe(method(capturePhotoWithSettings:delegate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn capturePhotoWithSettings_delegate(
            &self,
            settings: &AVCapturePhotoSettings,
            delegate: &ProtocolObject<dyn AVCapturePhotoCaptureDelegate>,
        );

        /// An array of AVCapturePhotoSettings instances for which the receiver is prepared to capture.
        ///
        ///
        /// See also setPreparedPhotoSettingsArray:completionHandler:
        /// Some types of photo capture, such as bracketed captures and RAW captures, require the receiver to allocate additional buffers or prepare other resources. To prevent photo capture requests from executing slowly due to lazy resource allocation, you may call -setPreparedPhotoSettingsArray:completionHandler: with an array of settings objects representative of the types of capture you will be performing (e.g., settings for a bracketed capture, RAW capture, and/or still image stabilization capture). By default, the receiver prepares sufficient resources to capture photos with default settings, +[AVCapturePhotoSettings photoSettings].
        #[unsafe(method(preparedPhotoSettingsArray))]
        #[unsafe(method_family = none)]
        pub unsafe fn preparedPhotoSettingsArray(
            &self,
        ) -> Retained<NSArray<AVCapturePhotoSettings>>;

        #[cfg(feature = "block2")]
        /// Method allowing the receiver to prepare resources in advance for future -capturePhotoWithSettings:delegate: requests.
        ///
        ///
        /// Parameter `preparedPhotoSettingsArray`: An array of AVCapturePhotoSettings instances indicating the types of capture for which the receiver should prepare resources.
        ///
        /// Parameter `completionHandler`: A completion block to be fired on a serial dispatch queue once the receiver has finished preparing. You may pass nil to indicate you do not wish to be called back when preparation is complete.
        ///
        ///
        /// Some types of photo capture, such as bracketed captures and RAW captures, require the receiver to allocate additional buffers or prepare other resources. To prevent photo capture requests from executing slowly due to lazy resource allocation, you may call this method with an array of settings objects representative of the types of capture you will be performing (e.g., settings for a bracketed capture, RAW capture, and/or still image stabilization capture). You may call this method even before calling -[AVCaptureSession startRunning] in order to hint the receiver up front which features you'll be utilizing. Each time you call this method with an array of settings, the receiver evaluates what additional resources it needs to allocate, as well as existing resources that can be reclaimed, and calls back your completionHandler when it has finished preparing (and possibly reclaiming) needed resources. By default, the receiver prepares sufficient resources to capture photos with default settings, +[AVCapturePhotoSettings photoSettings]. If you wish to reclaim all possible resources, you may call this method with an empty array.
        ///
        /// Preparation for photo capture is always optional. You may call -capturePhotoWithSettings:delegate: without first calling -setPreparedPhotoSettingsArray:completionHandler:, but be advised that some of your photo captures may execute slowly as additional resources are allocated just-in-time.
        ///
        /// If you call this method while your AVCaptureSession is not running, your completionHandler does not fire immediately. It only fires once you've called -[AVCaptureSession startRunning], and the needed resources have actually been prepared. If you call -setPreparedPhotoSettingsArray:completionHandler: with an array of settings, and then call it a second time, your first prepare call's completionHandler fires immediately with prepared == NO.
        ///
        /// Prepared settings persist across session starts/stops and committed configuration changes. This property participates in -[AVCaptureSession beginConfiguration] / -[AVCaptureSession commitConfiguration] deferred work behavior. That is, if you call -[AVCaptureSession beginConfiguration], change your session's input/output topology, and call this method, preparation is deferred until you call -[AVCaptureSession commitConfiguration], enabling you to atomically commit a new configuration as well as prepare to take photos in that new configuration.
        #[unsafe(method(setPreparedPhotoSettingsArray:completionHandler:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPreparedPhotoSettingsArray_completionHandler(
            &self,
            prepared_photo_settings_array: &NSArray<AVCapturePhotoSettings>,
            completion_handler: Option<&block2::DynBlock<dyn Fn(Bool, *mut NSError)>>,
        );

        /// An array of kCVPixelBufferPixelFormatTypeKey values that are currently supported by the receiver.
        ///
        ///
        /// If you wish to capture a photo in an uncompressed format, such as 420f, 420v, or BGRA, you must ensure that the format you want is present in the receiver's availablePhotoPixelFormatTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no pixel format types are available. This property is key-value observable.
        #[unsafe(method(availablePhotoPixelFormatTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availablePhotoPixelFormatTypes(&self) -> Retained<NSArray<NSNumber>>;

        #[cfg(feature = "AVVideoSettings")]
        /// An array of AVVideoCodecKey values that are currently supported by the receiver.
        ///
        ///
        /// If you wish to capture a photo in a compressed format, such as JPEG, you must ensure that the format you want is present in the receiver's availablePhotoCodecTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no codec types are available. This property is key-value observable.
        #[unsafe(method(availablePhotoCodecTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availablePhotoCodecTypes(&self) -> Retained<NSArray<AVVideoCodecType>>;

        #[cfg(feature = "AVVideoSettings")]
        /// An array of available AVVideoCodecType values that may be used for the raw photo.
        ///
        ///
        /// Not all codecs can be used for all rawPixelFormatType values and this call will show all of the possible codecs available. To check if a codec is available for a specific rawPixelFormatType and rawFileType, one should use supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:.
        #[unsafe(method(availableRawPhotoCodecTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableRawPhotoCodecTypes(&self) -> Retained<NSArray<AVVideoCodecType>>;

        /// Indicates whether the current configuration supports Apple ProRAW pixel formats.
        ///
        ///
        /// The AVCapturePhotoSettings appleProRAWEnabled property may only be set to YES if this property returns YES. This property is key-value observable.
        #[unsafe(method(isAppleProRAWSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAppleProRAWSupported(&self) -> bool;

        /// Indicates whether the photo output is configured for delivery of Apple ProRAW pixel formats as well as Bayer RAW formats.
        ///
        ///
        /// Setting this property to YES will enable support for taking photos in Apple ProRAW pixel formats. These formats will be added to -availableRawPhotoPixelFormatTypes after any existing Bayer RAW formats. Compared to photos taken with a Bayer RAW format, these photos will be demosaiced and partially processed. They are still scene-referred, and allow capturing RAW photos in modes where there is no traditional sensor/Bayer RAW available. Examples are any modes that rely on fusion of multiple captures. Use +isBayerRAWPixelFormat: to determine if a pixel format in -availableRawPhotoPixelFormatTypes is a Bayer RAW format, and +isAppleProRAWPixelFormat: to determine if it is an Apple ProRAW format. When writing an Apple ProRAW buffer to a DNG file, the resulting file is known as "Linear DNG". Apple ProRAW formats are not supported on all platforms and devices. This property may only be set to YES if appleProRAWSupported returns YES. This property is key-value observable.
        ///
        /// Enabling this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning].
        #[unsafe(method(isAppleProRAWEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAppleProRAWEnabled(&self) -> bool;

        /// Setter for [`isAppleProRAWEnabled`][Self::isAppleProRAWEnabled].
        #[unsafe(method(setAppleProRAWEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAppleProRAWEnabled(&self, apple_pro_raw_enabled: bool);

        /// Returns YES if the given pixel format is a Bayer RAW format.
        ///
        ///
        /// May be used to distinguish Bayer RAW from Apple ProRAW pixel formats in -availableRawPhotoPixelFormatTypes once appleProRAWEnabled has been set to YES.
        #[unsafe(method(isBayerRAWPixelFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn isBayerRAWPixelFormat(pixel_format: OSType) -> bool;

        /// Returns YES if the given pixel format is an Apple ProRAW format.
        ///
        ///
        /// May be used to distinguish Bayer RAW from Apple ProRAW pixel formats in -availableRawPhotoPixelFormatTypes once appleProRAWEnabled has been set to YES.
        ///
        /// See appleProRAWEnabled for more information on Apple ProRAW.
        #[unsafe(method(isAppleProRAWPixelFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAppleProRAWPixelFormat(pixel_format: OSType) -> bool;

        /// An array of RAW CVPixelBufferPixelFormatTypeKey values that are currently supported by the receiver.
        ///
        ///
        /// If you wish to capture a RAW photo, you must ensure that the RAW format you want is present in the receiver's availableRawPhotoPixelFormatTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no RAW formats are available. See AVCapturePhotoOutput.appleProRAWEnabled on how to enable support for partially processed RAW formats. This property is key-value observable. RAW capture is not supported on all platforms.
        #[unsafe(method(availableRawPhotoPixelFormatTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableRawPhotoPixelFormatTypes(&self) -> Retained<NSArray<NSNumber>>;

        #[cfg(feature = "AVMediaFormat")]
        /// An array of AVFileType values that are currently supported by the receiver.
        ///
        ///
        /// If you wish to capture a photo that is formatted for a particular file container, such as HEIF or DICOM, you must ensure that the fileType you desire is present in the receiver's availablePhotoFileTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no file types are available. This property is key-value observable.
        #[unsafe(method(availablePhotoFileTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availablePhotoFileTypes(&self) -> Retained<NSArray<AVFileType>>;

        #[cfg(feature = "AVMediaFormat")]
        /// An array of AVFileType values that are currently supported by the receiver for RAW capture.
        ///
        ///
        /// If you wish to capture a RAW photo that is formatted for a particular file container, such as DNG, you must ensure that the fileType you desire is present in the receiver's availableRawPhotoFileTypes array. If you've not yet added your receiver to an AVCaptureSession with a video source, no file types are available. This property is key-value observable.
        #[unsafe(method(availableRawPhotoFileTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableRawPhotoFileTypes(&self) -> Retained<NSArray<AVFileType>>;

        #[cfg(feature = "AVMediaFormat")]
        /// An array of pixel format type values that are currently supported by the receiver for a particular file container.
        ///
        ///
        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo.
        ///
        /// Returns: An array of CVPixelBufferPixelFormatTypeKey values supported by the receiver for the file type in question.
        ///
        ///
        /// If you wish to capture a photo for storage in a particular file container, such as TIFF, you must ensure that the photo pixel format type you request is valid for that file type. If no pixel format types are supported for a given fileType, an empty array is returned. If you've not yet added your receiver to an AVCaptureSession with a video source, no pixel format types are supported.
        #[unsafe(method(supportedPhotoPixelFormatTypesForFileType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedPhotoPixelFormatTypesForFileType(
            &self,
            file_type: &AVFileType,
        ) -> Retained<NSArray<NSNumber>>;

        #[cfg(all(feature = "AVMediaFormat", feature = "AVVideoSettings"))]
        /// An array of AVVideoCodecKey values that are currently supported by the receiver for a particular file container.
        ///
        ///
        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo.
        ///
        /// Returns: An array of AVVideoCodecKey values supported by the receiver for the file type in question.
        ///
        ///
        /// If you wish to capture a photo for storage in a particular file container, such as HEIF, you must ensure that the photo codec type you request is valid for that file type. If no codec types are supported for a given fileType, an empty array is returned. If you've not yet added your receiver to an AVCaptureSession with a video source, no codec types are supported.
        #[unsafe(method(supportedPhotoCodecTypesForFileType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedPhotoCodecTypesForFileType(
            &self,
            file_type: &AVFileType,
        ) -> Retained<NSArray<AVVideoCodecType>>;

        #[cfg(all(feature = "AVMediaFormat", feature = "AVVideoSettings"))]
        /// An array of AVVideoCodecType values that are currently supported by the receiver for a particular file container and raw pixel format.
        ///
        ///
        /// Parameter `pixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
        ///
        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo which can be retrieved from -availableRawPhotoFileTypes.
        ///
        /// Returns: An array of AVVideoCodecType values supported by the receiver for the file type and and raw pixel format in question.
        ///
        ///
        /// If you wish to capture a raw photo for storage using a Bayer RAW or Apple ProRAW pixel format and to be stored in a file container, such as DNG, you must ensure that the codec type you request is valid for that file and pixel format type. If no RAW codec types are supported for a given file type and/or pixel format type, an empty array is returned. If you have not yet added your receiver to an AVCaptureSession with a video source, an empty array is returned.
        #[unsafe(method(supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedRawPhotoCodecTypesForRawPhotoPixelFormatType_fileType(
            &self,
            pixel_format_type: OSType,
            file_type: &AVFileType,
        ) -> Retained<NSArray<AVVideoCodecType>>;

        #[cfg(feature = "AVMediaFormat")]
        /// An array of CVPixelBufferPixelFormatType values that are currently supported by the receiver for a particular file container.
        ///
        ///
        /// Parameter `fileType`: The AVFileType container type intended for storage of a photo.
        ///
        /// Returns: An array of CVPixelBufferPixelFormatType values supported by the receiver for the file type in question.
        ///
        ///
        /// If you wish to capture a photo for storage in a particular file container, such as DNG, you must ensure that the RAW pixel format type you request is valid for that file type. If no RAW pixel format types are supported for a given fileType, an empty array is returned. If you've not yet added your receiver to an AVCaptureSession with a video source, no pixel format types are supported.
        #[unsafe(method(supportedRawPhotoPixelFormatTypesForFileType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedRawPhotoPixelFormatTypesForFileType(
            &self,
            file_type: &AVFileType,
        ) -> Retained<NSArray<NSNumber>>;

        /// Indicates the highest quality the receiver should be prepared to output on a capture-by-capture basis.
        ///
        ///
        /// Default value is AVCapturePhotoQualityPrioritizationBalanced when attached to an AVCaptureSession, and AVCapturePhotoQualityPrioritizationSpeed when attached to an AVCaptureMultiCamSession. The AVCapturePhotoOutput is capable of applying a variety of techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc). Some techniques improve image quality at the expense of speed (shot-to-shot time). Before starting your session, you may set this property to indicate the highest quality prioritization you intend to request when calling -capturePhotoWithSettings:delegate:. When configuring an AVCapturePhotoSettings object, you may not exceed this quality prioritization level, but you may select a lower (speedier) prioritization level.
        ///
        /// Changing the maxPhotoQualityPrioritization while the session is running can result in a lengthy rebuild of the session in which video preview is disrupted.
        ///
        /// Setting the maxPhotoQualityPrioritization to .quality will turn on optical image stabilization if the -isHighPhotoQualitySupported of the source device's -activeFormat is true.
        #[unsafe(method(maxPhotoQualityPrioritization))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxPhotoQualityPrioritization(&self) -> AVCapturePhotoQualityPrioritization;

        /// Setter for [`maxPhotoQualityPrioritization`][Self::maxPhotoQualityPrioritization].
        #[unsafe(method(setMaxPhotoQualityPrioritization:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaxPhotoQualityPrioritization(
            &self,
            max_photo_quality_prioritization: AVCapturePhotoQualityPrioritization,
        );

        /// Specifies whether fast capture prioritization is supported.
        ///
        ///
        /// Fast capture prioritization allows capture quality to be automatically reduced from the selected AVCapturePhotoQualityPrioritization to ensure the photo output can keep up when captures are requested in rapid succession. Fast capture prioritization is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats and only when responsiveCaptureEnabled is YES. When switching cameras or formats this property may change. When this property changes from YES to NO, fastCapturePrioritizationEnabled also reverts to NO. If you've previously opted in for fast capture prioritization and then change configurations, you may need to set fastCapturePrioritizationEnabled = YES again.
        #[unsafe(method(isFastCapturePrioritizationSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isFastCapturePrioritizationSupported(&self) -> bool;

        /// Setter for [`isFastCapturePrioritizationSupported`][Self::isFastCapturePrioritizationSupported].
        #[unsafe(method(setFastCapturePrioritizationSupported:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFastCapturePrioritizationSupported(
            &self,
            fast_capture_prioritization_supported: bool,
        );

        /// Specifies whether fast capture prioritization is enabled.
        ///
        ///
        /// This property defaults to NO. This property may only be set to YES if fastCapturePrioritizationSupported is YES, otherwise an NSInvalidArgumentException is thrown. By setting this property to YES, the photo output prepares itself to automatically reduce capture quality from the selected AVCapturePhotoQualityPrioritization when needed to keep up with rapid capture requests. In many cases the slightly reduced quality is preferable to missing the moment entirely. If you intend to use fast capture prioritization, you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
        #[unsafe(method(isFastCapturePrioritizationEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isFastCapturePrioritizationEnabled(&self) -> bool;

        /// Setter for [`isFastCapturePrioritizationEnabled`][Self::isFastCapturePrioritizationEnabled].
        #[unsafe(method(setFastCapturePrioritizationEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFastCapturePrioritizationEnabled(
            &self,
            fast_capture_prioritization_enabled: bool,
        );

        /// Indicates whether the deferred photo delivery feature is supported by the receiver.
        ///
        ///
        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When deferred photo delivery is not supported, your capture requests always resolve their AVCaptureResolvedPhotoSettings.deferredPhotoProxyDimensions to { 0, 0 }. This property is key-value observable.
        ///
        /// Automatic deferred photo delivery can produce a lightweight photo representation, called a "proxy", at the time of capture that can later be processed to completion while improving camera responsiveness.  When it's appropriate for the receiver to deliver a photo proxy for deferred processing, the delegate callback -captureOutput:didFinishCapturingDeferredPhotoProxy:error: will be invoked instead of -captureOutput:didFinishProcessingPhoto:error:.  See the documentation for AVCaptureDeferredPhotoProxy for more details.
        #[unsafe(method(isAutoDeferredPhotoDeliverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoDeferredPhotoDeliverySupported(&self) -> bool;

        /// Specifies whether automatic deferred photo delivery is enabled.
        ///
        ///
        /// Setting this value to either YES or NO requires a lengthy reconfiguration of the capture pipeline, so you should set this property before calling -[AVCaptureSession startRunning].  Setting this property to YES throws an NSInvalidArgumentException if autoDeferredPhotoDeliverySupported is NO.
        #[unsafe(method(isAutoDeferredPhotoDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoDeferredPhotoDeliveryEnabled(&self) -> bool;

        /// Setter for [`isAutoDeferredPhotoDeliveryEnabled`][Self::isAutoDeferredPhotoDeliveryEnabled].
        #[unsafe(method(setAutoDeferredPhotoDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutoDeferredPhotoDeliveryEnabled(
            &self,
            auto_deferred_photo_delivery_enabled: bool,
        );

        /// Indicates whether the still image stabilization feature is supported by the receiver.
        ///
        ///
        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When still image stabilization is not supported, your capture requests always resolve stillImageStabilizationEnabled to NO. This property is key-value observable.
        ///
        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -maxPhotoQualityPrioritization to indicate the highest quality prioritization level you might request in a photo capture, understanding that the higher the quality, the longer the potential wait. You may also use AVCapturePhotoSettings' photoQualityPrioritization property to specify a prioritization level for a particular photo capture, and then query the AVCaptureResolvedPhotoSettings photoProcessingTimeRange property to find out how long it might take to receive the resulting photo in your delegate callback.
        #[deprecated]
        #[unsafe(method(isStillImageStabilizationSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isStillImageStabilizationSupported(&self) -> bool;

        /// Indicates whether the current scene is dark enough to warrant use of still image stabilization.
        ///
        ///
        /// This property reports whether the current scene being previewed by the camera is dark enough to benefit from still image stabilization. You can influence this property's answers by setting the photoSettingsForSceneMonitoring property, indicating whether autoStillImageStabilization monitoring should be on or off. If you set autoStillImageStabilization to NO, isStillImageStabilizationScene always reports NO. If you set it to YES, this property returns YES or NO depending on the current scene's lighting conditions. Note that some very dark scenes do not benefit from still image stabilization, but do benefit from flash. By default, this property always returns NO unless you set photoSettingsForSceneMonitoring to a non-nil value. This property may be key-value observed.
        ///
        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -maxPhotoQualityPrioritization to indicate the highest quality prioritization level you might request in a photo capture, understanding that the higher the quality, the longer the potential wait. You may also use AVCapturePhotoSettings' photoQualityPrioritization property to specify a prioritization level for a particular photo capture, and then query the AVCaptureResolvedPhotoSettings photoProcessingTimeRange property to find out how long it might take to receive the resulting photo in your delegate callback.
        #[deprecated]
        #[unsafe(method(isStillImageStabilizationScene))]
        #[unsafe(method_family = none)]
        pub unsafe fn isStillImageStabilizationScene(&self) -> bool;

        /// Indicates whether the virtual device image fusion feature is supported by the receiver.
        ///
        ///
        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When using a virtual AVCaptureDevice, its constituent camera images can be fused together to improve image quality when this property answers YES. When virtual device fusion is not supported by the current configuration, your capture requests always resolve virtualDeviceFusionEnabled to NO. This property is key-value observable.
        #[unsafe(method(isVirtualDeviceFusionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isVirtualDeviceFusionSupported(&self) -> bool;

        /// Indicates whether the DualCamera image fusion feature is supported by the receiver.
        ///
        ///
        /// This property may change as the session's -sessionPreset or source device's -activeFormat change. When using the AVCaptureDevice with deviceType AVCaptureDeviceTypeBuiltInDualCamera, the wide-angle and telephoto camera images can be fused together to improve image quality in some configurations. When DualCamera image fusion is not supported by the current configuration, your capture requests always resolve dualCameraFusionEnabled to NO. This property is key-value observable. As of iOS 13, this property is deprecated in favor of virtualDeviceFusionSupported.
        #[deprecated]
        #[unsafe(method(isDualCameraFusionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDualCameraFusionSupported(&self) -> bool;

        /// Specifies whether the photo output's current configuration supports delivery of photos from constituent cameras of a virtual device.
        ///
        ///
        /// Virtual device constituent photo delivery is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats. When switching cameras or formats this property may change. When this property changes from YES to NO, virtualDeviceConstituentPhotoDeliveryEnabled also reverts to NO. If you've previously opted in for virtual device constituent photo delivery and then change configurations, you may need to set virtualDeviceConstituentPhotoDeliveryEnabled = YES again. This property is key-value observable.
        #[unsafe(method(isVirtualDeviceConstituentPhotoDeliverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isVirtualDeviceConstituentPhotoDeliverySupported(&self) -> bool;

        /// Specifies whether the photo output's current configuration supports delivery of both telephoto and wide images from the DualCamera.
        ///
        ///
        /// DualCamera dual photo delivery is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats. When switching cameras or formats this property may change. When this property changes from YES to NO, dualCameraDualPhotoDeliveryEnabled also reverts to NO. If you've previously opted in for DualCamera dual photo delivery and then change configurations, you may need to set dualCameraDualPhotoDeliveryEnabled = YES again. This property is key-value observable. As of iOS 13, this property is deprecated in favor of virtualDeviceConstituentPhotoDeliverySupported.
        #[deprecated]
        #[unsafe(method(isDualCameraDualPhotoDeliverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDualCameraDualPhotoDeliverySupported(&self) -> bool;

        /// Indicates whether the photo output is configured for delivery of photos from constituent cameras of a virtual device.
        ///
        ///
        /// Default value is NO. This property may only be set to YES if virtualDeviceConstituentPhotoDeliverySupported is YES. Virtual device constituent photo delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to do any constituent photo delivery captures, you should set this property to YES before calling -[AVCaptureSession startRunning]. See also -[AVCapturePhotoSettings virtualDeviceConstituentPhotoDeliveryEnabledDevices].
        #[unsafe(method(isVirtualDeviceConstituentPhotoDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isVirtualDeviceConstituentPhotoDeliveryEnabled(&self) -> bool;

        /// Setter for [`isVirtualDeviceConstituentPhotoDeliveryEnabled`][Self::isVirtualDeviceConstituentPhotoDeliveryEnabled].
        #[unsafe(method(setVirtualDeviceConstituentPhotoDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setVirtualDeviceConstituentPhotoDeliveryEnabled(
            &self,
            virtual_device_constituent_photo_delivery_enabled: bool,
        );

        /// Indicates whether the photo output is configured for delivery of both the telephoto and wide images from the DualCamera.
        ///
        ///
        /// Default value is NO. This property may only be set to YES if dualCameraDualPhotoDeliverySupported is YES. DualCamera dual photo delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to do any dual photo delivery captures, you should set this property to YES before calling -[AVCaptureSession startRunning]. See also -[AVCapturePhotoSettings dualCameraDualPhotoDeliveryEnabled]. As of iOS 13, this property is deprecated in favor of virtualDeviceConstituentPhotoDeliveryEnabled.
        #[deprecated]
        #[unsafe(method(isDualCameraDualPhotoDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDualCameraDualPhotoDeliveryEnabled(&self) -> bool;

        /// Setter for [`isDualCameraDualPhotoDeliveryEnabled`][Self::isDualCameraDualPhotoDeliveryEnabled].
        #[deprecated]
        #[unsafe(method(setDualCameraDualPhotoDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDualCameraDualPhotoDeliveryEnabled(
            &self,
            dual_camera_dual_photo_delivery_enabled: bool,
        );

        /// Specifies whether the photo output's current configuration supports delivery of AVCameraCalibrationData in the resultant AVCapturePhoto.
        ///
        ///
        /// Camera calibration data delivery (intrinsics, extrinsics, lens distortion characteristics, etc.) is only supported if virtualDeviceConstituentPhotoDeliveryEnabled is YES and contentAwareDistortionCorrectionEnabled is NO and the source device's geometricDistortionCorrectionEnabled property is set to NO. This property is key-value observable.
        #[unsafe(method(isCameraCalibrationDataDeliverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isCameraCalibrationDataDeliverySupported(&self) -> bool;

        /// An array of AVCaptureFlashMode constants for the current capture session configuration.
        ///
        ///
        /// This property supersedes AVCaptureDevice's isFlashModeSupported: It returns an array of AVCaptureFlashMode constants. To test whether a particular flash mode is supported, use NSArray's containsObject API: [photoOutput.supportedFlashModes containsObject:
        /// @
        /// (AVCaptureFlashModeAuto)]. This property is key-value observable.
        #[unsafe(method(supportedFlashModes))]
        #[unsafe(method_family = none)]
        pub unsafe fn supportedFlashModes(&self) -> Retained<NSArray<NSNumber>>;

        /// Indicates whether the receiver supports automatic red-eye reduction for flash captures.
        ///
        ///
        /// Flash images may cause subjects' eyes to appear red, golden, or white. Automatic red-eye reduction detects and corrects for reflected light in eyes, at the cost of additional processing time per image. This property may change as the session's -sessionPreset or source device's -activeFormat change. When red-eye reduction is not supported, your capture requests always resolve redEyeReductionEnabled to NO. This property is key-value observable.
        #[unsafe(method(isAutoRedEyeReductionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoRedEyeReductionSupported(&self) -> bool;

        /// Indicates whether the current scene is dark enough to warrant use of the flash.
        ///
        ///
        /// This property reports whether the current scene being previewed by the camera is dark enough to need the flash. If -supportedFlashModes only contains AVCaptureFlashModeOff, isFlashScene always reports NO. You can influence this property's answers by setting the photoSettingsForSceneMonitoring property, indicating the flashMode you wish to monitor. If you set flashMode to AVCaptureFlashModeOff, isFlashScene always reports NO. If you set it to AVCaptureFlashModeAuto or AVCaptureFlashModeOn, isFlashScene answers YES or NO based on the current scene's lighting conditions. By default, this property always returns NO unless you set photoSettingsForSceneMonitoring to a non-nil value. Note that there is some overlap in the light level ranges that benefit from still image stabilization and flash. If your photoSettingsForSceneMonitoring indicate that both still image stabilization and flash scenes should be monitored, still image stabilization takes precedence, and isFlashScene becomes YES at lower overall light levels. This property may be key-value observed.
        #[unsafe(method(isFlashScene))]
        #[unsafe(method_family = none)]
        pub unsafe fn isFlashScene(&self) -> bool;

        /// Settings that govern the behavior of isFlashScene and isStillImageStabilizationScene.
        ///
        ///
        /// You can influence the return values of isFlashScene and isStillImageStabilizationScene by setting this property, indicating the flashMode and photoQualityPrioritization values that should be considered for scene monitoring. For instance, if you set flashMode to AVCaptureFlashModeOff, isFlashScene always reports NO. If you set it to AVCaptureFlashModeAuto or AVCaptureFlashModeOn, isFlashScene answers YES or NO based on the current scene's lighting conditions. Note that there is some overlap in the light level ranges that benefit from still image stabilization and flash. If your photoSettingsForSceneMonitoring indicate that both still image stabilization and flash scenes should be monitored, still image stabilization takes precedence, and isFlashScene becomes YES at lower overall light levels. The default value for this property is nil. See isStillImageStabilizationScene and isFlashScene for further discussion.
        #[unsafe(method(photoSettingsForSceneMonitoring))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsForSceneMonitoring(
            &self,
        ) -> Option<Retained<AVCapturePhotoSettings>>;

        /// Setter for [`photoSettingsForSceneMonitoring`][Self::photoSettingsForSceneMonitoring].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setPhotoSettingsForSceneMonitoring:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPhotoSettingsForSceneMonitoring(
            &self,
            photo_settings_for_scene_monitoring: Option<&AVCapturePhotoSettings>,
        );

        /// Indicates whether the photo render pipeline should be configured to deliver high resolution still images.
        ///
        ///
        /// Some AVCaptureDeviceFormats support outputting higher resolution stills than their streaming resolution (See AVCaptureDeviceFormat.highResolutionStillImageDimensions). Under some conditions, AVCaptureSession needs to set up the photo render pipeline differently to support high resolution still image capture. If you intend to take high resolution still images at all, you should set this property to YES before calling -[AVCaptureSession startRunning]. Once you've opted in for high resolution capture, you are free to issue photo capture requests with or without highResolutionCaptureEnabled in the AVCapturePhotoSettings. If you have not set this property to YES and call capturePhotoWithSettings:delegate: with settings.highResolutionCaptureEnabled set to YES, an NSInvalidArgumentException will be thrown.
        #[deprecated = "Use maxPhotoDimensions instead."]
        #[unsafe(method(isHighResolutionCaptureEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isHighResolutionCaptureEnabled(&self) -> bool;

        /// Setter for [`isHighResolutionCaptureEnabled`][Self::isHighResolutionCaptureEnabled].
        #[deprecated = "Use maxPhotoDimensions instead."]
        #[unsafe(method(setHighResolutionCaptureEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHighResolutionCaptureEnabled(&self, high_resolution_capture_enabled: bool);

        #[cfg(feature = "objc2-core-media")]
        /// Indicates the maximum resolution of the requested photo.
        ///
        ///
        /// Set this property to enable requesting of images up to as large as the specified dimensions. Images returned by AVCapturePhotoOutput may be smaller than these dimensions but will never be larger. Once set, images can be requested with any valid maximum photo dimensions by setting AVCapturePhotoSettings.maxPhotoDimensions on a per photo basis. The dimensions set must match one of the dimensions returned by AVCaptureDeviceFormat.supportedMaxPhotoDimensions for the current active format. Changing this property may trigger a lengthy reconfiguration of the capture render pipeline so it is recommended that this is set before calling -[AVCaptureSession startRunning].
        /// Note: When supported, the 24MP setting (5712, 4284) is only serviced as 24MP when opted-in to autoDeferredPhotoDeliveryEnabled.
        #[unsafe(method(maxPhotoDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxPhotoDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// Setter for [`maxPhotoDimensions`][Self::maxPhotoDimensions].
        #[unsafe(method(setMaxPhotoDimensions:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaxPhotoDimensions(&self, max_photo_dimensions: CMVideoDimensions);

        /// Specifies the maximum number of photos that may be taken in a single bracket.
        ///
        ///
        /// AVCapturePhotoOutput can only satisfy a limited number of image requests in a single bracket without exhausting system resources. The maximum number of photos that may be taken in a single bracket depends on the size and format of the images being captured, and consequently may vary with AVCaptureSession -sessionPreset and AVCaptureDevice -activeFormat. Some formats do not support bracketed capture at all, and thus this property may return a value of 0. This read-only property is key-value observable. If you call -capturePhotoWithSettings:delegate: with a bracketedSettings whose count exceeds -maxBracketedCapturePhotoCount, an NSInvalidArgumentException is thrown.
        #[unsafe(method(maxBracketedCapturePhotoCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxBracketedCapturePhotoCount(&self) -> NSUInteger;

        /// Indicates whether the receiver supports lens stabilization during bracketed captures.
        ///
        ///
        /// The AVCapturePhotoBracketSettings lensStabilizationEnabled property may only be set if this property returns YES. Its value may change as the session's -sessionPreset or input device's -activeFormat changes. This read-only property is key-value observable.
        #[unsafe(method(isLensStabilizationDuringBracketedCaptureSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLensStabilizationDuringBracketedCaptureSupported(&self) -> bool;

        /// Indicates whether the receiver supports Live Photo capture.
        ///
        ///
        /// Live Photo capture is only supported for certain AVCaptureSession sessionPresets and AVCaptureDevice activeFormats. When switching cameras or formats this property may change. When this property changes from YES to NO, livePhotoCaptureEnabled also reverts to NO. If you've previously opted in for Live Photo capture and then change configurations, you may need to set livePhotoCaptureEnabled = YES again.
        #[unsafe(method(isLivePhotoCaptureSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLivePhotoCaptureSupported(&self) -> bool;

        /// Indicates whether the receiver is configured for Live Photo capture.
        ///
        ///
        /// Default value is NO. This property may only be set to YES if livePhotoCaptureSupported is YES. Live Photo capture requires a lengthy reconfiguration of the capture render pipeline, so if you intend to do any Live Photo captures at all, you should set livePhotoCaptureEnabled to YES before calling -[AVCaptureSession startRunning].
        #[unsafe(method(isLivePhotoCaptureEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLivePhotoCaptureEnabled(&self) -> bool;

        /// Setter for [`isLivePhotoCaptureEnabled`][Self::isLivePhotoCaptureEnabled].
        #[unsafe(method(setLivePhotoCaptureEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLivePhotoCaptureEnabled(&self, live_photo_capture_enabled: bool);

        /// Indicates whether Live Photo capture is enabled, but currently suspended.
        ///
        ///
        /// This property allows you to cut current Live Photo movie captures short (for instance, if you suddenly need to do something that you don't want to show up in the Live Photo movie, such as take a non Live Photo capture that makes a shutter sound). By default, livePhotoCaptureSuspended is NO. When you set livePhotoCaptureSuspended = YES, any Live Photo movie captures in progress are trimmed to the current time. Likewise, when you toggle livePhotoCaptureSuspended from YES to NO, subsequent Live Photo movie captures will not contain any samples earlier than the time you un-suspended Live Photo capture. Setting this property to YES throws an NSInvalidArgumentException if livePhotoCaptureEnabled is NO. By default, this property resets to NO when the AVCaptureSession stops. This behavior can be prevented by setting preservesLivePhotoCaptureSuspendedOnSessionStop to YES before stopping the session.
        #[unsafe(method(isLivePhotoCaptureSuspended))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLivePhotoCaptureSuspended(&self) -> bool;

        /// Setter for [`isLivePhotoCaptureSuspended`][Self::isLivePhotoCaptureSuspended].
        #[unsafe(method(setLivePhotoCaptureSuspended:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLivePhotoCaptureSuspended(&self, live_photo_capture_suspended: bool);

        /// By default, Live Photo capture is resumed when the session stops. This property allows clients to opt out of this and preserve the value of livePhotoCaptureSuspended.
        ///
        ///
        /// Defaults to NO.
        #[unsafe(method(preservesLivePhotoCaptureSuspendedOnSessionStop))]
        #[unsafe(method_family = none)]
        pub unsafe fn preservesLivePhotoCaptureSuspendedOnSessionStop(&self) -> bool;

        /// Setter for [`preservesLivePhotoCaptureSuspendedOnSessionStop`][Self::preservesLivePhotoCaptureSuspendedOnSessionStop].
        #[unsafe(method(setPreservesLivePhotoCaptureSuspendedOnSessionStop:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPreservesLivePhotoCaptureSuspendedOnSessionStop(
            &self,
            preserves_live_photo_capture_suspended_on_session_stop: bool,
        );

        /// Indicates whether Live Photo movies are trimmed in real time to avoid excessive movement.
        ///
        ///
        /// This property defaults to YES when livePhotoCaptureSupported is YES. Changing this property's value while your session is running will cause a lengthy reconfiguration of the session. You should set livePhotoAutoTrimmingEnabled to YES or NO before calling -[AVCaptureSession startRunning]. When set to YES, Live Photo movies are analyzed in real time and trimmed if there's excessive movement before or after the photo is taken. Nominally, Live Photos are approximately 3 seconds long. With trimming enabled, they may be shorter, depending on movement. This feature prevents common problems such as Live Photo movies containing shoe or pocket shots.
        #[unsafe(method(isLivePhotoAutoTrimmingEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLivePhotoAutoTrimmingEnabled(&self) -> bool;

        /// Setter for [`isLivePhotoAutoTrimmingEnabled`][Self::isLivePhotoAutoTrimmingEnabled].
        #[unsafe(method(setLivePhotoAutoTrimmingEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLivePhotoAutoTrimmingEnabled(
            &self,
            live_photo_auto_trimming_enabled: bool,
        );

        #[cfg(feature = "AVVideoSettings")]
        /// An array of AVVideoCodecKey values that are currently supported by the receiver for use in the movie complement of a Live Photo.
        ///
        ///
        /// Prior to iOS 11, all Live Photo movie video tracks are compressed using H.264. Beginning in iOS 11, you can select the Live Photo movie video compression format using one of the AVVideoCodecKey strings presented in this property. The system's default (preferred) video codec is always presented first in the list. If you've not yet added your receiver to an AVCaptureSession with a video source, no codecs are available. This property is key-value observable.
        #[unsafe(method(availableLivePhotoVideoCodecTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableLivePhotoVideoCodecTypes(
            &self,
        ) -> Retained<NSArray<AVVideoCodecType>>;

        #[cfg(feature = "objc2-core-media")]
        /// A class method that writes a JPEG sample buffer to an NSData in the JPEG file format.
        ///
        ///
        /// Parameter `JPEGSampleBuffer`: A CMSampleBuffer containing JPEG compressed data.
        ///
        /// Parameter `previewPhotoSampleBuffer`: An optional CMSampleBuffer containing pixel buffer image data to be written as a thumbnail image.
        ///
        /// Returns: An NSData containing bits in the JPEG file format. May return nil if the re-packaging process fails.
        ///
        ///
        /// AVCapturePhotoOutput's depecrated -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback delivers JPEG photos to clients as CMSampleBuffers. To re-package these buffers in a data format suitable for writing to a JPEG file, you may call this class method, optionally inserting your own metadata into the JPEG CMSampleBuffer first, and optionally passing a preview image to be written to the JPEG file format as a thumbnail image.
        #[deprecated]
        #[unsafe(method(JPEGPhotoDataRepresentationForJPEGSampleBuffer:previewPhotoSampleBuffer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn JPEGPhotoDataRepresentationForJPEGSampleBuffer_previewPhotoSampleBuffer(
            jpeg_sample_buffer: &CMSampleBuffer,
            preview_photo_sample_buffer: Option<&CMSampleBuffer>,
        ) -> Option<Retained<NSData>>;

        #[cfg(feature = "objc2-core-media")]
        /// A class method that writes a RAW sample buffer to an NSData containing bits in the DNG file format.
        ///
        ///
        /// Parameter `rawSampleBuffer`: A CMSampleBuffer containing Bayer RAW data.
        ///
        /// Parameter `previewPhotoSampleBuffer`: An optional CMSampleBuffer containing pixel buffer image data to be written as a thumbnail image.
        ///
        /// Returns: An NSData containing bits in the DNG file format. May return nil if the re-packaging process fails.
        ///
        ///
        /// AVCapturePhotoOutput's deprecated -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback delivers RAW photos to clients as CMSampleBuffers. To re-package these buffers in a data format suitable for writing to a DNG file, you may call this class method, optionally inserting your own metadata into the RAW CMSampleBuffer first, and optionally passing a preview image to be written to the DNG file format as a thumbnail image. Only RAW images from Apple built-in cameras are supported.
        #[deprecated]
        #[unsafe(method(DNGPhotoDataRepresentationForRawSampleBuffer:previewPhotoSampleBuffer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn DNGPhotoDataRepresentationForRawSampleBuffer_previewPhotoSampleBuffer(
            raw_sample_buffer: &CMSampleBuffer,
            preview_photo_sample_buffer: Option<&CMSampleBuffer>,
        ) -> Option<Retained<NSData>>;

        /// A BOOL value specifying whether content aware distortion correction is supported.
        ///
        ///
        /// The rectilinear model used in optical design and by geometric distortion correction only preserves lines but not area, angles, or distance. Thus the wider the field of view of a lens, the greater the areal distortion at the edges of images. Content aware distortion correction, when enabled, intelligently corrects distortions by taking content into consideration, such as faces near the edges of the image. This property returns YES if the session's current configuration allows photos to be captured with content aware distortion correction. When switching cameras or formats or enabling depth data delivery this property may change. When this property changes from YES to NO, contentAwareDistortionCorrectionEnabled also reverts to NO. This property is key-value observable.
        #[unsafe(method(isContentAwareDistortionCorrectionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isContentAwareDistortionCorrectionSupported(&self) -> bool;

        /// A BOOL value specifying whether the photo render pipeline is set up to perform content aware distortion correction.
        ///
        ///
        /// Default is NO. Set to YES if you wish content aware distortion correction to be performed on your AVCapturePhotos. This property may only be set to YES if contentAwareDistortionCorrectionSupported is YES. Note that warping the photos to preserve more natural looking content may result in a small change in field of view compared to what you see in the AVCaptureVideoPreviewLayer. The amount of field of view lost or gained is content specific and may vary from photo to photo. Enabling this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning].
        #[unsafe(method(isContentAwareDistortionCorrectionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isContentAwareDistortionCorrectionEnabled(&self) -> bool;

        /// Setter for [`isContentAwareDistortionCorrectionEnabled`][Self::isContentAwareDistortionCorrectionEnabled].
        #[unsafe(method(setContentAwareDistortionCorrectionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContentAwareDistortionCorrectionEnabled(
            &self,
            content_aware_distortion_correction_enabled: bool,
        );

        /// A BOOL value specifying whether zero shutter lag is supported.
        ///
        ///
        /// This property returns YES if the session's current configuration allows zero shutter lag. When switching cameras or formats, setting depthDataDeliveryEnabled, or setting virtualDeviceConstituentPhotoDeliveryEnabled this property may change. When this property changes from YES to NO, zeroShutterLagEnabled also reverts to NO. This property is key-value observable.
        #[unsafe(method(isZeroShutterLagSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isZeroShutterLagSupported(&self) -> bool;

        /// A BOOL value specifying whether the output is set up to support zero shutter lag.
        ///
        ///
        /// This property may only be set to YES if zeroShutterLagSupported is YES, otherwise an NSInvalidArgumentException is thrown. For apps linked on or after iOS 17 zero shutter lag is automatically enabled when supported. Enabling zero shutter lag reduces or eliminates shutter lag when using AVCapturePhotoQualityPrioritizationBalanced or Quality at the cost of additional memory usage by the photo output. The timestamp of the AVCapturePhoto may be slightly earlier than when -capturePhotoWithSettings:delegate: was called. To minimize camera shake from the user's tapping gesture it is recommended that -capturePhotoWithSettings:delegate: be called as early as possible when handling the touch down event. Zero shutter lag isn't available when using manual exposure or bracketed capture. Changing this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
        #[unsafe(method(isZeroShutterLagEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isZeroShutterLagEnabled(&self) -> bool;

        /// Setter for [`isZeroShutterLagEnabled`][Self::isZeroShutterLagEnabled].
        #[unsafe(method(setZeroShutterLagEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setZeroShutterLagEnabled(&self, zero_shutter_lag_enabled: bool);

        /// A BOOL value specifying whether responsive capture is supported.
        ///
        ///
        /// Enabling responsive capture increases peak and sustained capture rates, and reduces shutter lag at the cost of additional memory usage by the photo output. This property returns YES if the session's current configuration allows responsive capture. When switching cameras or formats, enabling depth data delivery, or enabling zero shutter lag this property may change. Responsive capture is only supported when zero shutter lag is enabled. When this property changes from YES to NO, responsiveCaptureEnabled also reverts to NO. This property is key-value observable.
        #[unsafe(method(isResponsiveCaptureSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isResponsiveCaptureSupported(&self) -> bool;

        /// A BOOL value specifying whether the photo output is set up to support responsive capture.
        ///
        ///
        /// This property may only be set to YES if responsiveCaptureSupported is YES, otherwise an NSInvalidArgumentException is thrown. When responsiveCaptureEnabled is YES the captureReadiness property should be used to determine whether new capture requests can be serviced in a reasonable time and whether the shutter control should be available to the user. Responsive capture adds buffering between the capture and photo processing stages which allows a new capture to start before processing has completed for the previous capture, so be prepared to handle -captureOutput:willBeginCaptureForResolvedSettings: being called before the -captureOutput:didFinishProcessingPhoto: for the prior requests. Processed photos continue to be delivered in the order they were captured. To minimize camera shake from the user's tapping gesture it is recommended that -capturePhotoWithSettings:delegate: be called as early as possible when handling the touch down event. Enabling responsive capture allows the fast capture prioritization feature to be used, which further increases capture rates and reduces preview and recording disruptions. See the fastCapturePrioritizationEnabled property. When requesting uncompressed output using kCVPixelBufferPixelFormatTypeKey in AVCapturePhotoSetting.format the AVCapturePhoto's pixelBuffer is allocated from a pool with enough capacity for that request only, and overlap between capture and processing is disabled. The client must release the AVCapturePhoto and references to the pixelBuffer before capturing again and the pixelBuffer's IOSurface must also no longer be in use. Changing this property requires a lengthy reconfiguration of the capture render pipeline, so you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
        #[unsafe(method(isResponsiveCaptureEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isResponsiveCaptureEnabled(&self) -> bool;

        /// Setter for [`isResponsiveCaptureEnabled`][Self::isResponsiveCaptureEnabled].
        #[unsafe(method(setResponsiveCaptureEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setResponsiveCaptureEnabled(&self, responsive_capture_enabled: bool);

        /// A value specifying whether the photo output is ready to respond to new capture requests in a timely manner.
        ///
        ///
        /// This property can be key-value observed to enable and disable shutter button UI depending on whether the output is ready to capture, which is especially important when the responsiveCaptureEnabled property is YES. When interacting with AVCapturePhotoOutput on a background queue AVCapturePhotoOutputReadinessCoordinator should instead be used to observe readiness changes and perform UI updates. Capturing only when the output is ready limits the number of requests inflight to minimize shutter lag while maintaining the fastest shot to shot time. When the property returns a value other than Ready the output is not ready to capture and the shutter button should be disabled to prevent the user from initiating new requests. The output continues to accept requests when the captureReadiness property returns a value other than Ready, but the request may not be serviced for a longer period. The visual presentation of the shutter button can be customized based on the readiness value. When the user rapidly taps the shutter button the property may transition to NotReadyMomentarily for a brief period. Although the shutter button should be disabled during this period it is short lived enough that dimming or changing the appearance of the shutter is not recommended as it would be visually distracting to the user. Longer running capture types like flash or captures with AVCapturePhotoQualityPrioritizationQuality may prevent the output from capturing for an extended period, indicated by NotReadyWaitingForCapture or NotReadyWaitingForProcessing, which is appropriate to show by dimming or disabling the shutter button. For NotReadyWaitingForProcessing it is also appropriate to show a spinner or other indication that the shutter is busy.
        #[unsafe(method(captureReadiness))]
        #[unsafe(method_family = none)]
        pub unsafe fn captureReadiness(&self) -> AVCapturePhotoOutputCaptureReadiness;

        /// A BOOL value specifying whether constant color capture is supported.
        ///
        ///
        /// An object's color in a photograph is affected by the light sources illuminating the scene, so the color of the same object photographed in warm light might look markedly different than in colder light. In some use cases, such ambient light induced color variation is undesirable, and the user may prefer an estimate of what these materials would look like under a standard light such as daylight (D65), regardless of the lighting conditions at the time the photograph was taken. Some devices are capable of producing such constant color photos.
        ///
        /// Constant color captures require the flash to be fired and may require pre-flash sequence to determine the correct focus and exposure, therefore it might take several seconds to acquire a constant color photo. Due to this flash requirement, a constant color capture can only be taken with AVCaptureFlashModeAuto or AVCaptureFlashModeOn as the flash mode, otherwise an exception is thrown.
        ///
        /// Constant color can only be achieved when the flash has a discernible effect on the scene so it may not perform well in bright conditions such as direct sunlight. Use the constantColorConfidenceMap property to examine the confidence level, and therefore the usefulness, of each region of a constant color photo.
        ///
        /// Constant color should not be used in conjunction with locked or manual white balance.
        ///
        /// This property returns YES if the session's current configuration allows photos to be captured with constant color. When switching cameras or formats this property may change. When this property changes from YES to NO, constantColorEnabled also reverts to NO. If you've previously opted in for constant color and then change configurations, you may need to set constantColorEnabled = YES again. This property is key-value observable.
        #[unsafe(method(isConstantColorSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isConstantColorSupported(&self) -> bool;

        /// A BOOL value specifying whether the photo render pipeline is set up to perform constant color captures.
        ///
        ///
        /// Default is NO. Set to YES to enable support for taking constant color photos. This property may only be set to YES if constantColorSupported is YES. Enabling constant color requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture constant color photos, you should set this property to YES before calling -[AVCaptureSession startRunning] or within -[AVCaptureSession beginConfiguration] and -[AVCaptureSession commitConfiguration] while running.
        #[unsafe(method(isConstantColorEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isConstantColorEnabled(&self) -> bool;

        /// Setter for [`isConstantColorEnabled`][Self::isConstantColorEnabled].
        #[unsafe(method(setConstantColorEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConstantColorEnabled(&self, constant_color_enabled: bool);

        /// Specifies whether suppressing the shutter sound is supported.
        ///
        ///
        /// On iOS, this property returns NO in jurisdictions where shutter sound production cannot be disabled. On all other platforms, it always returns NO.
        #[unsafe(method(isShutterSoundSuppressionSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isShutterSoundSuppressionSupported(&self) -> bool;

        /// A read-only BOOL value indicating whether still image buffers may be rotated to match the sensor orientation of earlier generation hardware.
        ///
        /// Value is YES for camera configurations which support compensation for the sensor orientation, which is applied to HEIC, JPEG, and uncompressed processed photos only; compensation is never applied to Bayer RAW or Apple ProRaw captures.
        #[unsafe(method(isCameraSensorOrientationCompensationSupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isCameraSensorOrientationCompensationSupported(&self) -> bool;

        /// A BOOL value indicating that still image buffers will be rotated to match the sensor orientation of earlier generation hardware.
        ///
        /// Default is YES when cameraSensorOrientationCompensationSupported is YES. Set to NO if your app does not require sensor orientation compensation.
        #[unsafe(method(isCameraSensorOrientationCompensationEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isCameraSensorOrientationCompensationEnabled(&self) -> bool;

        /// Setter for [`isCameraSensorOrientationCompensationEnabled`][Self::isCameraSensorOrientationCompensationEnabled].
        #[unsafe(method(setCameraSensorOrientationCompensationEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCameraSensorOrientationCompensationEnabled(
            &self,
            camera_sensor_orientation_compensation_enabled: bool,
        );
    );
}

extern_class!(
    /// AVCapturePhotoOutputReadinessCoordinator notifies its delegate of changes in an AVCapturePhotoOutput's captureReadiness property and can be used to coordinate UI updates on the main queue with use of AVCapturePhotoOutput on a background queue.
    ///
    ///
    /// AVCapturePhotoOutputReadinessCoordinator tracks its output's captureReadiness and incorporates additional requests registered via -startTrackingCaptureRequestUsingPhotoSettings:. This allows clients to synchronously update shutter button availability and appearance and on the main thread while calling -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] asynchronously on a background queue.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutputreadinesscoordinator?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCapturePhotoOutputReadinessCoordinator;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCapturePhotoOutputReadinessCoordinator {}
);

impl AVCapturePhotoOutputReadinessCoordinator {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[cfg(feature = "AVCaptureOutputBase")]
        #[unsafe(method(initWithPhotoOutput:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithPhotoOutput(
            this: Allocated<Self>,
            photo_output: &AVCapturePhotoOutput,
        ) -> Retained<Self>;

        /// The receiver's delegate, called on the main queue.
        ///
        ///
        /// The value of this property is an object conforming to the AVCapturePhotoOutputReadinessCoordinatorDelegate protocol that will receive a callback when the captureReadiness property changes. Callbacks are delivered on the main queue, allowing UI updates to be done directly in the callback. A callback with the initial value of captureReadiness is delivered when delegate is set.
        #[unsafe(method(delegate))]
        #[unsafe(method_family = none)]
        pub unsafe fn delegate(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn AVCapturePhotoOutputReadinessCoordinatorDelegate>>>;

        /// Setter for [`delegate`][Self::delegate].
        ///
        /// This is a [weak property][objc2::topics::weak_property].
        #[unsafe(method(setDelegate:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDelegate(
            &self,
            delegate: Option<&ProtocolObject<dyn AVCapturePhotoOutputReadinessCoordinatorDelegate>>,
        );

        /// A value specifying whether the coordinator's photo output is ready to respond to new capture requests in a timely manner.
        ///
        ///
        /// The value incorporates the photo output's captureReadiness and any requests registered using -startTrackingCaptureRequestUsingPhotoSettings:. The value is updated before calling the -readinessCoordinator:captureReadinessDidChange: callback. See AVCapturePhotoOutput's captureReadiness documentation for a discussion of how to update shutter availability and appearance based on the captureReadiness value. This property is key-value observable and all change notifications are delivered on the main queue, allowing UI updates to be done directly in the callback.
        #[unsafe(method(captureReadiness))]
        #[unsafe(method_family = none)]
        pub unsafe fn captureReadiness(&self) -> AVCapturePhotoOutputCaptureReadiness;

        /// Track the capture request represented by the specified photo settings until it is enqueued to the photo output and update captureReadiness to include this request.
        ///
        ///
        /// Parameter `settings`: The AVCapturePhotoSettings which will be passed to -[AVCapturePhotoOutput capturePhotoWithSettings:delegate] for this capture request.
        ///
        ///
        /// The captureReadiness property is updated to include the tracked request until the the photo output receives a settings object with the same or a newer uniqueID. It is recommended that the same photo settings be passed to -[AVCapturePhotoOutput capturePhotoWithSettings:delegate] to ensure the captureReadiness value is consistent once the capture begins. When called on the main queue the delegate callback is invoked synchronously before returning to ensure shutter availability is updated immediately and prevent queued touch events from initiating unwanted captures. The -startTrackingCaptureRequestUsingPhotoSettings: method can be called while in the SessionNotRunning state to allow the shutter button to be interactive while the session is being started on a background queue. An NSInvalidArgumentException is thrown if the photo settings are invalid.
        #[unsafe(method(startTrackingCaptureRequestUsingPhotoSettings:))]
        #[unsafe(method_family = none)]
        pub unsafe fn startTrackingCaptureRequestUsingPhotoSettings(
            &self,
            settings: &AVCapturePhotoSettings,
        );

        /// Stop tracking the capture request represented by the specified photo settings uniqueID and update captureReadiness to no longer include this request.
        ///
        ///
        /// Parameter `settingsUniqueID`: The AVCapturePhotoSettings.uniqueID of the settings passed to -startTrackingCaptureRequestUsingPhotoSettings:.
        ///
        ///
        /// Tracking automatically stops when -[AVCapturePhotoOutput capturePhotoWithSettings:delegate] is called with a photo settings objects with the same or a newer uniqueID, but in cases where an error or other condition prevents calling -capturePhotoWithSettings:delegate tracking should be explicitly stopped to ensure the captureReadiness value is up to date. When called on the main queue the delegate callback is invoked synchronously before returning to ensure shutter availability is updated immediately.
        #[unsafe(method(stopTrackingCaptureRequestUsingPhotoSettingsUniqueID:))]
        #[unsafe(method_family = none)]
        pub unsafe fn stopTrackingCaptureRequestUsingPhotoSettingsUniqueID(
            &self,
            settings_unique_id: i64,
        );
    );
}

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotooutputreadinesscoordinatordelegate?language=objc)
    pub unsafe trait AVCapturePhotoOutputReadinessCoordinatorDelegate:
        NSObjectProtocol
    {
        /// A callback delivered on the main queue whenever the captureReadiness property changes.
        ///
        ///
        /// Parameter `coordinator`: The calling instance of AVCapturePhotoOutputReadinessCoordinator.
        ///
        /// Parameter `captureReadiness`: The updated captureReadiness value which can be used to update shutter button availability and appearance.
        ///
        ///
        /// This callback is always delivered on the main queue and is suitable for updating shutter button availability and appearance.
        #[optional]
        #[unsafe(method(readinessCoordinator:captureReadinessDidChange:))]
        #[unsafe(method_family = none)]
        unsafe fn readinessCoordinator_captureReadinessDidChange(
            &self,
            coordinator: &AVCapturePhotoOutputReadinessCoordinator,
            capture_readiness: AVCapturePhotoOutputCaptureReadiness,
        );
    }
);

/// AVCapturePhotoOutputDepthDataDeliverySupport.
#[cfg(feature = "AVCaptureOutputBase")]
impl AVCapturePhotoOutput {
    extern_methods!(
        /// A BOOL value specifying whether depth data delivery is supported.
        ///
        ///
        /// Some cameras and configurations support the delivery of depth data (e.g. disparity maps) along with the photo. This property returns YES if the session's current configuration allows photos to be captured with depth data, from which depth-related filters may be applied. When switching cameras or formats this property may change. When this property changes from YES to NO, depthDataDeliveryEnabled also reverts to NO. If you've previously opted in for depth data delivery and then change configurations, you may need to set depthDataDeliveryEnabled = YES again. This property is key-value observable.
        #[unsafe(method(isDepthDataDeliverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDepthDataDeliverySupported(&self) -> bool;

        /// A BOOL specifying whether the photo render pipeline is prepared for depth data delivery.
        ///
        ///
        /// Default is NO. Set to YES if you wish depth data to be delivered with your AVCapturePhotos. This property may only be set to YES if depthDataDeliverySupported is YES. Enabling depth data delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture depth data, you should set this property to YES before calling -[AVCaptureSession startRunning].
        #[unsafe(method(isDepthDataDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDepthDataDeliveryEnabled(&self) -> bool;

        /// Setter for [`isDepthDataDeliveryEnabled`][Self::isDepthDataDeliveryEnabled].
        #[unsafe(method(setDepthDataDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDepthDataDeliveryEnabled(&self, depth_data_delivery_enabled: bool);

        /// A BOOL value specifying whether portrait effects matte delivery is supported.
        ///
        ///
        /// Some cameras and configurations support the delivery of a matting image to augment depth data and aid in high quality portrait effect rendering (see AVPortraitEffectsMatte.h). This property returns YES if the session's current configuration allows photos to be captured with a portrait effects matte. When switching cameras or formats this property may change. When this property changes from YES to NO, portraitEffectsMatteDeliveryEnabled also reverts to NO. If you've previously opted in for portrait effects matte delivery and then change configurations, you may need to set portraitEffectsMatteDeliveryEnabled = YES again. This property is key-value observable.
        #[unsafe(method(isPortraitEffectsMatteDeliverySupported))]
        #[unsafe(method_family = none)]
        pub unsafe fn isPortraitEffectsMatteDeliverySupported(&self) -> bool;

        /// A BOOL specifying whether the photo render pipeline is prepared for portrait effects matte delivery.
        ///
        ///
        /// Default is NO. Set to YES if you wish portrait effects mattes to be delivered with your AVCapturePhotos. This property may only be set to YES if portraitEffectsMatteDeliverySupported is YES. Portrait effects matte generation requires depth to be present, so when enabling portrait effects matte delivery, you must also set depthDataDeliveryEnabled to YES. Enabling portrait effects matte delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture portrait effects mattes, you should set this property to YES before calling -[AVCaptureSession startRunning].
        #[unsafe(method(isPortraitEffectsMatteDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isPortraitEffectsMatteDeliveryEnabled(&self) -> bool;

        /// Setter for [`isPortraitEffectsMatteDeliveryEnabled`][Self::isPortraitEffectsMatteDeliveryEnabled].
        #[unsafe(method(setPortraitEffectsMatteDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPortraitEffectsMatteDeliveryEnabled(
            &self,
            portrait_effects_matte_delivery_enabled: bool,
        );

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// An array of supported semantic segmentation matte types that may be captured and delivered along with your AVCapturePhotos.
        ///
        ///
        /// Some cameras and configurations support the delivery of semantic segmentation matting images (e.g. segmentations of the hair, skin, or teeth in the photo). This property returns an array of AVSemanticSegmentationMatteTypes available given the session's current configuration. When switching cameras or formats this property may change. When this property changes, enabledSemanticSegmentationMatteTypes reverts to an empty array. If you've previously opted in for delivery of one or more semantic segmentation mattes and then change configurations, you need to set up your enabledSemanticSegmentationMatteTypes again. This property is key-value observable.
        #[unsafe(method(availableSemanticSegmentationMatteTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableSemanticSegmentationMatteTypes(
            &self,
        ) -> Retained<NSArray<AVSemanticSegmentationMatteType>>;

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// An array of semantic segmentation matte types which the photo render pipeline is prepared to deliver.
        ///
        ///
        /// Default is empty array. You may set this to the array of matte types you'd like to be delivered with your AVCapturePhotos. The array may only contain values present in availableSemanticSegmentationMatteTypes. Enabling semantic segmentation matte delivery requires a lengthy reconfiguration of the capture render pipeline, so if you intend to capture semantic segmentation mattes, you should set this property to YES before calling -[AVCaptureSession startRunning].
        #[unsafe(method(enabledSemanticSegmentationMatteTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn enabledSemanticSegmentationMatteTypes(
            &self,
        ) -> Retained<NSArray<AVSemanticSegmentationMatteType>>;

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// Setter for [`enabledSemanticSegmentationMatteTypes`][Self::enabledSemanticSegmentationMatteTypes].
        #[unsafe(method(setEnabledSemanticSegmentationMatteTypes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEnabledSemanticSegmentationMatteTypes(
            &self,
            enabled_semantic_segmentation_matte_types: &NSArray<AVSemanticSegmentationMatteType>,
        );
    );
}

extern_protocol!(
    /// A set of delegate callbacks to be implemented by a client who calls AVCapturePhotoOutput's -capturePhotoWithSettings:delegate.
    ///
    ///
    /// AVCapturePhotoOutput invokes the AVCapturePhotoCaptureDelegate callbacks on a common dispatch queue — not necessarily the main queue. While the -captureOutput:willBeginCaptureForResolvedSettings: callback always comes first and the -captureOutput:didFinishCaptureForResolvedSettings: callback always comes last, none of the other callbacks can be assumed to come in any particular order. The AVCaptureResolvedPhotoSettings instance passed to the client with each callback has the same uniqueID as the AVCapturePhotoSettings instance passed in -capturePhotoWithSettings:delegate:. All callbacks are marked optional, but depending on the features you've specified in your AVCapturePhotoSettings, some callbacks become mandatory and are validated in -capturePhotoWithSettings:delegate:. If your delegate does not implement the mandatory callbacks, an NSInvalidArgumentException is thrown.
    ///
    /// - If you initialize your photo settings with a format dictionary, or use one of the default constructors (that is, if you're not requesting a RAW-only capture), your delegate must respond to either - captureOutput:didFinishProcessingPhoto:error: or the deprecated -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:. If your delegate responds to both of these callbacks, only the undeprecated variant will be called.
    /// - If you initialize your photo settings with a rawPhotoPixelFormatType, your delegate must respond to either -captureOutput:didFinishProcessingPhoto:error: or the deprecated -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:. If your delegate responds to both of these callbacks, only the undeprecated variant will be called.
    /// - If you set livePhotoMovieFileURL to non-nil, your delegate must respond to -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:.
    ///
    /// In the event of an error, all expected callbacks are fired with an appropriate error.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotocapturedelegate?language=objc)
    pub unsafe trait AVCapturePhotoCaptureDelegate: NSObjectProtocol {
        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired as soon as the capture settings have been resolved.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        ///
        /// This callback is always delivered first for a particular capture request. It is delivered as soon as possible after you call -capturePhotoWithSettings:delegate:, so you can know what to expect in the remainder of your callbacks.
        #[optional]
        #[unsafe(method(captureOutput:willBeginCaptureForResolvedSettings:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_willBeginCaptureForResolvedSettings(
            &self,
            output: &AVCapturePhotoOutput,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
        );

        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired just as the photo is being taken.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        ///
        /// The timing of this callback is analogous to AVCaptureStillImageOutput's capturingStillImage property changing from NO to YES. The callback is delivered right after the shutter sound is heard (note that shutter sounds are suppressed when Live Photos are being captured).
        #[optional]
        #[unsafe(method(captureOutput:willCapturePhotoForResolvedSettings:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_willCapturePhotoForResolvedSettings(
            &self,
            output: &AVCapturePhotoOutput,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
        );

        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired just after the photo is taken.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        ///
        /// The timing of this callback is analogous to AVCaptureStillImageOutput's capturingStillImage property changing from YES to NO.
        #[optional]
        #[unsafe(method(captureOutput:didCapturePhotoForResolvedSettings:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didCapturePhotoForResolvedSettings(
            &self,
            output: &AVCapturePhotoOutput,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
        );

        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired when photos are ready to be delivered to you (RAW or processed).
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `photo`: An instance of AVCapturePhoto.
        ///
        /// Parameter `error`: An error indicating what went wrong. If the photo was processed successfully, nil is returned.
        ///
        ///
        /// This callback fires resolvedSettings.expectedPhotoCount number of times for a given capture request. Note that the photo parameter is always non nil, even if an error is returned. The delivered AVCapturePhoto's rawPhoto property can be queried to know if it's a RAW image or processed image.
        #[optional]
        #[unsafe(method(captureOutput:didFinishProcessingPhoto:error:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishProcessingPhoto_error(
            &self,
            output: &AVCapturePhotoOutput,
            photo: &AVCapturePhoto,
            error: Option<&NSError>,
        );

        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired just after the photo proxy has been taken.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `deferredPhotoProxy`: The AVCaptureDeferredPhotoProxy instance which contains a proxy CVPixelBuffer as a placeholder for the final image.  The fileDataRepresentation from this object may be used with PHAssetCreation to eventually produce the final, processed photo into the user's Photo Library.  The in-memory proxy fileDataRepresentation should be added to the photo library as quickly as possible after receipt to ensure that the photo library can begin background processing and also so that the intermediates are not removed by a periodic clean-up job looking for abandoned intermediates produced by using the deferred photo processing APIs.
        ///
        ///
        /// Parameter `error`: An error indicating what went wrong if the photo proxy or any of the underlying intermediate files couldn't be created.
        ///
        ///
        /// Delegates are required to implement this method if they opt in for deferred photo processing, otherwise an NSInvalidArgumentException will be thrown from the -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] method.
        #[optional]
        #[unsafe(method(captureOutput:didFinishCapturingDeferredPhotoProxy:error:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishCapturingDeferredPhotoProxy_error(
            &self,
            output: &AVCapturePhotoOutput,
            deferred_photo_proxy: Option<&AVCaptureDeferredPhotoProxy>,
            error: Option<&NSError>,
        );

        #[cfg(all(
            feature = "AVCaptureOutputBase",
            feature = "AVCaptureStillImageOutput",
            feature = "objc2-core-media"
        ))]
        /// A callback fired when the primary processed photo or photos are done.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `photoSampleBuffer`: A CMSampleBuffer containing an uncompressed pixel buffer or compressed data, along with timing information and metadata. May be nil if there was an error.
        ///
        /// Parameter `previewPhotoSampleBuffer`: An optional CMSampleBuffer containing an uncompressed, down-scaled preview pixel buffer. Note that the preview sample buffer contains no metadata. Refer to the photoSampleBuffer for metadata (e.g., the orientation). May be nil.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        /// Parameter `bracketSettings`: If this image is being delivered as part of a bracketed capture, the bracketSettings corresponding to this image. Otherwise nil.
        ///
        /// Parameter `error`: An error indicating what went wrong if photoSampleBuffer is nil.
        ///
        ///
        /// If you've requested a single processed image (uncompressed or compressed) capture, the photo is delivered here. If you've requested a bracketed capture, this callback is fired bracketedSettings.count times (once for each photo in the bracket).
        #[deprecated]
        #[optional]
        #[unsafe(method(captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishProcessingPhotoSampleBuffer_previewPhotoSampleBuffer_resolvedSettings_bracketSettings_error(
            &self,
            output: &AVCapturePhotoOutput,
            photo_sample_buffer: Option<&CMSampleBuffer>,
            preview_photo_sample_buffer: Option<&CMSampleBuffer>,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
            bracket_settings: Option<&AVCaptureBracketedStillImageSettings>,
            error: Option<&NSError>,
        );

        #[cfg(all(
            feature = "AVCaptureOutputBase",
            feature = "AVCaptureStillImageOutput",
            feature = "objc2-core-media"
        ))]
        /// A callback fired when the RAW photo or photos are done.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `rawSampleBuffer`: A CMSampleBuffer containing Bayer RAW pixel data, along with timing information and metadata. May be nil if there was an error.
        ///
        /// Parameter `previewPhotoSampleBuffer`: An optional CMSampleBuffer containing an uncompressed, down-scaled preview pixel buffer. Note that the preview sample buffer contains no metadata. Refer to the rawSampleBuffer for metadata (e.g., the orientation). May be nil.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        /// Parameter `bracketSettings`: If this image is being delivered as part of a bracketed capture, the bracketSettings corresponding to this image. Otherwise nil.
        ///
        /// Parameter `error`: An error indicating what went wrong if rawSampleBuffer is nil.
        ///
        ///
        /// Single RAW image and bracketed RAW photos are delivered here. If you've requested a RAW bracketed capture, this callback is fired bracketedSettings.count times (once for each photo in the bracket).
        #[deprecated]
        #[optional]
        #[unsafe(method(captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishProcessingRawPhotoSampleBuffer_previewPhotoSampleBuffer_resolvedSettings_bracketSettings_error(
            &self,
            output: &AVCapturePhotoOutput,
            raw_sample_buffer: Option<&CMSampleBuffer>,
            preview_photo_sample_buffer: Option<&CMSampleBuffer>,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
            bracket_settings: Option<&AVCaptureBracketedStillImageSettings>,
            error: Option<&NSError>,
        );

        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired when the Live Photo movie has captured all its media data, though all media has not yet been written to file.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `outputFileURL`: The URL to which the movie file will be written. This URL is equal to your AVCapturePhotoSettings.livePhotoMovieURL.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        ///
        /// When this callback fires, no new media is being written to the file. If you are displaying a "Live" badge, this is an appropriate time to dismiss it. The movie file itself is not done being written until the -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error: callback fires.
        #[optional]
        #[unsafe(method(captureOutput:didFinishRecordingLivePhotoMovieForEventualFileAtURL:resolvedSettings:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishRecordingLivePhotoMovieForEventualFileAtURL_resolvedSettings(
            &self,
            output: &AVCapturePhotoOutput,
            output_file_url: &NSURL,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
        );

        #[cfg(all(feature = "AVCaptureOutputBase", feature = "objc2-core-media"))]
        /// A callback fired when the Live Photo movie is finished being written to disk.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `outputFileURL`: The URL where the movie file resides. This URL is equal to your AVCapturePhotoSettings.livePhotoMovieURL.
        ///
        /// Parameter `duration`: A CMTime indicating the duration of the movie file.
        ///
        /// Parameter `photoDisplayTime`: A CMTime indicating the time in the movie at which the still photo should be displayed.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features have been selected.
        ///
        /// Parameter `error`: An error indicating what went wrong if the outputFileURL is damaged.
        ///
        ///
        /// When this callback fires, the movie on disk is fully finished and ready for consumption.
        #[optional]
        #[unsafe(method(captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishProcessingLivePhotoToMovieFileAtURL_duration_photoDisplayTime_resolvedSettings_error(
            &self,
            output: &AVCapturePhotoOutput,
            output_file_url: &NSURL,
            duration: CMTime,
            photo_display_time: CMTime,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
            error: Option<&NSError>,
        );

        #[cfg(feature = "AVCaptureOutputBase")]
        /// A callback fired when the photo capture is completed and no more callbacks will be fired.
        ///
        ///
        /// Parameter `output`: The calling instance of AVCapturePhotoOutput.
        ///
        /// Parameter `resolvedSettings`: An instance of AVCaptureResolvedPhotoSettings indicating which capture features were selected.
        ///
        /// Parameter `error`: An error indicating whether the capture was unsuccessful. Nil if there were no problems.
        ///
        ///
        /// This callback always fires last and when it does, you may clean up any state relating to this photo capture.
        #[optional]
        #[unsafe(method(captureOutput:didFinishCaptureForResolvedSettings:error:))]
        #[unsafe(method_family = none)]
        unsafe fn captureOutput_didFinishCaptureForResolvedSettings_error(
            &self,
            output: &AVCapturePhotoOutput,
            resolved_settings: &AVCaptureResolvedPhotoSettings,
            error: Option<&NSError>,
        );
    }
);

extern_class!(
    /// A mutable settings object encapsulating all the desired properties of a photo capture.
    ///
    ///
    /// To take a picture, a client instantiates and configures an AVCapturePhotoSettings object, then calls AVCapturePhotoOutput's -capturePhotoWithSettings:delegate:, passing the settings and a delegate to be informed when events relating to the photo capture occur. Since AVCapturePhotoSettings has no reference to the AVCapturePhotoOutput instance with which it will be used, minimal validation occurs while you configure an AVCapturePhotoSettings instance. The bulk of the validation is executed when you call AVCapturePhotoOutput's -capturePhotoWithSettings:delegate:.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotosettings?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCapturePhotoSettings;
);

extern_conformance!(
    unsafe impl NSCopying for AVCapturePhotoSettings {}
);

unsafe impl CopyingHelper for AVCapturePhotoSettings {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCapturePhotoSettings {}
);

impl AVCapturePhotoSettings {
    extern_methods!(
        /// Creates a default instance of AVCapturePhotoSettings.
        ///
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// A default AVCapturePhotoSettings object has a format of AVVideoCodecTypeJPEG, a fileType of AVFileTypeJPEG, and photoQualityPrioritization set to AVCapturePhotoQualityPrioritizationBalanced.
        #[unsafe(method(photoSettings))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettings() -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings with a user-specified output format.
        ///
        ///
        /// Parameter `format`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil format dictionary is analogous to calling +photoSettings.
        ///
        /// # Safety
        ///
        /// `format` generic should be of the correct type.
        #[unsafe(method(photoSettingsWithFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithFormat(
            format: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings specifying RAW only output.
        ///
        ///
        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        #[unsafe(method(photoSettingsWithRawPixelFormatType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithRawPixelFormatType(
            raw_pixel_format_type: OSType,
        ) -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG).
        ///
        ///
        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
        ///
        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil processedFormat dictionary is analogous to calling +photoSettingsWithRawPixelFormatType:. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        ///
        /// # Safety
        ///
        /// `processed_format` generic should be of the correct type.
        #[unsafe(method(photoSettingsWithRawPixelFormatType:processedFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithRawPixelFormatType_processedFormat(
            raw_pixel_format_type: OSType,
            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Retained<Self>;

        #[cfg(feature = "AVMediaFormat")]
        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG) and a file container to which it will be written.
        ///
        ///
        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h). Pass 0 if you do not desire a RAW photo callback.
        ///
        /// Parameter `rawFileType`: The file container for which the RAW image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
        ///
        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. Pass nil if you do not desire a processed photo callback.
        ///
        /// Parameter `processedFileType`: The file container for which the processed image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. Set rawPixelFormatType to 0 if you do not desire a RAW photo callback. If you are specifying a rawFileType, it must be present in AVCapturePhotoOutput's -availableRawPhotoFileTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you are specifying a processedFileType (such as AVFileTypeJPEG, AVFileTypeHEIC or AVFileTypeDICOM), it must be present in AVCapturePhotoOutput's -availablePhotoFileTypes array. Pass a nil processedFormat dictionary if you only desire a RAW photo capture. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        ///
        /// # Safety
        ///
        /// `processed_format` generic should be of the correct type.
        #[unsafe(method(photoSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithRawPixelFormatType_rawFileType_processedFormat_processedFileType(
            raw_pixel_format_type: OSType,
            raw_file_type: Option<&AVFileType>,
            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
            processed_file_type: Option<&AVFileType>,
        ) -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings with a new uniqueID from an existing instance of AVCapturePhotoSettings.
        ///
        ///
        /// Parameter `photoSettings`: An existing AVCapturePhotoSettings instance.
        ///
        /// Returns: An new instance of AVCapturePhotoSettings with new uniqueID.
        ///
        ///
        /// Use this factory method to create a clone of an existing photo settings instance, but with a new uniqueID that can safely be passed to AVCapturePhotoOutput -capturePhotoWithSettings:delegate:.
        #[unsafe(method(photoSettingsFromPhotoSettings:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsFromPhotoSettings(
            photo_settings: &AVCapturePhotoSettings,
        ) -> Retained<Self>;

        /// A 64-bit number that uniquely identifies this instance.
        ///
        ///
        /// When you create an instance of AVCapturePhotoSettings, a uniqueID is generated automatically. This uniqueID is guaranteed to be unique for the life time of your process.
        #[unsafe(method(uniqueID))]
        #[unsafe(method_family = none)]
        pub unsafe fn uniqueID(&self) -> i64;

        /// A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
        ///
        ///
        /// The format dictionary you passed to one of the creation methods. May be nil if you've specified RAW-only capture.
        #[unsafe(method(format))]
        #[unsafe(method_family = none)]
        pub unsafe fn format(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        /// A dictionary of AVVideoSettings keys specifying the RAW file format to be used for the RAW photo.
        ///
        /// One can specify desired format properties of the RAW file that will be created. Currently only the key AVVideoAppleProRAWBitDepthKey is allowed and the value to which it can be set should be from 8-16.  The AVVideoCodecKey must be present in the receiver's -availableRawPhotoCodecTypes array as well as in -supportedRawPhotoCodecTypesForRawPhotoPixelFormatType:fileType:. AVVideoQualityKey (NSNumber in range [0.0,1.0]) can be optionally set and a value between [0.0,1.0] will use lossy compression with lower values being more lossy resulting in smaller file sizes but lower image quality, while a value of 1.0 will use lossless compression resulting in the largest file size but also the best quality.
        #[unsafe(method(rawFileFormat))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawFileFormat(&self) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        /// Setter for [`rawFileFormat`][Self::rawFileFormat].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `raw_file_format` generic should be of the correct type.
        #[unsafe(method(setRawFileFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRawFileFormat(
            &self,
            raw_file_format: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "AVMediaFormat")]
        /// The file container for which the processed photo is formatted to be stored.
        ///
        ///
        /// The formatting of data within a photo buffer is often dependent on the file format intended for storage. For instance, a JPEG encoded photo buffer intended for storage in a JPEG (JPEG File Interchange Format) file differs from JPEG to be stored in HEIF. The HEIF-containerized JPEG buffer is tiled for readback efficiency and partitioned into the box structure dictated by the HEIF file format. Some codecs are only supported by AVCapturePhotoOutput if containerized. For instance, the AVVideoCodecTypeHEVC is only supported with AVFileTypeHEIF and AVFileTypeHEIC formatting. To discover which photo pixel format types and video codecs are supported for a given file type, you may query AVCapturePhotoOutput's -supportedPhotoPixelFormatTypesForFileType:, or -supportedPhotoCodecTypesForFileType: respectively.
        #[unsafe(method(processedFileType))]
        #[unsafe(method_family = none)]
        pub unsafe fn processedFileType(&self) -> Option<Retained<AVFileType>>;

        /// A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
        ///
        ///
        /// The rawPixelFormatType you specified in one of the creation methods. Returns 0 if you did not specify RAW capture. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        #[unsafe(method(rawPhotoPixelFormatType))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawPhotoPixelFormatType(&self) -> OSType;

        #[cfg(feature = "AVMediaFormat")]
        /// The file container for which the RAW photo is formatted to be stored.
        ///
        ///
        /// The formatting of data within a RAW photo buffer may be dependent on the file format intended for storage. To discover which RAW photo pixel format types are supported for a given file type, you may query AVCapturePhotoOutput's -supportedRawPhotoPixelFormatTypesForFileType:.
        #[unsafe(method(rawFileType))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawFileType(&self) -> Option<Retained<AVFileType>>;

        #[cfg(feature = "AVCaptureDevice")]
        /// Specifies whether the flash should be on, off, or chosen automatically by AVCapturePhotoOutput.
        ///
        ///
        /// flashMode takes the place of the deprecated AVCaptureDevice -flashMode API. Setting AVCaptureDevice.flashMode has no effect on AVCapturePhotoOutput, which only pays attention to the flashMode specified in your AVCapturePhotoSettings. The default value is AVCaptureFlashModeOff. Flash modes are defined in AVCaptureDevice.h. If you specify a flashMode of AVCaptureFlashModeOn, it wins over autoStillImageStabilizationEnabled=YES. When the device becomes very hot, the flash becomes temporarily unavailable until the device cools down (see AVCaptureDevice's -flashAvailable). While the flash is unavailable, AVCapturePhotoOutput's -supportedFlashModes property still reports AVCaptureFlashModeOn and AVCaptureFlashModeAuto as being available, thus allowing you to specify a flashMode of AVCaptureModeOn. You should always check the AVCaptureResolvedPhotoSettings provided to you in the AVCapturePhotoCaptureDelegate callbacks, as the resolved flashEnabled property will tell you definitively if the flash is being used.
        #[unsafe(method(flashMode))]
        #[unsafe(method_family = none)]
        pub unsafe fn flashMode(&self) -> AVCaptureFlashMode;

        #[cfg(feature = "AVCaptureDevice")]
        /// Setter for [`flashMode`][Self::flashMode].
        #[unsafe(method(setFlashMode:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setFlashMode(&self, flash_mode: AVCaptureFlashMode);

        /// Specifies whether red-eye reduction should be applied automatically on flash captures.
        ///
        ///
        /// Default is YES on platforms that support automatic red-eye reduction unless you are capturing a bracket using AVCapturePhotoBracketSettings or a RAW photo without a processed photo.  For RAW photos with a processed photo the red-eye reduction will be applied to the processed photo only (RAW photos by definition are not processed). When set to YES, red-eye reduction is applied as needed for flash captures if the photo output's autoRedEyeReductionSupported property returns YES.
        #[unsafe(method(isAutoRedEyeReductionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoRedEyeReductionEnabled(&self) -> bool;

        /// Setter for [`isAutoRedEyeReductionEnabled`][Self::isAutoRedEyeReductionEnabled].
        #[unsafe(method(setAutoRedEyeReductionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutoRedEyeReductionEnabled(&self, auto_red_eye_reduction_enabled: bool);

        /// Indicates how photo quality should be prioritized against speed of photo delivery.
        ///
        ///
        /// Default value is AVCapturePhotoQualityPrioritizationBalanced. The AVCapturePhotoOutput is capable of applying a variety of techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), depending on the source device's activeFormat. Some of these techniques can take significant processing time before the photo is returned to your delegate callback. The photoQualityPrioritization property allows you to specify your preferred quality vs speed of delivery. By default, speed and quality are considered to be of equal importance. When you specify AVCapturePhotoQualityPrioritizationSpeed, you indicate that speed should be prioritized at the expense of quality. Likewise, when you choose AVCapturePhotoQualityPrioritizationQuality, you signal your willingness to prioritize the very best quality at the expense of speed, and your readiness to wait (perhaps significantly) longer for the photo to be returned to your delegate.
        #[unsafe(method(photoQualityPrioritization))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoQualityPrioritization(&self) -> AVCapturePhotoQualityPrioritization;

        /// Setter for [`photoQualityPrioritization`][Self::photoQualityPrioritization].
        #[unsafe(method(setPhotoQualityPrioritization:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPhotoQualityPrioritization(
            &self,
            photo_quality_prioritization: AVCapturePhotoQualityPrioritization,
        );

        /// Specifies whether still image stabilization should be used automatically.
        ///
        ///
        /// Default is YES unless you are capturing a Bayer RAW photo (Bayer RAW photos may not be processed by definition) or a bracket using AVCapturePhotoBracketSettings. When set to YES, still image stabilization is applied automatically in low light to counteract hand shake. If the device has optical image stabilization, autoStillImageStabilizationEnabled makes use of lens stabilization as well.
        ///
        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -photoQualityPrioritization to indicate your preferred quality vs speed.
        #[deprecated]
        #[unsafe(method(isAutoStillImageStabilizationEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoStillImageStabilizationEnabled(&self) -> bool;

        /// Setter for [`isAutoStillImageStabilizationEnabled`][Self::isAutoStillImageStabilizationEnabled].
        #[deprecated]
        #[unsafe(method(setAutoStillImageStabilizationEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutoStillImageStabilizationEnabled(
            &self,
            auto_still_image_stabilization_enabled: bool,
        );

        /// Specifies whether virtual device image fusion should be used automatically.
        ///
        ///
        /// Default is YES unless you are capturing a RAW photo (RAW photos may not be processed by definition) or a bracket using AVCapturePhotoBracketSettings. When set to YES, and -[AVCapturePhotoOutput isVirtualDeviceFusionSupported] is also YES, constituent camera images of a virtual device may be fused to improve still image quality, depending on the current zoom factor, light levels, and focus position. You may determine whether virtual device fusion is enabled for a particular capture request by inspecting the virtualDeviceFusionEnabled property of the AVCaptureResolvedPhotoSettings. Note that when using the deprecated AVCaptureStillImageOutput interface with a virtual device, autoVirtualDeviceFusionEnabled fusion is always enabled if supported, and may not be turned off.
        #[unsafe(method(isAutoVirtualDeviceFusionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoVirtualDeviceFusionEnabled(&self) -> bool;

        /// Setter for [`isAutoVirtualDeviceFusionEnabled`][Self::isAutoVirtualDeviceFusionEnabled].
        #[unsafe(method(setAutoVirtualDeviceFusionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutoVirtualDeviceFusionEnabled(
            &self,
            auto_virtual_device_fusion_enabled: bool,
        );

        /// Specifies whether DualCamera image fusion should be used automatically.
        ///
        ///
        /// Default is YES unless you are capturing a RAW photo (RAW photos may not be processed by definition) or a bracket using AVCapturePhotoBracketSettings. When set to YES, and -[AVCapturePhotoOutput isDualCameraFusionSupported] is also YES, wide-angle and telephoto images may be fused to improve still image quality, depending on the current zoom factor, light levels, and focus position. You may determine whether DualCamera fusion is enabled for a particular capture request by inspecting the dualCameraFusionEnabled property of the AVCaptureResolvedPhotoSettings. Note that when using the deprecated AVCaptureStillImageOutput interface with the DualCamera, auto DualCamera fusion is always enabled and may not be turned off. As of iOS 13, this property is deprecated in favor of autoVirtualDeviceFusionEnabled.
        #[deprecated]
        #[unsafe(method(isAutoDualCameraFusionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoDualCameraFusionEnabled(&self) -> bool;

        /// Setter for [`isAutoDualCameraFusionEnabled`][Self::isAutoDualCameraFusionEnabled].
        #[deprecated]
        #[unsafe(method(setAutoDualCameraFusionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutoDualCameraFusionEnabled(&self, auto_dual_camera_fusion_enabled: bool);

        #[cfg(feature = "AVCaptureDevice")]
        /// Specifies the constituent devices for which the virtual device should deliver photos.
        ///
        ///
        /// Default is empty array. To opt in for constituent device photo delivery, you may set this property to any subset of 2 or more of the devices in virtualDevice.constituentDevices. Your captureOutput:didFinishProcessingPhoto:error: callback will be called n times -- one for each of the devices you include in the array. You may only set this property to a non-nil array if you've set your AVCapturePhotoOutput's virtualDeviceConstituentPhotoDeliveryEnabled property to YES, and your delegate responds to the captureOutput:didFinishProcessingPhoto:error: selector.
        #[unsafe(method(virtualDeviceConstituentPhotoDeliveryEnabledDevices))]
        #[unsafe(method_family = none)]
        pub unsafe fn virtualDeviceConstituentPhotoDeliveryEnabledDevices(
            &self,
        ) -> Retained<NSArray<AVCaptureDevice>>;

        #[cfg(feature = "AVCaptureDevice")]
        /// Setter for [`virtualDeviceConstituentPhotoDeliveryEnabledDevices`][Self::virtualDeviceConstituentPhotoDeliveryEnabledDevices].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setVirtualDeviceConstituentPhotoDeliveryEnabledDevices:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setVirtualDeviceConstituentPhotoDeliveryEnabledDevices(
            &self,
            virtual_device_constituent_photo_delivery_enabled_devices: &NSArray<AVCaptureDevice>,
        );

        /// Specifies whether the DualCamera should return both the telephoto and wide image.
        ///
        ///
        /// Default is NO. When set to YES, your captureOutput:didFinishProcessingPhoto:error: callback will receive twice the number of callbacks, as both the telephoto image(s) and wide-angle image(s) are delivered. You may only set this property to YES if you've set your AVCapturePhotoOutput's dualCameraDualPhotoDeliveryEnabled property to YES, and your delegate responds to the captureOutput:didFinishProcessingPhoto:error: selector. As of iOS 13, this property is deprecated in favor of virtualDeviceConstituentPhotoDeliveryEnabledDevices.
        #[deprecated]
        #[unsafe(method(isDualCameraDualPhotoDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDualCameraDualPhotoDeliveryEnabled(&self) -> bool;

        /// Setter for [`isDualCameraDualPhotoDeliveryEnabled`][Self::isDualCameraDualPhotoDeliveryEnabled].
        #[deprecated]
        #[unsafe(method(setDualCameraDualPhotoDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDualCameraDualPhotoDeliveryEnabled(
            &self,
            dual_camera_dual_photo_delivery_enabled: bool,
        );

        /// Specifies whether photos should be captured at the highest resolution supported by the source AVCaptureDevice's activeFormat.
        ///
        ///
        /// Default is NO. By default, AVCapturePhotoOutput emits images with the same dimensions as its source AVCaptureDevice's activeFormat.formatDescription. However, if you set this property to YES, the AVCapturePhotoOutput emits images at its source AVCaptureDevice's activeFormat.highResolutionStillImageDimensions. Note that if you enable video stabilization (see AVCaptureConnection's preferredVideoStabilizationMode) for any output, the high resolution photos emitted by AVCapturePhotoOutput may be smaller by 10 or more percent. You may inspect your AVCaptureResolvedPhotoSettings in the delegate callbacks to discover the exact dimensions of the capture photo(s).
        ///
        /// Starting in iOS 14.5 if you disable geometric distortion correction, the high resolution photo emitted by AVCapturePhotoOutput may be is smaller depending on the format.
        #[deprecated = "Use maxPhotoDimensions instead."]
        #[unsafe(method(isHighResolutionPhotoEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isHighResolutionPhotoEnabled(&self) -> bool;

        /// Setter for [`isHighResolutionPhotoEnabled`][Self::isHighResolutionPhotoEnabled].
        #[deprecated = "Use maxPhotoDimensions instead."]
        #[unsafe(method(setHighResolutionPhotoEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHighResolutionPhotoEnabled(&self, high_resolution_photo_enabled: bool);

        #[cfg(feature = "objc2-core-media")]
        /// Indicates the maximum resolution photo that will be captured.
        ///
        ///
        /// By setting this property you are requesting an image that may be up to as large as the specified dimensions, but no larger. The dimensions set must match one of the dimensions returned by AVCaptureDeviceFormat.supportedMaxPhotoDimensions for the currently configured format and be equal to or smaller than the value of AVCapturePhotoOutput.maxPhotoDimensions. This property defaults to the smallest dimensions returned by AVCaptureDeviceFormat.supportedMaxPhotoDimensions.
        #[unsafe(method(maxPhotoDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn maxPhotoDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// Setter for [`maxPhotoDimensions`][Self::maxPhotoDimensions].
        #[unsafe(method(setMaxPhotoDimensions:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMaxPhotoDimensions(&self, max_photo_dimensions: CMVideoDimensions);

        /// Specifies whether AVDepthData should be captured along with the photo.
        ///
        ///
        /// Default is NO. Set to YES if you wish to receive depth data with your photo. Throws an exception if -[AVCapturePhotoOutput depthDataDeliveryEnabled] is not set to YES or your delegate does not respond to the captureOutput:didFinishProcessingPhoto:error: selector. Note that setting this property to YES may add significant processing time to the delivery of your didFinishProcessingPhoto: callback.
        ///
        /// For best rendering results in Apple's Photos.app, portrait photos should be captured with both embedded depth data and a portrait effects matte (see portraitEffectsMatteDeliveryEnabled). When supported, it is recommended to opt in for both of these auxiliary images in your photo captures involving depth.
        #[unsafe(method(isDepthDataDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDepthDataDeliveryEnabled(&self) -> bool;

        /// Setter for [`isDepthDataDeliveryEnabled`][Self::isDepthDataDeliveryEnabled].
        #[unsafe(method(setDepthDataDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDepthDataDeliveryEnabled(&self, depth_data_delivery_enabled: bool);

        /// Specifies whether depth data included with this photo should be written to the photo's file structure.
        ///
        ///
        /// Default is YES. When depthDataDeliveryEnabled is set to YES, this property specifies whether the included depth data should be written to the resulting photo's internal file structure. Depth data is currently only supported in HEIF and JPEG. This property is ignored if depthDataDeliveryEnabled is set to NO.
        #[unsafe(method(embedsDepthDataInPhoto))]
        #[unsafe(method_family = none)]
        pub unsafe fn embedsDepthDataInPhoto(&self) -> bool;

        /// Setter for [`embedsDepthDataInPhoto`][Self::embedsDepthDataInPhoto].
        #[unsafe(method(setEmbedsDepthDataInPhoto:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEmbedsDepthDataInPhoto(&self, embeds_depth_data_in_photo: bool);

        /// Specifies whether the depth data delivered with the photo should be filtered to fill invalid values.
        ///
        ///
        /// Default is YES. This property is ignored unless depthDataDeliveryEnabled is set to YES. Depth data maps may contain invalid pixel values due to a variety of factors including occlusions and low light. When depthDataFiltered is set to YES, the photo output interpolates missing data, filling in all holes.
        #[unsafe(method(isDepthDataFiltered))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDepthDataFiltered(&self) -> bool;

        /// Setter for [`isDepthDataFiltered`][Self::isDepthDataFiltered].
        #[unsafe(method(setDepthDataFiltered:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDepthDataFiltered(&self, depth_data_filtered: bool);

        /// Specifies whether AVCameraCalibrationData should be captured and delivered along with this photo.
        ///
        ///
        /// Default is NO. Set to YES if you wish to receive camera calibration data with your photo. Camera calibration data is delivered as a property of an AVCapturePhoto, so if you are using the CMSampleBuffer delegate callbacks rather than -captureOutput:didFinishProcessingPhoto:error:, an exception is thrown. Also, you may only set this property to YES if your AVCapturePhotoOutput's cameraCalibrationDataDeliverySupported property is YES and 2 or more devices are selected for virtual device constituent photo delivery. When requesting virtual device constituent photo delivery plus camera calibration data, the photos for each constituent device each contain camera calibration data. Note that AVCameraCalibrationData can be delivered as a property of an AVCapturePhoto or an AVDepthData, thus your delegate must respond to the captureOutput:didFinishProcessingPhoto:error: selector.
        #[unsafe(method(isCameraCalibrationDataDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isCameraCalibrationDataDeliveryEnabled(&self) -> bool;

        /// Setter for [`isCameraCalibrationDataDeliveryEnabled`][Self::isCameraCalibrationDataDeliveryEnabled].
        #[unsafe(method(setCameraCalibrationDataDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCameraCalibrationDataDeliveryEnabled(
            &self,
            camera_calibration_data_delivery_enabled: bool,
        );

        /// Specifies whether an AVPortraitEffectsMatte should be captured along with the photo.
        ///
        ///
        /// Default is NO. Set to YES if you wish to receive a portrait effects matte with your photo. Throws an exception if -[AVCapturePhotoOutput portraitEffectsMatteDeliveryEnabled] is not set to YES or your delegate does not respond to the captureOutput:didFinishProcessingPhoto:error: selector. Portrait effects matte generation requires depth to be present, so if you wish to enable portrait effects matte delivery, you must set depthDataDeliveryEnabled to YES. Setting this property to YES does not guarantee that a portrait effects matte will be present in the resulting AVCapturePhoto. As the property name implies, the matte is primarily used to improve the rendering quality of portrait effects on the image. If the photo's content lacks a clear foreground subject, no portrait effects matte is generated, and the -[AVCapturePhoto portraitEffectsMatte] property returns nil. Note that setting this property to YES may add significant processing time to the delivery of your didFinishProcessingPhoto: callback.
        ///
        /// For best rendering results in Apple's Photos.app, portrait photos should be captured with both embedded depth data (see depthDataDeliveryEnabled) and a portrait effects matte. When supported, it is recommended to opt in for both of these auxiliary images in your photo captures involving depth.
        #[unsafe(method(isPortraitEffectsMatteDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isPortraitEffectsMatteDeliveryEnabled(&self) -> bool;

        /// Setter for [`isPortraitEffectsMatteDeliveryEnabled`][Self::isPortraitEffectsMatteDeliveryEnabled].
        #[unsafe(method(setPortraitEffectsMatteDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPortraitEffectsMatteDeliveryEnabled(
            &self,
            portrait_effects_matte_delivery_enabled: bool,
        );

        /// Specifies whether the portrait effects matte captured with this photo should be written to the photo's file structure.
        ///
        ///
        /// Default is YES. When portraitEffectsMatteDeliveryEnabled is set to YES, this property specifies whether the included portrait effects matte should be written to the resulting photo's internal file structure. Portrait effects mattes are currently only supported in HEIF and JPEG. This property is ignored if portraitEffectsMatteDeliveryEnabled is set to NO.
        #[unsafe(method(embedsPortraitEffectsMatteInPhoto))]
        #[unsafe(method_family = none)]
        pub unsafe fn embedsPortraitEffectsMatteInPhoto(&self) -> bool;

        /// Setter for [`embedsPortraitEffectsMatteInPhoto`][Self::embedsPortraitEffectsMatteInPhoto].
        #[unsafe(method(setEmbedsPortraitEffectsMatteInPhoto:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEmbedsPortraitEffectsMatteInPhoto(
            &self,
            embeds_portrait_effects_matte_in_photo: bool,
        );

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// Specifies which types of AVSemanticSegmentationMatte should be captured along with the photo.
        ///
        ///
        /// Default is empty array. You may set this property to an array of AVSemanticSegmentationMatteTypes you'd like to capture. Throws an exception if -[AVCapturePhotoOutput enabledSemanticSegmentationMatteTypes] does not contain any of the AVSemanticSegmentationMatteTypes specified. In other words, when setting up a capture session, you opt in for the superset of segmentation matte types you might like to receive, and then on a shot-by-shot basis, you may opt in to all or a subset of the previously specified types by setting this property. An exception is also thrown during -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] if your delegate does not respond to the captureOutput:didFinishProcessingPhoto:error: selector. Setting this property to YES does not guarantee that the specified mattes will be present in the resulting AVCapturePhoto. If the photo's content lacks any persons, for instance, no hair, skin, or teeth mattes are generated, and the -[AVCapturePhoto semanticSegmentationMatteForType:] property returns nil. Note that setting this property to YES may add significant processing time to the delivery of your didFinishProcessingPhoto: callback.
        #[unsafe(method(enabledSemanticSegmentationMatteTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn enabledSemanticSegmentationMatteTypes(
            &self,
        ) -> Retained<NSArray<AVSemanticSegmentationMatteType>>;

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// Setter for [`enabledSemanticSegmentationMatteTypes`][Self::enabledSemanticSegmentationMatteTypes].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setEnabledSemanticSegmentationMatteTypes:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEnabledSemanticSegmentationMatteTypes(
            &self,
            enabled_semantic_segmentation_matte_types: &NSArray<AVSemanticSegmentationMatteType>,
        );

        /// Specifies whether enabledSemanticSegmentationMatteTypes captured with this photo should be written to the photo's file structure.
        ///
        ///
        /// Default is YES. This property specifies whether the captured semantic segmentation mattes should be written to the resulting photo's internal file structure. Semantic segmentation mattes are currently only supported in HEIF and JPEG. This property is ignored if enabledSemanticSegmentationMatteTypes is set to an empty array.
        #[unsafe(method(embedsSemanticSegmentationMattesInPhoto))]
        #[unsafe(method_family = none)]
        pub unsafe fn embedsSemanticSegmentationMattesInPhoto(&self) -> bool;

        /// Setter for [`embedsSemanticSegmentationMattesInPhoto`][Self::embedsSemanticSegmentationMattesInPhoto].
        #[unsafe(method(setEmbedsSemanticSegmentationMattesInPhoto:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEmbedsSemanticSegmentationMattesInPhoto(
            &self,
            embeds_semantic_segmentation_mattes_in_photo: bool,
        );

        /// A dictionary of metadata key/value pairs you'd like to have written to each photo in the capture request.
        ///
        ///
        /// Valid metadata keys are found in
        /// <ImageIO
        /// /CGImageProperties.h>. AVCapturePhotoOutput inserts a base set of metadata into each photo it captures, such as kCGImagePropertyOrientation, kCGImagePropertyExifDictionary, and kCGImagePropertyMakerAppleDictionary. You may specify metadata keys and values that should be written to each photo in the capture request. If you've specified metadata that also appears in AVCapturePhotoOutput's base set, your value replaces the base value. An NSInvalidArgumentException is thrown if you specify keys other than those found in
        /// <ImageIO
        /// /CGImageProperties.h>.
        #[unsafe(method(metadata))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadata(&self) -> Retained<NSDictionary<NSString, AnyObject>>;

        /// Setter for [`metadata`][Self::metadata].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `metadata` generic should be of the correct type.
        #[unsafe(method(setMetadata:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMetadata(&self, metadata: &NSDictionary<NSString, AnyObject>);

        /// Specifies that a Live Photo movie be captured to complement the still photo.
        ///
        ///
        /// A Live Photo movie is a short movie (with audio, if you've added an audio input to your session) containing the moments right before and after the still photo. A QuickTime movie file will be written to disk at the URL specified if it is a valid file URL accessible to your app's sandbox. You may only set this property if AVCapturePhotoOutput's livePhotoCaptureSupported property is YES. When you specify a Live Photo, your AVCapturePhotoCaptureDelegate object must implement -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error:.
        #[unsafe(method(livePhotoMovieFileURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn livePhotoMovieFileURL(&self) -> Option<Retained<NSURL>>;

        /// Setter for [`livePhotoMovieFileURL`][Self::livePhotoMovieFileURL].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLivePhotoMovieFileURL:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLivePhotoMovieFileURL(&self, live_photo_movie_file_url: Option<&NSURL>);

        #[cfg(feature = "AVVideoSettings")]
        /// Specifies the video codec type to use when compressing video for the Live Photo movie complement.
        ///
        ///
        /// Prior to iOS 11, all Live Photo movie video tracks are compressed using H.264. Beginning in iOS 11, you can select the Live Photo movie video compression format by specifying one of the strings present in AVCapturePhotoOutput's availableLivePhotoVideoCodecTypes array.
        #[unsafe(method(livePhotoVideoCodecType))]
        #[unsafe(method_family = none)]
        pub unsafe fn livePhotoVideoCodecType(&self) -> Retained<AVVideoCodecType>;

        #[cfg(feature = "AVVideoSettings")]
        /// Setter for [`livePhotoVideoCodecType`][Self::livePhotoVideoCodecType].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLivePhotoVideoCodecType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLivePhotoVideoCodecType(
            &self,
            live_photo_video_codec_type: &AVVideoCodecType,
        );

        #[cfg(feature = "AVMetadataItem")]
        /// Movie-level metadata to be written to the Live Photo movie.
        ///
        ///
        /// An array of AVMetadataItems to be inserted into the top level of the Live Photo movie. The receiver makes immutable copies of the AVMetadataItems in the array. Live Photo movies always contain a AVMetadataQuickTimeMetadataKeyContentIdentifier which allow them to be paired with a similar identifier in the MakerNote of the photo complement. AVCapturePhotoSettings generates a unique content identifier for you. If you provide a metadata array containing an AVMetadataItem with keyspace = AVMetadataKeySpaceQuickTimeMetadata and key = AVMetadataQuickTimeMetadataKeyContentIdentifier, an NSInvalidArgumentException is thrown.
        #[unsafe(method(livePhotoMovieMetadata))]
        #[unsafe(method_family = none)]
        pub unsafe fn livePhotoMovieMetadata(&self) -> Retained<NSArray<AVMetadataItem>>;

        #[cfg(feature = "AVMetadataItem")]
        /// Setter for [`livePhotoMovieMetadata`][Self::livePhotoMovieMetadata].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setLivePhotoMovieMetadata:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLivePhotoMovieMetadata(
            &self,
            live_photo_movie_metadata: Option<&NSArray<AVMetadataItem>>,
        );

        /// An array of available kCVPixelBufferPixelFormatTypeKeys that may be used when specifying a previewPhotoFormat.
        ///
        ///
        /// The array is sorted such that the preview format requiring the fewest conversions is presented first.
        #[unsafe(method(availablePreviewPhotoPixelFormatTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availablePreviewPhotoPixelFormatTypes(&self) -> Retained<NSArray<NSNumber>>;

        /// A dictionary of Core Video pixel buffer attributes specifying the preview photo format to be delivered along with the RAW or processed photo.
        ///
        ///
        /// A dictionary of pixel buffer attributes specifying a smaller version of the RAW or processed photo for preview purposes. The kCVPixelBufferPixelFormatTypeKey is required and must be present in the receiver's -availablePreviewPhotoPixelFormatTypes array. Optional keys are { kCVPixelBufferWidthKey | kCVPixelBufferHeightKey }. If you wish to specify dimensions, you must add both width and height. Width and height are only honored up to the display dimensions. If you specify a width and height whose aspect ratio differs from the RAW or processed photo, the larger of the two dimensions is honored and aspect ratio of the RAW or processed photo is always preserved.
        #[unsafe(method(previewPhotoFormat))]
        #[unsafe(method_family = none)]
        pub unsafe fn previewPhotoFormat(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        /// Setter for [`previewPhotoFormat`][Self::previewPhotoFormat].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `preview_photo_format` generic should be of the correct type.
        #[unsafe(method(setPreviewPhotoFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setPreviewPhotoFormat(
            &self,
            preview_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "AVVideoSettings")]
        /// An array of available AVVideoCodecKeys that may be used when specifying an embeddedThumbnailPhotoFormat.
        ///
        ///
        /// The array is sorted such that the thumbnail codec type that is most backward compatible is listed first.
        #[unsafe(method(availableEmbeddedThumbnailPhotoCodecTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableEmbeddedThumbnailPhotoCodecTypes(
            &self,
        ) -> Retained<NSArray<AVVideoCodecType>>;

        /// A dictionary of AVVideoSettings keys specifying the thumbnail format to be written to the processed or RAW photo.
        ///
        ///
        /// A dictionary of AVVideoSettings keys specifying a thumbnail (usually smaller) version of the processed photo to be embedded in that image before calling the AVCapturePhotoCaptureDelegate. This image is sometimes referred to as a "thumbnail image". The AVVideoCodecKey is required and must be present in the receiver's -availableEmbeddedThumbnailPhotoCodecTypes array. Optional keys are { AVVideoWidthKey | AVVideoHeightKey }. If you wish to specify dimensions, you must specify both width and height. If you specify a width and height whose aspect ratio differs from the processed photo, the larger of the two dimensions is honored and aspect ratio of the RAW or processed photo is always preserved. For RAW captures, use -rawEmbeddedThumbnailPhotoFormat to specify the thumbnail format you'd like to capture in the RAW image. For apps linked on or after iOS 12, the raw thumbnail format must be specified using the -rawEmbeddedThumbnailPhotoFormat API rather than -embeddedThumbnailPhotoFormat. Beginning in iOS 12, HEIC files may contain thumbnails up to the full resolution of the main image.
        #[unsafe(method(embeddedThumbnailPhotoFormat))]
        #[unsafe(method_family = none)]
        pub unsafe fn embeddedThumbnailPhotoFormat(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        /// Setter for [`embeddedThumbnailPhotoFormat`][Self::embeddedThumbnailPhotoFormat].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `embedded_thumbnail_photo_format` generic should be of the correct type.
        #[unsafe(method(setEmbeddedThumbnailPhotoFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEmbeddedThumbnailPhotoFormat(
            &self,
            embedded_thumbnail_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
        );

        #[cfg(feature = "AVVideoSettings")]
        /// An array of available AVVideoCodecKeys that may be used when specifying a rawEmbeddedThumbnailPhotoFormat.
        ///
        ///
        /// The array is sorted such that the thumbnail codec type that is most backward compatible is listed first.
        #[unsafe(method(availableRawEmbeddedThumbnailPhotoCodecTypes))]
        #[unsafe(method_family = none)]
        pub unsafe fn availableRawEmbeddedThumbnailPhotoCodecTypes(
            &self,
        ) -> Retained<NSArray<AVVideoCodecType>>;

        /// A dictionary of AVVideoSettings keys specifying the thumbnail format to be written to the RAW photo in a RAW photo request.
        ///
        ///
        /// A dictionary of AVVideoSettings keys specifying a thumbnail (usually smaller) version of the RAW photo to be embedded in that image's DNG before calling back the AVCapturePhotoCaptureDelegate. The AVVideoCodecKey is required and must be present in the receiver's -availableRawEmbeddedThumbnailPhotoCodecTypes array. Optional keys are { AVVideoWidthKey | AVVideoHeightKey }. If you wish to specify dimensions, you must specify both width and height. If you specify a width and height whose aspect ratio differs from the RAW or processed photo, the larger of the two dimensions is honored and aspect ratio of the RAW or processed photo is always preserved. For apps linked on or after iOS 12, the raw thumbnail format must be specified using the -rawEmbeddedThumbnailPhotoFormat API rather than -embeddedThumbnailPhotoFormat. Beginning in iOS 12, DNG files may contain thumbnails up to the full resolution of the RAW image.
        #[unsafe(method(rawEmbeddedThumbnailPhotoFormat))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawEmbeddedThumbnailPhotoFormat(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        /// Setter for [`rawEmbeddedThumbnailPhotoFormat`][Self::rawEmbeddedThumbnailPhotoFormat].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        ///
        /// # Safety
        ///
        /// `raw_embedded_thumbnail_photo_format` generic should be of the correct type.
        #[unsafe(method(setRawEmbeddedThumbnailPhotoFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRawEmbeddedThumbnailPhotoFormat(
            &self,
            raw_embedded_thumbnail_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
        );

        /// Specifies whether the photo output should use content aware distortion correction on this photo request (at its discretion).
        ///
        ///
        /// Default is NO. Set to YES if you wish content aware distortion correction to be performed on your AVCapturePhotos, when the photo output deems it necessary. Photos may or may not benefit from distortion correction. For instance, photos lacking faces may be left as is. Setting this property to YES does introduce a small additional amount of latency to the photo processing. You may check your AVCaptureResolvedPhotoSettings to see whether content aware distortion correction will be enabled for a given photo request. Throws an exception if -[AVCapturePhotoOutput contentAwareDistortionCorrectionEnabled] is not set to YES.
        #[unsafe(method(isAutoContentAwareDistortionCorrectionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isAutoContentAwareDistortionCorrectionEnabled(&self) -> bool;

        /// Setter for [`isAutoContentAwareDistortionCorrectionEnabled`][Self::isAutoContentAwareDistortionCorrectionEnabled].
        #[unsafe(method(setAutoContentAwareDistortionCorrectionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAutoContentAwareDistortionCorrectionEnabled(
            &self,
            auto_content_aware_distortion_correction_enabled: bool,
        );

        /// Specifies whether the photo will be captured with constant color.
        ///
        ///
        /// Default is NO. Set to YES if you wish to capture a constant color photo. Throws an exception if -[AVCapturePhotoOutput constantColorEnabled] is not set to YES.
        #[unsafe(method(isConstantColorEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isConstantColorEnabled(&self) -> bool;

        /// Setter for [`isConstantColorEnabled`][Self::isConstantColorEnabled].
        #[unsafe(method(setConstantColorEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConstantColorEnabled(&self, constant_color_enabled: bool);

        /// Specifies whether a fallback photo is delivered when taking a constant color capture.
        ///
        ///
        /// Default is NO. Set to YES if you wish to receive a fallback photo that can be used in case the main constant color photo's confidence level is too low for your use case.
        #[unsafe(method(isConstantColorFallbackPhotoDeliveryEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isConstantColorFallbackPhotoDeliveryEnabled(&self) -> bool;

        /// Setter for [`isConstantColorFallbackPhotoDeliveryEnabled`][Self::isConstantColorFallbackPhotoDeliveryEnabled].
        #[unsafe(method(setConstantColorFallbackPhotoDeliveryEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setConstantColorFallbackPhotoDeliveryEnabled(
            &self,
            constant_color_fallback_photo_delivery_enabled: bool,
        );

        /// Specifies whether the built-in shutter sound should be suppressed when capturing a photo with these settings.
        ///
        ///
        /// Default is NO. Set to YES if you wish to suppress AVCapturePhotoOutput's built-in shutter sound for this request. AVCapturePhotoOutput throws an NSInvalidArgumentException in `-capturePhotoWithSettings:` if its `shutterSoundSuppressionSupported` property returns NO.
        #[unsafe(method(isShutterSoundSuppressionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isShutterSoundSuppressionEnabled(&self) -> bool;

        /// Setter for [`isShutterSoundSuppressionEnabled`][Self::isShutterSoundSuppressionEnabled].
        #[unsafe(method(setShutterSoundSuppressionEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setShutterSoundSuppressionEnabled(
            &self,
            shutter_sound_suppression_enabled: bool,
        );
    );
}

/// Methods declared on superclass `NSObject`.
impl AVCapturePhotoSettings {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// A concrete subclass of AVCapturePhotoSettings that describes a bracketed capture.
    ///
    ///
    /// In addition to the properties expressed in the base class, an AVCapturePhotoBracketSettings contains an array of AVCaptureBracketedStillImageSettings objects, where each describes one individual photo in the bracket. bracketedSettings.count must be
    /// <
    /// = AVCapturePhotoOutput's -maxBracketedCapturePhotoCount. Capturing a photo bracket may require the allocation of additional resources.
    ///
    /// When you request a bracketed capture, your AVCapturePhotoCaptureDelegate's -captureOutput:didFinishProcessing{Photo | RawPhoto}... callbacks are called back bracketSettings.count times and provided with the corresponding AVCaptureBracketedStillImageSettings object from your request.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotobracketsettings?language=objc)
    #[unsafe(super(AVCapturePhotoSettings, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCapturePhotoBracketSettings;
);

extern_conformance!(
    unsafe impl NSCopying for AVCapturePhotoBracketSettings {}
);

unsafe impl CopyingHelper for AVCapturePhotoBracketSettings {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCapturePhotoBracketSettings {}
);

impl AVCapturePhotoBracketSettings {
    extern_methods!(
        #[cfg(feature = "AVCaptureStillImageOutput")]
        /// Creates an instance of AVCapturePhotoBracketSettings.
        ///
        ///
        /// Parameter `rawPixelFormatType`: One of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. May be set to 0 if you do not desire RAW capture.
        ///
        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you only wish to capture RAW, you may pass a non-zero rawPixelFormatType and a nil processedFormat dictionary. If you pass a rawPixelFormatType of 0 AND a nil processedFormat dictionary, the default output of AVVideoCodecTypeJPEG will be delivered.
        ///
        /// Parameter `bracketedSettings`: An array of AVCaptureBracketedStillImageSettings objects (defined in AVCaptureStillImageOutput.h). All must be of the same type, either AVCaptureManualExposureBracketedStillImageSettings or AVCaptureAutoExposureBracketedStillImageSettings. bracketedSettings.count must be
        /// <
        /// = AVCapturePhotoOutput's -maxBracketedCapturePhotoCount.
        ///
        /// Returns: An instance of AVCapturePhotoBracketSettings.
        ///
        ///
        /// An NSInvalidArgumentException is thrown if bracketedSettings is nil, contains zero elements, or mixes and matches different subclasses of AVCaptureBracketedStillImageSettings.
        ///
        /// AVCapturePhotoBracketSettings do not support flashMode, autoStillImageStabilizationEnabled, livePhotoMovieFileURL or livePhotoMovieMetadata.
        ///
        /// # Safety
        ///
        /// `processed_format` generic should be of the correct type.
        #[unsafe(method(photoBracketSettingsWithRawPixelFormatType:processedFormat:bracketedSettings:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoBracketSettingsWithRawPixelFormatType_processedFormat_bracketedSettings(
            raw_pixel_format_type: OSType,
            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
            bracketed_settings: &NSArray<AVCaptureBracketedStillImageSettings>,
        ) -> Retained<Self>;

        #[cfg(all(feature = "AVCaptureStillImageOutput", feature = "AVMediaFormat"))]
        /// Creates an instance of AVCapturePhotoBracketSettings.
        ///
        ///
        /// Parameter `rawPixelFormatType`: One of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. May be set to 0 if you do not desire RAW capture.
        ///
        /// Parameter `rawFileType`: The file container for which the RAW image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
        ///
        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you only wish to capture RAW, you may pass a non-zero rawPixelFormatType and a nil processedFormat dictionary. If you pass a rawPixelFormatType of 0 AND a nil processedFormat dictionary, the default output of AVVideoCodecTypeJPEG will be delivered.
        ///
        /// Parameter `processedFileType`: The file container for which the processed image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
        ///
        /// Parameter `bracketedSettings`: An array of AVCaptureBracketedStillImageSettings objects (defined in AVCaptureStillImageOutput.h). All must be of the same type, either AVCaptureManualExposureBracketedStillImageSettings or AVCaptureAutoExposureBracketedStillImageSettings. bracketedSettings.count must be
        /// <
        /// = AVCapturePhotoOutput's -maxBracketedCapturePhotoCount.
        ///
        /// Returns: An instance of AVCapturePhotoBracketSettings.
        ///
        ///
        /// An NSInvalidArgumentException is thrown if bracketedSettings is nil, contains zero elements, or mixes and matches different subclasses of AVCaptureBracketedStillImageSettings.
        ///
        /// AVCapturePhotoBracketSettings do not support flashMode, autoStillImageStabilizationEnabled, livePhotoMovieFileURL or livePhotoMovieMetadata.
        ///
        /// # Safety
        ///
        /// `processed_format` generic should be of the correct type.
        #[unsafe(method(photoBracketSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:bracketedSettings:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoBracketSettingsWithRawPixelFormatType_rawFileType_processedFormat_processedFileType_bracketedSettings(
            raw_pixel_format_type: OSType,
            raw_file_type: Option<&AVFileType>,
            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
            processed_file_type: Option<&AVFileType>,
            bracketed_settings: &NSArray<AVCaptureBracketedStillImageSettings>,
        ) -> Retained<Self>;

        #[cfg(feature = "AVCaptureStillImageOutput")]
        /// An array of AVCaptureBracketedStillImageSettings objects you passed in -initWithFormat:rawPixelFormatType:bracketedSettings:
        ///
        ///
        /// This read-only property never returns nil.
        #[unsafe(method(bracketedSettings))]
        #[unsafe(method_family = none)]
        pub unsafe fn bracketedSettings(
            &self,
        ) -> Retained<NSArray<AVCaptureBracketedStillImageSettings>>;

        /// Specifies whether lens (optical) stabilization should be employed during the bracketed capture.
        ///
        ///
        /// Default value is NO. This property may only be set to YES if AVCapturePhotoOutput's isLensStabilizationDuringBracketedCaptureSupported is YES. When set to YES, AVCapturePhotoOutput holds the lens steady for the duration of the bracket to counter hand shake and produce a sharper bracket of images.
        #[unsafe(method(isLensStabilizationEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isLensStabilizationEnabled(&self) -> bool;

        /// Setter for [`isLensStabilizationEnabled`][Self::isLensStabilizationEnabled].
        #[unsafe(method(setLensStabilizationEnabled:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setLensStabilizationEnabled(&self, lens_stabilization_enabled: bool);
    );
}

/// Methods declared on superclass `AVCapturePhotoSettings`.
impl AVCapturePhotoBracketSettings {
    extern_methods!(
        /// Creates a default instance of AVCapturePhotoSettings.
        ///
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// A default AVCapturePhotoSettings object has a format of AVVideoCodecTypeJPEG, a fileType of AVFileTypeJPEG, and photoQualityPrioritization set to AVCapturePhotoQualityPrioritizationBalanced.
        #[unsafe(method(photoSettings))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettings() -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings with a user-specified output format.
        ///
        ///
        /// Parameter `format`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// If you wish an uncompressed format, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the format specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed output. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil format dictionary is analogous to calling +photoSettings.
        ///
        /// # Safety
        ///
        /// `format` generic should be of the correct type.
        #[unsafe(method(photoSettingsWithFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithFormat(
            format: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings specifying RAW only output.
        ///
        ///
        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        #[unsafe(method(photoSettingsWithRawPixelFormatType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithRawPixelFormatType(
            raw_pixel_format_type: OSType,
        ) -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG).
        ///
        ///
        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h).
        ///
        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property.
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. Passing a nil processedFormat dictionary is analogous to calling +photoSettingsWithRawPixelFormatType:. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        ///
        /// # Safety
        ///
        /// `processed_format` generic should be of the correct type.
        #[unsafe(method(photoSettingsWithRawPixelFormatType:processedFormat:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithRawPixelFormatType_processedFormat(
            raw_pixel_format_type: OSType,
            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
        ) -> Retained<Self>;

        #[cfg(feature = "AVMediaFormat")]
        /// Creates an instance of AVCapturePhotoSettings specifying RAW + a processed format (such as JPEG) and a file container to which it will be written.
        ///
        ///
        /// Parameter `rawPixelFormatType`: A Bayer RAW or Apple ProRAW pixel format OSType (defined in CVPixelBuffer.h). Pass 0 if you do not desire a RAW photo callback.
        ///
        /// Parameter `rawFileType`: The file container for which the RAW image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
        ///
        /// Parameter `processedFormat`: A dictionary of Core Video pixel buffer attributes or AVVideoSettings, analogous to AVCaptureStillImageOutput's outputSettings property. Pass nil if you do not desire a processed photo callback.
        ///
        /// Parameter `processedFileType`: The file container for which the processed image should be formatted to be written. Pass nil if you have no preferred file container. A default container will be chosen for you.
        ///
        /// Returns: An instance of AVCapturePhotoSettings.
        ///
        ///
        /// rawPixelFormatType must be one of the OSTypes contained in AVCapturePhotoOutput's -availableRawPhotoPixelFormatTypes array. Set rawPixelFormatType to 0 if you do not desire a RAW photo callback. If you are specifying a rawFileType, it must be present in AVCapturePhotoOutput's -availableRawPhotoFileTypes array. If you wish an uncompressed processedFormat, your dictionary must contain kCVPixelBufferPixelFormatTypeKey, and the processedFormat specified must be present in AVCapturePhotoOutput's -availablePhotoPixelFormatTypes array. kCVPixelBufferPixelFormatTypeKey is the only supported key when expressing uncompressed processedFormat. If you wish a compressed format, your dictionary must contain AVVideoCodecKey and the codec specified must be present in AVCapturePhotoOutput's -availablePhotoCodecTypes array. If you are specifying a compressed format, the AVVideoCompressionPropertiesKey is also supported, with a payload dictionary containing a single AVVideoQualityKey. If you are specifying a processedFileType (such as AVFileTypeJPEG, AVFileTypeHEIC or AVFileTypeDICOM), it must be present in AVCapturePhotoOutput's -availablePhotoFileTypes array. Pass a nil processedFormat dictionary if you only desire a RAW photo capture. See AVCapturePhotoOutput's -capturePhotoWithSettings:delegate: inline documentation for a discussion of restrictions on AVCapturePhotoSettings when requesting RAW capture.
        ///
        /// # Safety
        ///
        /// `processed_format` generic should be of the correct type.
        #[unsafe(method(photoSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsWithRawPixelFormatType_rawFileType_processedFormat_processedFileType(
            raw_pixel_format_type: OSType,
            raw_file_type: Option<&AVFileType>,
            processed_format: Option<&NSDictionary<NSString, AnyObject>>,
            processed_file_type: Option<&AVFileType>,
        ) -> Retained<Self>;

        /// Creates an instance of AVCapturePhotoSettings with a new uniqueID from an existing instance of AVCapturePhotoSettings.
        ///
        ///
        /// Parameter `photoSettings`: An existing AVCapturePhotoSettings instance.
        ///
        /// Returns: An new instance of AVCapturePhotoSettings with new uniqueID.
        ///
        ///
        /// Use this factory method to create a clone of an existing photo settings instance, but with a new uniqueID that can safely be passed to AVCapturePhotoOutput -capturePhotoWithSettings:delegate:.
        #[unsafe(method(photoSettingsFromPhotoSettings:))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoSettingsFromPhotoSettings(
            photo_settings: &AVCapturePhotoSettings,
        ) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
impl AVCapturePhotoBracketSettings {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// An immutable object produced by callbacks in each and every AVCapturePhotoCaptureDelegate protocol method.
    ///
    ///
    /// When you initiate a photo capture request using -capturePhotoWithSettings:delegate:, some of your settings are not yet certain. For instance, auto flash and auto still image stabilization allow the AVCapturePhotoOutput to decide just in time whether to employ flash or still image stabilization, depending on the current scene. Once the request is issued, AVCapturePhotoOutput begins the capture, resolves the uncertain settings, and in its first callback informs you of its choices through an AVCaptureResolvedPhotoSettings object. This same object is presented to all the callbacks fired for a particular photo capture request. Its uniqueID property matches that of the AVCapturePhotoSettings instance you used to initiate the photo request.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcaptureresolvedphotosettings?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCaptureResolvedPhotoSettings;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCaptureResolvedPhotoSettings {}
);

impl AVCaptureResolvedPhotoSettings {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        /// uniqueID matches that of the AVCapturePhotoSettings instance you passed to -capturePhotoWithSettings:delegate:.
        #[unsafe(method(uniqueID))]
        #[unsafe(method_family = none)]
        pub unsafe fn uniqueID(&self) -> i64;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the photo buffer that will be delivered to the -captureOutput:didFinishProcessingPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback.
        ///
        ///
        /// If you request a RAW capture with no processed companion image, photoDimensions resolve to { 0, 0 }.
        #[unsafe(method(photoDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the RAW photo buffer that will be delivered to the -captureOutput:didFinishProcessingRawPhotoSampleBuffer:previewPhotoSampleBuffer:resolvedSettings:bracketSettings:error: callback.
        ///
        ///
        /// If you request a non-RAW capture, rawPhotoDimensions resolve to { 0, 0 }.
        #[unsafe(method(rawPhotoDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawPhotoDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the preview photo buffer that will be delivered to the -captureOutput:didFinishProcessing{Photo | RawPhoto}... AVCapturePhotoCaptureDelegate callbacks.
        ///
        ///
        /// If you don't request a preview image, previewDimensions resolve to { 0, 0 }.
        #[unsafe(method(previewDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn previewDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the embedded thumbnail that will be written to the processed photo delivered to the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
        ///
        ///
        /// If you don't request an embedded thumbnail image, embeddedThumbnailDimensions resolve to { 0, 0 }.
        #[unsafe(method(embeddedThumbnailDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn embeddedThumbnailDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the embedded thumbnail that will be written to the RAW photo delivered to the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
        ///
        ///
        /// If you don't request a raw embedded thumbnail image, rawEmbeddedThumbnailDimensions resolve to { 0, 0 }.
        #[unsafe(method(rawEmbeddedThumbnailDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn rawEmbeddedThumbnailDimensions(&self) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the portrait effects matte that will be delivered to the AVCapturePhoto in the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
        ///
        ///
        /// If you request a portrait effects matte by calling -[AVCapturePhotoSettings setPortraitEffectsMatteDeliveryEnabled:YES], portraitEffectsMatteDimensions resolve to the expected dimensions of the portrait effects matte, assuming one is generated (see -[AVCapturePhotoSettings portraitEffectsMatteDeliveryEnabled] for a discussion of why a portrait effects matte might not be delivered). If you don't request a portrait effects matte, portraitEffectsMatteDimensions always resolve to { 0, 0 }.
        #[unsafe(method(portraitEffectsMatteDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn portraitEffectsMatteDimensions(&self) -> CMVideoDimensions;

        #[cfg(all(feature = "AVSemanticSegmentationMatte", feature = "objc2-core-media"))]
        /// Queries the resolved dimensions of semantic segmentation mattes that will be delivered to the AVCapturePhoto in the -captureOutput:didFinishProcessingPhoto:error: AVCapturePhotoCaptureDelegate callback.
        ///
        ///
        /// If you request semantic segmentation mattes by calling -[AVCapturePhotoSettings setEnabledSemanticSegmentationMatteTypes:] with a non-empty array, the dimensions resolve to the expected dimensions for each of the mattes, assuming they are generated (see -[AVCapturePhotoSettings enabledSemanticSegmentationMatteTypes] for a discussion of why a particular matte might not be delivered). If you don't request any semantic segmentation mattes, the result will always be { 0, 0 }.
        #[unsafe(method(dimensionsForSemanticSegmentationMatteOfType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn dimensionsForSemanticSegmentationMatteOfType(
            &self,
            semantic_segmentation_matte_type: &AVSemanticSegmentationMatteType,
        ) -> CMVideoDimensions;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the video track in the movie that will be delivered to the -captureOutput:didFinishProcessingLivePhotoToMovieFileAtURL:duration:photoDisplayTime:resolvedSettings:error: callback.
        ///
        ///
        /// If you don't request Live Photo capture, livePhotoMovieDimensions resolve to { 0, 0 }.
        #[unsafe(method(livePhotoMovieDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn livePhotoMovieDimensions(&self) -> CMVideoDimensions;

        /// Indicates whether the flash will fire when capturing the photo.
        ///
        ///
        /// When you specify AVCaptureFlashModeAuto as your AVCapturePhotoSettings.flashMode, you don't know if flash capture will be chosen until you inspect the AVCaptureResolvedPhotoSettings flashEnabled property. If the device becomes too hot, the flash becomes temporarily unavailable. You can key-value observe AVCaptureDevice's flashAvailable property to know when this occurs. If the flash is unavailable due to thermal issues, and you specify a flashMode of AVCaptureFlashModeOn, flashEnabled still resolves to NO until the device has sufficiently cooled off.
        #[unsafe(method(isFlashEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isFlashEnabled(&self) -> bool;

        /// Indicates whether red-eye reduction will be applied as necessary when capturing the photo if flashEnabled is YES.
        #[unsafe(method(isRedEyeReductionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isRedEyeReductionEnabled(&self) -> bool;

        #[cfg(feature = "objc2-core-media")]
        /// The resolved dimensions of the AVCaptureDeferredPhotoProxy when opting in to deferred photo delivery.  See AVCaptureDeferredPhotoProxy.
        ///
        ///
        /// If you don't opt in to deferred photo delivery, deferredPhotoProxyDimensions resolve to { 0, 0 }.  When an AVCaptureDeferredPhotoProxy is returned, the photoDimensions property of this object represents the dimensions of the final photo.
        #[unsafe(method(deferredPhotoProxyDimensions))]
        #[unsafe(method_family = none)]
        pub unsafe fn deferredPhotoProxyDimensions(&self) -> CMVideoDimensions;

        /// Indicates whether still image stabilization will be employed when capturing the photo.
        ///
        /// As of iOS 13 hardware, the AVCapturePhotoOutput is capable of applying a variety of multi-image fusion techniques to improve photo quality (reduce noise, preserve detail in low light, freeze motion, etc), all of which have been previously lumped under the stillImageStabilization moniker. This property should no longer be used as it no longer provides meaningful information about the techniques used to improve quality in a photo capture. Instead, you should use -photoQualityPrioritization to indicate your preferred quality vs speed when configuring your AVCapturePhotoSettings. You may query -photoProcessingTimeRange to get an indication of how long the photo will take to process before delivery to your delegate.
        #[deprecated]
        #[unsafe(method(isStillImageStabilizationEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isStillImageStabilizationEnabled(&self) -> bool;

        /// Indicates whether fusion of virtual device constituent camera images will be used when capturing the photo, such as the wide-angle and telephoto images on a DualCamera.
        #[unsafe(method(isVirtualDeviceFusionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isVirtualDeviceFusionEnabled(&self) -> bool;

        /// Indicates whether DualCamera wide-angle and telephoto image fusion will be employed when capturing the photo. As of iOS 13, this property is deprecated in favor of virtualDeviceFusionEnabled.
        #[deprecated]
        #[unsafe(method(isDualCameraFusionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isDualCameraFusionEnabled(&self) -> bool;

        /// Indicates the number of times your -captureOutput:didFinishProcessingPhoto:error: callback will be called. For instance, if you've requested an auto exposure bracket of 3 with JPEG and RAW, the expectedPhotoCount is 6.
        #[unsafe(method(expectedPhotoCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn expectedPhotoCount(&self) -> NSUInteger;

        #[cfg(feature = "objc2-core-media")]
        /// Indicates the processing time range you can expect for this photo to be delivered to your delegate. the .start field of the CMTimeRange is zero-based. In other words, if photoProcessingTimeRange.start is equal to .5 seconds, then the minimum processing time for this photo is .5 seconds. The .start field plus the .duration field of the CMTimeRange indicate the max expected processing time for this photo. Consider implementing a UI affordance if the max processing time is uncomfortably long.
        #[unsafe(method(photoProcessingTimeRange))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoProcessingTimeRange(&self) -> CMTimeRange;

        /// Indicates whether content aware distortion correction will be employed when capturing the photo.
        #[unsafe(method(isContentAwareDistortionCorrectionEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isContentAwareDistortionCorrectionEnabled(&self) -> bool;

        /// Indicates whether fast capture prioritization will be employed when capturing the photo.
        #[unsafe(method(isFastCapturePrioritizationEnabled))]
        #[unsafe(method_family = none)]
        pub unsafe fn isFastCapturePrioritizationEnabled(&self) -> bool;
    );
}

extern_class!(
    /// An object representing a photo in memory, produced by the -captureOutput:didFinishingProcessingPhoto:error: in the AVCapturePhotoCaptureDelegate protocol method.
    ///
    ///
    /// Beginning in iOS 11, AVCapturePhotoOutput's AVCapturePhotoCaptureDelegate supports a simplified callback for delivering image data, namely -captureOutput:didFinishingProcessingPhoto:error:. This callback presents each image result for your capture request as an AVCapturePhoto object, an immutable wrapper from which various properties of the photo capture may be queried, such as the photo's preview pixel buffer, metadata, depth data, camera calibration data, and image bracket specific properties. AVCapturePhoto can wrap file-containerized photo results, such as HEVC encoded image data, containerized in the HEIC file format. CMSampleBufferRef, on the other hand, may only be used to express non file format containerized photo data. For this reason, the AVCapturePhotoCaptureDelegate protocol methods that return CMSampleBuffers have been deprecated in favor of -captureOutput:didFinishingProcessingPhoto:error:. A AVCapturePhoto wraps a single image result. For instance, if you've requested a bracketed capture of 3 images, your callback is called 3 times, each time delivering an AVCapturePhoto.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephoto?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCapturePhoto;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCapturePhoto {}
);

impl AVCapturePhoto {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        #[cfg(feature = "objc2-core-media")]
        /// The time at which this image was captured, synchronized to the synchronizationClock of the AVCaptureSession
        ///
        ///
        /// The timestamp property indicates the time the image was captured, and is analogous to CMSampleBufferGetPresentationTimeStamp(). If an error was provided in the -captureOutput:didFinishingProcessingPhoto:error: callback, timestamp returns kCMTimeInvalid.
        #[unsafe(method(timestamp))]
        #[unsafe(method_family = none)]
        pub unsafe fn timestamp(&self) -> CMTime;

        /// This property returns YES if this photo is a RAW image.
        ///
        ///
        /// Your AVCapturePhotoCaptureDelegate's -captureOutput:didFinishingProcessingPhoto:error: method may be called one or more times with image results, including RAW or non-RAW images. This property distinguishes RAW from non-RAW image results, for instance, if you've requested a RAW + JPEG capture.
        #[unsafe(method(isRawPhoto))]
        #[unsafe(method_family = none)]
        pub unsafe fn isRawPhoto(&self) -> bool;

        #[cfg(feature = "objc2-core-video")]
        /// For uncompressed or RAW captures, this property offers access to the pixel data.
        ///
        ///
        /// Uncompressed captures, such as '420f' or 'BGRA', Bayer RAW captures, such as 'bgg4', or Apple ProRAW captures, such as 'l64r', present pixel data as a CVPixelBuffer. See AVCapturePhotoOutput's -appleProRAWEnabled for a discussion on the differences between Bayer RAW and Apple ProRAW. This property is analogous to CMSampleBufferGetImageBuffer(). The pixel buffer contains only the minimal attachments required for correct display. Compressed captures, such as 'jpeg', return nil.
        #[unsafe(method(pixelBuffer))]
        #[unsafe(method_family = none)]
        pub unsafe fn pixelBuffer(&self) -> Option<Retained<CVPixelBuffer>>;

        #[cfg(feature = "objc2-core-video")]
        /// This property offers access to the preview image pixel data if you've requested it.
        ///
        ///
        /// If you requested a preview image by calling -[AVCapturePhotoSettings setPreviewPhotoFormat:] with a non-nil value, this property offers access to the resulting preview image pixel data, and is analogous to CMSampleBufferGetImageBuffer(). The pixel buffer contains only the minimal attachments required for correct display. Nil is returned if you did not request a preview image.
        #[unsafe(method(previewPixelBuffer))]
        #[unsafe(method_family = none)]
        pub unsafe fn previewPixelBuffer(&self) -> Option<Retained<CVPixelBuffer>>;

        /// The format of the embedded thumbnail contained in this AVCapturePhoto.
        ///
        ///
        /// If you requested an embedded thumbnail image by calling -[AVCapturePhotoSettings setEmbeddedThumbnailPhotoFormat:] with a non-nil value, this property offers access to the resolved embedded thumbnail AVVideoSettings dictionary. Nil is returned if you did not request an embedded thumbnail image.
        #[unsafe(method(embeddedThumbnailPhotoFormat))]
        #[unsafe(method_family = none)]
        pub unsafe fn embeddedThumbnailPhotoFormat(
            &self,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(feature = "AVDepthData")]
        /// An AVDepthData object wrapping a disparity/depth map associated with this photo.
        ///
        ///
        /// If you requested depth data delivery by calling -[AVCapturePhotoSettings setDepthDataDeliveryEnabled:YES], this property offers access to the resulting AVDepthData object. Nil is returned if you did not request depth data delivery. Note that the depth data is only embedded in the photo's internal file format container if you set -[AVCapturePhotoSettings setEmbedsDepthDataInPhoto:YES].
        #[unsafe(method(depthData))]
        #[unsafe(method_family = none)]
        pub unsafe fn depthData(&self) -> Option<Retained<AVDepthData>>;

        #[cfg(feature = "AVPortraitEffectsMatte")]
        /// An AVPortraitEffectsMatte object wrapping a matte associated with this photo.
        ///
        ///
        /// If you requested portrait effects matte delivery by calling -[AVCapturePhotoSettings setPortraitEffectsMatteDeliveryEnabled:YES], this property offers access to the resulting AVPortraitEffectsMatte object. Nil is returned if you did not request portrait effects matte delivery. Note that the portrait effects matte is only embedded in the photo's internal file format container if you set -[AVCapturePhotoSettings setEmbedsPortraitEffectsMatteInPhoto:YES].
        #[unsafe(method(portraitEffectsMatte))]
        #[unsafe(method_family = none)]
        pub unsafe fn portraitEffectsMatte(&self) -> Option<Retained<AVPortraitEffectsMatte>>;

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// An accessor for semantic segmentation mattes associated with this photo.
        ///
        ///
        /// Parameter `semanticSegmentationMatteType`: The matte type of interest (hair, skin, etc).
        ///
        /// Returns: An instance of AVSemanticSegmentationMatte, or nil if none could be found for the specified type.
        ///
        ///
        /// If you requested one or more semantic segmentation mattes by calling -[AVCapturePhotoSettings setEnabledSemanticSegmentationMatteTypes:] with a non-empty array of types, this property offers access to the resulting AVSemanticSegmentationMatte objects. Nil is returned if you did not request semantic segmentation matte delivery, or if no mattes of the specified type are available. Note that semantic segmentation mattes are only embedded in the photo's internal file format container if you call -[AVCapturePhotoSettings setEmbedsSemanticSegmentationMattesInPhoto:YES].
        #[unsafe(method(semanticSegmentationMatteForType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn semanticSegmentationMatteForType(
            &self,
            semantic_segmentation_matte_type: &AVSemanticSegmentationMatteType,
        ) -> Option<Retained<AVSemanticSegmentationMatte>>;

        /// An ImageIO property style dictionary of metadata associated with this photo.
        ///
        ///
        /// Valid metadata keys are found in
        /// <ImageIO
        /// /CGImageProperties.h>, such as kCGImagePropertyOrientation, kCGImagePropertyExifDictionary, kCGImagePropertyMakerAppleDictionary, etc.
        #[unsafe(method(metadata))]
        #[unsafe(method_family = none)]
        pub unsafe fn metadata(&self) -> Retained<NSDictionary<NSString, AnyObject>>;

        #[cfg(feature = "AVCameraCalibrationData")]
        /// An AVCameraCalibrationData object representing the calibration information for the camera providing the photo.
        ///
        ///
        /// Camera calibration data is only present if you set AVCapturePhotoSettings.setCameraCalibrationDataDeliveryEnabled to YES. When requesting virtual device constituent photo delivery plus cameraCalibrationDataDeliveryEnabled, camera calibration information is delivered with all resultant photos and is specific to the constituent device producing that photo.
        #[unsafe(method(cameraCalibrationData))]
        #[unsafe(method_family = none)]
        pub unsafe fn cameraCalibrationData(&self) -> Option<Retained<AVCameraCalibrationData>>;

        /// The AVCaptureResolvedPhotoSettings associated with all photo results for a given -[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] request.
        ///
        ///
        /// Even in the event of an error, the resolved settings are always non nil.
        #[unsafe(method(resolvedSettings))]
        #[unsafe(method_family = none)]
        pub unsafe fn resolvedSettings(&self) -> Retained<AVCaptureResolvedPhotoSettings>;

        /// This photo's index (1-based) in the total expected photo count.
        ///
        ///
        /// The resolvedSettings.expectedPhotoCount property indicates the total number of images that will be returned for a given capture request. This property indicates this photo's index (1-based). When you receive a -captureOutput:didFinishProcessingPhoto:error: callback with a photo whose photoCount matches resolvedSettings.expectedPhotoCount, you know you've received the last one for the given capture request.
        #[unsafe(method(photoCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn photoCount(&self) -> NSInteger;

        #[cfg(feature = "AVCaptureDevice")]
        /// The device type of the source camera providing the photo.
        ///
        ///
        /// When taking a virtual device constituent photo capture, you may query this property to find out the source type of the photo. For instance, on a DualCamera, resulting photos will be of sourceDeviceType AVCaptureDeviceTypeBuiltInWideCamera, or AVCaptureDeviceTypeBuiltInTelephotoCamera. For all other types of capture, the source device type is equal to the -[AVCaptureDevice deviceType] of the AVCaptureDevice to which the AVCapturePhotoOutput is connected. Returns nil if the source of the photo is not an AVCaptureDevice.
        #[unsafe(method(sourceDeviceType))]
        #[unsafe(method_family = none)]
        pub unsafe fn sourceDeviceType(&self) -> Option<Retained<AVCaptureDeviceType>>;

        #[cfg(feature = "objc2-core-video")]
        /// Returns a pixel buffer with the same aspect ratio as the constant color photo, where each pixel value (unsigned 8-bit integer) indicates how fully the constant color effect has been achieved in the corresponding region of the constant color photo -- 255 means full confidence, 0 means zero confidence.
        ///
        ///
        /// NULL is returned for any non constant color photos.
        #[unsafe(method(constantColorConfidenceMap))]
        #[unsafe(method_family = none)]
        pub unsafe fn constantColorConfidenceMap(&self) -> Option<Retained<CVPixelBuffer>>;

        /// Returns a score summarizing the overall confidence level of a constant color photo -- 1.0 means full confidence, 0.0 means zero confidence.
        ///
        ///
        /// Default is 0.0.
        ///
        /// In most use cases (document scanning for example), the central region of the photo is considered more important than the peripherals, therefore the confidence level of the central pixels are weighted more heavily than pixels on the edges of the photo.
        ///
        /// Use constantColorConfidenceMap for more use case specific analyses of the confidence level.
        #[unsafe(method(constantColorCenterWeightedMeanConfidenceLevel))]
        #[unsafe(method_family = none)]
        pub unsafe fn constantColorCenterWeightedMeanConfidenceLevel(&self) -> c_float;

        /// Indicates whether this photo is a fallback photo for a constant color capture.
        #[unsafe(method(isConstantColorFallbackPhoto))]
        #[unsafe(method_family = none)]
        pub unsafe fn isConstantColorFallbackPhoto(&self) -> bool;
    );
}

/// AVCapturePhotoConversions.
impl AVCapturePhoto {
    extern_methods!(
        /// Flattens the AVCapturePhoto to an NSData using the file container format (processedFileType or rawFileType) specified in the AVCapturePhotoSettings (e.g. JFIF, HEIF, DNG, DICOM).
        ///
        ///
        /// Returns: An NSData containing bits in the file container's format, or nil if the flattening process fails.
        #[unsafe(method(fileDataRepresentation))]
        #[unsafe(method_family = none)]
        pub unsafe fn fileDataRepresentation(&self) -> Option<Retained<NSData>>;

        /// Flattens the AVCapturePhoto to an NSData using the file container format (processedFileType or rawFileType) specified in the AVCapturePhotoSettings (e.g. JFIF, HEIF, DNG, DICOM), and allows you to strip or replace various pieces of metadata in the process.
        ///
        ///
        /// Parameter `customizer`: An object conforming to the AVCapturePhotoFileDataRepresentationCustomizer protocol that will be called synchronously to provide customization of metadata written to the container format. An NSInvalidArgumentException is thrown if you pass nil.
        ///
        /// Returns: An NSData containing bits in the file container's format, or nil if the flattening process fails.
        #[unsafe(method(fileDataRepresentationWithCustomizer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fileDataRepresentationWithCustomizer(
            &self,
            customizer: &ProtocolObject<dyn AVCapturePhotoFileDataRepresentationCustomizer>,
        ) -> Option<Retained<NSData>>;

        #[cfg(all(feature = "AVDepthData", feature = "objc2-core-video"))]
        /// Flattens the AVCapturePhoto to an NSData using the file container format (processedFileType or rawFileType) specified in the AVCapturePhotoSettings (e.g. JFIF, HEIF, DNG, DICOM), and allows you to replace metadata, thumbnail, and depth data in the process.
        ///
        ///
        /// Parameter `replacementMetadata`: A dictionary of keys and values from
        /// <ImageIO
        /// /CGImageProperties.h>. To preserve existing metadata to the file, pass self.metadata. To strip existing metadata, pass nil. To replace metadata, pass a replacement dictionary.
        ///
        /// Parameter `replacementEmbeddedThumbnailPhotoFormat`: A dictionary of keys and values from
        /// <AVFoundation
        /// /AVVideoSettings.h>. If you pass a non-nil dictionary, AVVideoCodecKey is required, with AVVideoWidthKey and AVVideoHeightKey being optional. To preserve the existing embedded thumbnail photo to the file, pass self.embeddedThumbnailPhotoFormat and pass nil as your replacementEmbeddedThumbnailPixelBuffer parameter. To strip the existing embedded thumbnail, pass nil for both replacementEmbeddedThumbnailPhotoFormat and replacementEmbeddedThumbnailPixelBuffer. To replace the existing embedded thumbnail photo, pass both a non-nil replacementThumbnailPixelBuffer and replacementEmbeddedThumbnailPhotoFormat dictionary.
        ///
        /// Parameter `replacementEmbeddedThumbnailPixelBuffer`: A pixel buffer containing a source image to be encoded to the file as the replacement thumbnail image. To preserve the existing embedded thumbnail photo to the file, pass self.embeddedThumbnailPhotoFormat as your replacementEmbeddedThumbnailPhotoFormat parameter and nil as your replacementEmbeddedThumbnailPixelBuffer parameter. To strip the existing embedded thumbnail, pass nil for both replacementEmbeddedThumbnailPhotoFormat and replacementEmbeddedThumbnailPixelBuffer. To replace the existing embedded thumbnail photo, pass both a non-nil replacementThumbnailPixelBuffer and replacementEmbeddedThumbnailPhotoFormat dictionary.
        ///
        /// Parameter `replacementDepthData`: Replacement depth data to be written to the flattened file container. To preserve existing depth data to the file, pass self.depthData. To strip it, pass nil. To replace it, pass a new AVDepthData instance.
        ///
        /// Returns: An NSData containing bits in the file container's format, or nil if the flattening process fails.
        ///
        /// # Safety
        ///
        /// - `replacement_metadata` generic should be of the correct type.
        /// - `replacement_embedded_thumbnail_photo_format` generic should be of the correct type.
        #[deprecated]
        #[unsafe(method(fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData:))]
        #[unsafe(method_family = none)]
        pub unsafe fn fileDataRepresentationWithReplacementMetadata_replacementEmbeddedThumbnailPhotoFormat_replacementEmbeddedThumbnailPixelBuffer_replacementDepthData(
            &self,
            replacement_metadata: Option<&NSDictionary<NSString, AnyObject>>,
            replacement_embedded_thumbnail_photo_format: Option<&NSDictionary<NSString, AnyObject>>,
            replacement_embedded_thumbnail_pixel_buffer: Option<&CVPixelBuffer>,
            replacement_depth_data: Option<&AVDepthData>,
        ) -> Option<Retained<NSData>>;

        #[cfg(feature = "objc2-core-graphics")]
        /// Utility method that converts the AVCapturePhoto's primary photo to a CGImage.
        ///
        ///
        /// Returns: A CGImageRef, or nil if the conversion process fails.
        ///
        ///
        /// Each time you access this method, AVCapturePhoto generates a new CGImageRef. When backed by a compressed container (such as HEIC), the CGImageRepresentation is decoded lazily as needed. When backed by an uncompressed format such as BGRA, it is copied into a separate backing buffer whose lifetime is not tied to that of the AVCapturePhoto. For a 12 megapixel image, a BGRA CGImage represents ~48 megabytes per call. If you only intend to use the CGImage for on-screen rendering, use the previewCGImageRepresentation instead. Note that the physical rotation of the CGImageRef matches that of the main image. Exif orientation has not been applied. If you wish to apply rotation when working with UIImage, you can do so by querying the photo's metadata[kCGImagePropertyOrientation] value, and passing it as the orientation parameter to +[UIImage imageWithCGImage:scale:orientation:]. RAW images always return a CGImageRepresentation of nil. If you wish to make a CGImageRef from a RAW image, use CIRAWFilter in the CoreImage framework.
        #[unsafe(method(CGImageRepresentation))]
        #[unsafe(method_family = none)]
        pub unsafe fn CGImageRepresentation(&self) -> Option<Retained<CGImage>>;

        #[cfg(feature = "objc2-core-graphics")]
        /// Utility method that converts the AVCapturePhoto's preview photo to a CGImage.
        ///
        ///
        /// Returns: A CGImageRef, or nil if the conversion process fails, or if you did not request a preview photo.
        ///
        ///
        /// Each time you access this method, AVCapturePhoto generates a new CGImageRef. This CGImageRepresentation is a RGB rendering of the previewPixelBuffer property. If you did not request a preview photo by setting the -[AVCapturePhotoSettings previewPhotoFormat] property, this method returns nil. Note that the physical rotation of the CGImageRef matches that of the main image. Exif orientation has not been applied. If you wish to apply rotation when working with UIImage, you can do so by querying the photo's metadata[kCGImagePropertyOrientation] value, and passing it as the orientation parameter to +[UIImage imageWithCGImage:scale:orientation:].
        #[unsafe(method(previewCGImageRepresentation))]
        #[unsafe(method_family = none)]
        pub unsafe fn previewCGImageRepresentation(&self) -> Option<Retained<CGImage>>;
    );
}

/// Constants indicating the status of the lens stabilization module (aka OIS).
///
///
/// Indicates that lens stabilization is unsupported.
///
/// Indicates that lens stabilization was not in use for this capture.
///
/// Indicates that the lens stabilization module was active for the duration of the capture.
///
/// Indicates that device motion or capture duration exceeded the stabilization module's correction limits.
///
/// Indicates that the lens stabilization module was unavailable for use at the time of capture. The module may be available in subsequent captures.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturelensstabilizationstatus?language=objc)
// NS_ENUM
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct AVCaptureLensStabilizationStatus(pub NSInteger);
impl AVCaptureLensStabilizationStatus {
    #[doc(alias = "AVCaptureLensStabilizationStatusUnsupported")]
    pub const Unsupported: Self = Self(0);
    #[doc(alias = "AVCaptureLensStabilizationStatusOff")]
    pub const Off: Self = Self(1);
    #[doc(alias = "AVCaptureLensStabilizationStatusActive")]
    pub const Active: Self = Self(2);
    #[doc(alias = "AVCaptureLensStabilizationStatusOutOfRange")]
    pub const OutOfRange: Self = Self(3);
    #[doc(alias = "AVCaptureLensStabilizationStatusUnavailable")]
    pub const Unavailable: Self = Self(4);
}

unsafe impl Encode for AVCaptureLensStabilizationStatus {
    const ENCODING: Encoding = NSInteger::ENCODING;
}

unsafe impl RefEncode for AVCaptureLensStabilizationStatus {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// AVCapturePhotoBracketedCapture.
impl AVCapturePhoto {
    extern_methods!(
        #[cfg(feature = "AVCaptureStillImageOutput")]
        /// The AVCaptureBracketedStillImageSettings associated with this photo.
        ///
        ///
        /// When specifying a bracketed capture using AVCapturePhotoBracketSettings, you specify an array of AVCaptureBracketedStillImageSettings -- one per image in the bracket. This property indicates the AVCaptureBracketedStillImageSettings associated with this particular photo, or nil if this photo is not part of a bracketed capture.
        #[unsafe(method(bracketSettings))]
        #[unsafe(method_family = none)]
        pub unsafe fn bracketSettings(
            &self,
        ) -> Option<Retained<AVCaptureBracketedStillImageSettings>>;

        /// 1-based sequence count of the photo.
        ///
        ///
        /// If this photo is part of a bracketed capture (invoked using AVCapturePhotoBracketSettings), this property indicates the current result's count in the sequence, starting with 1 for the first result, or 0 if this photo is not part of a bracketed capture.
        #[unsafe(method(sequenceCount))]
        #[unsafe(method_family = none)]
        pub unsafe fn sequenceCount(&self) -> NSInteger;

        /// The status of the lens stabilization module during capture of this photo.
        ///
        ///
        /// In configurations where lens stabilization (OIS) is unsupported, AVCaptureLensStabilizationStatusUnsupported is returned. If lens stabilization is supported, but this photo is not part of a bracketed capture in which -[AVCapturePhotoBracketSettings setLensStabilizationEnabled:YES] was called, AVCaptureLensStabilizationStatusOff is returned. Otherwise a lens stabilization status is returned indicating how lens stabilization was applied during the capture.
        #[unsafe(method(lensStabilizationStatus))]
        #[unsafe(method_family = none)]
        pub unsafe fn lensStabilizationStatus(&self) -> AVCaptureLensStabilizationStatus;
    );
}

extern_class!(
    /// A lightly-processed photo whose data may be used to process and fetch a higher-resolution asset at a later time.
    ///
    ///
    /// An AVCaptureDeferredPhotoProxy behaves like a normal AVCapturePhoto, and approximates the look of the final rendered image.  This object represents intermediate data that can be rendered into a final image and ingested into the user's photo library via PHAsset APIs.  The intermediate data are not accessible by the calling process.
    ///
    /// Use a PHAssetCreationRequest with a resourceType of PHAssetResourceTypePhotoProxy using the fileDataRepresentation of this object.  Image processing to finalize the asset will occur either on-demand when accessing the image data via PHImageManager or PHAssetResource, or will execute in the background when the system has determined that it's a good time to process based on thermals, battery level, and other conditions.  If the data provided to the PHAssetCreationRequest does not come from an AVCaptureDeferredPhotoProxy, then PHAssetCreationRequest will fail and a PHPhotosErrorInvalidResource error will be returned.
    ///
    /// Below is a discussion of how the superclass properties behave on an AVCaptureDeferredPhotoProxy.
    ///
    /// The time of the capture; proxy and final photos will have the same timestamp.
    ///
    ///
    /// The metadata of the proxy image may differ slightly from the final photo's metadata where some fields may be updated.
    ///
    ///
    /// Always NO, as deferred processing isn't available for raw photos.
    ///
    ///
    /// Describes the embedded thumbnail format of both the proxy and the final photo which have the same dimensions and codec.
    ///
    ///
    /// Describes the resolved settings of the whole capture, including the proxy and final photo. See AVCaptureResolvedPhotoSettings.deferredPhotoProxyDimensions.
    ///
    ///
    /// Same for both proxy and final.
    ///
    ///
    /// Same for both proxy and final.
    ///
    ///
    /// Same for both proxy and final.
    ///
    ///
    /// Same for both proxy and final.
    ///
    ///
    /// Same for both proxy and final.
    ///
    /// Superclass properties/methods that behave differently than a typical AVCapturePhoto:
    ///
    ///
    /// - (nullable CGImageRef)CGImageRepresentation;
    /// - (nullable CGImageRef)previewCGImageRepresentation;
    /// All of the above properties return the same proxy image, either as a pixel buffer or CGImageRef.
    ///
    /// - (nullable NSData *)fileDataRepresentation;
    /// - (nullable NSData *)fileDataRepresentationWithCustomizer:(id
    /// <AVCapturePhotoFileDataRepresentationCustomizer
    /// >)customizer;
    /// You may call either of the above two methods to create a NSData representation of the image, but note that it is only the proxy image quality being packaged.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturedeferredphotoproxy?language=objc)
    #[unsafe(super(AVCapturePhoto, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct AVCaptureDeferredPhotoProxy;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for AVCaptureDeferredPhotoProxy {}
);

impl AVCaptureDeferredPhotoProxy {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_protocol!(
    /// A set of delegate callbacks to be implemented by a client who calls AVCapturePhoto's -fileDataRepresentationWithCustomizer:.
    ///
    ///
    /// AVCapturePhoto is a wrapper representing a file-containerized photo in memory. If you simply wish to flatten the photo to an NSData to be written to a file, you may call -[AVCapturePhoto fileDataRepresentation]. For more complex flattening operations in which you wish to replace or strip metadata, you should call -[AVCapturePhoto fileDataRepresentationWithCustomizer:] instead, providing a delegate for customized stripping / replacing behavior. This delegate's methods are called synchronously before the flattening process commences.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/avfoundation/avcapturephotofiledatarepresentationcustomizer?language=objc)
    pub unsafe trait AVCapturePhotoFileDataRepresentationCustomizer:
        NSObjectProtocol
    {
        /// A callback in which you may provide replacement metadata, or direct the AVCapturePhoto to strip existing metadata from the flattened file data representation.
        ///
        ///
        /// Parameter `photo`: The calling instance of AVCapturePhoto.
        ///
        /// Returns: A dictionary of keys and values from
        /// <ImageIO
        /// /CGImageProperties.h>. To preserve existing metadata, return photo.metadata. To strip existing metadata, return nil. To replace metadata, pass a replacement dictionary.
        ///
        ///
        /// This callback is optional. If your delegate does not implement this callback, the existing metadata in the in-memory AVCapturePhoto container will be written to the file data representation.
        #[optional]
        #[unsafe(method(replacementMetadataForPhoto:))]
        #[unsafe(method_family = none)]
        unsafe fn replacementMetadataForPhoto(
            &self,
            photo: &AVCapturePhoto,
        ) -> Option<Retained<NSDictionary<NSString, AnyObject>>>;

        #[cfg(feature = "objc2-core-video")]
        /// A callback in which you may provide a replacement embedded thumbnail image with compression settings, or strip the existing embedded thumbnail image from the flattened file data representation.
        ///
        ///
        /// Parameter `replacementEmbeddedThumbnailPhotoFormatOut`: On output, a pointer to a dictionary of keys and values from
        /// <AVFoundation
        /// /AVVideoSettings.h> If you pass a non-nil dictionary, AVVideoCodecKey is required, with AVVideoWidthKey and AVVideoHeightKey being optional. To preserve the existing embedded thumbnail photo to the flattened data, set *replacementEmbeddedThumbnailPhotoFormatOut to photo.embeddedThumbnailPhotoFormat and return nil. To strip the existing embedded thumbnail, set *replacementEmbeddedThumbnailPhotoFormatOut to nil and return nil. To replace the existing embedded thumbnail photo, pass a replacement photo format dictionary and return a non-nil replacement pixel buffer.
        ///
        /// Parameter `photo`: The calling instance of AVCapturePhoto.
        ///
        /// Returns: A pixel buffer containing a source image to be encoded to the file as the replacement thumbnail image. To preserve the existing embedded thumbnail photo to the flattened data, set *replacementEmbeddedThumbnailPhotoFormatOut to photo.embeddedThumbnailPhotoFormat and return nil. To strip the existing embedded thumbnail, set *replacementEmbeddedThumbnailPhotoFormatOut to nil and return nil. To replace the existing embedded thumbnail photo, pass a replacement photo format dictionary and return a non-nil replacement pixel buffer.
        ///
        ///
        /// This callback is optional. If your delegate does not implement this callback, the existing embedded thumbnail photo in the in-memory AVCapturePhoto container will be written to the file data representation.
        ///
        /// # Safety
        ///
        /// `replacement_embedded_thumbnail_photo_format_out` generic should be of the correct type.
        #[optional]
        #[unsafe(method(replacementEmbeddedThumbnailPixelBufferWithPhotoFormat:forPhoto:))]
        #[unsafe(method_family = none)]
        unsafe fn replacementEmbeddedThumbnailPixelBufferWithPhotoFormat_forPhoto(
            &self,
            replacement_embedded_thumbnail_photo_format_out: &mut Option<
                Retained<NSDictionary<NSString, AnyObject>>,
            >,
            photo: &AVCapturePhoto,
        ) -> Option<Retained<CVPixelBuffer>>;

        #[cfg(feature = "AVDepthData")]
        /// A callback in which you may provide replacement depth data, or strip the existing depth data from the flattened file data representation.
        ///
        ///
        /// Parameter `photo`: The calling instance of AVCapturePhoto.
        ///
        /// Returns: An instance of AVDepthData. To preserve the existing depth data, return photo.depthData. To strip the existing one, return nil. To replace, provide a replacement AVDepthData instance.
        ///
        ///
        /// This callback is optional. If your delegate does not implement this callback, the existing depth data in the in-memory AVCapturePhoto container will be written to the file data representation.
        #[optional]
        #[unsafe(method(replacementDepthDataForPhoto:))]
        #[unsafe(method_family = none)]
        unsafe fn replacementDepthDataForPhoto(
            &self,
            photo: &AVCapturePhoto,
        ) -> Option<Retained<AVDepthData>>;

        #[cfg(feature = "AVPortraitEffectsMatte")]
        /// A callback in which you may provide a replacement portrait effects matte, or strip the existing portrait effects matte from the flattened file data representation.
        ///
        ///
        /// Parameter `photo`: The calling instance of AVCapturePhoto.
        ///
        /// Returns: An instance of AVPortraitEffectsMatte. To preserve the existing portrait effects matte, return photo.portraitEffectsMatte. To strip the existing one, return nil. To replace, provide a replacement AVPortraitEffectsMatte instance.
        ///
        ///
        /// This callback is optional. If your delegate does not implement this callback, the existing portrait effects matte in the in-memory AVCapturePhoto container will be written to the file data representation.
        #[optional]
        #[unsafe(method(replacementPortraitEffectsMatteForPhoto:))]
        #[unsafe(method_family = none)]
        unsafe fn replacementPortraitEffectsMatteForPhoto(
            &self,
            photo: &AVCapturePhoto,
        ) -> Option<Retained<AVPortraitEffectsMatte>>;

        #[cfg(feature = "AVSemanticSegmentationMatte")]
        /// A callback in which you may provide a replacement semantic segmentation matte of the indicated type, or strip the existing one from the flattened file data representation.
        ///
        ///
        /// Parameter `semanticSegmentationMatteType`: The type of semantic segmentation matte to be replaced or stripped.
        ///
        /// Parameter `photo`: The calling instance of AVCapturePhoto.
        ///
        /// Returns: An instance of AVSemanticSegmentationMatte. To preserve the existing matte, return [photo semanticSegmentationMatteForType:semanticSegmentationMatteType]. To strip the existing one, return nil. To replace, provide a replacement AVPortraitEffectsMatte instance.
        ///
        ///
        /// This callback is optional. If your delegate does not implement this callback, the existing semantic segmentation matte of the specified type in the in-memory AVCapturePhoto container will be written to the file data representation.
        #[optional]
        #[unsafe(method(replacementSemanticSegmentationMatteOfType:forPhoto:))]
        #[unsafe(method_family = none)]
        unsafe fn replacementSemanticSegmentationMatteOfType_forPhoto(
            &self,
            semantic_segmentation_matte_type: &AVSemanticSegmentationMatteType,
            photo: &AVCapturePhoto,
        ) -> Option<Retained<AVSemanticSegmentationMatte>>;

        /// A callback in which you may provide replacement compression settings for the DNG flattened file data representation of Apple ProRAW. This callback will only be invoked for Apple ProRAW captures written to DNG.
        ///
        ///
        /// Parameter `photo`: The calling instance of AVCapturePhoto.
        ///
        /// Parameter `defaultSettings`: The default settings that will be used if not overridden.
        ///
        /// Parameter `maximumBitDepth`: The maximum bit depth that can be specified with AVVideoAppleProRAWBitDepthKey in the returned settings dictionary.
        ///
        /// Returns: An NSDictionary containing compression settings to be used when writing the DNG file representation. Currently accepted keys are:
        /// AVVideoQualityKey (NSNumber in range 0 to 1.0, inclusive)
        /// AVVideoAppleProRAWBitDepthKey (NSNumber in range 8 to maximumBitDepth, inclusive)
        /// Setting AVVideoQualityKey to 1.0 will use lossless compression. Any value between 0 and 1.0 will use lossy compression with that quality.
        /// Setting AVVideoAppleProRAWBitDepthKey to a value less than what is given in defaultSettings may result in quantization losses.
        /// Any keys not specified in the returned dictionary will use the values from defaultSettings. Return defaultSettings if no changes to the compression settings are desired.
        ///
        ///
        /// This callback is optional. If your delegate does not implement this callback, the default compression settings for the file type will be used.
        ///
        /// # Safety
        ///
        /// `default_settings` generic should be of the correct type.
        #[optional]
        #[unsafe(method(replacementAppleProRAWCompressionSettingsForPhoto:defaultSettings:maximumBitDepth:))]
        #[unsafe(method_family = none)]
        unsafe fn replacementAppleProRAWCompressionSettingsForPhoto_defaultSettings_maximumBitDepth(
            &self,
            photo: &AVCapturePhoto,
            default_settings: &NSDictionary<NSString, AnyObject>,
            maximum_bit_depth: NSInteger,
        ) -> Retained<NSDictionary<NSString, AnyObject>>;
    }
);