1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
pub const RS2_PRODUCT_LINE_ANY: u32 = 255;
pub const RS2_PRODUCT_LINE_ANY_INTEL: u32 = 254;
pub const RS2_PRODUCT_LINE_NON_INTEL: u32 = 1;
pub const RS2_PRODUCT_LINE_D400: u32 = 2;
pub const RS2_PRODUCT_LINE_SR300: u32 = 4;
pub const RS2_PRODUCT_LINE_L500: u32 = 8;
pub const RS2_PRODUCT_LINE_T200: u32 = 16;
pub const RS2_PRODUCT_LINE_DEPTH: u32 = 14;
pub const RS2_PRODUCT_LINE_TRACKING: u32 = 16;
pub const RS2_UNSIGNED_UPDATE_MODE_UPDATE: u32 = 0;
pub const RS2_UNSIGNED_UPDATE_MODE_READ_ONLY: u32 = 1;
pub const RS2_UNSIGNED_UPDATE_MODE_FULL: u32 = 2;
pub const RS2_API_MAJOR_VERSION: u32 = 2;
pub const RS2_API_MINOR_VERSION: u32 = 47;
pub const RS2_API_PATCH_VERSION: u32 = 0;
pub const RS2_API_BUILD_VERSION: u32 = 0;
pub const RS2_API_VERSION: u32 = 24700;
pub const RS2_DEFAULT_TIMEOUT: u32 = 15000;
#[doc = "< Frames didn't arrived within 5 seconds"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_FRAMES_TIMEOUT:
rs2_notification_category = 0;
#[doc = "< Received partial/incomplete frame"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_FRAME_CORRUPTED:
rs2_notification_category = 1;
#[doc = "< Error reported from the device"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_HARDWARE_ERROR:
rs2_notification_category = 2;
#[doc = "< General Hardeware notification that is not an error"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_HARDWARE_EVENT:
rs2_notification_category = 3;
#[doc = "< Received unknown error from the device"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_UNKNOWN_ERROR:
rs2_notification_category = 4;
#[doc = "< Current firmware version installed is not the latest available"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_FIRMWARE_UPDATE_RECOMMENDED:
rs2_notification_category = 5;
#[doc = "< A relocalization event has updated the pose provided by a pose sensor"]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_POSE_RELOCALIZATION:
rs2_notification_category = 6;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_notification_category_RS2_NOTIFICATION_CATEGORY_COUNT: rs2_notification_category = 7;
#[doc = " \\brief Category of the librealsense notification."]
pub type rs2_notification_category = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_notification_category_to_string(
category: rs2_notification_category,
) -> *const ::std::os::raw::c_char;
}
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_UNKNOWN: rs2_exception_type = 0;
#[doc = "< Device was disconnected, this can be caused by outside intervention, by internal firmware error or due to insufficient power"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_CAMERA_DISCONNECTED: rs2_exception_type = 1;
#[doc = "< Error was returned from the underlying OS-specific layer"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_BACKEND: rs2_exception_type = 2;
#[doc = "< Invalid value was passed to the API"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_INVALID_VALUE: rs2_exception_type = 3;
#[doc = "< Function precondition was violated"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_WRONG_API_CALL_SEQUENCE: rs2_exception_type = 4;
#[doc = "< The method is not implemented at this point"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_NOT_IMPLEMENTED: rs2_exception_type = 5;
#[doc = "< Device is in recovery mode and might require firmware update"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_DEVICE_IN_RECOVERY_MODE: rs2_exception_type = 6;
#[doc = "< IO Device failure"]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_IO: rs2_exception_type = 7;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_exception_type_RS2_EXCEPTION_TYPE_COUNT: rs2_exception_type = 8;
#[doc = " \\brief Exception types are the different categories of errors that RealSense API might return."]
pub type rs2_exception_type = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_exception_type_to_string(type_: rs2_exception_type)
-> *const ::std::os::raw::c_char;
}
#[doc = "< Rectilinear images. No distortion compensation required."]
pub const rs2_distortion_RS2_DISTORTION_NONE: rs2_distortion = 0;
#[doc = "< Equivalent to Brown-Conrady distortion, except that tangential distortion is applied to radially distorted points"]
pub const rs2_distortion_RS2_DISTORTION_MODIFIED_BROWN_CONRADY: rs2_distortion = 1;
#[doc = "< Equivalent to Brown-Conrady distortion, except undistorts image instead of distorting it"]
pub const rs2_distortion_RS2_DISTORTION_INVERSE_BROWN_CONRADY: rs2_distortion = 2;
#[doc = "< F-Theta fish-eye distortion model"]
pub const rs2_distortion_RS2_DISTORTION_FTHETA: rs2_distortion = 3;
#[doc = "< Unmodified Brown-Conrady distortion model"]
pub const rs2_distortion_RS2_DISTORTION_BROWN_CONRADY: rs2_distortion = 4;
#[doc = "< Four parameter Kannala Brandt distortion model"]
pub const rs2_distortion_RS2_DISTORTION_KANNALA_BRANDT4: rs2_distortion = 5;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_distortion_RS2_DISTORTION_COUNT: rs2_distortion = 6;
#[doc = " \\brief Distortion model: defines how pixel coordinates should be mapped to sensor coordinates."]
pub type rs2_distortion = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_distortion_to_string(distortion: rs2_distortion) -> *const ::std::os::raw::c_char;
}
#[doc = " \\brief Video stream intrinsics."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_intrinsics {
#[doc = "< Width of the image in pixels"]
pub width: ::std::os::raw::c_int,
#[doc = "< Height of the image in pixels"]
pub height: ::std::os::raw::c_int,
#[doc = "< Horizontal coordinate of the principal point of the image, as a pixel offset from the left edge"]
pub ppx: f32,
#[doc = "< Vertical coordinate of the principal point of the image, as a pixel offset from the top edge"]
pub ppy: f32,
#[doc = "< Focal length of the image plane, as a multiple of pixel width"]
pub fx: f32,
#[doc = "< Focal length of the image plane, as a multiple of pixel height"]
pub fy: f32,
#[doc = "< Distortion model of the image"]
pub model: rs2_distortion,
#[doc = "< Distortion coefficients. Order for Brown-Conrady: [k1, k2, p1, p2, k3]. Order for F-Theta Fish-eye: [k1, k2, k3, k4, 0]. Other models are subject to their own interpretations"]
pub coeffs: [f32; 5usize],
}
#[test]
fn bindgen_test_layout_rs2_intrinsics() {
assert_eq!(
::std::mem::size_of::<rs2_intrinsics>(),
48usize,
concat!("Size of: ", stringify!(rs2_intrinsics))
);
assert_eq!(
::std::mem::align_of::<rs2_intrinsics>(),
4usize,
concat!("Alignment of ", stringify!(rs2_intrinsics))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).width as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(width)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).height as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(height)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).ppx as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(ppx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).ppy as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(ppy)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).fx as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(fx)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).fy as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(fy)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).model as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(model)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_intrinsics>())).coeffs as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(rs2_intrinsics),
"::",
stringify!(coeffs)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_dsm_params {
#[doc = "< system_clock::time_point::time_since_epoch().count()"]
pub timestamp: ::std::os::raw::c_ulonglong,
#[doc = "< MAJOR<<12 | MINOR<<4 | PATCH"]
pub version: ::std::os::raw::c_ushort,
#[doc = "< rs2_dsm_correction_model"]
pub model: ::std::os::raw::c_uchar,
#[doc = "< TBD, now 0s"]
pub flags: [::std::os::raw::c_uchar; 5usize],
#[doc = "< the scale factor to horizontal DSM scale thermal results"]
pub h_scale: f32,
#[doc = "< the scale factor to vertical DSM scale thermal results"]
pub v_scale: f32,
#[doc = "< the offset to horizontal DSM offset thermal results"]
pub h_offset: f32,
#[doc = "< the offset to vertical DSM offset thermal results"]
pub v_offset: f32,
#[doc = "< the offset to the Round-Trip-Distance delay thermal results"]
pub rtd_offset: f32,
#[doc = "< the temperature recorded times 2 (ldd for depth; hum for rgb)"]
pub temp_x2: ::std::os::raw::c_uchar,
#[doc = "< the scale factor to horizontal LOS coefficients in MC"]
pub mc_h_scale: f32,
#[doc = "< the scale factor to vertical LOS coefficients in MC"]
pub mc_v_scale: f32,
#[doc = "< time (in weeks) since factory calibration"]
pub weeks_since_calibration: ::std::os::raw::c_uchar,
#[doc = "< time (in weeks) between factory calibration and last AC event"]
pub ac_weeks_since_calibaration: ::std::os::raw::c_uchar,
pub reserved: [::std::os::raw::c_uchar; 1usize],
}
#[test]
fn bindgen_test_layout_rs2_dsm_params() {
assert_eq!(
::std::mem::size_of::<rs2_dsm_params>(),
48usize,
concat!("Size of: ", stringify!(rs2_dsm_params))
);
assert_eq!(
::std::mem::align_of::<rs2_dsm_params>(),
1usize,
concat!("Alignment of ", stringify!(rs2_dsm_params))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).timestamp as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(timestamp)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).version as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).model as *const _ as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(model)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).flags as *const _ as usize },
11usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).h_scale as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(h_scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).v_scale as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(v_scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).h_offset as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(h_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).v_offset as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(v_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).rtd_offset as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(rtd_offset)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).temp_x2 as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(temp_x2)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).mc_h_scale as *const _ as usize },
37usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(mc_h_scale)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).mc_v_scale as *const _ as usize },
41usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(mc_v_scale)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<rs2_dsm_params>())).weeks_since_calibration as *const _ as usize
},
45usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(weeks_since_calibration)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<rs2_dsm_params>())).ac_weeks_since_calibaration as *const _
as usize
},
46usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(ac_weeks_since_calibaration)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_dsm_params>())).reserved as *const _ as usize },
47usize,
concat!(
"Offset of field: ",
stringify!(rs2_dsm_params),
"::",
stringify!(reserved)
)
);
}
#[doc = "< hFactor and hOffset are not used, and no artificial error is induced"]
pub const rs2_dsm_correction_model_RS2_DSM_CORRECTION_NONE: rs2_dsm_correction_model = 0;
#[doc = "< Aging-over-thermal (default); aging-induced error is uniform across temperature"]
pub const rs2_dsm_correction_model_RS2_DSM_CORRECTION_AOT: rs2_dsm_correction_model = 1;
#[doc = "< Thermal-over-aging; aging-induced error changes alongside temperature"]
pub const rs2_dsm_correction_model_RS2_DSM_CORRECTION_TOA: rs2_dsm_correction_model = 2;
pub const rs2_dsm_correction_model_RS2_DSM_CORRECTION_COUNT: rs2_dsm_correction_model = 3;
pub type rs2_dsm_correction_model = ::std::os::raw::c_uint;
#[doc = " \\brief Motion device intrinsics: scale, bias, and variances."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_motion_device_intrinsic {
#[doc = "< Interpret data array values"]
pub data: [[f32; 4usize]; 3usize],
#[doc = "< Variance of noise for X, Y, and Z axis"]
pub noise_variances: [f32; 3usize],
#[doc = "< Variance of bias for X, Y, and Z axis"]
pub bias_variances: [f32; 3usize],
}
#[test]
fn bindgen_test_layout_rs2_motion_device_intrinsic() {
assert_eq!(
::std::mem::size_of::<rs2_motion_device_intrinsic>(),
72usize,
concat!("Size of: ", stringify!(rs2_motion_device_intrinsic))
);
assert_eq!(
::std::mem::align_of::<rs2_motion_device_intrinsic>(),
4usize,
concat!("Alignment of ", stringify!(rs2_motion_device_intrinsic))
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<rs2_motion_device_intrinsic>())).data as *const _ as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_motion_device_intrinsic),
"::",
stringify!(data)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<rs2_motion_device_intrinsic>())).noise_variances as *const _
as usize
},
48usize,
concat!(
"Offset of field: ",
stringify!(rs2_motion_device_intrinsic),
"::",
stringify!(noise_variances)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<rs2_motion_device_intrinsic>())).bias_variances as *const _
as usize
},
60usize,
concat!(
"Offset of field: ",
stringify!(rs2_motion_device_intrinsic),
"::",
stringify!(bias_variances)
)
);
}
#[doc = " \\brief 3D coordinates with origin at topmost left corner of the lense,"]
#[doc = "with positive Z pointing away from the camera, positive X pointing camera right and positive Y pointing camera down"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_vertex {
pub xyz: [f32; 3usize],
}
#[test]
fn bindgen_test_layout_rs2_vertex() {
assert_eq!(
::std::mem::size_of::<rs2_vertex>(),
12usize,
concat!("Size of: ", stringify!(rs2_vertex))
);
assert_eq!(
::std::mem::align_of::<rs2_vertex>(),
4usize,
concat!("Alignment of ", stringify!(rs2_vertex))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_vertex>())).xyz as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_vertex),
"::",
stringify!(xyz)
)
);
}
#[doc = " \\brief Pixel location within 2D image. (0,0) is the topmost, left corner. Positive X is right, positive Y is down"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_pixel {
pub ij: [::std::os::raw::c_int; 2usize],
}
#[test]
fn bindgen_test_layout_rs2_pixel() {
assert_eq!(
::std::mem::size_of::<rs2_pixel>(),
8usize,
concat!("Size of: ", stringify!(rs2_pixel))
);
assert_eq!(
::std::mem::align_of::<rs2_pixel>(),
4usize,
concat!("Alignment of ", stringify!(rs2_pixel))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pixel>())).ij as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_pixel),
"::",
stringify!(ij)
)
);
}
#[doc = " \\brief 3D vector in Euclidean coordinate space"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_vector {
pub x: f32,
pub y: f32,
pub z: f32,
}
#[test]
fn bindgen_test_layout_rs2_vector() {
assert_eq!(
::std::mem::size_of::<rs2_vector>(),
12usize,
concat!("Size of: ", stringify!(rs2_vector))
);
assert_eq!(
::std::mem::align_of::<rs2_vector>(),
4usize,
concat!("Alignment of ", stringify!(rs2_vector))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_vector>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_vector),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_vector>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(rs2_vector),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_vector>())).z as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rs2_vector),
"::",
stringify!(z)
)
);
}
#[doc = " \\brief Quaternion used to represent rotation"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_quaternion {
pub x: f32,
pub y: f32,
pub z: f32,
pub w: f32,
}
#[test]
fn bindgen_test_layout_rs2_quaternion() {
assert_eq!(
::std::mem::size_of::<rs2_quaternion>(),
16usize,
concat!("Size of: ", stringify!(rs2_quaternion))
);
assert_eq!(
::std::mem::align_of::<rs2_quaternion>(),
4usize,
concat!("Alignment of ", stringify!(rs2_quaternion))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_quaternion>())).x as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_quaternion),
"::",
stringify!(x)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_quaternion>())).y as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(rs2_quaternion),
"::",
stringify!(y)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_quaternion>())).z as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(rs2_quaternion),
"::",
stringify!(z)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_quaternion>())).w as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(rs2_quaternion),
"::",
stringify!(w)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_pose {
#[doc = "< X, Y, Z values of translation, in meters (relative to initial position)"]
pub translation: rs2_vector,
#[doc = "< X, Y, Z values of velocity, in meters/sec"]
pub velocity: rs2_vector,
#[doc = "< X, Y, Z values of acceleration, in meters/sec^2"]
pub acceleration: rs2_vector,
#[doc = "< Qi, Qj, Qk, Qr components of rotation as represented in quaternion rotation (relative to initial position)"]
pub rotation: rs2_quaternion,
#[doc = "< X, Y, Z values of angular velocity, in radians/sec"]
pub angular_velocity: rs2_vector,
#[doc = "< X, Y, Z values of angular acceleration, in radians/sec^2"]
pub angular_acceleration: rs2_vector,
#[doc = "< Pose confidence 0x0 - Failed, 0x1 - Low, 0x2 - Medium, 0x3 - High"]
pub tracker_confidence: ::std::os::raw::c_uint,
#[doc = "< Pose map confidence 0x0 - Failed, 0x1 - Low, 0x2 - Medium, 0x3 - High"]
pub mapper_confidence: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_rs2_pose() {
assert_eq!(
::std::mem::size_of::<rs2_pose>(),
84usize,
concat!("Size of: ", stringify!(rs2_pose))
);
assert_eq!(
::std::mem::align_of::<rs2_pose>(),
4usize,
concat!("Alignment of ", stringify!(rs2_pose))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).translation as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(translation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).velocity as *const _ as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(velocity)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).acceleration as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(acceleration)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).rotation as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(rotation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).angular_velocity as *const _ as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(angular_velocity)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).angular_acceleration as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(angular_acceleration)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).tracker_confidence as *const _ as usize },
76usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(tracker_confidence)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_pose>())).mapper_confidence as *const _ as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(rs2_pose),
"::",
stringify!(mapper_confidence)
)
);
}
#[doc = "< Detailed information about ordinary operations"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_DEBUG: rs2_log_severity = 0;
#[doc = "< Terse information about ordinary operations"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_INFO: rs2_log_severity = 1;
#[doc = "< Indication of possible failure"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_WARN: rs2_log_severity = 2;
#[doc = "< Indication of definite failure"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_ERROR: rs2_log_severity = 3;
#[doc = "< Indication of unrecoverable failure"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_FATAL: rs2_log_severity = 4;
#[doc = "< No logging will occur"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_NONE: rs2_log_severity = 5;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_log_severity_RS2_LOG_SEVERITY_COUNT: rs2_log_severity = 6;
#[doc = "< Include any/all log messages"]
pub const rs2_log_severity_RS2_LOG_SEVERITY_ALL: rs2_log_severity = 0;
#[doc = " \\brief Severity of the librealsense logger."]
pub type rs2_log_severity = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_log_severity_to_string(info: rs2_log_severity) -> *const ::std::os::raw::c_char;
}
pub const rs2_extension_RS2_EXTENSION_UNKNOWN: rs2_extension = 0;
pub const rs2_extension_RS2_EXTENSION_DEBUG: rs2_extension = 1;
pub const rs2_extension_RS2_EXTENSION_INFO: rs2_extension = 2;
pub const rs2_extension_RS2_EXTENSION_MOTION: rs2_extension = 3;
pub const rs2_extension_RS2_EXTENSION_OPTIONS: rs2_extension = 4;
pub const rs2_extension_RS2_EXTENSION_VIDEO: rs2_extension = 5;
pub const rs2_extension_RS2_EXTENSION_ROI: rs2_extension = 6;
pub const rs2_extension_RS2_EXTENSION_DEPTH_SENSOR: rs2_extension = 7;
pub const rs2_extension_RS2_EXTENSION_VIDEO_FRAME: rs2_extension = 8;
pub const rs2_extension_RS2_EXTENSION_MOTION_FRAME: rs2_extension = 9;
pub const rs2_extension_RS2_EXTENSION_COMPOSITE_FRAME: rs2_extension = 10;
pub const rs2_extension_RS2_EXTENSION_POINTS: rs2_extension = 11;
pub const rs2_extension_RS2_EXTENSION_DEPTH_FRAME: rs2_extension = 12;
pub const rs2_extension_RS2_EXTENSION_ADVANCED_MODE: rs2_extension = 13;
pub const rs2_extension_RS2_EXTENSION_RECORD: rs2_extension = 14;
pub const rs2_extension_RS2_EXTENSION_VIDEO_PROFILE: rs2_extension = 15;
pub const rs2_extension_RS2_EXTENSION_PLAYBACK: rs2_extension = 16;
pub const rs2_extension_RS2_EXTENSION_DEPTH_STEREO_SENSOR: rs2_extension = 17;
pub const rs2_extension_RS2_EXTENSION_DISPARITY_FRAME: rs2_extension = 18;
pub const rs2_extension_RS2_EXTENSION_MOTION_PROFILE: rs2_extension = 19;
pub const rs2_extension_RS2_EXTENSION_POSE_FRAME: rs2_extension = 20;
pub const rs2_extension_RS2_EXTENSION_POSE_PROFILE: rs2_extension = 21;
pub const rs2_extension_RS2_EXTENSION_TM2: rs2_extension = 22;
pub const rs2_extension_RS2_EXTENSION_SOFTWARE_DEVICE: rs2_extension = 23;
pub const rs2_extension_RS2_EXTENSION_SOFTWARE_SENSOR: rs2_extension = 24;
pub const rs2_extension_RS2_EXTENSION_DECIMATION_FILTER: rs2_extension = 25;
pub const rs2_extension_RS2_EXTENSION_THRESHOLD_FILTER: rs2_extension = 26;
pub const rs2_extension_RS2_EXTENSION_DISPARITY_FILTER: rs2_extension = 27;
pub const rs2_extension_RS2_EXTENSION_SPATIAL_FILTER: rs2_extension = 28;
pub const rs2_extension_RS2_EXTENSION_TEMPORAL_FILTER: rs2_extension = 29;
pub const rs2_extension_RS2_EXTENSION_HOLE_FILLING_FILTER: rs2_extension = 30;
pub const rs2_extension_RS2_EXTENSION_ZERO_ORDER_FILTER: rs2_extension = 31;
pub const rs2_extension_RS2_EXTENSION_RECOMMENDED_FILTERS: rs2_extension = 32;
pub const rs2_extension_RS2_EXTENSION_POSE: rs2_extension = 33;
pub const rs2_extension_RS2_EXTENSION_POSE_SENSOR: rs2_extension = 34;
pub const rs2_extension_RS2_EXTENSION_WHEEL_ODOMETER: rs2_extension = 35;
pub const rs2_extension_RS2_EXTENSION_GLOBAL_TIMER: rs2_extension = 36;
pub const rs2_extension_RS2_EXTENSION_UPDATABLE: rs2_extension = 37;
pub const rs2_extension_RS2_EXTENSION_UPDATE_DEVICE: rs2_extension = 38;
pub const rs2_extension_RS2_EXTENSION_L500_DEPTH_SENSOR: rs2_extension = 39;
pub const rs2_extension_RS2_EXTENSION_TM2_SENSOR: rs2_extension = 40;
pub const rs2_extension_RS2_EXTENSION_AUTO_CALIBRATED_DEVICE: rs2_extension = 41;
pub const rs2_extension_RS2_EXTENSION_COLOR_SENSOR: rs2_extension = 42;
pub const rs2_extension_RS2_EXTENSION_MOTION_SENSOR: rs2_extension = 43;
pub const rs2_extension_RS2_EXTENSION_FISHEYE_SENSOR: rs2_extension = 44;
pub const rs2_extension_RS2_EXTENSION_DEPTH_HUFFMAN_DECODER: rs2_extension = 45;
pub const rs2_extension_RS2_EXTENSION_SERIALIZABLE: rs2_extension = 46;
pub const rs2_extension_RS2_EXTENSION_FW_LOGGER: rs2_extension = 47;
pub const rs2_extension_RS2_EXTENSION_AUTO_CALIBRATION_FILTER: rs2_extension = 48;
pub const rs2_extension_RS2_EXTENSION_DEVICE_CALIBRATION: rs2_extension = 49;
pub const rs2_extension_RS2_EXTENSION_CALIBRATED_SENSOR: rs2_extension = 50;
pub const rs2_extension_RS2_EXTENSION_HDR_MERGE: rs2_extension = 51;
pub const rs2_extension_RS2_EXTENSION_SEQUENCE_ID_FILTER: rs2_extension = 52;
pub const rs2_extension_RS2_EXTENSION_MAX_USABLE_RANGE_SENSOR: rs2_extension = 53;
pub const rs2_extension_RS2_EXTENSION_DEBUG_STREAM_SENSOR: rs2_extension = 54;
pub const rs2_extension_RS2_EXTENSION_CALIBRATION_CHANGE_DEVICE: rs2_extension = 55;
pub const rs2_extension_RS2_EXTENSION_COUNT: rs2_extension = 56;
#[doc = " \\brief Specifies advanced interfaces (capabilities) objects may implement."]
pub type rs2_extension = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_extension_type_to_string(type_: rs2_extension) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_extension_to_string(type_: rs2_extension) -> *const ::std::os::raw::c_char;
}
pub const rs2_matchers_RS2_MATCHER_DI: rs2_matchers = 0;
pub const rs2_matchers_RS2_MATCHER_DI_C: rs2_matchers = 1;
pub const rs2_matchers_RS2_MATCHER_DLR_C: rs2_matchers = 2;
pub const rs2_matchers_RS2_MATCHER_DLR: rs2_matchers = 3;
pub const rs2_matchers_RS2_MATCHER_DIC: rs2_matchers = 4;
pub const rs2_matchers_RS2_MATCHER_DIC_C: rs2_matchers = 5;
pub const rs2_matchers_RS2_MATCHER_DEFAULT: rs2_matchers = 6;
pub const rs2_matchers_RS2_MATCHER_COUNT: rs2_matchers = 7;
#[doc = " \\brief Specifies types of different matchers"]
pub type rs2_matchers = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_device_info {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_device {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_error {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_log_message {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_raw_data_buffer {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_frame {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_frame_queue {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_pipeline {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_pipeline_profile {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_config {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_device_list {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_stream_profile_list {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_processing_block_list {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_stream_profile {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_frame_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_log_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_syncer {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_device_serializer {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_source {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_processing_block {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_frame_processor_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_playback_status_changed_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_update_progress_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_context {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_device_hub {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_sensor_list {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_sensor {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_options {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_options_list {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_devices_changed_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_notification {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_notifications_callback {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_firmware_log_message {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_firmware_log_parsed_message {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_firmware_log_parser {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_terminal_parser {
_unused: [u8; 0],
}
pub type rs2_log_callback_ptr = ::std::option::Option<
unsafe extern "C" fn(
arg1: rs2_log_severity,
arg2: *const rs2_log_message,
arg: *mut ::std::os::raw::c_void,
),
>;
pub type rs2_notification_callback_ptr = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut rs2_notification, arg2: *mut ::std::os::raw::c_void),
>;
pub type rs2_software_device_destruction_callback_ptr =
::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
pub type rs2_devices_changed_callback_ptr = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut rs2_device_list,
arg2: *mut rs2_device_list,
arg3: *mut ::std::os::raw::c_void,
),
>;
pub type rs2_frame_callback_ptr = ::std::option::Option<
unsafe extern "C" fn(arg1: *mut rs2_frame, arg2: *mut ::std::os::raw::c_void),
>;
pub type rs2_frame_processor_callback_ptr = ::std::option::Option<
unsafe extern "C" fn(
arg1: *mut rs2_frame,
arg2: *mut rs2_source,
arg3: *mut ::std::os::raw::c_void,
),
>;
pub type rs2_update_progress_callback_ptr =
::std::option::Option<unsafe extern "C" fn(arg1: f32, arg2: *mut ::std::os::raw::c_void)>;
pub type rs2_time_t = f64;
pub type rs2_metadata_type = ::std::os::raw::c_longlong;
extern "C" {
pub fn rs2_create_error(
what: *const ::std::os::raw::c_char,
name: *const ::std::os::raw::c_char,
args: *const ::std::os::raw::c_char,
type_: rs2_exception_type,
) -> *mut rs2_error;
}
extern "C" {
pub fn rs2_get_librealsense_exception_type(error: *const rs2_error) -> rs2_exception_type;
}
extern "C" {
pub fn rs2_get_failed_function(error: *const rs2_error) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_get_failed_args(error: *const rs2_error) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_get_error_message(error: *const rs2_error) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_free_error(error: *mut rs2_error);
}
extern "C" {
#[doc = " \\brief Creates RealSense context that is required for the rest of the API."]
#[doc = " \\param[in] api_version Users are expected to pass their version of \\c RS2_API_VERSION to make sure they are running the correct librealsense version."]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored."]
#[doc = " \\return Context object"]
pub fn rs2_create_context(
api_version: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_context;
}
extern "C" {
#[doc = " \\brief Frees the relevant context object."]
#[doc = " \\param[in] context Object that is no longer needed"]
pub fn rs2_delete_context(context: *mut rs2_context);
}
extern "C" {
#[doc = " set callback to get devices changed events"]
#[doc = " these events will be raised by the context whenever new RealSense device is connected or existing device gets disconnected"]
#[doc = " \\param context Object representing librealsense session"]
#[doc = " \\param[in] callback callback object created from c++ application. ownership over the callback object is moved into the context"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_devices_changed_callback_cpp(
context: *mut rs2_context,
callback: *mut rs2_devices_changed_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " set callback to get devices changed events"]
#[doc = " these events will be raised by the context whenever new RealSense device is connected or existing device gets disconnected"]
#[doc = " \\param context Object representing librealsense session"]
#[doc = " \\param[in] callback function pointer to register as per-notifications callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_devices_changed_callback(
context: *const rs2_context,
callback: rs2_devices_changed_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Create a new device and add it to the context"]
#[doc = " \\param ctx The context to which the new device will be added"]
#[doc = " \\param file The file from which the device should be created"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " @return A pointer to a device that plays data from the file, or null in case of failure"]
pub fn rs2_context_add_device(
ctx: *mut rs2_context,
file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Add an instance of software device to the context"]
#[doc = " \\param ctx The context to which the new device will be added"]
#[doc = " \\param dev Instance of software device to register into the context"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_context_add_software_device(
ctx: *mut rs2_context,
dev: *mut rs2_device,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Removes a playback device from the context, if exists"]
#[doc = " \\param[in] ctx The context from which the device should be removed"]
#[doc = " \\param[in] file The file name that was used to add the device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_context_remove_device(
ctx: *mut rs2_context,
file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Removes tracking module."]
#[doc = " function query_devices() locks the tracking module in the tm_context object."]
#[doc = " If the tracking module device is not used it should be removed using this function, so that other applications could find it."]
#[doc = " This function can be used both before the call to query_device() to prevent enabling tracking modules or afterwards to"]
#[doc = " release them."]
pub fn rs2_context_unload_tracking_module(ctx: *mut rs2_context, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " create a static snapshot of all connected devices at the time of the call"]
#[doc = " \\param context Object representing librealsense session"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the list of devices, should be released by rs2_delete_device_list"]
pub fn rs2_query_devices(
context: *const rs2_context,
error: *mut *mut rs2_error,
) -> *mut rs2_device_list;
}
extern "C" {
#[doc = " create a static snapshot of all connected devices at the time of the call"]
#[doc = " \\param context Object representing librealsense session"]
#[doc = " \\param product_mask Controls what kind of devices will be returned"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the list of devices, should be released by rs2_delete_device_list"]
pub fn rs2_query_devices_ex(
context: *const rs2_context,
product_mask: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_device_list;
}
extern "C" {
#[doc = " \\brief Creates RealSense device_hub ."]
#[doc = " \\param[in] context The context for the device hub"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored."]
#[doc = " \\return Device hub object"]
pub fn rs2_create_device_hub(
context: *const rs2_context,
error: *mut *mut rs2_error,
) -> *mut rs2_device_hub;
}
extern "C" {
#[doc = " \\brief Frees the relevant device hub object."]
#[doc = " \\param[in] hub Object that is no longer needed"]
pub fn rs2_delete_device_hub(hub: *const rs2_device_hub);
}
extern "C" {
#[doc = " If any device is connected return it, otherwise wait until next RealSense device connects."]
#[doc = " Calling this method multiple times will cycle through connected devices"]
#[doc = " \\param[in] ctx The context to creat the device"]
#[doc = " \\param[in] hub The device hub object"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored."]
#[doc = " \\return device object"]
pub fn rs2_device_hub_wait_for_device(
hub: *const rs2_device_hub,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Checks if device is still connected"]
#[doc = " \\param[in] hub The device hub object"]
#[doc = " \\param[in] device The device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored."]
#[doc = " \\return 1 if the device is connected, 0 otherwise"]
pub fn rs2_device_hub_is_device_connected(
hub: *const rs2_device_hub,
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
#[doc = "< Friendly name"]
pub const rs2_camera_info_RS2_CAMERA_INFO_NAME: rs2_camera_info = 0;
#[doc = "< Device serial number"]
pub const rs2_camera_info_RS2_CAMERA_INFO_SERIAL_NUMBER: rs2_camera_info = 1;
#[doc = "< Primary firmware version"]
pub const rs2_camera_info_RS2_CAMERA_INFO_FIRMWARE_VERSION: rs2_camera_info = 2;
#[doc = "< Recommended firmware version"]
pub const rs2_camera_info_RS2_CAMERA_INFO_RECOMMENDED_FIRMWARE_VERSION: rs2_camera_info = 3;
#[doc = "< Unique identifier of the port the device is connected to (platform specific)"]
pub const rs2_camera_info_RS2_CAMERA_INFO_PHYSICAL_PORT: rs2_camera_info = 4;
#[doc = "< If device supports firmware logging, this is the command to send to get logs from firmware"]
pub const rs2_camera_info_RS2_CAMERA_INFO_DEBUG_OP_CODE: rs2_camera_info = 5;
#[doc = "< True iff the device is in advanced mode"]
pub const rs2_camera_info_RS2_CAMERA_INFO_ADVANCED_MODE: rs2_camera_info = 6;
#[doc = "< Product ID as reported in the USB descriptor"]
pub const rs2_camera_info_RS2_CAMERA_INFO_PRODUCT_ID: rs2_camera_info = 7;
#[doc = "< True iff EEPROM is locked"]
pub const rs2_camera_info_RS2_CAMERA_INFO_CAMERA_LOCKED: rs2_camera_info = 8;
#[doc = "< Designated USB specification: USB2/USB3"]
pub const rs2_camera_info_RS2_CAMERA_INFO_USB_TYPE_DESCRIPTOR: rs2_camera_info = 9;
#[doc = "< Device product line D400/SR300/L500/T200"]
pub const rs2_camera_info_RS2_CAMERA_INFO_PRODUCT_LINE: rs2_camera_info = 10;
#[doc = "< ASIC serial number"]
pub const rs2_camera_info_RS2_CAMERA_INFO_ASIC_SERIAL_NUMBER: rs2_camera_info = 11;
#[doc = "< Firmware update ID"]
pub const rs2_camera_info_RS2_CAMERA_INFO_FIRMWARE_UPDATE_ID: rs2_camera_info = 12;
#[doc = "< IP address for remote camera."]
pub const rs2_camera_info_RS2_CAMERA_INFO_IP_ADDRESS: rs2_camera_info = 13;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_camera_info_RS2_CAMERA_INFO_COUNT: rs2_camera_info = 14;
#[doc = " \\brief Read-only strings that can be queried from the device."]
#[doc = "Not all information attributes are available on all camera types."]
#[doc = "This information is mainly available for camera debug and troubleshooting and should not be used in applications."]
pub type rs2_camera_info = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_camera_info_to_string(info: rs2_camera_info) -> *const ::std::os::raw::c_char;
}
pub const rs2_stream_RS2_STREAM_ANY: rs2_stream = 0;
#[doc = "< Native stream of depth data produced by RealSense device"]
pub const rs2_stream_RS2_STREAM_DEPTH: rs2_stream = 1;
#[doc = "< Native stream of color data captured by RealSense device"]
pub const rs2_stream_RS2_STREAM_COLOR: rs2_stream = 2;
#[doc = "< Native stream of infrared data captured by RealSense device"]
pub const rs2_stream_RS2_STREAM_INFRARED: rs2_stream = 3;
#[doc = "< Native stream of fish-eye (wide) data captured from the dedicate motion camera"]
pub const rs2_stream_RS2_STREAM_FISHEYE: rs2_stream = 4;
#[doc = "< Native stream of gyroscope motion data produced by RealSense device"]
pub const rs2_stream_RS2_STREAM_GYRO: rs2_stream = 5;
#[doc = "< Native stream of accelerometer motion data produced by RealSense device"]
pub const rs2_stream_RS2_STREAM_ACCEL: rs2_stream = 6;
#[doc = "< Signals from external device connected through GPIO"]
pub const rs2_stream_RS2_STREAM_GPIO: rs2_stream = 7;
#[doc = "< 6 Degrees of Freedom pose data, calculated by RealSense device"]
pub const rs2_stream_RS2_STREAM_POSE: rs2_stream = 8;
#[doc = "< 4 bit per-pixel depth confidence level"]
pub const rs2_stream_RS2_STREAM_CONFIDENCE: rs2_stream = 9;
pub const rs2_stream_RS2_STREAM_COUNT: rs2_stream = 10;
#[doc = " \\brief Streams are different types of data provided by RealSense devices."]
pub type rs2_stream = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_stream_to_string(stream: rs2_stream) -> *const ::std::os::raw::c_char;
}
#[doc = "< When passed to enable stream, librealsense will try to provide best suited format"]
pub const rs2_format_RS2_FORMAT_ANY: rs2_format = 0;
#[doc = "< 16-bit linear depth values. The depth is meters is equal to depth scale * pixel value."]
pub const rs2_format_RS2_FORMAT_Z16: rs2_format = 1;
#[doc = "< 16-bit float-point disparity values. Depth->Disparity conversion : Disparity = Baseline*FocalLength/Depth."]
pub const rs2_format_RS2_FORMAT_DISPARITY16: rs2_format = 2;
#[doc = "< 32-bit floating point 3D coordinates."]
pub const rs2_format_RS2_FORMAT_XYZ32F: rs2_format = 3;
#[doc = "< 32-bit y0, u, y1, v data for every two pixels. Similar to YUV422 but packed in a different order - https://en.wikipedia.org/wiki/YUV"]
pub const rs2_format_RS2_FORMAT_YUYV: rs2_format = 4;
#[doc = "< 8-bit red, green and blue channels"]
pub const rs2_format_RS2_FORMAT_RGB8: rs2_format = 5;
#[doc = "< 8-bit blue, green, and red channels -- suitable for OpenCV"]
pub const rs2_format_RS2_FORMAT_BGR8: rs2_format = 6;
#[doc = "< 8-bit red, green and blue channels + constant alpha channel equal to FF"]
pub const rs2_format_RS2_FORMAT_RGBA8: rs2_format = 7;
#[doc = "< 8-bit blue, green, and red channels + constant alpha channel equal to FF"]
pub const rs2_format_RS2_FORMAT_BGRA8: rs2_format = 8;
#[doc = "< 8-bit per-pixel grayscale image"]
pub const rs2_format_RS2_FORMAT_Y8: rs2_format = 9;
#[doc = "< 16-bit per-pixel grayscale image"]
pub const rs2_format_RS2_FORMAT_Y16: rs2_format = 10;
#[doc = "< Four 10 bits per pixel luminance values packed into a 5-byte macropixel"]
pub const rs2_format_RS2_FORMAT_RAW10: rs2_format = 11;
#[doc = "< 16-bit raw image"]
pub const rs2_format_RS2_FORMAT_RAW16: rs2_format = 12;
#[doc = "< 8-bit raw image"]
pub const rs2_format_RS2_FORMAT_RAW8: rs2_format = 13;
#[doc = "< Similar to the standard YUYV pixel format, but packed in a different order"]
pub const rs2_format_RS2_FORMAT_UYVY: rs2_format = 14;
#[doc = "< Raw data from the motion sensor"]
pub const rs2_format_RS2_FORMAT_MOTION_RAW: rs2_format = 15;
#[doc = "< Motion data packed as 3 32-bit float values, for X, Y, and Z axis"]
pub const rs2_format_RS2_FORMAT_MOTION_XYZ32F: rs2_format = 16;
#[doc = "< Raw data from the external sensors hooked to one of the GPIO's"]
pub const rs2_format_RS2_FORMAT_GPIO_RAW: rs2_format = 17;
#[doc = "< Pose data packed as floats array, containing translation vector, rotation quaternion and prediction velocities and accelerations vectors"]
pub const rs2_format_RS2_FORMAT_6DOF: rs2_format = 18;
#[doc = "< 32-bit float-point disparity values. Depth->Disparity conversion : Disparity = Baseline*FocalLength/Depth"]
pub const rs2_format_RS2_FORMAT_DISPARITY32: rs2_format = 19;
#[doc = "< 16-bit per-pixel grayscale image unpacked from 10 bits per pixel packed ([8:8:8:8:2222]) grey-scale image. The data is unpacked to LSB and padded with 6 zero bits"]
pub const rs2_format_RS2_FORMAT_Y10BPACK: rs2_format = 20;
#[doc = "< 32-bit float-point depth distance value."]
pub const rs2_format_RS2_FORMAT_DISTANCE: rs2_format = 21;
#[doc = "< Bitstream encoding for video in which an image of each frame is encoded as JPEG-DIB"]
pub const rs2_format_RS2_FORMAT_MJPEG: rs2_format = 22;
#[doc = "< 8-bit per pixel interleaved. 8-bit left, 8-bit right."]
pub const rs2_format_RS2_FORMAT_Y8I: rs2_format = 23;
#[doc = "< 12-bit per pixel interleaved. 12-bit left, 12-bit right. Each pixel is stored in a 24-bit word in little-endian order."]
pub const rs2_format_RS2_FORMAT_Y12I: rs2_format = 24;
#[doc = "< multi-planar Depth 16bit + IR 10bit."]
pub const rs2_format_RS2_FORMAT_INZI: rs2_format = 25;
#[doc = "< 8-bit IR stream."]
pub const rs2_format_RS2_FORMAT_INVI: rs2_format = 26;
#[doc = "< Grey-scale image as a bit-packed array. 4 pixel data stream taking 5 bytes"]
pub const rs2_format_RS2_FORMAT_W10: rs2_format = 27;
#[doc = "< Variable-length Huffman-compressed 16-bit depth values."]
pub const rs2_format_RS2_FORMAT_Z16H: rs2_format = 28;
#[doc = "< 16-bit per-pixel frame grabber format."]
pub const rs2_format_RS2_FORMAT_FG: rs2_format = 29;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_format_RS2_FORMAT_COUNT: rs2_format = 30;
#[doc = " \\brief A stream's format identifies how binary data is encoded within a frame."]
pub type rs2_format = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_format_to_string(format: rs2_format) -> *const ::std::os::raw::c_char;
}
#[doc = " \\brief Cross-stream extrinsics: encodes the topology describing how the different devices are oriented."]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_extrinsics {
#[doc = "< Column-major 3x3 rotation matrix"]
pub rotation: [f32; 9usize],
#[doc = "< Three-element translation vector, in meters"]
pub translation: [f32; 3usize],
}
#[test]
fn bindgen_test_layout_rs2_extrinsics() {
assert_eq!(
::std::mem::size_of::<rs2_extrinsics>(),
48usize,
concat!("Size of: ", stringify!(rs2_extrinsics))
);
assert_eq!(
::std::mem::align_of::<rs2_extrinsics>(),
4usize,
concat!("Alignment of ", stringify!(rs2_extrinsics))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_extrinsics>())).rotation as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(rs2_extrinsics),
"::",
stringify!(rotation)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<rs2_extrinsics>())).translation as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(rs2_extrinsics),
"::",
stringify!(translation)
)
);
}
extern "C" {
#[doc = " Deletes sensors list, any sensors created from this list will remain unaffected"]
#[doc = " \\param[in] info_list list to delete"]
pub fn rs2_delete_sensor_list(info_list: *mut rs2_sensor_list);
}
extern "C" {
#[doc = " Determines number of sensors in a list"]
#[doc = " \\param[in] info_list The list of connected sensors captured using rs2_query_sensors"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Sensors count"]
pub fn rs2_get_sensors_count(
info_list: *const rs2_sensor_list,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " delete relasense sensor"]
#[doc = " \\param[in] sensor realsense sensor to delete"]
pub fn rs2_delete_sensor(sensor: *mut rs2_sensor);
}
extern "C" {
#[doc = " create sensor by index"]
#[doc = " \\param[in] index the zero based index of sensor to retrieve"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the requested sensor, should be released by rs2_delete_sensor"]
pub fn rs2_create_sensor(
list: *const rs2_sensor_list,
index: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_sensor;
}
extern "C" {
#[doc = " This is a helper function allowing the user to discover the device from one of its sensors"]
#[doc = " \\param[in] sensor Pointer to a sensor"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return new device wrapper for the device of the sensor. Needs to be released by delete_device"]
pub fn rs2_create_device_from_sensor(
sensor: *const rs2_sensor,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " retrieve sensor specific information, like versions of various internal components"]
#[doc = " \\param[in] sensor the RealSense sensor"]
#[doc = " \\param[in] info camera info type to retrieve"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the requested camera info string, in a format specific to the device model"]
pub fn rs2_get_sensor_info(
sensor: *const rs2_sensor,
info: rs2_camera_info,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " check if specific sensor info is supported"]
#[doc = " \\param[in] info the parameter to check for support"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if the parameter both exist and well-defined for the specific device"]
pub fn rs2_supports_sensor_info(
sensor: *const rs2_sensor,
info: rs2_camera_info,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Test if the given sensor can be extended to the requested extension"]
#[doc = " \\param[in] sensor Realsense sensor"]
#[doc = " \\param[in] extension The extension to which the sensor should be tested if it is extendable"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return non-zero value iff the sensor can be extended to the given extension"]
pub fn rs2_is_sensor_extendable_to(
sensor: *const rs2_sensor,
extension: rs2_extension,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " When called on a depth sensor, this method will return the number of meters represented by a single depth unit"]
#[doc = " \\param[in] sensor depth sensor"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the number of meters represented by a single depth unit"]
pub fn rs2_get_depth_scale(sensor: *mut rs2_sensor, error: *mut *mut rs2_error) -> f32;
}
extern "C" {
#[doc = " Retrieve the stereoscopic baseline value from frame. Applicable to stereo-based depth modules"]
#[doc = " \\param[out] float Stereoscopic baseline in millimeters"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_depth_stereo_frame_get_baseline(
frame_ref: *const rs2_frame,
error: *mut *mut rs2_error,
) -> f32;
}
extern "C" {
#[doc = " Retrieve the stereoscopic baseline value from sensor. Applicable to stereo-based depth modules"]
#[doc = " \\param[out] float Stereoscopic baseline in millimeters"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_stereo_baseline(sensor: *mut rs2_sensor, error: *mut *mut rs2_error) -> f32;
}
extern "C" {
#[doc = " \\brief sets the active region of interest to be used by auto-exposure algorithm"]
#[doc = " \\param[in] sensor the RealSense sensor"]
#[doc = " \\param[in] min_x lower horizontal bound in pixels"]
#[doc = " \\param[in] min_y lower vertical bound in pixels"]
#[doc = " \\param[in] max_x upper horizontal bound in pixels"]
#[doc = " \\param[in] max_y upper vertical bound in pixels"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_region_of_interest(
sensor: *const rs2_sensor,
min_x: ::std::os::raw::c_int,
min_y: ::std::os::raw::c_int,
max_x: ::std::os::raw::c_int,
max_y: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " \\brief gets the active region of interest to be used by auto-exposure algorithm"]
#[doc = " \\param[in] sensor the RealSense sensor"]
#[doc = " \\param[out] min_x lower horizontal bound in pixels"]
#[doc = " \\param[out] min_y lower vertical bound in pixels"]
#[doc = " \\param[out] max_x upper horizontal bound in pixels"]
#[doc = " \\param[out] max_y upper vertical bound in pixels"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_region_of_interest(
sensor: *const rs2_sensor,
min_x: *mut ::std::os::raw::c_int,
min_y: *mut ::std::os::raw::c_int,
max_x: *mut ::std::os::raw::c_int,
max_y: *mut ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " open subdevice for exclusive access, by committing to a configuration"]
#[doc = " \\param[in] device relevant RealSense device"]
#[doc = " \\param[in] profile stream profile that defines single stream configuration"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_open(
device: *mut rs2_sensor,
profile: *const rs2_stream_profile,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " open subdevice for exclusive access, by committing to composite configuration, specifying one or more stream profiles"]
#[doc = " this method should be used for interdependent streams, such as depth and infrared, that have to be configured together"]
#[doc = " \\param[in] device relevant RealSense device"]
#[doc = " \\param[in] profiles list of stream profiles discovered by get_stream_profiles"]
#[doc = " \\param[in] count number of simultaneous stream profiles to configure"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_open_multiple(
device: *mut rs2_sensor,
profiles: *mut *const rs2_stream_profile,
count: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " stop any streaming from specified subdevice"]
#[doc = " \\param[in] sensor RealSense device"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_close(sensor: *const rs2_sensor, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " start streaming from specified configured sensor"]
#[doc = " \\param[in] sensor RealSense device"]
#[doc = " \\param[in] on_frame function pointer to register as per-frame callback"]
#[doc = " \\param[in] user auxiliary data the user wishes to receive together with every frame callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_start(
sensor: *const rs2_sensor,
on_frame: rs2_frame_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " start streaming from specified configured sensor"]
#[doc = " \\param[in] sensor RealSense device"]
#[doc = " \\param[in] callback callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_start_cpp(
sensor: *const rs2_sensor,
callback: *mut rs2_frame_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " start streaming from specified configured sensor of specific stream to frame queue"]
#[doc = " \\param[in] sensor RealSense Sensor"]
#[doc = " \\param[in] queue frame-queue to store new frames into"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_start_queue(
sensor: *const rs2_sensor,
queue: *mut rs2_frame_queue,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " stops streaming from specified configured device"]
#[doc = " \\param[in] sensor RealSense sensor"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_stop(sensor: *const rs2_sensor, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " set callback to get notifications from specified sensor"]
#[doc = " \\param[in] sensor RealSense device"]
#[doc = " \\param[in] on_notification function pointer to register as per-notifications callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_notifications_callback(
sensor: *const rs2_sensor,
on_notification: rs2_notification_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " set callback to get notifications from specified device"]
#[doc = " \\param[in] sensor RealSense sensor"]
#[doc = " \\param[in] callback callback object created from c++ application. ownership over the callback object is moved into the relevant subdevice lock"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_notifications_callback_cpp(
sensor: *const rs2_sensor,
callback: *mut rs2_notifications_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " retrieve description from notification handle"]
#[doc = " \\param[in] notification handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the notification description"]
pub fn rs2_get_notification_description(
notification: *mut rs2_notification,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " retrieve timestamp from notification handle"]
#[doc = " \\param[in] notification handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the notification timestamp"]
pub fn rs2_get_notification_timestamp(
notification: *mut rs2_notification,
error: *mut *mut rs2_error,
) -> rs2_time_t;
}
extern "C" {
#[doc = " retrieve severity from notification handle"]
#[doc = " \\param[in] notification handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the notification severity"]
pub fn rs2_get_notification_severity(
notification: *mut rs2_notification,
error: *mut *mut rs2_error,
) -> rs2_log_severity;
}
extern "C" {
#[doc = " retrieve category from notification handle"]
#[doc = " \\param[in] notification handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the notification category"]
pub fn rs2_get_notification_category(
notification: *mut rs2_notification,
error: *mut *mut rs2_error,
) -> rs2_notification_category;
}
extern "C" {
#[doc = " retrieve serialized data from notification handle"]
#[doc = " \\param[in] notification handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the serialized data (in JSON format)"]
pub fn rs2_get_notification_serialized_data(
notification: *mut rs2_notification,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " check if physical subdevice is supported"]
#[doc = " \\param[in] sensor input RealSense subdevice"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return list of stream profiles that given subdevice can provide, should be released by rs2_delete_profiles_list"]
pub fn rs2_get_stream_profiles(
sensor: *mut rs2_sensor,
error: *mut *mut rs2_error,
) -> *mut rs2_stream_profile_list;
}
extern "C" {
#[doc = " retrieve list of debug stream profiles that given subdevice can provide"]
#[doc = " \\param[in] sensor input RealSense subdevice"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return list of debug stream profiles that given subdevice can provide, should be released by rs2_delete_profiles_list"]
pub fn rs2_get_debug_stream_profiles(
sensor: *mut rs2_sensor,
error: *mut *mut rs2_error,
) -> *mut rs2_stream_profile_list;
}
extern "C" {
#[doc = " check how subdevice is streaming"]
#[doc = " \\param[in] sensor input RealSense subdevice"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return list of stream profiles that given subdevice is currently streaming, should be released by rs2_delete_profiles_list"]
pub fn rs2_get_active_streams(
sensor: *mut rs2_sensor,
error: *mut *mut rs2_error,
) -> *mut rs2_stream_profile_list;
}
extern "C" {
#[doc = " Get pointer to specific stream profile"]
#[doc = " \\param[in] list the list of supported profiles returned by rs2_get_supported_profiles"]
#[doc = " \\param[in] index the zero based index of the streaming mode"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_stream_profile(
list: *const rs2_stream_profile_list,
index: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *const rs2_stream_profile;
}
extern "C" {
#[doc = " Extract common parameters of a stream profiles"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[out] stream stream type of the input profile"]
#[doc = " \\param[out] format binary data format of the input profile"]
#[doc = " \\param[out] index stream index the input profile in case there are multiple streams of the same type"]
#[doc = " \\param[out] unique_id identifier for the stream profile, unique within the application"]
#[doc = " \\param[out] framerate expected rate for data frames to arrive, meaning expected number of frames per second"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_stream_profile_data(
mode: *const rs2_stream_profile,
stream: *mut rs2_stream,
format: *mut rs2_format,
index: *mut ::std::os::raw::c_int,
unique_id: *mut ::std::os::raw::c_int,
framerate: *mut ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Override some of the parameters of the stream profile"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[in] stream stream type for the profile"]
#[doc = " \\param[in] format binary data format of the profile"]
#[doc = " \\param[in] index stream index the profile in case there are multiple streams of the same type"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_stream_profile_data(
mode: *mut rs2_stream_profile,
stream: rs2_stream,
index: ::std::os::raw::c_int,
format: rs2_format,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Creates a copy of stream profile, assigning new values to some of the fields"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[in] stream stream type for the profile"]
#[doc = " \\param[in] format binary data format of the profile"]
#[doc = " \\param[in] index stream index the profile in case there are multiple streams of the same type"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return new stream profile, must be deleted by rs2_delete_stream_profile"]
pub fn rs2_clone_stream_profile(
mode: *const rs2_stream_profile,
stream: rs2_stream,
index: ::std::os::raw::c_int,
format: rs2_format,
error: *mut *mut rs2_error,
) -> *mut rs2_stream_profile;
}
extern "C" {
#[doc = " Creates a copy of stream profile, assigning new values to some of the fields"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[in] stream stream type for the profile"]
#[doc = " \\param[in] format binary data format of the profile"]
#[doc = " \\param[in] width new width for the profile"]
#[doc = " \\param[in] height new height for the profile"]
#[doc = " \\param[in] intr new intrinsics for the profile"]
#[doc = " \\param[in] index stream index the profile in case there are multiple streams of the same type"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return new stream profile, must be deleted by rs2_delete_stream_profile"]
pub fn rs2_clone_video_stream_profile(
mode: *const rs2_stream_profile,
stream: rs2_stream,
index: ::std::os::raw::c_int,
format: rs2_format,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
intr: *const rs2_intrinsics,
error: *mut *mut rs2_error,
) -> *mut rs2_stream_profile;
}
extern "C" {
#[doc = " Delete stream profile allocated by rs2_clone_stream_profile"]
#[doc = " Should not be called on stream profiles returned by the device"]
#[doc = " \\param[in] mode input stream profile"]
pub fn rs2_delete_stream_profile(mode: *mut rs2_stream_profile);
}
extern "C" {
#[doc = " Try to extend stream profile to an extension type"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[in] type extension type, for example RS2_EXTENSION_VIDEO_STREAM_PROFILE"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return non-zero if profile is extendable to specified extension, zero otherwise"]
pub fn rs2_stream_profile_is(
mode: *const rs2_stream_profile,
type_: rs2_extension,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " When called on a video stream profile, will return the width and the height of the stream"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[out] width width in pixels of the video stream"]
#[doc = " \\param[out] height height in pixels of the video stream"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_video_stream_resolution(
mode: *const rs2_stream_profile,
width: *mut ::std::os::raw::c_int,
height: *mut ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Obtain the intrinsics of a specific stream configuration from the device."]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[out] intrinsics Pointer to the struct to store the data in"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_motion_intrinsics(
mode: *const rs2_stream_profile,
intrinsics: *mut rs2_motion_device_intrinsic,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Returns non-zero if selected profile is recommended for the sensor"]
#[doc = " This is an optional hint we offer to suggest profiles with best performance-quality tradeof"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return non-zero if selected profile is recommended for the sensor"]
pub fn rs2_is_stream_profile_default(
mode: *const rs2_stream_profile,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " get the number of supported stream profiles"]
#[doc = " \\param[in] list the list of supported profiles returned by rs2_get_supported_profiles"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return number of supported subdevice profiles"]
pub fn rs2_get_stream_profiles_count(
list: *const rs2_stream_profile_list,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " delete stream profiles list"]
#[doc = " \\param[in] list the list of supported profiles returned by rs2_get_supported_profiles"]
pub fn rs2_delete_stream_profiles_list(list: *mut rs2_stream_profile_list);
}
extern "C" {
#[doc = " \\param[in] from origin stream profile"]
#[doc = " \\param[in] to target stream profile"]
#[doc = " \\param[out] extrin extrinsics from origin to target"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_extrinsics(
from: *const rs2_stream_profile,
to: *const rs2_stream_profile,
extrin: *mut rs2_extrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " \\param[in] from origin stream profile"]
#[doc = " \\param[in] to target stream profile"]
#[doc = " \\param[out] extrin extrinsics from origin to target"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_register_extrinsics(
from: *const rs2_stream_profile,
to: *const rs2_stream_profile,
extrin: rs2_extrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " \\brief Override extrinsics of a given sensor that supports calibrated_sensor."]
#[doc = ""]
#[doc = " This will affect extrinsics at the source device and may affect multiple profiles. Used for DEPTH_TO_RGB calibration."]
#[doc = ""]
#[doc = " \\param[in] sensor The sensor"]
#[doc = " \\param[in] extrinsics Extrinsics from Depth to the named sensor"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_override_extrinsics(
sensor: *const rs2_sensor,
extrinsics: *const rs2_extrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " When called on a video profile, returns the intrinsics of specific stream configuration"]
#[doc = " \\param[in] mode input stream profile"]
#[doc = " \\param[out] intrinsics resulting intrinsics for the video profile"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_video_stream_intrinsics(
mode: *const rs2_stream_profile,
intrinsics: *mut rs2_intrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Returns the list of recommended processing blocks for a specific sensor."]
#[doc = " Order and configuration of the blocks are decided by the sensor"]
#[doc = " \\param[in] sensor input sensor"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return list of supported sensor recommended processing blocks"]
pub fn rs2_get_recommended_processing_blocks(
sensor: *mut rs2_sensor,
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block_list;
}
extern "C" {
#[doc = " Returns specific processing blocks from processing blocks list"]
#[doc = " \\param[in] list the processing blocks list"]
#[doc = " \\param[in] index the requested processing block"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return processing block"]
pub fn rs2_get_processing_block(
list: *const rs2_processing_block_list,
index: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Returns the processing blocks list size"]
#[doc = " \\param[in] list the processing blocks list"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the processing block list size"]
pub fn rs2_get_recommended_processing_blocks_count(
list: *const rs2_processing_block_list,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Deletes processing blocks list"]
#[doc = " \\param[in] list list to delete"]
pub fn rs2_delete_recommended_processing_blocks(list: *mut rs2_processing_block_list);
}
extern "C" {
#[doc = " Imports a localization map from file to tm2 tracking device"]
#[doc = " \\param[in] sensor TM2 position-tracking sensor"]
#[doc = " \\param[in] lmap_blob Localization map raw buffer, serialized"]
#[doc = " \\param[in] blob_size The buffer's size in bytes"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Non-zero if succeeded, otherwise 0"]
pub fn rs2_import_localization_map(
sensor: *const rs2_sensor,
lmap_blob: *const ::std::os::raw::c_uchar,
blob_size: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rs2_export_localization_map(
sensor: *const rs2_sensor,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " Create a named location tag"]
#[doc = " \\param[in] sensor T2xx position-tracking sensor"]
#[doc = " \\param[in] guid Null-terminated string of up to 127 characters"]
#[doc = " \\param[in] pos Position in meters, relative to the current tracking session"]
#[doc = " \\param[in] orient Quaternion orientation, expressed the the coordinate system of the current tracking session"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Non-zero if succeeded, otherwise 0"]
pub fn rs2_set_static_node(
sensor: *const rs2_sensor,
guid: *const ::std::os::raw::c_char,
pos: rs2_vector,
orient: rs2_quaternion,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Retrieve a named location tag"]
#[doc = " \\param[in] sensor T2xx position-tracking sensor"]
#[doc = " \\param[in] guid Null-terminated string of up to 127 characters"]
#[doc = " \\param[out] pos Position in meters of the tagged (stored) location"]
#[doc = " \\param[out] orient Quaternion orientation of the tagged (stored) location"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Non-zero if succeeded, otherwise 0"]
pub fn rs2_get_static_node(
sensor: *const rs2_sensor,
guid: *const ::std::os::raw::c_char,
pos: *mut rs2_vector,
orient: *mut rs2_quaternion,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Remove a named location tag"]
#[doc = " \\param[in] sensor T2xx position-tracking sensor"]
#[doc = " \\param[in] guid Null-terminated string of up to 127 characters"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Non-zero if succeeded, otherwise 0"]
pub fn rs2_remove_static_node(
sensor: *const rs2_sensor,
guid: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Load Wheel odometer settings from host to device"]
#[doc = " \\param[in] odometry_config_buf odometer configuration/calibration blob serialized from jsom file"]
#[doc = " \\return true on success"]
pub fn rs2_load_wheel_odometry_config(
sensor: *const rs2_sensor,
odometry_config_buf: *const ::std::os::raw::c_uchar,
blob_size: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Send wheel odometry data for each individual sensor (wheel)"]
#[doc = " \\param[in] wo_sensor_id - Zero-based index of (wheel) sensor with the same type within device"]
#[doc = " \\param[in] frame_num - Monotonocally increasing frame number, managed per sensor."]
#[doc = " \\param[in] translational_velocity - Translational velocity of the wheel sensor [meter/sec]"]
#[doc = " \\return true on success"]
pub fn rs2_send_wheel_odometry(
sensor: *const rs2_sensor,
wo_sensor_id: ::std::os::raw::c_char,
frame_num: ::std::os::raw::c_uint,
translational_velocity: rs2_vector,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Set intrinsics of a given sensor"]
#[doc = " \\param[in] sensor The RealSense device"]
#[doc = " \\param[in] profile Target stream profile"]
#[doc = " \\param[in] intrinsics Intrinsics value to be written to the device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_intrinsics(
sensor: *const rs2_sensor,
profile: *const rs2_stream_profile,
intrinsics: *const rs2_intrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " \\brief Override intrinsics of a given sensor that supports calibrated_sensor."]
#[doc = ""]
#[doc = " This will affect intrinsics at the source and may affect multiple profiles. Used for DEPTH_TO_RGB calibration."]
#[doc = ""]
#[doc = " \\param[in] sensor The RealSense device"]
#[doc = " \\param[in] intrinsics Intrinsics value to be written to the sensor"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_override_intrinsics(
sensor: *const rs2_sensor,
intrinsics: *const rs2_intrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Set extrinsics between two sensors"]
#[doc = " \\param[in] from_sensor Origin sensor"]
#[doc = " \\param[in] from_profile Origin profile"]
#[doc = " \\param[in] to_sensor Target sensor"]
#[doc = " \\param[in] to_profile Target profile"]
#[doc = " \\param[out] extrinsics Extrinsics from origin to target"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_extrinsics(
from_sensor: *const rs2_sensor,
from_profile: *const rs2_stream_profile,
to_sensor: *mut rs2_sensor,
to_profile: *const rs2_stream_profile,
extrinsics: *const rs2_extrinsics,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Get the DSM parameters for a sensor"]
#[doc = " \\param[in] sensor Sensor that supports the CALIBRATED_SENSOR extension"]
#[doc = " \\param[out] p_params_out Pointer to the structure that will get the DSM parameters"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_dsm_params(
sensor: *const rs2_sensor,
p_params_out: *mut rs2_dsm_params,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Set the sensor DSM parameters"]
#[doc = " This should ideally be done when the stream is NOT running. If it is, the"]
#[doc = " parameters may not take effect immediately."]
#[doc = " \\param[in] sensor Sensor that supports the CALIBRATED_SENSOR extension"]
#[doc = " \\param[out] p_params Pointer to the structure that contains the DSM parameters"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_override_dsm_params(
sensor: *const rs2_sensor,
p_params: *const rs2_dsm_params,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Reset the sensor DSM parameters"]
#[doc = " This should ideally be done when the stream is NOT running. May not take effect immediately."]
#[doc = " \\param[in] sensor Sensor that supports the CALIBRATED_SENSOR extension"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_reset_sensor_calibration(sensor: *const rs2_sensor, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Set motion device intrinsics"]
#[doc = " \\param[in] sensor Motion sensor"]
#[doc = " \\param[in] profile Motion stream profile"]
#[doc = " \\param[out] intrinsics Pointer to the struct to store the data in"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_motion_device_intrinsics(
sensor: *const rs2_sensor,
profile: *const rs2_stream_profile,
intrinsics: *const rs2_motion_device_intrinsic,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " When called on a depth sensor, this method will return the maximum range of the camera given the amount of ambient light in the scene"]
#[doc = " \\param[in] sensor depth sensor"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the max usable range in meters"]
pub fn rs2_get_max_usable_depth_range(
sensor: *const rs2_sensor,
error: *mut *mut rs2_error,
) -> f32;
}
extern "C" {
#[doc = " Determines number of devices in a list."]
#[doc = " \\param[in] info_list The list of connected devices captured using rs2_query_devices"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Device count"]
pub fn rs2_get_device_count(
info_list: *const rs2_device_list,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Deletes device list, any devices created using this list will remain unaffected."]
#[doc = " \\param[in] info_list List to delete"]
pub fn rs2_delete_device_list(info_list: *mut rs2_device_list);
}
extern "C" {
#[doc = " Checks if a specific device is contained inside a device list."]
#[doc = " \\param[in] info_list The list of devices to check in"]
#[doc = " \\param[in] device RealSense device to check for"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return True if the device is in the list and false otherwise"]
pub fn rs2_device_list_contains(
info_list: *const rs2_device_list,
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Creates a device by index. The device object represents a physical camera and provides the means to manipulate it."]
#[doc = " \\param[in] info_list the list containing the device to retrieve"]
#[doc = " \\param[in] index The zero based index of device to retrieve"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The requested device, should be released by rs2_delete_device"]
pub fn rs2_create_device(
info_list: *const rs2_device_list,
index: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Delete RealSense device"]
#[doc = " \\param[in] device Realsense device to delete"]
pub fn rs2_delete_device(device: *mut rs2_device);
}
extern "C" {
#[doc = " Retrieve camera specific information, like versions of various internal components."]
#[doc = " \\param[in] device The RealSense device"]
#[doc = " \\param[in] info Camera info type to retrieve"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The requested camera info string, in a format specific to the device model"]
pub fn rs2_get_device_info(
device: *const rs2_device,
info: rs2_camera_info,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Check if a camera supports a specific camera info type."]
#[doc = " \\param[in] device The RealSense device to check"]
#[doc = " \\param[in] info The parameter to check for support"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return True if the parameter both exist and well-defined for the specific device"]
pub fn rs2_supports_device_info(
device: *const rs2_device,
info: rs2_camera_info,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Send hardware reset request to the device. The actual reset is asynchronous."]
#[doc = " Note: Invalidates all handles to this device."]
#[doc = " \\param[in] device The RealSense device to reset"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_hardware_reset(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Send raw data to device"]
#[doc = " \\param[in] device RealSense device to send data to"]
#[doc = " \\param[in] raw_data_to_send Raw data to be sent to device"]
#[doc = " \\param[in] size_of_raw_data_to_send Size of raw_data_to_send in bytes"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Device's response in a rs2_raw_data_buffer, which should be released by rs2_delete_raw_data"]
pub fn rs2_send_and_receive_raw_data(
device: *mut rs2_device,
raw_data_to_send: *mut ::std::os::raw::c_void,
size_of_raw_data_to_send: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " Test if the given device can be extended to the requested extension."]
#[doc = " \\param[in] device Realsense device"]
#[doc = " \\param[in] extension The extension to which the device should be tested if it is extendable"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Non-zero value iff the device can be extended to the given extension"]
pub fn rs2_is_device_extendable_to(
device: *const rs2_device,
extension: rs2_extension,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Create a static snapshot of all connected sensors within a specific device."]
#[doc = " \\param[in] device Specific RealSense device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The list of sensors, should be released by rs2_delete_sensor_list"]
pub fn rs2_query_sensors(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> *mut rs2_sensor_list;
}
extern "C" {
#[doc = " Enter the given device into loopback operation mode that uses the given file as input for raw data"]
#[doc = " \\param[in] device Device to enter into loopback operation mode"]
#[doc = " \\param[in] from_file Path to bag file with raw data for loopback"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_loopback_enable(
device: *const rs2_device,
from_file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Restores the given device into normal operation mode"]
#[doc = " \\param[in] device Device to restore to normal operation mode"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_loopback_disable(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Checks if the device is in loopback mode or not"]
#[doc = " \\param[in] device Device to check for operation mode"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if the device is in loopback operation mode"]
pub fn rs2_loopback_is_enabled(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Connects to a given tm2 controller"]
#[doc = " \\param[in] device Device to connect to the controller"]
#[doc = " \\param[in] mac_addr The MAC address of the desired controller"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_connect_tm2_controller(
device: *const rs2_device,
mac_addr: *const ::std::os::raw::c_uchar,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Disconnects a given tm2 controller"]
#[doc = " \\param[in] device Device to disconnect the controller from"]
#[doc = " \\param[in] id The ID of the desired controller"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_disconnect_tm2_controller(
device: *const rs2_device,
id: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Reset device to factory calibration"]
#[doc = " \\param[in] device The RealSense device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_reset_to_factory_calibration(device: *const rs2_device, e: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Write calibration to device's EEPROM"]
#[doc = " \\param[in] device The RealSense device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_write_calibration(device: *const rs2_device, e: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Update device to the provided firmware, the device must be extendable to RS2_EXTENSION_UPDATABLE."]
#[doc = " This call is executed on the caller's thread and it supports progress notifications via the optional callback."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] fw_image Firmware image buffer"]
#[doc = " \\param[in] fw_image_size Firmware image buffer size"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_update_firmware_cpp(
device: *const rs2_device,
fw_image: *const ::std::os::raw::c_void,
fw_image_size: ::std::os::raw::c_int,
callback: *mut rs2_update_progress_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Update device to the provided firmware, the device must be extendable to RS2_EXTENSION_UPDATABLE."]
#[doc = " This call is executed on the caller's thread and it supports progress notifications via the optional callback."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] fw_image Firmware image buffer"]
#[doc = " \\param[in] fw_image_size Firmware image buffer size"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[in] client_data Optional client data for the callback"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_update_firmware(
device: *const rs2_device,
fw_image: *const ::std::os::raw::c_void,
fw_image_size: ::std::os::raw::c_int,
callback: rs2_update_progress_callback_ptr,
client_data: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Create backup of camera flash memory. Such backup does not constitute valid firmware image, and cannot be"]
#[doc = " loaded back to the device, but it does contain all calibration and device information."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_flash_backup_cpp(
device: *const rs2_device,
callback: *mut rs2_update_progress_callback,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " Create backup of camera flash memory. Such backup does not constitute valid firmware image, and cannot be"]
#[doc = " loaded back to the device, but it does contain all calibration and device information."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[in] client_data Optional client data for the callback"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_flash_backup(
device: *const rs2_device,
callback: rs2_update_progress_callback_ptr,
client_data: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " Update device to the provided firmware by writing raw data directly to the flash, this command can be executed only on unlocked camera."]
#[doc = " The device must be extendable to RS2_EXTENSION_UPDATABLE."]
#[doc = " This call is executed on the caller's thread and it supports progress notifications via the optional callback."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] fw_image Firmware image buffer"]
#[doc = " \\param[in] fw_image_size Firmware image buffer size"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[in] update_mode Select one of RS2_UNSIGNED_UPDATE_MODE, WARNING!!! setting to any option other than RS2_UNSIGNED_UPDATE_MODE_UPDATE will make this call unsafe and might damage the camera"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_update_firmware_unsigned_cpp(
device: *const rs2_device,
fw_image: *const ::std::os::raw::c_void,
fw_image_size: ::std::os::raw::c_int,
callback: *mut rs2_update_progress_callback,
update_mode: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Checks if the device and the provided firmware image are compatible"]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] fw_image Firmware image buffer"]
#[doc = " \\param[in] fw_image_size Firmware image buffer size in bytes"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Non-zero if the firmware is compatible with the device and 0 otherwise"]
pub fn rs2_check_firmware_compatibility(
device: *const rs2_device,
fw_image: *const ::std::os::raw::c_void,
fw_image_size: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Update device to the provided firmware by writing raw data directly to the flash, this command can be executed only on unlocked camera."]
#[doc = " The device must be extendable to RS2_EXTENSION_UPDATABLE."]
#[doc = " This call is executed on the caller's thread and it supports progress notifications via the optional callback."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[in] fw_image Firmware image buffer"]
#[doc = " \\param[in] fw_image_size Firmware image buffer size"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[in] client_data Optional client data for the callback"]
#[doc = " \\param[in] update_mode Select one of RS2_UNSIGNED_UPDATE_MODE, WARNING!!! setting to any option other than RS2_UNSIGNED_UPDATE_MODE_UPDATE will make this call unsafe and might damage the camera"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_update_firmware_unsigned(
device: *const rs2_device,
fw_image: *const ::std::os::raw::c_void,
fw_image_size: ::std::os::raw::c_int,
callback: rs2_update_progress_callback_ptr,
client_data: *mut ::std::os::raw::c_void,
update_mode: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Enter the device to update state, this will cause the updatable device to disconnect and reconnect as update device."]
#[doc = " \\param[in] device Device to update"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_enter_update_state(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " This will improve the depth noise."]
#[doc = " \\param[in] json_content Json string to configure regular speed on chip calibration parameters:"]
#[doc = "{"]
#[doc = "\"calib type\" : 0,"]
#[doc = "\"speed\": 3,"]
#[doc = "\"scan parameter\": 0,"]
#[doc = "\"adjust both sides\": 0,"]
#[doc = "\"white wall mode\": 0"]
#[doc = "}"]
#[doc = "calib_type - calibraton type: 0 = regular, 1 = focal length, 2 = both regular and focal length in order"]
#[doc = "speed - for regular calibration. value can be one of: Very fast = 0, Fast = 1, Medium = 2, Slow = 3, White wall = 4, default is Slow for type 0 and Fast for type 2"]
#[doc = "scan_parameter - for regular calibration. value can be one of: Py scan (default) = 0, Rx scan = 1"]
#[doc = "adjust_both_sides - for focal length calibration. value can be one of: 0 = adjust right only, 1 = adjust both sides"]
#[doc = "white_wall_mode - white wall mode: 0 for normal mode and 1 for white wall mode"]
#[doc = "if json is nullptr it will be ignored and calibration will use the default parameters"]
#[doc = " \\param[out] health The absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one"]
#[doc = "[0, 0.25) - Good"]
#[doc = "[0.25, 0.75) - Can be Improved"]
#[doc = "[0.75, ) - Requires Calibration"]
#[doc = "The absolute value of focal length calibration Health-Check captures how far camera calibration is from the optimal one"]
#[doc = "[0, 0.15) - Good"]
#[doc = "[0.15, 0.75) - Can be Improved"]
#[doc = "[0.75, ) - Requires Calibration"]
#[doc = "The two health numbers are encoded in one integer as follows for calib_type 2:"]
#[doc = "Regular health number times 1000 are bits 0 to 11"]
#[doc = "Regular health number is negative if bit 24 is 1"]
#[doc = "Focal length health number times 1000 are bits 12 to 23"]
#[doc = "Focal length health number is negative if bit 25 is 1"]
#[doc = " \\param[in] callback Optional callback to get progress notifications"]
#[doc = " \\param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise)"]
#[doc = " \\return New calibration table"]
pub fn rs2_run_on_chip_calibration_cpp(
device: *mut rs2_device,
json_content: *const ::std::os::raw::c_void,
content_size: ::std::os::raw::c_int,
health: *mut f32,
progress_callback: *mut rs2_update_progress_callback,
timeout_ms: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " This will improve the depth noise."]
#[doc = " \\param[in] json_content Json string to configure regular speed on chip calibration parameters:"]
#[doc = "{"]
#[doc = "\"calib type\" : 0,"]
#[doc = "\"speed\": 3,"]
#[doc = "\"scan parameter\": 0,"]
#[doc = "\"adjust both sides\": 0,"]
#[doc = "\"white wall mode\": 0"]
#[doc = "}"]
#[doc = "calib_type - calibraton type: 0 = regular, 1 = focal length, 2 = both regular and focal length in order"]
#[doc = "speed - for regular calibration, value can be one of: Very fast = 0, Fast = 1, Medium = 2, Slow = 3, White wall = 4, default is Slow for type 0 and Fast for type 2"]
#[doc = "scan_parameter - for regular calibration. value can be one of: Py scan (default) = 0, Rx scan = 1"]
#[doc = "adjust_both_sides - for focal length calibration. value can be one of: 0 = adjust right only, 1 = adjust both sides"]
#[doc = "white_wall_mode - white wall mode: 0 for normal mode and 1 for white wall mode"]
#[doc = "if json is nullptr it will be ignored and calibration will use the default parameters"]
#[doc = " \\param[out] health The absolute value of regular calibration Health-Check captures how far camera calibration is from the optimal one"]
#[doc = "[0, 0.25) - Good"]
#[doc = "[0.25, 0.75) - Can be Improved"]
#[doc = "[0.75, ) - Requires Calibration"]
#[doc = "The absolute value of focal length calibration Health-Check captures how far camera calibration is from the optimal one"]
#[doc = "[0, 0.15) - Good"]
#[doc = "[0.15, 0.75) - Can be Improved"]
#[doc = "[0.75, ) - Requires Calibration"]
#[doc = "The two health numbers are encoded in one integer as follows for calib_type 2:"]
#[doc = "Regular health number times 1000 are bits 0 to 11"]
#[doc = "Regular health number is negative if bit 24 is 1"]
#[doc = "Focal length health number times 1000 are bits 12 to 23"]
#[doc = "Focal length health number is negative if bit 25 is 1"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[in] client_data Optional client data for the callback"]
#[doc = " \\param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise)"]
#[doc = " \\return New calibration table"]
pub fn rs2_run_on_chip_calibration(
device: *mut rs2_device,
json_content: *const ::std::os::raw::c_void,
content_size: ::std::os::raw::c_int,
health: *mut f32,
callback: rs2_update_progress_callback_ptr,
client_data: *mut ::std::os::raw::c_void,
timeout_ms: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " This will adjust camera absolute distance to flat target. User needs to enter the known ground truth."]
#[doc = " \\param[in] ground_truth_mm Ground truth in mm must be between 60 and 10000"]
#[doc = " \\param[in] json_content Json string to configure tare calibration parameters:"]
#[doc = "{"]
#[doc = "\"average step count\": 20,"]
#[doc = "\"step count\": 20,"]
#[doc = "\"accuracy\": 2,"]
#[doc = "\"scan parameter\": 0,"]
#[doc = "\"data sampling\": 0"]
#[doc = "}"]
#[doc = "average step count - number of frames to average, must be between 1 - 30, default = 20"]
#[doc = "step count - max iteration steps, must be between 5 - 30, default = 10"]
#[doc = "accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is very high (0.025%)"]
#[doc = "scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1"]
#[doc = "data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1"]
#[doc = "if json is nullptr it will be ignored and calibration will use the default parameters"]
#[doc = " \\param[in] content_size Json string size if its 0 the json will be ignored and calibration will use the default parameters"]
#[doc = " \\param[in] callback Optional callback to get progress notifications"]
#[doc = " \\param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise)"]
#[doc = " \\return New calibration table"]
pub fn rs2_run_tare_calibration_cpp(
dev: *mut rs2_device,
ground_truth_mm: f32,
json_content: *const ::std::os::raw::c_void,
content_size: ::std::os::raw::c_int,
progress_callback: *mut rs2_update_progress_callback,
timeout_ms: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
pub const rs2_calibration_type_RS2_CALIBRATION_AUTO_DEPTH_TO_RGB: rs2_calibration_type = 0;
pub const rs2_calibration_type_RS2_CALIBRATION_MANUAL_DEPTH_TO_RGB: rs2_calibration_type = 1;
pub const rs2_calibration_type_RS2_CALIBRATION_THERMAL: rs2_calibration_type = 2;
pub const rs2_calibration_type_RS2_CALIBRATION_TYPE_COUNT: rs2_calibration_type = 3;
#[doc = " Used in device_calibration; enumerates the different calibration types"]
#[doc = " available for that extension."]
pub type rs2_calibration_type = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_calibration_type_to_string(
arg1: rs2_calibration_type,
) -> *const ::std::os::raw::c_char;
}
pub const rs2_calibration_status_RS2_CALIBRATION_TRIGGERED: rs2_calibration_status = 0;
pub const rs2_calibration_status_RS2_CALIBRATION_SPECIAL_FRAME: rs2_calibration_status = 1;
pub const rs2_calibration_status_RS2_CALIBRATION_STARTED: rs2_calibration_status = 2;
pub const rs2_calibration_status_RS2_CALIBRATION_NOT_NEEDED: rs2_calibration_status = 3;
pub const rs2_calibration_status_RS2_CALIBRATION_SUCCESSFUL: rs2_calibration_status = 4;
pub const rs2_calibration_status_RS2_CALIBRATION_RETRY: rs2_calibration_status = -1;
pub const rs2_calibration_status_RS2_CALIBRATION_FAILED: rs2_calibration_status = -2;
pub const rs2_calibration_status_RS2_CALIBRATION_SCENE_INVALID: rs2_calibration_status = -3;
pub const rs2_calibration_status_RS2_CALIBRATION_BAD_RESULT: rs2_calibration_status = -4;
pub const rs2_calibration_status_RS2_CALIBRATION_BAD_CONDITIONS: rs2_calibration_status = -5;
pub const rs2_calibration_status_RS2_CALIBRATION_STATUS_FIRST: rs2_calibration_status = -5;
pub const rs2_calibration_status_RS2_CALIBRATION_STATUS_LAST: rs2_calibration_status = 4;
pub const rs2_calibration_status_RS2_CALIBRATION_STATUS_COUNT: rs2_calibration_status = 10;
#[doc = " Used in device_calibration with rs2_calibration_change_callback"]
pub type rs2_calibration_status = ::std::os::raw::c_int;
extern "C" {
pub fn rs2_calibration_status_to_string(
arg1: rs2_calibration_status,
) -> *const ::std::os::raw::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rs2_calibration_change_callback {
_unused: [u8; 0],
}
pub type rs2_calibration_change_callback_ptr = ::std::option::Option<
unsafe extern "C" fn(arg1: rs2_calibration_status, arg: *mut ::std::os::raw::c_void),
>;
extern "C" {
#[doc = " Adds a callback for a sensor that gets called when calibration (intrinsics) changes, e.g. due to auto-calibration"]
#[doc = " \\param[in] sensor the sensor"]
#[doc = " \\param[in] callback the C callback function that gets called"]
#[doc = " \\param[in] user user argument that gets passed to the callback function"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_register_calibration_change_callback(
dev: *mut rs2_device,
callback: rs2_calibration_change_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Adds a callback for a sensor that gets called when calibration (intrinsics) changes, e.g. due to auto-calibration"]
#[doc = " \\param[in] sensor the sensor"]
#[doc = " \\param[in] callback the C++ callback interface that gets called"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_register_calibration_change_callback_cpp(
dev: *mut rs2_device,
callback: *mut rs2_calibration_change_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Triggers calibration of the given type"]
#[doc = " \\param[in] dev the device"]
#[doc = " \\param[in] type the type of calibration requested"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_trigger_device_calibration(
dev: *mut rs2_device,
type_: rs2_calibration_type,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " This will adjust camera absolute distance to flat target. User needs to enter the known ground truth."]
#[doc = " \\param[in] ground_truth_mm Ground truth in mm must be between 60 and 10000"]
#[doc = " \\param[in] json_content Json string to configure tare calibration parameters:"]
#[doc = "{"]
#[doc = "\"average_step_count\": 20,"]
#[doc = "\"step count\": 20,"]
#[doc = "\"accuracy\": 2,"]
#[doc = "\"scan parameter\": 0,"]
#[doc = "\"data sampling\": 0"]
#[doc = "}"]
#[doc = "average step count - number of frames to average, must be between 1 - 30, default = 20"]
#[doc = "step count - max iteration steps, must be between 5 - 30, default = 10"]
#[doc = "accuracy - Subpixel accuracy level, value can be one of: Very high = 0 (0.025%), High = 1 (0.05%), Medium = 2 (0.1%), Low = 3 (0.2%), Default = Very high (0.025%), default is very high (0.025%)"]
#[doc = "scan_parameter - value can be one of: Py scan (default) = 0, Rx scan = 1"]
#[doc = "data_sampling - value can be one of:polling data sampling = 0, interrupt data sampling = 1"]
#[doc = "if json is nullptr it will be ignored and calibration will use the default parameters"]
#[doc = " \\param[in] content_size Json string size if its 0 the json will be ignored and calibration will use the default parameters"]
#[doc = " \\param[in] callback Optional callback for update progress notifications, the progress value is normailzed to 1"]
#[doc = " \\param[in] client_data Optional client data for the callback"]
#[doc = " \\param[in] timeout_ms Timeout in ms (use 5000 msec unless instructed otherwise)"]
#[doc = " \\return New calibration table"]
pub fn rs2_run_tare_calibration(
dev: *mut rs2_device,
ground_truth_mm: f32,
json_content: *const ::std::os::raw::c_void,
content_size: ::std::os::raw::c_int,
callback: rs2_update_progress_callback_ptr,
client_data: *mut ::std::os::raw::c_void,
timeout_ms: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " Read current calibration table from flash."]
#[doc = " \\return Calibration table"]
pub fn rs2_get_calibration_table(
dev: *const rs2_device,
error: *mut *mut rs2_error,
) -> *const rs2_raw_data_buffer;
}
extern "C" {
#[doc = " Set current table to dynamic area."]
#[doc = " \\param[in] Calibration table"]
pub fn rs2_set_calibration_table(
device: *const rs2_device,
calibration: *const ::std::os::raw::c_void,
calibration_size: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
pub fn rs2_serialize_json(
dev: *mut rs2_device,
error: *mut *mut rs2_error,
) -> *mut rs2_raw_data_buffer;
}
extern "C" {
pub fn rs2_load_json(
dev: *mut rs2_device,
json_content: *const ::std::os::raw::c_void,
content_size: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
);
}
#[doc = "< Frame timestamp was measured in relation to the camera clock"]
pub const rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_HARDWARE_CLOCK: rs2_timestamp_domain = 0;
#[doc = "< Frame timestamp was measured in relation to the OS system clock"]
pub const rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_SYSTEM_TIME: rs2_timestamp_domain = 1;
#[doc = "< Frame timestamp was measured in relation to the camera clock and converted to OS system clock by constantly measure the difference"]
pub const rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_GLOBAL_TIME: rs2_timestamp_domain = 2;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_timestamp_domain_RS2_TIMESTAMP_DOMAIN_COUNT: rs2_timestamp_domain = 3;
#[doc = " \\brief Specifies the clock in relation to which the frame timestamp was measured."]
pub type rs2_timestamp_domain = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_timestamp_domain_to_string(
info: rs2_timestamp_domain,
) -> *const ::std::os::raw::c_char;
}
#[doc = "< A sequential index managed per-stream. Integer value"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_COUNTER: rs2_frame_metadata_value = 0;
#[doc = "< Timestamp set by device clock when data readout and transmit commence. usec"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_TIMESTAMP: rs2_frame_metadata_value = 1;
#[doc = "< Timestamp of the middle of sensor's exposure calculated by device. usec"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_SENSOR_TIMESTAMP: rs2_frame_metadata_value =
2;
#[doc = "< Sensor's exposure width. When Auto Exposure (AE) is on the value is controlled by firmware. usec"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_ACTUAL_EXPOSURE: rs2_frame_metadata_value = 3;
#[doc = "< A relative value increasing which will increase the Sensor's gain factor. \\"]
#[doc = "When AE is set On, the value is controlled by firmware. Integer value"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_GAIN_LEVEL: rs2_frame_metadata_value = 4;
#[doc = "< Auto Exposure Mode indicator. Zero corresponds to AE switched off."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_AUTO_EXPOSURE: rs2_frame_metadata_value = 5;
#[doc = "< White Balance setting as a color temperature. Kelvin degrees"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_WHITE_BALANCE: rs2_frame_metadata_value = 6;
#[doc = "< Time of arrival in system clock"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_TIME_OF_ARRIVAL: rs2_frame_metadata_value = 7;
#[doc = "< Temperature of the device, measured at the time of the frame capture. Celsius degrees"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_TEMPERATURE: rs2_frame_metadata_value = 8;
#[doc = "< Timestamp get from uvc driver. usec"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_BACKEND_TIMESTAMP: rs2_frame_metadata_value =
9;
#[doc = "< Actual fps"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_ACTUAL_FPS: rs2_frame_metadata_value = 10;
#[doc = "< Laser power value 0-360."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_LASER_POWER: rs2_frame_metadata_value =
11;
#[doc = "< Laser power mode. Zero corresponds to Laser power switched off and one for switched on. deprecated, replaced by RS2_FRAME_METADATA_FRAME_EMITTER_MODE"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_LASER_POWER_MODE:
rs2_frame_metadata_value = 12;
#[doc = "< Exposure priority."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_PRIORITY: rs2_frame_metadata_value =
13;
#[doc = "< Left region of interest for the auto exposure Algorithm."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_LEFT: rs2_frame_metadata_value =
14;
#[doc = "< Right region of interest for the auto exposure Algorithm."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_RIGHT: rs2_frame_metadata_value =
15;
#[doc = "< Top region of interest for the auto exposure Algorithm."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_TOP: rs2_frame_metadata_value =
16;
#[doc = "< Bottom region of interest for the auto exposure Algorithm."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_EXPOSURE_ROI_BOTTOM:
rs2_frame_metadata_value = 17;
#[doc = "< Color image brightness."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_BRIGHTNESS: rs2_frame_metadata_value = 18;
#[doc = "< Color image contrast."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_CONTRAST: rs2_frame_metadata_value = 19;
#[doc = "< Color image saturation."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_SATURATION: rs2_frame_metadata_value = 20;
#[doc = "< Color image sharpness."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_SHARPNESS: rs2_frame_metadata_value = 21;
#[doc = "< Auto white balance temperature Mode indicator. Zero corresponds to automatic mode switched off."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_AUTO_WHITE_BALANCE_TEMPERATURE:
rs2_frame_metadata_value = 22;
#[doc = "< Color backlight compensation. Zero corresponds to switched off."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_BACKLIGHT_COMPENSATION:
rs2_frame_metadata_value = 23;
#[doc = "< Color image hue."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_HUE: rs2_frame_metadata_value = 24;
#[doc = "< Color image gamma."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_GAMMA: rs2_frame_metadata_value = 25;
#[doc = "< Color image white balance."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_MANUAL_WHITE_BALANCE:
rs2_frame_metadata_value = 26;
#[doc = "< Power Line Frequency for anti-flickering Off/50Hz/60Hz/Auto."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_POWER_LINE_FREQUENCY:
rs2_frame_metadata_value = 27;
#[doc = "< Color lowlight compensation. Zero corresponds to switched off."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_LOW_LIGHT_COMPENSATION:
rs2_frame_metadata_value = 28;
#[doc = "< Emitter mode: 0 - all emitters disabled. 1 - laser enabled. 2 - auto laser enabled (opt). 3 - LED enabled (opt)."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_EMITTER_MODE: rs2_frame_metadata_value =
29;
#[doc = "< Led power value 0-360."]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_FRAME_LED_POWER: rs2_frame_metadata_value =
30;
#[doc = "< The number of transmitted payload bytes, not including metadata"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_RAW_FRAME_SIZE: rs2_frame_metadata_value = 31;
#[doc = "< GPIO input data"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_GPIO_INPUT_DATA: rs2_frame_metadata_value =
32;
#[doc = "< sub-preset id"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_SEQUENCE_NAME: rs2_frame_metadata_value = 33;
#[doc = "< sub-preset sequence id"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_SEQUENCE_ID: rs2_frame_metadata_value = 34;
#[doc = "< sub-preset sequence size"]
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_SEQUENCE_SIZE: rs2_frame_metadata_value = 35;
pub const rs2_frame_metadata_value_RS2_FRAME_METADATA_COUNT: rs2_frame_metadata_value = 36;
#[doc = " \\brief Per-Frame-Metadata is the set of read-only properties that might be exposed for each individual frame."]
pub type rs2_frame_metadata_value = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_frame_metadata_to_string(
metadata: rs2_frame_metadata_value,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_frame_metadata_value_to_string(
metadata: rs2_frame_metadata_value,
) -> *const ::std::os::raw::c_char;
}
#[doc = "< Flat rectangle with vertices as the centers of Gaussian dots"]
pub const rs2_calib_target_type_RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES: rs2_calib_target_type =
0;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_calib_target_type_RS2_CALIB_TARGET_COUNT: rs2_calib_target_type = 1;
#[doc = " \\brief Calibration target type."]
pub type rs2_calib_target_type = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_calib_target_type_to_string(
type_: rs2_calib_target_type,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " retrieve metadata from frame handle"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[in] frame_metadata the rs2_frame_metadata whose latest frame we are interested in"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the metadata value"]
pub fn rs2_get_frame_metadata(
frame: *const rs2_frame,
frame_metadata: rs2_frame_metadata_value,
error: *mut *mut rs2_error,
) -> rs2_metadata_type;
}
extern "C" {
#[doc = " determine device metadata"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[in] frame_metadata the metadata to check for support"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if device has this metadata"]
pub fn rs2_supports_frame_metadata(
frame: *const rs2_frame,
frame_metadata: rs2_frame_metadata_value,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " retrieve timestamp domain from frame handle. timestamps can only be comparable if they are in common domain"]
#[doc = " (for example, depth timestamp might come from system time while color timestamp might come from the device)"]
#[doc = " this method is used to check if two timestamp values are comparable (generated from the same clock)"]
#[doc = " \\param[in] frameset handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the timestamp domain of the frame (camera / microcontroller / system time)"]
pub fn rs2_get_frame_timestamp_domain(
frameset: *const rs2_frame,
error: *mut *mut rs2_error,
) -> rs2_timestamp_domain;
}
extern "C" {
#[doc = " retrieve timestamp from frame handle in milliseconds"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the timestamp of the frame in milliseconds"]
pub fn rs2_get_frame_timestamp(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> rs2_time_t;
}
extern "C" {
#[doc = " retrieve frame parent sensor from frame handle"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the parent sensor of the frame"]
pub fn rs2_get_frame_sensor(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> *mut rs2_sensor;
}
extern "C" {
#[doc = " retrieve frame number from frame handle"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the frame nubmer of the frame, in milliseconds since the device was started"]
pub fn rs2_get_frame_number(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
#[doc = " retrieve data size from frame handle"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the size of the frame data"]
pub fn rs2_get_frame_data_size(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " retrieve data from frame handle"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the pointer to the start of the frame data"]
pub fn rs2_get_frame_data(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_void;
}
extern "C" {
#[doc = " retrieve frame width in pixels"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return frame width in pixels"]
pub fn rs2_get_frame_width(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " retrieve frame height in pixels"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return frame height in pixels"]
pub fn rs2_get_frame_height(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " retrieve the scaling factor to use when converting a depth frame's get_data() units to meters"]
#[doc = " \\return float - depth, in meters, per 1 unit stored in the frame data"]
pub fn rs2_depth_frame_get_units(frame: *const rs2_frame, error: *mut *mut rs2_error) -> f32;
}
extern "C" {
#[doc = " retrieve frame stride in bytes (number of bytes from start of line N to start of line N+1)"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return stride in bytes"]
pub fn rs2_get_frame_stride_in_bytes(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " retrieve bits per pixels in the frame image"]
#[doc = " (note that bits per pixel is not necessarily divided by 8, as in 12bpp)"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return bits per pixel"]
pub fn rs2_get_frame_bits_per_pixel(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " create additional reference to a frame without duplicating frame data"]
#[doc = " \\param[in] frame handle returned from a callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return new frame reference, has to be released by rs2_release_frame"]
pub fn rs2_frame_add_ref(frame: *mut rs2_frame, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " relases the frame handle"]
#[doc = " \\param[in] frame handle returned from a callback"]
pub fn rs2_release_frame(frame: *mut rs2_frame);
}
extern "C" {
#[doc = " communicate to the library you intend to keep the frame alive for a while"]
#[doc = " this will remove the frame from the regular count of the frame pool"]
#[doc = " once this function is called, the SDK can no longer guarantee 0-allocations during frame cycling"]
#[doc = " \\param[in] frame handle returned from a callback"]
pub fn rs2_keep_frame(frame: *mut rs2_frame);
}
extern "C" {
#[doc = " When called on Points frame type, this method returns a pointer to an array of 3D vertices of the model"]
#[doc = " The coordinate system is: X right, Y up, Z away from the camera. Units: Meters"]
#[doc = " \\param[in] frame Points frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Pointer to an array of vertices, lifetime is managed by the frame"]
pub fn rs2_get_frame_vertices(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> *mut rs2_vertex;
}
extern "C" {
#[doc = " When called on Points frame type, this method creates a ply file of the model with the given file name."]
#[doc = " \\param[in] frame Points frame"]
#[doc = " \\param[in] fname The name for the ply file"]
#[doc = " \\param[in] texture Texture frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_export_to_ply(
frame: *const rs2_frame,
fname: *const ::std::os::raw::c_char,
texture: *mut rs2_frame,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " When called on Points frame type, this method returns a pointer to an array of texture coordinates per vertex"]
#[doc = " Each coordinate represent a (u,v) pair within [0,1] range, to be mapped to texture image"]
#[doc = " \\param[in] frame Points frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Pointer to an array of texture coordinates, lifetime is managed by the frame"]
pub fn rs2_get_frame_texture_coordinates(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> *mut rs2_pixel;
}
extern "C" {
#[doc = " When called on Points frame type, this method returns the number of vertices in the frame"]
#[doc = " \\param[in] frame Points frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Number of vertices"]
pub fn rs2_get_frame_points_count(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Returns the stream profile that was used to start the stream of this frame"]
#[doc = " \\param[in] frame frame reference, owned by the user"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Pointer to the stream profile object, lifetime is managed elsewhere"]
pub fn rs2_get_frame_stream_profile(
frame: *const rs2_frame,
error: *mut *mut rs2_error,
) -> *const rs2_stream_profile;
}
extern "C" {
#[doc = " Test if the given frame can be extended to the requested extension"]
#[doc = " \\param[in] frame Realsense frame"]
#[doc = " \\param[in] extension_type The extension to which the frame should be tested if it is extendable"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return non-zero value iff the frame can be extended to the given extension"]
pub fn rs2_is_frame_extendable_to(
frame: *const rs2_frame,
extension_type: rs2_extension,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Allocate new video frame using a frame-source provided form a processing block"]
#[doc = " \\param[in] source Frame pool to allocate the frame from"]
#[doc = " \\param[in] new_stream New stream profile to assign to newly created frame"]
#[doc = " \\param[in] original A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)"]
#[doc = " \\param[in] new_bpp New value for bits per pixel for the allocated frame"]
#[doc = " \\param[in] new_width New value for width for the allocated frame"]
#[doc = " \\param[in] new_height New value for height for the allocated frame"]
#[doc = " \\param[in] new_stride New value for stride in bytes for the allocated frame"]
#[doc = " \\param[in] frame_type New value for frame type for the allocated frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return reference to a newly allocated frame, must be released with release_frame"]
#[doc = " memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store"]
pub fn rs2_allocate_synthetic_video_frame(
source: *mut rs2_source,
new_stream: *const rs2_stream_profile,
original: *mut rs2_frame,
new_bpp: ::std::os::raw::c_int,
new_width: ::std::os::raw::c_int,
new_height: ::std::os::raw::c_int,
new_stride: ::std::os::raw::c_int,
frame_type: rs2_extension,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " Allocate new motion frame using a frame-source provided form a processing block"]
#[doc = " \\param[in] source Frame pool to allocate the frame from"]
#[doc = " \\param[in] new_stream New stream profile to assign to newly created frame"]
#[doc = " \\param[in] original A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)"]
#[doc = " \\param[in] frame_type New value for frame type for the allocated frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return reference to a newly allocated frame, must be released with release_frame"]
#[doc = " memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store"]
pub fn rs2_allocate_synthetic_motion_frame(
source: *mut rs2_source,
new_stream: *const rs2_stream_profile,
original: *mut rs2_frame,
frame_type: rs2_extension,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " Allocate new points frame using a frame-source provided from a processing block"]
#[doc = " \\param[in] source Frame pool to allocate the frame from"]
#[doc = " \\param[in] new_stream New stream profile to assign to newly created frame"]
#[doc = " \\param[in] original A reference frame that can be used to fill in auxilary information like format, width, height, bpp, stride (if applicable)"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return reference to a newly allocated frame, must be released with release_frame"]
#[doc = " memory for the frame is likely to be re-used from previous frame, but in lack of available frames in the pool will be allocated from the free store"]
pub fn rs2_allocate_points(
source: *mut rs2_source,
new_stream: *const rs2_stream_profile,
original: *mut rs2_frame,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " Allocate new composite frame, aggregating a set of existing frames"]
#[doc = " \\param[in] source Frame pool to allocate the frame from"]
#[doc = " \\param[in] frames Array of existing frames"]
#[doc = " \\param[in] count Number of input frames"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return reference to a newly allocated frame, must be released with release_frame"]
#[doc = " when composite frame gets released it will automatically release all of the input frames"]
pub fn rs2_allocate_composite_frame(
source: *mut rs2_source,
frames: *mut *mut rs2_frame,
count: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " Extract frame from within a composite frame"]
#[doc = " \\param[in] composite Composite frame"]
#[doc = " \\param[in] index Index of the frame to extract within the composite frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return returns reference to a frame existing within the composite frame"]
#[doc = " If you wish to keep this frame after the composite is released, you need to call acquire_ref"]
#[doc = " Otherwise the resulting frame lifetime is bound by owning composite frame"]
pub fn rs2_extract_frame(
composite: *mut rs2_frame,
index: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " Get number of frames embedded within a composite frame"]
#[doc = " \\param[in] composite Composite input frame"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Number of embedded frames"]
pub fn rs2_embedded_frames_count(
composite: *mut rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " This method will dispatch frame callback on a frame"]
#[doc = " \\param[in] source Frame pool provided by the processing block"]
#[doc = " \\param[in] frame Frame to dispatch, frame ownership is passed to this function, so you don't have to call release_frame after it"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_synthetic_frame_ready(
source: *mut rs2_source,
frame: *mut rs2_frame,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " When called on Pose frame type, this method returns the transformation represented by the pose data"]
#[doc = " \\param[in] frame Pose frame"]
#[doc = " \\param[out] pose Pointer to a user allocated struct, which contains the pose info after a successful return"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_pose_frame_get_pose_data(
frame: *const rs2_frame,
pose: *mut rs2_pose,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Extract the target dimensions on the specific target"]
#[doc = " \\param[in] frame Left or right camera frame of specified size based on the target type"]
#[doc = " \\param[in] calib_type Calibration target type"]
#[doc = " \\param[in] target_dims_size Target dimension array size"]
#[doc = " \\param[out] target_dims The array to hold the result target dimensions calculated. For type RS2_CALIB_TARGET_RECT_GAUSSIAN_DOT_VERTICES, the four rectangle side sizes in pixels with the order of top, bottom, left, and right"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_extract_target_dimensions(
frame: *const rs2_frame,
calib_type: rs2_calib_target_type,
target_dims: *mut f32,
target_dims_size: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
);
}
#[doc = "< Enable / disable color backlight compensation"]
pub const rs2_option_RS2_OPTION_BACKLIGHT_COMPENSATION: rs2_option = 0;
#[doc = "< Color image brightness"]
pub const rs2_option_RS2_OPTION_BRIGHTNESS: rs2_option = 1;
#[doc = "< Color image contrast"]
pub const rs2_option_RS2_OPTION_CONTRAST: rs2_option = 2;
#[doc = "< Controls exposure time of color camera. Setting any value will disable auto exposure"]
pub const rs2_option_RS2_OPTION_EXPOSURE: rs2_option = 3;
#[doc = "< Color image gain"]
pub const rs2_option_RS2_OPTION_GAIN: rs2_option = 4;
#[doc = "< Color image gamma setting"]
pub const rs2_option_RS2_OPTION_GAMMA: rs2_option = 5;
#[doc = "< Color image hue"]
pub const rs2_option_RS2_OPTION_HUE: rs2_option = 6;
#[doc = "< Color image saturation setting"]
pub const rs2_option_RS2_OPTION_SATURATION: rs2_option = 7;
#[doc = "< Color image sharpness setting"]
pub const rs2_option_RS2_OPTION_SHARPNESS: rs2_option = 8;
#[doc = "< Controls white balance of color image. Setting any value will disable auto white balance"]
pub const rs2_option_RS2_OPTION_WHITE_BALANCE: rs2_option = 9;
#[doc = "< Enable / disable color image auto-exposure"]
pub const rs2_option_RS2_OPTION_ENABLE_AUTO_EXPOSURE: rs2_option = 10;
#[doc = "< Enable / disable color image auto-white-balance"]
pub const rs2_option_RS2_OPTION_ENABLE_AUTO_WHITE_BALANCE: rs2_option = 11;
#[doc = "< Provide access to several recommend sets of option presets for the depth camera"]
pub const rs2_option_RS2_OPTION_VISUAL_PRESET: rs2_option = 12;
#[doc = "< Power of the laser emitter, with 0 meaning projector off"]
pub const rs2_option_RS2_OPTION_LASER_POWER: rs2_option = 13;
#[doc = "< Set the number of patterns projected per frame. The higher the accuracy value the more patterns projected. Increasing the number of patterns help to achieve better accuracy. Note that this control is affecting the Depth FPS"]
pub const rs2_option_RS2_OPTION_ACCURACY: rs2_option = 14;
#[doc = "< Motion vs. Range trade-off, with lower values allowing for better motion sensitivity and higher values allowing for better depth range"]
pub const rs2_option_RS2_OPTION_MOTION_RANGE: rs2_option = 15;
#[doc = "< Set the filter to apply to each depth frame. Each one of the filter is optimized per the application requirements"]
pub const rs2_option_RS2_OPTION_FILTER_OPTION: rs2_option = 16;
#[doc = "< The confidence level threshold used by the Depth algorithm pipe to set whether a pixel will get a valid range or will be marked with invalid range"]
pub const rs2_option_RS2_OPTION_CONFIDENCE_THRESHOLD: rs2_option = 17;
#[doc = "< Emitter select: 0 – disable all emitters. 1 – enable laser. 2 – enable auto laser. 3 – enable LED."]
pub const rs2_option_RS2_OPTION_EMITTER_ENABLED: rs2_option = 18;
#[doc = "< Number of frames the user is allowed to keep per stream. Trying to hold-on to more frames will cause frame-drops."]
pub const rs2_option_RS2_OPTION_FRAMES_QUEUE_SIZE: rs2_option = 19;
#[doc = "< Total number of detected frame drops from all streams"]
pub const rs2_option_RS2_OPTION_TOTAL_FRAME_DROPS: rs2_option = 20;
#[doc = "< Auto-Exposure modes: Static, Anti-Flicker and Hybrid"]
pub const rs2_option_RS2_OPTION_AUTO_EXPOSURE_MODE: rs2_option = 21;
#[doc = "< Power Line Frequency control for anti-flickering Off/50Hz/60Hz/Auto"]
pub const rs2_option_RS2_OPTION_POWER_LINE_FREQUENCY: rs2_option = 22;
#[doc = "< Current Asic Temperature"]
pub const rs2_option_RS2_OPTION_ASIC_TEMPERATURE: rs2_option = 23;
#[doc = "< disable error handling"]
pub const rs2_option_RS2_OPTION_ERROR_POLLING_ENABLED: rs2_option = 24;
#[doc = "< Current Projector Temperature"]
pub const rs2_option_RS2_OPTION_PROJECTOR_TEMPERATURE: rs2_option = 25;
#[doc = "< Enable / disable trigger to be outputed from the camera to any external device on every depth frame"]
pub const rs2_option_RS2_OPTION_OUTPUT_TRIGGER_ENABLED: rs2_option = 26;
#[doc = "< Current Motion-Module Temperature"]
pub const rs2_option_RS2_OPTION_MOTION_MODULE_TEMPERATURE: rs2_option = 27;
#[doc = "< Number of meters represented by a single depth unit"]
pub const rs2_option_RS2_OPTION_DEPTH_UNITS: rs2_option = 28;
#[doc = "< Enable/Disable automatic correction of the motion data"]
pub const rs2_option_RS2_OPTION_ENABLE_MOTION_CORRECTION: rs2_option = 29;
#[doc = "< Allows sensor to dynamically ajust the frame rate depending on lighting conditions"]
pub const rs2_option_RS2_OPTION_AUTO_EXPOSURE_PRIORITY: rs2_option = 30;
#[doc = "< Color scheme for data visualization"]
pub const rs2_option_RS2_OPTION_COLOR_SCHEME: rs2_option = 31;
#[doc = "< Perform histogram equalization post-processing on the depth data"]
pub const rs2_option_RS2_OPTION_HISTOGRAM_EQUALIZATION_ENABLED: rs2_option = 32;
#[doc = "< Minimal distance to the target"]
pub const rs2_option_RS2_OPTION_MIN_DISTANCE: rs2_option = 33;
#[doc = "< Maximum distance to the target"]
pub const rs2_option_RS2_OPTION_MAX_DISTANCE: rs2_option = 34;
#[doc = "< Texture mapping stream unique ID"]
pub const rs2_option_RS2_OPTION_TEXTURE_SOURCE: rs2_option = 35;
#[doc = "< The 2D-filter effect. The specific interpretation is given within the context of the filter"]
pub const rs2_option_RS2_OPTION_FILTER_MAGNITUDE: rs2_option = 36;
#[doc = "< 2D-filter parameter controls the weight/radius for smoothing."]
pub const rs2_option_RS2_OPTION_FILTER_SMOOTH_ALPHA: rs2_option = 37;
#[doc = "< 2D-filter range/validity threshold"]
pub const rs2_option_RS2_OPTION_FILTER_SMOOTH_DELTA: rs2_option = 38;
#[doc = "< Enhance depth data post-processing with holes filling where appropriate"]
pub const rs2_option_RS2_OPTION_HOLES_FILL: rs2_option = 39;
#[doc = "< The distance in mm between the first and the second imagers in stereo-based depth cameras"]
pub const rs2_option_RS2_OPTION_STEREO_BASELINE: rs2_option = 40;
#[doc = "< Allows dynamically ajust the converge step value of the target exposure in Auto-Exposure algorithm"]
pub const rs2_option_RS2_OPTION_AUTO_EXPOSURE_CONVERGE_STEP: rs2_option = 41;
#[doc = "< Impose Inter-camera HW synchronization mode. Applicable for D400/L500/Rolling Shutter SKUs"]
pub const rs2_option_RS2_OPTION_INTER_CAM_SYNC_MODE: rs2_option = 42;
#[doc = "< Select a stream to process"]
pub const rs2_option_RS2_OPTION_STREAM_FILTER: rs2_option = 43;
#[doc = "< Select a stream format to process"]
pub const rs2_option_RS2_OPTION_STREAM_FORMAT_FILTER: rs2_option = 44;
#[doc = "< Select a stream index to process"]
pub const rs2_option_RS2_OPTION_STREAM_INDEX_FILTER: rs2_option = 45;
#[doc = "< When supported, this option make the camera to switch the emitter state every frame. 0 for disabled, 1 for enabled"]
pub const rs2_option_RS2_OPTION_EMITTER_ON_OFF: rs2_option = 46;
#[doc = "< Deprecated!!! - Zero order point x"]
pub const rs2_option_RS2_OPTION_ZERO_ORDER_POINT_X: rs2_option = 47;
#[doc = "< Deprecated!!! - Zero order point y"]
pub const rs2_option_RS2_OPTION_ZERO_ORDER_POINT_Y: rs2_option = 48;
#[doc = "< LDD temperature"]
pub const rs2_option_RS2_OPTION_LLD_TEMPERATURE: rs2_option = 49;
#[doc = "< MC temperature"]
pub const rs2_option_RS2_OPTION_MC_TEMPERATURE: rs2_option = 50;
#[doc = "< MA temperature"]
pub const rs2_option_RS2_OPTION_MA_TEMPERATURE: rs2_option = 51;
#[doc = "< Hardware stream configuration"]
pub const rs2_option_RS2_OPTION_HARDWARE_PRESET: rs2_option = 52;
#[doc = "< disable global time"]
pub const rs2_option_RS2_OPTION_GLOBAL_TIME_ENABLED: rs2_option = 53;
#[doc = "< APD temperature"]
pub const rs2_option_RS2_OPTION_APD_TEMPERATURE: rs2_option = 54;
#[doc = "< Enable an internal map"]
pub const rs2_option_RS2_OPTION_ENABLE_MAPPING: rs2_option = 55;
#[doc = "< Enable appearance based relocalization"]
pub const rs2_option_RS2_OPTION_ENABLE_RELOCALIZATION: rs2_option = 56;
#[doc = "< Enable position jumping"]
pub const rs2_option_RS2_OPTION_ENABLE_POSE_JUMPING: rs2_option = 57;
#[doc = "< Enable dynamic calibration"]
pub const rs2_option_RS2_OPTION_ENABLE_DYNAMIC_CALIBRATION: rs2_option = 58;
#[doc = "< Offset from sensor to depth origin in millimetrers"]
pub const rs2_option_RS2_OPTION_DEPTH_OFFSET: rs2_option = 59;
#[doc = "< Power of the LED (light emitting diode), with 0 meaning LED off"]
pub const rs2_option_RS2_OPTION_LED_POWER: rs2_option = 60;
#[doc = "< DEPRECATED! - Toggle Zero-Order mode"]
pub const rs2_option_RS2_OPTION_ZERO_ORDER_ENABLED: rs2_option = 61;
#[doc = "< Preserve previous map when starting"]
pub const rs2_option_RS2_OPTION_ENABLE_MAP_PRESERVATION: rs2_option = 62;
#[doc = "< Enable/disable sensor shutdown when a free-fall is detected (on by default)"]
pub const rs2_option_RS2_OPTION_FREEFALL_DETECTION_ENABLED: rs2_option = 63;
#[doc = "< Changes the exposure time of Avalanche Photo Diode in the receiver"]
pub const rs2_option_RS2_OPTION_AVALANCHE_PHOTO_DIODE: rs2_option = 64;
#[doc = "< Changes the amount of sharpening in the post-processed image"]
pub const rs2_option_RS2_OPTION_POST_PROCESSING_SHARPENING: rs2_option = 65;
#[doc = "< Changes the amount of sharpening in the pre-processed image"]
pub const rs2_option_RS2_OPTION_PRE_PROCESSING_SHARPENING: rs2_option = 66;
#[doc = "< Control edges and background noise"]
pub const rs2_option_RS2_OPTION_NOISE_FILTERING: rs2_option = 67;
#[doc = "< Enable\\disable pixel invalidation"]
pub const rs2_option_RS2_OPTION_INVALIDATION_BYPASS: rs2_option = 68;
#[doc = "< DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead."]
pub const rs2_option_RS2_OPTION_AMBIENT_LIGHT: rs2_option = 69;
#[doc = "< Change the depth digital gain see rs2_digital_gain for values"]
pub const rs2_option_RS2_OPTION_DIGITAL_GAIN: rs2_option = 69;
#[doc = "< The resolution mode: see rs2_sensor_mode for values"]
pub const rs2_option_RS2_OPTION_SENSOR_MODE: rs2_option = 70;
#[doc = "< Enable Laser On constantly (GS SKU Only)"]
pub const rs2_option_RS2_OPTION_EMITTER_ALWAYS_ON: rs2_option = 71;
#[doc = "< Depth Thermal Compensation for selected D400 SKUs"]
pub const rs2_option_RS2_OPTION_THERMAL_COMPENSATION: rs2_option = 72;
#[doc = "< DEPRECATED as of 2.46!"]
pub const rs2_option_RS2_OPTION_TRIGGER_CAMERA_ACCURACY_HEALTH: rs2_option = 73;
#[doc = "< DEPRECATED as of 2.46!"]
pub const rs2_option_RS2_OPTION_RESET_CAMERA_ACCURACY_HEALTH: rs2_option = 74;
#[doc = "< Set host performance mode to optimize device settings so host can keep up with workload, for example, USB transaction granularity, setting option to low performance host leads to larger USB transaction size and reduced number of transactions which improves performance and stability if host is relatively weak as compared to workload"]
pub const rs2_option_RS2_OPTION_HOST_PERFORMANCE: rs2_option = 75;
#[doc = "< Enable / disable HDR"]
pub const rs2_option_RS2_OPTION_HDR_ENABLED: rs2_option = 76;
#[doc = "< HDR Sequence name"]
pub const rs2_option_RS2_OPTION_SEQUENCE_NAME: rs2_option = 77;
#[doc = "< HDR Sequence size"]
pub const rs2_option_RS2_OPTION_SEQUENCE_SIZE: rs2_option = 78;
#[doc = "< HDR Sequence ID - 0 is not HDR; sequence ID for HDR configuration starts from 1"]
pub const rs2_option_RS2_OPTION_SEQUENCE_ID: rs2_option = 79;
#[doc = "< Humidity temperature [Deg Celsius]"]
pub const rs2_option_RS2_OPTION_HUMIDITY_TEMPERATURE: rs2_option = 80;
#[doc = "< Turn on/off the maximum usable depth sensor range given the amount of ambient light in the scene"]
pub const rs2_option_RS2_OPTION_ENABLE_MAX_USABLE_RANGE: rs2_option = 81;
#[doc = "< Turn on/off the alternate IR, When enabling alternate IR, the IR image is holding the amplitude of the depth correlation."]
pub const rs2_option_RS2_OPTION_ALTERNATE_IR: rs2_option = 82;
#[doc = "< Noise estimation - indicates the noise on the IR image"]
pub const rs2_option_RS2_OPTION_NOISE_ESTIMATION: rs2_option = 83;
#[doc = "< Enables data collection for calculating IR pixel reflectivity"]
pub const rs2_option_RS2_OPTION_ENABLE_IR_REFLECTIVITY: rs2_option = 84;
#[doc = "< Set and get auto exposure limit in microseconds. Default is 0 which means full exposure range. If the requested exposure limit is greater than frame time, it will be set to frame time at runtime. Setting will not take effect until next streaming session."]
pub const rs2_option_RS2_OPTION_AUTO_EXPOSURE_LIMIT: rs2_option = 85;
#[doc = "< Set and get auto gain limits ranging from 16 to 248. Default is 0 which means full gain. If the requested gain limit is less than 16, it will be set to 16. If the requested gain limit is greater than 248, it will be set to 248. Setting will not take effect until next streaming session."]
pub const rs2_option_RS2_OPTION_AUTO_GAIN_LIMIT: rs2_option = 86;
#[doc = "< Enable receiver sensitivity according to ambient light, bounded by the Receiver Gain control."]
pub const rs2_option_RS2_OPTION_AUTO_RX_SENSITIVITY: rs2_option = 87;
#[doc = "<changes the transmitter frequencies increasing effective range over sharpness."]
pub const rs2_option_RS2_OPTION_TRANSMITTER_FREQUENCY: rs2_option = 88;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_option_RS2_OPTION_COUNT: rs2_option = 89;
#[doc = " \\brief Defines general configuration controls."]
#[doc = "These can generally be mapped to camera UVC controls, and can be set / queried at any time unless stated otherwise."]
pub type rs2_option = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_option_to_string(option: rs2_option) -> *const ::std::os::raw::c_char;
}
#[doc = "< Preset for short range"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_SHORT_RANGE: rs2_sr300_visual_preset = 0;
#[doc = "< Preset for long range"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_LONG_RANGE: rs2_sr300_visual_preset = 1;
#[doc = "< Preset for background segmentation"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_BACKGROUND_SEGMENTATION:
rs2_sr300_visual_preset = 2;
#[doc = "< Preset for gesture recognition"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_GESTURE_RECOGNITION:
rs2_sr300_visual_preset = 3;
#[doc = "< Preset for object scanning"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_OBJECT_SCANNING: rs2_sr300_visual_preset =
4;
#[doc = "< Preset for face analytics"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_FACE_ANALYTICS: rs2_sr300_visual_preset =
5;
#[doc = "< Preset for face login"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_FACE_LOGIN: rs2_sr300_visual_preset = 6;
#[doc = "< Preset for GR cursor"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_GR_CURSOR: rs2_sr300_visual_preset = 7;
#[doc = "< Camera default settings"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_DEFAULT: rs2_sr300_visual_preset = 8;
#[doc = "< Preset for mid-range"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_MID_RANGE: rs2_sr300_visual_preset = 9;
#[doc = "< Preset for IR only"]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_IR_ONLY: rs2_sr300_visual_preset = 10;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_sr300_visual_preset_RS2_SR300_VISUAL_PRESET_COUNT: rs2_sr300_visual_preset = 11;
#[doc = " \\brief For SR300 devices: provides optimized settings (presets) for specific types of usage."]
pub type rs2_sr300_visual_preset = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_sr300_visual_preset_to_string(
preset: rs2_sr300_visual_preset,
) -> *const ::std::os::raw::c_char;
}
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_CUSTOM: rs2_rs400_visual_preset = 0;
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_DEFAULT: rs2_rs400_visual_preset = 1;
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_HAND: rs2_rs400_visual_preset = 2;
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_HIGH_ACCURACY: rs2_rs400_visual_preset =
3;
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_HIGH_DENSITY: rs2_rs400_visual_preset = 4;
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_MEDIUM_DENSITY: rs2_rs400_visual_preset =
5;
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_REMOVE_IR_PATTERN:
rs2_rs400_visual_preset = 6;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_rs400_visual_preset_RS2_RS400_VISUAL_PRESET_COUNT: rs2_rs400_visual_preset = 7;
#[doc = " \\brief For RS400 devices: provides optimized settings (presets) for specific types of usage."]
pub type rs2_rs400_visual_preset = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_rs400_visual_preset_to_string(
preset: rs2_rs400_visual_preset,
) -> *const ::std::os::raw::c_char;
}
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_CUSTOM: rs2_l500_visual_preset = 0;
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_DEFAULT: rs2_l500_visual_preset = 1;
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_NO_AMBIENT: rs2_l500_visual_preset = 2;
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_LOW_AMBIENT: rs2_l500_visual_preset = 3;
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_MAX_RANGE: rs2_l500_visual_preset = 4;
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_SHORT_RANGE: rs2_l500_visual_preset = 5;
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_AUTOMATIC: rs2_l500_visual_preset = 6;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_l500_visual_preset_RS2_L500_VISUAL_PRESET_COUNT: rs2_l500_visual_preset = 7;
#[doc = " \\brief For L500 devices: provides optimized settings (presets) for specific types of usage."]
pub type rs2_l500_visual_preset = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_l500_visual_preset_to_string(
preset: rs2_l500_visual_preset,
) -> *const ::std::os::raw::c_char;
}
pub const rs2_sensor_mode_RS2_SENSOR_MODE_VGA: rs2_sensor_mode = 0;
pub const rs2_sensor_mode_RS2_SENSOR_MODE_XGA: rs2_sensor_mode = 1;
pub const rs2_sensor_mode_RS2_SENSOR_MODE_QVGA: rs2_sensor_mode = 2;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_sensor_mode_RS2_SENSOR_MODE_COUNT: rs2_sensor_mode = 3;
#[doc = " \\brief For setting the camera_mode option"]
pub type rs2_sensor_mode = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_sensor_mode_to_string(preset: rs2_sensor_mode) -> *const ::std::os::raw::c_char;
}
pub const rs2_ambient_light_RS2_AMBIENT_LIGHT_NO_AMBIENT: rs2_ambient_light = 1;
pub const rs2_ambient_light_RS2_AMBIENT_LIGHT_LOW_AMBIENT: rs2_ambient_light = 2;
#[doc = " \\brief DEPRECATED! - Use RS2_OPTION_DIGITAL_GAIN instead."]
pub type rs2_ambient_light = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_ambient_light_to_string(preset: rs2_ambient_light) -> *const ::std::os::raw::c_char;
}
pub const rs2_digital_gain_RS2_DIGITAL_GAIN_AUTO: rs2_digital_gain = 0;
pub const rs2_digital_gain_RS2_DIGITAL_GAIN_HIGH: rs2_digital_gain = 1;
pub const rs2_digital_gain_RS2_DIGITAL_GAIN_LOW: rs2_digital_gain = 2;
#[doc = " \\brief digital gain for RS2_OPTION_DIGITAL_GAIN option."]
pub type rs2_digital_gain = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_digital_gain_to_string(preset: rs2_digital_gain) -> *const ::std::os::raw::c_char;
}
#[doc = "< no change in settings, use device defaults"]
pub const rs2_host_perf_mode_RS2_HOST_PERF_DEFAULT: rs2_host_perf_mode = 0;
#[doc = "< low performance host mode, if host cannot keep up with workload, this option may improve stability, for example, it sets larger USB transaction granularity, reduces number of transactions and improve performance and stability on relatively weak hosts as compared to the workload"]
pub const rs2_host_perf_mode_RS2_HOST_PERF_LOW: rs2_host_perf_mode = 1;
#[doc = "< high performance host mode, if host is strong as compared to the work and can handle workload without delay, this option sets smaller USB transactions granularity and as result larger number of transactions and workload on host, but reduces chance in device frame drops"]
pub const rs2_host_perf_mode_RS2_HOST_PERF_HIGH: rs2_host_perf_mode = 2;
#[doc = "< Number of enumeration values. Not a valid input: intended to be used in for-loops."]
pub const rs2_host_perf_mode_RS2_HOST_PERF_COUNT: rs2_host_perf_mode = 3;
#[doc = " \\brief values for RS2_OPTION_HOST_PERFORMANCE option."]
pub type rs2_host_perf_mode = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_host_perf_mode_to_string(perf: rs2_host_perf_mode) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " check if an option is read-only"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be checked"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if option is read-only"]
pub fn rs2_is_option_read_only(
options: *const rs2_options,
option: rs2_option,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " read option value from the sensor"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be queried"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return value of the option"]
pub fn rs2_get_option(
options: *const rs2_options,
option: rs2_option,
error: *mut *mut rs2_error,
) -> f32;
}
extern "C" {
#[doc = " write new value to sensor option"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be queried"]
#[doc = " \\param[in] value new value for the option"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_set_option(
options: *const rs2_options,
option: rs2_option,
value: f32,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " get the list of supported options of options container"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_options_list(
options: *const rs2_options,
error: *mut *mut rs2_error,
) -> *mut rs2_options_list;
}
extern "C" {
#[doc = " get the size of options list"]
#[doc = " \\param[in] options the option list"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_options_list_size(
options: *const rs2_options_list,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " get option name"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be checked"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return human-readable option name"]
pub fn rs2_get_option_name(
options: *const rs2_options,
option: rs2_option,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " get the specific option from options list"]
#[doc = " \\param[in] i the index of the option"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_option_from_list(
options: *const rs2_options_list,
i: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> rs2_option;
}
extern "C" {
#[doc = " Deletes options list"]
#[doc = " \\param[in] list list to delete"]
pub fn rs2_delete_options_list(list: *mut rs2_options_list);
}
extern "C" {
#[doc = " check if particular option is supported by a subdevice"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be checked"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if option is supported"]
pub fn rs2_supports_option(
options: *const rs2_options,
option: rs2_option,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " retrieve the available range of values of a supported option"]
#[doc = " \\param[in] sensor the RealSense device"]
#[doc = " \\param[in] option the option whose range should be queried"]
#[doc = " \\param[out] min the minimum value which will be accepted for this option"]
#[doc = " \\param[out] max the maximum value which will be accepted for this option"]
#[doc = " \\param[out] step the granularity of options which accept discrete values, or zero if the option accepts continuous values"]
#[doc = " \\param[out] def the default value of the option"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_get_option_range(
sensor: *const rs2_options,
option: rs2_option,
min: *mut f32,
max: *mut f32,
step: *mut f32,
def: *mut f32,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " get option description"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be checked"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return human-readable option description"]
pub fn rs2_get_option_description(
options: *const rs2_options,
option: rs2_option,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " get option value description (in case specific option value hold special meaning)"]
#[doc = " \\param[in] options the options container"]
#[doc = " \\param[in] option option id to be checked"]
#[doc = " \\param[in] value value of the option"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return human-readable description of a specific value of an option or null if no special meaning"]
pub fn rs2_get_option_value_description(
options: *const rs2_options,
option: rs2_option,
value: f32,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Creates Depth-Colorizer processing block that can be used to quickly visualize the depth data"]
#[doc = " This block will accept depth frames as input and replace them by depth frames with format RGB8"]
#[doc = " Non-depth frames are passed through"]
#[doc = " Further customization will be added soon (format, color-map, histogram equalization control)"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_colorizer(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Sync processing block. This block accepts arbitrary frames and output composite frames of best matches"]
#[doc = " Some frames may be released within the syncer if they are waiting for match for too long"]
#[doc = " Syncronization is done (mostly) based on timestamps so good hardware timestamps are a pre-condition"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_sync_processing_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Point-Cloud processing block. This block accepts depth frames and outputs Points frames"]
#[doc = " In addition, given non-depth frame, the block will align texture coordinate to the non-depth stream"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_pointcloud(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates YUY decoder processing block. This block accepts raw YUY frames and outputs frames of other formats."]
#[doc = " YUY is a common video format used by a variety of web-cams. It benefits from packing pixels into 2 bytes per pixel"]
#[doc = " without signficant quality drop. YUY representation can be converted back to more usable RGB form,"]
#[doc = " but this requires somewhat costly conversion."]
#[doc = " The SDK will automatically try to use SSE2 and AVX instructions and CUDA where available to get"]
#[doc = " best performance. Other implementations (using GLSL, OpenCL, Neon and NCS) should follow."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_yuy_decoder(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates depth thresholding processing block"]
#[doc = " By controlling min and max options on the block, one could filter out depth values"]
#[doc = " that are either too large or too small, as a software post-processing step"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_threshold(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates depth units transformation processing block"]
#[doc = " All of the pixels are transformed from depth units into meters."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_units_transform(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " This method creates new custom processing block. This lets the users pass frames between module boundaries for processing"]
#[doc = " This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc.."]
#[doc = " \\param proc Processing function to be applied to every frame entering the block"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return new processing block, to be released by rs2_delete_processing_block"]
pub fn rs2_create_processing_block(
proc_: *mut rs2_frame_processor_callback,
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " This method creates new custom processing block from function pointer. This lets the users pass frames between module boundaries for processing"]
#[doc = " This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as sync, colorizer, etc.."]
#[doc = " \\param proc Processing function pointer to be applied to every frame entering the block"]
#[doc = " \\param context User context (can be anything or null) to be passed later as ctx param of the callback"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return new processing block, to be released by rs2_delete_processing_block"]
pub fn rs2_create_processing_block_fptr(
proc_: rs2_frame_processor_callback_ptr,
context: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " This method adds a custom option to a custom processing block. This is a simple float that can be accessed via rs2_set_option and rs2_get_option"]
#[doc = " This is an infrastructure function aimed at middleware developers, and also used by provided blocks such as save_to_ply, etc.."]
#[doc = " \\param[in] block Processing block"]
#[doc = " \\param[in] option_id an int ID for referencing the option"]
#[doc = " \\param[in] min the minimum value which will be accepted for this option"]
#[doc = " \\param[in] max the maximum value which will be accepted for this option"]
#[doc = " \\param[in] step the granularity of options which accept discrete values, or zero if the option accepts continuous values"]
#[doc = " \\param[in] def the default value of the option. This will be the initial value."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if adding the option succeeds. false if it fails e.g. an option with this id is already registered"]
pub fn rs2_processing_block_register_simple_option(
block: *mut rs2_processing_block,
option_id: rs2_option,
min: f32,
max: f32,
step: f32,
def: f32,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " This method is used to direct the output from the processing block to some callback or sink object"]
#[doc = " \\param[in] block Processing block"]
#[doc = " \\param[in] on_frame Callback to be invoked every time the processing block calls frame_ready"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_start_processing(
block: *mut rs2_processing_block,
on_frame: *mut rs2_frame_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " This method is used to direct the output from the processing block to some callback or sink object"]
#[doc = " \\param[in] block Processing block"]
#[doc = " \\param[in] on_frame Callback function to be invoked every time the processing block calls frame_ready"]
#[doc = " \\param[in] user User context for the callback (can be anything or null)"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_start_processing_fptr(
block: *mut rs2_processing_block,
on_frame: rs2_frame_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " This method is used to direct the output from the processing block to a dedicated queue object"]
#[doc = " \\param[in] block Processing block"]
#[doc = " \\param[in] queue Queue to place the processed frames to"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_start_processing_queue(
block: *mut rs2_processing_block,
queue: *mut rs2_frame_queue,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " This method is used to pass frame into a processing block"]
#[doc = " \\param[in] block Processing block"]
#[doc = " \\param[in] frame Frame to process, ownership is moved to the block object"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_process_frame(
block: *mut rs2_processing_block,
frame: *mut rs2_frame,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Deletes the processing block"]
#[doc = " \\param[in] block Processing block"]
pub fn rs2_delete_processing_block(block: *mut rs2_processing_block);
}
extern "C" {
#[doc = " create frame queue. frame queues are the simplest x-platform synchronization primitive provided by librealsense"]
#[doc = " to help developers who are not using async APIs"]
#[doc = " \\param[in] capacity max number of frames to allow to be stored in the queue before older frames will start to get dropped"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return handle to the frame queue, must be released using rs2_delete_frame_queue"]
pub fn rs2_create_frame_queue(
capacity: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_frame_queue;
}
extern "C" {
#[doc = " deletes frame queue and releases all frames inside it"]
#[doc = " \\param[in] queue queue to delete"]
pub fn rs2_delete_frame_queue(queue: *mut rs2_frame_queue);
}
extern "C" {
#[doc = " wait until new frame becomes available in the queue and dequeue it"]
#[doc = " \\param[in] queue the frame queue data structure"]
#[doc = " \\param[in] timeout_ms max time in milliseconds to wait until an exception will be thrown"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return frame handle to be released using rs2_release_frame"]
pub fn rs2_wait_for_frame(
queue: *mut rs2_frame_queue,
timeout_ms: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " poll if a new frame is available and dequeue if it is"]
#[doc = " \\param[in] queue the frame queue data structure"]
#[doc = " \\param[out] output_frame frame handle to be released using rs2_release_frame"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if new frame was stored to output_frame"]
pub fn rs2_poll_for_frame(
queue: *mut rs2_frame_queue,
output_frame: *mut *mut rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " wait until new frame becomes available in the queue and dequeue it"]
#[doc = " \\param[in] queue the frame queue data structure"]
#[doc = " \\param[in] timeout_ms max time in milliseconds to wait until a frame becomes available"]
#[doc = " \\param[out] output_frame frame handle to be released using rs2_release_frame"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if new frame was stored to output_frame"]
pub fn rs2_try_wait_for_frame(
queue: *mut rs2_frame_queue,
timeout_ms: ::std::os::raw::c_uint,
output_frame: *mut *mut rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " enqueue new frame into a queue"]
#[doc = " \\param[in] frame frame handle to enqueue (this operation passed ownership to the queue)"]
#[doc = " \\param[in] queue the frame queue data structure"]
pub fn rs2_enqueue_frame(frame: *mut rs2_frame, queue: *mut ::std::os::raw::c_void);
}
extern "C" {
#[doc = " Creates Align processing block."]
#[doc = " \\param[in] align_to stream type to be used as the target of frameset alignment"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_align(
align_to: rs2_stream,
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Depth post-processing filter block. This block accepts depth frames, applies decimation filter and plots modified prames"]
#[doc = " Note that due to the modifiedframe size, the decimated frame repaces the original one"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_decimation_filter_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Depth post-processing filter block. This block accepts depth frames, applies temporal filter"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_temporal_filter_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Depth post-processing spatial filter block. This block accepts depth frames, applies spatial filters and plots modified prames"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_spatial_filter_block(error: *mut *mut rs2_error)
-> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates a post processing block that provides for depth<->disparity domain transformation for stereo-based depth modules"]
#[doc = " \\param[in] transform_to_disparity flag select the transform direction: true = depth->disparity, and vice versa"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_disparity_transform_block(
transform_to_disparity: ::std::os::raw::c_uchar,
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Depth post-processing hole filling block. The filter replaces empty pixels with data from adjacent pixels based on the method selected"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_hole_filling_filter_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates a rates printer block. The printer prints the actual FPS of the invoked frame stream."]
#[doc = " The block ignores reapiting frames and calculats the FPS only if the frame number of the relevant frame was changed."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_rates_printer_block(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Depth post-processing zero order fix block. The filter invalidates pixels that has a wrong value due to zero order effect"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return zero order fix processing block"]
pub fn rs2_create_zero_order_invalidation_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates Depth frame decompression module. Decoded frames compressed and transmitted with Z16H variable-lenght Huffman code to"]
#[doc = " standartized Z16 Depth data format. Using the compression allows to reduce the Depth frames bandwidth by more than 50 percent"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Huffman-code decompression processing block"]
pub fn rs2_create_huffman_depth_decompress_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates a hdr_merge processing block."]
#[doc = " The block merges between two depth frames with different exposure values"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_hdr_merge_processing_block(
error: *mut *mut rs2_error,
) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Creates a sequence_id_filter processing block."]
#[doc = " The block lets frames with the selected sequence id pass and blocks frames with other values"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_sequence_id_filter(error: *mut *mut rs2_error) -> *mut rs2_processing_block;
}
extern "C" {
#[doc = " Retrieve processing block specific information, like name."]
#[doc = " \\param[in] block The processing block"]
#[doc = " \\param[in] info processing block info type to retrieve"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The requested processing block info string, in a format specific to the device model"]
pub fn rs2_get_processing_block_info(
block: *const rs2_processing_block,
info: rs2_camera_info,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Check if a processing block supports a specific info type."]
#[doc = " \\param[in] block The processing block to check"]
#[doc = " \\param[in] info The parameter to check for support"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return True if the parameter both exist and well-defined for the specific device"]
pub fn rs2_supports_processing_block_info(
block: *const rs2_processing_block,
info: rs2_camera_info,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Test if the given processing block can be extended to the requested extension"]
#[doc = " \\param[in] block processing block"]
#[doc = " \\param[in] extension The extension to which the sensor should be tested if it is extendable"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return non-zero value iff the processing block can be extended to the given extension"]
pub fn rs2_is_processing_block_extendable_to(
block: *const rs2_processing_block,
extension_type: rs2_extension,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
#[doc = "< Unknown state"]
pub const rs2_playback_status_RS2_PLAYBACK_STATUS_UNKNOWN: rs2_playback_status = 0;
#[doc = "< One or more sensors were started, playback is reading and raising data"]
pub const rs2_playback_status_RS2_PLAYBACK_STATUS_PLAYING: rs2_playback_status = 1;
#[doc = "< One or more sensors were started, but playback paused reading and paused raising data"]
pub const rs2_playback_status_RS2_PLAYBACK_STATUS_PAUSED: rs2_playback_status = 2;
#[doc = "< All sensors were stopped, or playback has ended (all data was read). This is the initial playback status"]
pub const rs2_playback_status_RS2_PLAYBACK_STATUS_STOPPED: rs2_playback_status = 3;
pub const rs2_playback_status_RS2_PLAYBACK_STATUS_COUNT: rs2_playback_status = 4;
pub type rs2_playback_status = ::std::os::raw::c_uint;
extern "C" {
pub fn rs2_playback_status_to_string(
status: rs2_playback_status,
) -> *const ::std::os::raw::c_char;
}
pub type rs2_playback_status_changed_callback_ptr =
::std::option::Option<unsafe extern "C" fn(arg1: rs2_playback_status)>;
extern "C" {
#[doc = " Creates a recording device to record the given device and save it to the given file"]
#[doc = " \\param[in] device The device to record"]
#[doc = " \\param[in] file The desired path to which the recorder should save the data"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return A pointer to a device that records its data to file, or null in case of failure"]
pub fn rs2_create_record_device(
device: *const rs2_device,
file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Creates a recording device to record the given device and save it to the given file"]
#[doc = " \\param[in] device The device to record"]
#[doc = " \\param[in] file The desired path to which the recorder should save the data"]
#[doc = " \\param[in] compression_enabled Indicates if compression is enabled, 0 means false, otherwise true"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return A pointer to a device that records its data to file, or null in case of failure"]
pub fn rs2_create_record_device_ex(
device: *const rs2_device,
file: *const ::std::os::raw::c_char,
compression_enabled: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Pause the recording device without stopping the actual device from streaming."]
#[doc = " Pausing will cause the device to stop writing new data to the file, in particular, frames and changes to extensions"]
#[doc = " \\param[in] device A recording device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_record_device_pause(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Unpause the recording device. Resume will cause the device to continue writing new data to the file, in particular, frames and changes to extensions"]
#[doc = " \\param[in] device A recording device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_record_device_resume(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Gets the name of the file to which the recorder is writing"]
#[doc = " \\param[in] device A recording device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The name of the file to which the recorder is writing"]
pub fn rs2_record_device_filename(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Creates a playback device to play the content of the given file"]
#[doc = " \\param[in] file Path to the file to play"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return A pointer to a device that plays data from the file, or null in case of failure"]
pub fn rs2_create_playback_device(
file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Gets the path of the file used by the playback device"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Path to the file used by the playback device"]
pub fn rs2_playback_device_get_file_path(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Gets the total duration of the file in units of nanoseconds"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Total duration of the file in units of nanoseconds"]
pub fn rs2_playback_get_duration(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
#[doc = " Set the playback to a specified time point of the played data"]
#[doc = " \\param[in] device A playback device."]
#[doc = " \\param[in] time The time point to which playback should seek, expressed in units of nanoseconds (zero value = start)"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_seek(
device: *const rs2_device,
time: ::std::os::raw::c_longlong,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Gets the current position of the playback in the file in terms of time. Units are expressed in nanoseconds"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Current position of the playback in the file in terms of time. Units are expressed in nanoseconds"]
pub fn rs2_playback_get_position(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_ulonglong;
}
extern "C" {
#[doc = " Pauses the playback"]
#[doc = " Calling pause() in \"Paused\" status does nothing"]
#[doc = " If pause() is called while playback status is \"Playing\" or \"Stopped\", the playback will not play until resume() is called"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_device_resume(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Un-pauses the playback"]
#[doc = " Calling resume() while playback status is \"Playing\" or \"Stopped\" does nothing"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_device_pause(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Set the playback to work in real time or non real time"]
#[doc = ""]
#[doc = " In real time mode, playback will play the same way the file was recorded."]
#[doc = " In real time mode if the application takes too long to handle the callback, frames may be dropped."]
#[doc = " In non real time mode, playback will wait for each callback to finish handling the data before"]
#[doc = " reading the next frame. In this mode no frames will be dropped, and the application controls the"]
#[doc = " frame rate of the playback (according to the callback handler duration)."]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[in] real_time Indicates if real time is requested, 0 means false, otherwise true"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_device_set_real_time(
device: *const rs2_device,
real_time: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Indicates if playback is in real time mode or non real time"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return True iff playback is in real time mode. 0 means false, otherwise true"]
pub fn rs2_playback_device_is_real_time(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Register to receive callback from playback device upon its status changes"]
#[doc = ""]
#[doc = " Callbacks are invoked from the reading thread, any heavy processing in the callback handler will affect"]
#[doc = " the reading thread and may cause frame drops\\ high latency"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[in] callback A callback handler that will be invoked when the playback status changes"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_device_set_status_changed_callback(
device: *const rs2_device,
callback: *mut rs2_playback_status_changed_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Returns the current state of the playback device"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Current state of the playback"]
pub fn rs2_playback_device_get_current_status(
device: *const rs2_device,
error: *mut *mut rs2_error,
) -> rs2_playback_status;
}
extern "C" {
#[doc = " Set the playing speed"]
#[doc = ""]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[in] speed Indicates a multiplication of the speed to play (e.g: 1 = normal, 0.5 twice as slow)"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_device_set_playback_speed(
device: *const rs2_device,
speed: f32,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Stops the playback"]
#[doc = " Calling stop() will stop all streaming playbakc sensors and will reset the playback (returning to beginning of file)"]
#[doc = " \\param[in] device A playback device"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_playback_device_stop(device: *const rs2_device, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " get the size of rs2_raw_data_buffer"]
#[doc = " \\param[in] buffer pointer to rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return size of rs2_raw_data_buffer"]
pub fn rs2_get_raw_data_size(
buffer: *const rs2_raw_data_buffer,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Delete rs2_raw_data_buffer"]
#[doc = " \\param[in] buffer rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data"]
pub fn rs2_delete_raw_data(buffer: *const rs2_raw_data_buffer);
}
extern "C" {
#[doc = " Retrieve char array from rs2_raw_data_buffer"]
#[doc = " \\param[in] buffer rs2_raw_data_buffer returned by rs2_send_and_receive_raw_data"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return raw data"]
pub fn rs2_get_raw_data(
buffer: *const rs2_raw_data_buffer,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_uchar;
}
extern "C" {
#[doc = " Retrieve the API version from the source code. Evaluate that the value is conformant to the established policies"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the version API encoded into integer value \"1.9.3\" -> 10903"]
pub fn rs2_get_api_version(error: *mut *mut rs2_error) -> ::std::os::raw::c_int;
}
extern "C" {
pub fn rs2_log_to_console(min_severity: rs2_log_severity, error: *mut *mut rs2_error);
}
extern "C" {
pub fn rs2_log_to_file(
min_severity: rs2_log_severity,
file_path: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
pub fn rs2_log_to_callback_cpp(
min_severity: rs2_log_severity,
callback: *mut rs2_log_callback,
error: *mut *mut rs2_error,
);
}
extern "C" {
pub fn rs2_log_to_callback(
min_severity: rs2_log_severity,
callback: rs2_log_callback_ptr,
arg: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
);
}
extern "C" {
pub fn rs2_reset_logger(error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Enable rolling log file when used with rs2_log_to_file:"]
#[doc = " Upon reaching (max_size/2) bytes, the log will be renamed with an \".old\" suffix and a new log created. Any"]
#[doc = " previous .old file will be erased."]
#[doc = " Must have permissions to remove/rename files in log file directory."]
#[doc = " \\param[in] max_size max file size in megabytes"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_enable_rolling_log_file(
max_size: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
);
}
extern "C" {
pub fn rs2_get_log_message_line_number(
msg: *const rs2_log_message,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_uint;
}
extern "C" {
pub fn rs2_get_log_message_filename(
msg: *const rs2_log_message,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_get_raw_log_message(
msg: *const rs2_log_message,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
pub fn rs2_get_full_log_message(
msg: *const rs2_log_message,
error: *mut *mut rs2_error,
) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " Add custom message into librealsense log"]
#[doc = " \\param[in] severity The log level for the message to be written under"]
#[doc = " \\param[in] message Message to be logged"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_log(
severity: rs2_log_severity,
message: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Given the 2D depth coordinate (x,y) provide the corresponding depth in metric units"]
#[doc = " \\param[in] frame_ref 2D depth pixel coordinates (Left-Upper corner origin)"]
#[doc = " \\param[in] x,y 2D depth pixel coordinates (Left-Upper corner origin)"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_depth_frame_get_distance(
frame_ref: *const rs2_frame,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
) -> f32;
}
extern "C" {
#[doc = " return the time at specific time point"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return the time at specific time point, in live and record mode it will return the system time and in playback mode it will return the recorded time"]
pub fn rs2_get_time(error: *mut *mut rs2_error) -> rs2_time_t;
}
extern "C" {
#[doc = " Create a config instance"]
#[doc = " The config allows pipeline users to request filters for the pipeline streams and device selection and configuration."]
#[doc = " This is an optional step in pipeline creation, as the pipeline resolves its streaming device internally."]
#[doc = " Config provides its users a way to set the filters and test if there is no conflict with the pipeline requirements"]
#[doc = " from the device. It also allows the user to find a matching device for the config filters and the pipeline, in order to"]
#[doc = " select a device explicitly, and modify its controls before streaming starts."]
#[doc = ""]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return rs2_config* A pointer to a new config instance"]
pub fn rs2_create_config(error: *mut *mut rs2_error) -> *mut rs2_config;
}
extern "C" {
#[doc = " Deletes an instance of a config"]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
pub fn rs2_delete_config(config: *mut rs2_config);
}
extern "C" {
#[doc = " Enable a device stream explicitly, with selected stream parameters."]
#[doc = " The method allows the application to request a stream with specific configuration. If no stream is explicitly enabled, the pipeline"]
#[doc = " configures the device and its streams according to the attached computer vision modules and processing blocks requirements, or"]
#[doc = " default configuration for the first available device."]
#[doc = " The application can configure any of the input stream parameters according to its requirement, or set to 0 for don't care value."]
#[doc = " The config accumulates the application calls for enable configuration methods, until the configuration is applied. Multiple enable"]
#[doc = " stream calls for the same stream with conflicting parameters override each other, and the last call is maintained."]
#[doc = " Upon calling \\c resolve(), the config checks for conflicts between the application configuration requests and the attached computer"]
#[doc = " vision modules and processing blocks requirements, and fails if conflicts are found. Before \\c resolve() is called, no conflict"]
#[doc = " check is done."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] stream Stream type to be enabled"]
#[doc = " \\param[in] index Stream index, used for multiple streams of the same type. -1 indicates any."]
#[doc = " \\param[in] width Stream image width - for images streams. 0 indicates any."]
#[doc = " \\param[in] height Stream image height - for images streams. 0 indicates any."]
#[doc = " \\param[in] format Stream data format - pixel format for images streams, of data type for other streams. RS2_FORMAT_ANY indicates any."]
#[doc = " \\param[in] framerate Stream frames per second. 0 indicates any."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_enable_stream(
config: *mut rs2_config,
stream: rs2_stream,
index: ::std::os::raw::c_int,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
format: rs2_format,
framerate: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Enable all device streams explicitly."]
#[doc = " The conditions and behavior of this method are similar to those of \\c enable_stream()."]
#[doc = " This filter enables all raw streams of the selected device. The device is either selected explicitly by the application,"]
#[doc = " or by the pipeline requirements or default. The list of streams is device dependent."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_enable_all_stream(config: *mut rs2_config, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Select a specific device explicitly by its serial number, to be used by the pipeline."]
#[doc = " The conditions and behavior of this method are similar to those of \\c enable_stream()."]
#[doc = " This method is required if the application needs to set device or sensor settings prior to pipeline streaming, to enforce"]
#[doc = " the pipeline to use the configured device."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] serial device serial number, as returned by RS2_CAMERA_INFO_SERIAL_NUMBER"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_enable_device(
config: *mut rs2_config,
serial: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Select a recorded device from a file, to be used by the pipeline through playback."]
#[doc = " The device available streams are as recorded to the file, and \\c resolve() considers only this device and configuration"]
#[doc = " as available."]
#[doc = " This request cannot be used if enable_record_to_file() is called for the current config, and vise versa"]
#[doc = " By default, playback is repeated once the file ends. To control this, see 'rs2_config_enable_device_from_file_repeat_option'."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] file The playback file of the device"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_enable_device_from_file(
config: *mut rs2_config,
file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Select a recorded device from a file, to be used by the pipeline through playback."]
#[doc = " The device available streams are as recorded to the file, and \\c resolve() considers only this device and configuration"]
#[doc = " as available."]
#[doc = " This request cannot be used if enable_record_to_file() is called for the current config, and vise versa"]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] file The playback file of the device"]
#[doc = " \\param[in] repeat_playback if true, when file ends the playback starts again, in an infinite loop;"]
#[doc = "if false, when file ends playback does not start again, and should by stopped manually by the user."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_enable_device_from_file_repeat_option(
config: *mut rs2_config,
file: *const ::std::os::raw::c_char,
repeat_playback: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Requires that the resolved device would be recorded to file"]
#[doc = " This request cannot be used if enable_device_from_file() is called for the current config, and vise versa"]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] file The desired file for the output record"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_enable_record_to_file(
config: *mut rs2_config,
file: *const ::std::os::raw::c_char,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Disable a device stream explicitly, to remove any requests on this stream type."]
#[doc = " The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the"]
#[doc = " stream configuration."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] stream Stream type, for which the filters are cleared"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_disable_stream(
config: *mut rs2_config,
stream: rs2_stream,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Disable a device stream explicitly, to remove any requests on this stream profile."]
#[doc = " The stream can still be enabled due to pipeline computer vision module request. This call removes any filter on the"]
#[doc = " stream configuration."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] stream Stream type, for which the filters are cleared"]
#[doc = " \\param[in] index Stream index, for which the filters are cleared"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_disable_indexed_stream(
config: *mut rs2_config,
stream: rs2_stream,
index: ::std::os::raw::c_int,
error: *mut *mut rs2_error,
);
}
extern "C" {
#[doc = " Disable all device stream explicitly, to remove any requests on the streams profiles."]
#[doc = " The streams can still be enabled due to pipeline computer vision module request. This call removes any filter on the"]
#[doc = " streams configuration."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_config_disable_all_streams(config: *mut rs2_config, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Resolve the configuration filters, to find a matching device and streams profiles."]
#[doc = " The method resolves the user configuration filters for the device and streams, and combines them with the requirements of"]
#[doc = " the computer vision modules and processing blocks attached to the pipeline. If there are no conflicts of requests, it looks"]
#[doc = " for an available device, which can satisfy all requests, and selects the first matching streams configuration. In the absence"]
#[doc = " of any request, the rs2::config selects the first available device and the first color and depth streams configuration."]
#[doc = " The pipeline profile selection during \\c start() follows the same method. Thus, the selected profile is the same, if no"]
#[doc = " change occurs to the available devices occurs."]
#[doc = " Resolving the pipeline configuration provides the application access to the pipeline selected device for advanced control."]
#[doc = " The returned configuration is not applied to the device, so the application doesn't own the device sensors. However, the"]
#[doc = " application can call \\c enable_device(), to enforce the device returned by this method is selected by pipeline \\c start(),"]
#[doc = " and configure the device and sensors options or extensions before streaming starts."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] pipe The pipeline for which the selected filters are applied"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return A matching device and streams profile, which satisfies the filters and pipeline requests."]
pub fn rs2_config_resolve(
config: *mut rs2_config,
pipe: *mut rs2_pipeline,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Check if the config can resolve the configuration filters, to find a matching device and streams profiles."]
#[doc = " The resolution conditions are as described in \\c resolve()."]
#[doc = ""]
#[doc = " \\param[in] config A pointer to an instance of a config"]
#[doc = " \\param[in] pipe The pipeline for which the selected filters are applied"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return True if a valid profile selection exists, false if no selection can be found under the config filters and the available devices."]
pub fn rs2_config_can_resolve(
config: *mut rs2_config,
pipe: *mut rs2_pipeline,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Create a pipeline instance"]
#[doc = " The pipeline simplifies the user interaction with the device and computer vision processing modules."]
#[doc = " The class abstracts the camera configuration and streaming, and the vision modules triggering and threading."]
#[doc = " It lets the application focus on the computer vision output of the modules, or the device output data."]
#[doc = " The pipeline can manage computer vision modules, which are implemented as a processing blocks."]
#[doc = " The pipeline is the consumer of the processing block interface, while the application consumes the"]
#[doc = " computer vision interface."]
#[doc = " \\param[in] ctx context"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_create_pipeline(
ctx: *mut rs2_context,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline;
}
extern "C" {
#[doc = " Stop the pipeline streaming."]
#[doc = " The pipeline stops delivering samples to the attached computer vision modules and processing blocks, stops the device streaming"]
#[doc = " and releases the device resources used by the pipeline. It is the application's responsibility to release any frame reference it owns."]
#[doc = " The method takes effect only after \\c start() was called, otherwise an exception is raised."]
#[doc = " \\param[in] pipe pipeline"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
pub fn rs2_pipeline_stop(pipe: *mut rs2_pipeline, error: *mut *mut rs2_error);
}
extern "C" {
#[doc = " Wait until a new set of frames becomes available."]
#[doc = " The frames set includes time-synchronized frames of each enabled stream in the pipeline."]
#[doc = " The method blocks the calling thread, and fetches the latest unread frames set."]
#[doc = " Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called"]
#[doc = " as fast as the device frame rate."]
#[doc = " The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device"]
#[doc = " may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources"]
#[doc = " are retained."]
#[doc = " \\param[in] pipe the pipeline"]
#[doc = " \\param[in] timeout_ms Max time in milliseconds to wait until an exception will be thrown"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return Set of coherent frames"]
pub fn rs2_pipeline_wait_for_frames(
pipe: *mut rs2_pipeline,
timeout_ms: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
) -> *mut rs2_frame;
}
extern "C" {
#[doc = " Check if a new set of frames is available and retrieve the latest undelivered set."]
#[doc = " The frames set includes time-synchronized frames of each enabled stream in the pipeline."]
#[doc = " The method returns without blocking the calling thread, with status of new frames available or not. If available, it fetches the"]
#[doc = " latest frames set."]
#[doc = " Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called"]
#[doc = " as fast as the device frame rate."]
#[doc = " The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device"]
#[doc = " may lack memory resources to produce new frames, and the following calls to this method shall return no new frames, until resources are"]
#[doc = " retained."]
#[doc = " \\param[in] pipe the pipeline"]
#[doc = " \\param[out] output_frame frame handle to be released using rs2_release_frame"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if new frame was stored to output_frame"]
pub fn rs2_pipeline_poll_for_frames(
pipe: *mut rs2_pipeline,
output_frame: *mut *mut rs2_frame,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Wait until a new set of frames becomes available."]
#[doc = " The frames set includes time-synchronized frames of each enabled stream in the pipeline."]
#[doc = " The method blocks the calling thread, and fetches the latest unread frames set."]
#[doc = " Device frames, which were produced while the function wasn't called, are dropped. To avoid frame drops, this method should be called"]
#[doc = " as fast as the device frame rate."]
#[doc = " The application can maintain the frames handles to defer processing. However, if the application maintains too long history, the device"]
#[doc = " may lack memory resources to produce new frames, and the following call to this method shall fail to retrieve new frames, until resources"]
#[doc = " are retained."]
#[doc = " \\param[in] pipe the pipeline"]
#[doc = " \\param[in] timeout_ms max time in milliseconds to wait until a frame becomes available"]
#[doc = " \\param[out] output_frame frame handle to be released using rs2_release_frame"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return true if new frame was stored to output_frame"]
pub fn rs2_pipeline_try_wait_for_frames(
pipe: *mut rs2_pipeline,
output_frame: *mut *mut rs2_frame,
timeout_ms: ::std::os::raw::c_uint,
error: *mut *mut rs2_error,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = " Delete a pipeline instance."]
#[doc = " Upon destruction, the pipeline will implicitly stop itself"]
#[doc = " \\param[in] pipe to delete"]
pub fn rs2_delete_pipeline(pipe: *mut rs2_pipeline);
}
extern "C" {
#[doc = " Start the pipeline streaming with its default configuration."]
#[doc = " The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules"]
#[doc = " and processing blocks, according to each module requirements and threading model."]
#[doc = " During the loop execution, the application can access the camera streams by calling \\c wait_for_frames() or \\c poll_for_frames()."]
#[doc = " The streaming loop runs until the pipeline is stopped."]
#[doc = " Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised."]
#[doc = ""]
#[doc = " \\param[in] pipe a pointer to an instance of the pipeline"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device."]
pub fn rs2_pipeline_start(
pipe: *mut rs2_pipeline,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Start the pipeline streaming according to the configuraion."]
#[doc = " The pipeline streaming loop captures samples from the device, and delivers them to the attached computer vision modules"]
#[doc = " and processing blocks, according to each module requirements and threading model."]
#[doc = " During the loop execution, the application can access the camera streams by calling \\c wait_for_frames() or \\c poll_for_frames()."]
#[doc = " The streaming loop runs until the pipeline is stopped."]
#[doc = " Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised."]
#[doc = " The pipeline selects and activates the device upon start, according to configuration or a default configuration."]
#[doc = " When the rs2::config is provided to the method, the pipeline tries to activate the config \\c resolve() result. If the application"]
#[doc = " requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails."]
#[doc = " Available configurations and devices may change between config \\c resolve() call and pipeline start, in case devices are connected"]
#[doc = " or disconnected, or another application acquires ownership of a device."]
#[doc = ""]
#[doc = " \\param[in] pipe a pointer to an instance of the pipeline"]
#[doc = " \\param[in] config A rs2::config with requested filters on the pipeline configuration. By default no filters are applied."]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device."]
pub fn rs2_pipeline_start_with_config(
pipe: *mut rs2_pipeline,
config: *mut rs2_config,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Start the pipeline streaming with its default configuration."]
#[doc = " The pipeline captures samples from the device, and delivers them to the through the provided frame callback."]
#[doc = " Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised."]
#[doc = " When starting the pipeline with a callback both \\c wait_for_frames() or \\c poll_for_frames() will throw exception."]
#[doc = ""]
#[doc = " \\param[in] pipe A pointer to an instance of the pipeline"]
#[doc = " \\param[in] on_frame function pointer to register as per-frame callback"]
#[doc = " \\param[in] user auxiliary data the user wishes to receive together with every frame callback"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device."]
pub fn rs2_pipeline_start_with_callback(
pipe: *mut rs2_pipeline,
on_frame: rs2_frame_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Start the pipeline streaming with its default configuration."]
#[doc = " The pipeline captures samples from the device, and delivers them to the through the provided frame callback."]
#[doc = " Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised."]
#[doc = " When starting the pipeline with a callback both \\c wait_for_frames() or \\c poll_for_frames() will throw exception."]
#[doc = ""]
#[doc = " \\param[in] pipe A pointer to an instance of the pipeline"]
#[doc = " \\param[in] callback callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device."]
pub fn rs2_pipeline_start_with_callback_cpp(
pipe: *mut rs2_pipeline,
callback: *mut rs2_frame_callback,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Start the pipeline streaming according to the configuraion."]
#[doc = " The pipeline captures samples from the device, and delivers them to the through the provided frame callback."]
#[doc = " Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised."]
#[doc = " When starting the pipeline with a callback both \\c wait_for_frames() or \\c poll_for_frames() will throw exception."]
#[doc = " The pipeline selects and activates the device upon start, according to configuration or a default configuration."]
#[doc = " When the rs2::config is provided to the method, the pipeline tries to activate the config \\c resolve() result. If the application"]
#[doc = " requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails."]
#[doc = " Available configurations and devices may change between config \\c resolve() call and pipeline start, in case devices are connected"]
#[doc = " or disconnected, or another application acquires ownership of a device."]
#[doc = ""]
#[doc = " \\param[in] pipe A pointer to an instance of the pipeline"]
#[doc = " \\param[in] config A rs2::config with requested filters on the pipeline configuration. By default no filters are applied."]
#[doc = " \\param[in] on_frame function pointer to register as per-frame callback"]
#[doc = " \\param[in] user auxiliary data the user wishes to receive together with every frame callback"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device."]
pub fn rs2_pipeline_start_with_config_and_callback(
pipe: *mut rs2_pipeline,
config: *mut rs2_config,
on_frame: rs2_frame_callback_ptr,
user: *mut ::std::os::raw::c_void,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Start the pipeline streaming according to the configuraion."]
#[doc = " The pipeline captures samples from the device, and delivers them to the through the provided frame callback."]
#[doc = " Starting the pipeline is possible only when it is not started. If the pipeline was started, an exception is raised."]
#[doc = " When starting the pipeline with a callback both \\c wait_for_frames() or \\c poll_for_frames() will throw exception."]
#[doc = " The pipeline selects and activates the device upon start, according to configuration or a default configuration."]
#[doc = " When the rs2::config is provided to the method, the pipeline tries to activate the config \\c resolve() result. If the application"]
#[doc = " requests are conflicting with pipeline computer vision modules or no matching device is available on the platform, the method fails."]
#[doc = " Available configurations and devices may change between config \\c resolve() call and pipeline start, in case devices are connected"]
#[doc = " or disconnected, or another application acquires ownership of a device."]
#[doc = ""]
#[doc = " \\param[in] pipe A pointer to an instance of the pipeline"]
#[doc = " \\param[in] config A rs2::config with requested filters on the pipeline configuration. By default no filters are applied."]
#[doc = " \\param[in] callback callback object created from c++ application. ownership over the callback object is moved into the relevant streaming lock"]
#[doc = " \\param[out] error If non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device."]
pub fn rs2_pipeline_start_with_config_and_callback_cpp(
pipe: *mut rs2_pipeline,
config: *mut rs2_config,
callback: *mut rs2_frame_callback,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Return the active device and streams profiles, used by the pipeline."]
#[doc = " The pipeline streams profiles are selected during \\c start(). The method returns a valid result only when the pipeline is active -"]
#[doc = " between calls to \\c start() and \\c stop()."]
#[doc = " After \\c stop() is called, the pipeline doesn't own the device, thus, the pipeline selected device may change in subsequent activations."]
#[doc = ""]
#[doc = " \\param[in] pipe a pointer to an instance of the pipeline"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return The actual pipeline device and streams profile, which was successfully configured to the streaming device on start."]
pub fn rs2_pipeline_get_active_profile(
pipe: *mut rs2_pipeline,
error: *mut *mut rs2_error,
) -> *mut rs2_pipeline_profile;
}
extern "C" {
#[doc = " Retrieve the device used by the pipeline."]
#[doc = " The device class provides the application access to control camera additional settings -"]
#[doc = " get device information, sensor options information, options value query and set, sensor specific extensions."]
#[doc = " Since the pipeline controls the device streams configuration, activation state and frames reading, calling"]
#[doc = " the device API functions, which execute those operations, results in unexpected behavior."]
#[doc = " The pipeline streaming device is selected during pipeline \\c start(). Devices of profiles, which are not returned by"]
#[doc = " pipeline \\c start() or \\c get_active_profile(), are not guaranteed to be used by the pipeline."]
#[doc = ""]
#[doc = " \\param[in] profile A pointer to an instance of a pipeline profile"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return rs2_device* The pipeline selected device"]
pub fn rs2_pipeline_profile_get_device(
profile: *mut rs2_pipeline_profile,
error: *mut *mut rs2_error,
) -> *mut rs2_device;
}
extern "C" {
#[doc = " Return the selected streams profiles, which are enabled in this profile."]
#[doc = ""]
#[doc = " \\param[in] profile A pointer to an instance of a pipeline profile"]
#[doc = " \\param[out] error if non-null, receives any error that occurs during this call, otherwise, errors are ignored"]
#[doc = " \\return list of stream profiles"]
pub fn rs2_pipeline_profile_get_streams(
profile: *mut rs2_pipeline_profile,
error: *mut *mut rs2_error,
) -> *mut rs2_stream_profile_list;
}
extern "C" {
#[doc = " Deletes an instance of a pipeline profile"]
#[doc = ""]
#[doc = " \\param[in] profile A pointer to an instance of a pipeline profile"]
pub fn rs2_delete_pipeline_profile(profile: *mut rs2_pipeline_profile);
}