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
|
/*
* Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef __TIZEN_MULTIMEDIA_CAMERA_H__
#define __TIZEN_MULTIMEDIA_CAMERA_H__
#include <tizen.h>
#include <media_packet.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @file camera.h
* @brief This file contains the Camera API, related structures and enumerations.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
#define CAMERA_ERROR_CLASS TIZEN_ERROR_CAMERA | 0x00
/**
* @brief Enumeration for the error codes of Camera.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
CAMERA_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
CAMERA_ERROR_INVALID_STATE = CAMERA_ERROR_CLASS | 0x02, /**< Invalid state */
CAMERA_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
CAMERA_ERROR_DEVICE = CAMERA_ERROR_CLASS | 0x04, /**< Device error */
CAMERA_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< Internal error */
CAMERA_ERROR_SECURITY_RESTRICTED = CAMERA_ERROR_CLASS | 0x07, /**< Restricted by security system policy */
CAMERA_ERROR_DEVICE_BUSY = CAMERA_ERROR_CLASS | 0x08, /**< The device is using another application or working on some operation */
CAMERA_ERROR_DEVICE_NOT_FOUND = CAMERA_ERROR_CLASS | 0x09, /**< No camera device */
CAMERA_ERROR_ESD = CAMERA_ERROR_CLASS | 0x0c, /**< ESD situation */
CAMERA_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< The access to the resources can not be granted*/
CAMERA_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< The feature is not supported */
CAMERA_ERROR_RESOURCE_CONFLICT = CAMERA_ERROR_CLASS | 0x0d, /**< Blocked by resource conflict (Since 3.0) */
CAMERA_ERROR_SERVICE_DISCONNECTED = CAMERA_ERROR_CLASS | 0x0e, /**< Socket connection lost (Since 3.0) */
} camera_error_e;
/**
* @brief Enumeration for the camera state.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_STATE_NONE, /**< Before creating */
CAMERA_STATE_CREATED, /**< Created, but not initialized yet */
CAMERA_STATE_PREVIEW, /**< Preview */
CAMERA_STATE_CAPTURING, /**< While capturing */
CAMERA_STATE_CAPTURED /**< After capturing */
} camera_state_e;
/**
* @brief Enumeration for the camera device state.
* @since_tizen 3.0
*/
typedef enum {
CAMERA_DEVICE_STATE_NULL, /**< Not opened */
CAMERA_DEVICE_STATE_OPENED, /**< Opened */
CAMERA_DEVICE_STATE_WORKING /**< Now previewing or capturing or is being used for video recording */
} camera_device_state_e;
/**
* @brief Enumeration for the camera device.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_DEVICE_CAMERA0 = 0, /**< Primary camera */
CAMERA_DEVICE_CAMERA1, /**< Secondary camera */
CAMERA_DEVICE_CAMERA2, /**< Third camera (Since 5.0) */
CAMERA_DEVICE_CAMERA3, /**< 4th camera (Since 5.0) */
CAMERA_DEVICE_CAMERA4, /**< 5th camera (Since 5.0) */
CAMERA_DEVICE_CAMERA5, /**< 6th camera (Since 5.0) */
CAMERA_DEVICE_CAMERA6, /**< 7th camera (Since 5.0) */
CAMERA_DEVICE_CAMERA7, /**< 8th camera (Since 5.0) */
CAMERA_DEVICE_CAMERA8, /**< 9th camera (Since 5.0) */
CAMERA_DEVICE_CAMERA9 /**< 10th camera (Since 5.0) */
} camera_device_e;
/**
* @brief Enumeration for the camera pixel format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If #CAMERA_PIXEL_FORMAT_INVZ is set, the type of display should be #CAMERA_DISPLAY_TYPE_NONE. \n
* Otherwise, camera_start_preview() will return #CAMERA_ERROR_INVALID_OPERATION. (Since 5.0)
*/
typedef enum {
CAMERA_PIXEL_FORMAT_INVALID = -1, /**< Invalid pixel format */
CAMERA_PIXEL_FORMAT_NV12, /**< NV12 pixel format */
CAMERA_PIXEL_FORMAT_NV12T, /**< NV12 Tiled pixel format */
CAMERA_PIXEL_FORMAT_NV16, /**< NV16 pixel format */
CAMERA_PIXEL_FORMAT_NV21, /**< NV21 pixel format */
CAMERA_PIXEL_FORMAT_YUYV, /**< YUYV(YUY2) pixel format */
CAMERA_PIXEL_FORMAT_UYVY, /**< UYVY pixel format */
CAMERA_PIXEL_FORMAT_422P, /**< YUV422(Y:U:V) planar pixel format */
CAMERA_PIXEL_FORMAT_I420, /**< I420 pixel format */
CAMERA_PIXEL_FORMAT_YV12, /**< YV12 pixel format */
CAMERA_PIXEL_FORMAT_RGB565, /**< RGB565 pixel format */
CAMERA_PIXEL_FORMAT_RGB888, /**< RGB888 pixel format */
CAMERA_PIXEL_FORMAT_RGBA, /**< RGBA pixel format */
CAMERA_PIXEL_FORMAT_ARGB, /**< ARGB pixel format */
CAMERA_PIXEL_FORMAT_JPEG, /**< Encoded pixel format */
CAMERA_PIXEL_FORMAT_H264 = 15, /**< Encoded pixel format : H264 (Since 3.0) */
CAMERA_PIXEL_FORMAT_INVZ /**< Depth pixel format : INVZ (Since 5.0) */
} camera_pixel_format_e;
/**
* @brief Enumeration for the camera display type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_DISPLAY_TYPE_OVERLAY = 0, /**< Overlay surface display */
CAMERA_DISPLAY_TYPE_EVAS, /**< Evas object surface display */
CAMERA_DISPLAY_TYPE_NONE /**< This disposes off buffers */
} camera_display_type_e;
/**
* @brief Enumeration for the camera policy.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_POLICY_NONE = 0, /**< None */
CAMERA_POLICY_SECURITY = 4, /**< Security policy */
CAMERA_POLICY_RESOURCE_CONFLICT /**< Resource conflict (Since 3.0) */
} camera_policy_e;
/**
* @brief Enumeration for the camera rotation type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ROTATION_NONE, /**< No rotation */
CAMERA_ROTATION_90, /**< 90 degree rotation */
CAMERA_ROTATION_180, /**< 180 degree rotation */
CAMERA_ROTATION_270, /**< 270 degree rotation */
} camera_rotation_e;
/**
* @brief Enumeration for the camera flip type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_FLIP_NONE, /**< No Flip */
CAMERA_FLIP_HORIZONTAL, /**< Horizontal flip */
CAMERA_FLIP_VERTICAL, /**< Vertical flip */
CAMERA_FLIP_BOTH /**< Horizontal and vertical flip */
} camera_flip_e;
/**
* @brief Enumeration for the camera focus state.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_FOCUS_STATE_RELEASED = 0, /**< Focus released */
CAMERA_FOCUS_STATE_ONGOING, /**< Focus in progress */
CAMERA_FOCUS_STATE_FOCUSED, /**< Focus succeeded */
CAMERA_FOCUS_STATE_FAILED, /**< Focus failed */
} camera_focus_state_e;
/**
* @brief Enumeration for the facing direction of camera module.
* @since_tizen 3.0
*/
typedef enum {
CAMERA_FACING_DIRECTION_REAR = 0, /**< Rear */
CAMERA_FACING_DIRECTION_FRONT, /**< Front */
} camera_facing_direction_e;
/**
* @brief Enumeration for the current flash state.
* @since_tizen 3.0
*/
typedef enum {
CAMERA_FLASH_STATE_NOT_USED = 0, /**< Flash is not used now through camera API */
CAMERA_FLASH_STATE_USED, /**< Flash is used now through camera API */
} camera_flash_state_e;
/**
* @brief The structure type of the image data.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef struct {
unsigned char *data; /**< The image buffer */
unsigned int size; /**< The size of the buffer */
int width; /**< The width of the image */
int height; /**< The height of the image */
camera_pixel_format_e format; /**< The format of the image pixel */
unsigned char *exif; /**< The exif raw data */
unsigned int exif_size; /**< The size of the exif data */
} camera_image_data_s;
/**
* @brief The structure type for face detection.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef struct {
int id; /**< The ID of each face */
int score; /**< The confidence level for the detection of the face */
int x; /**< The x coordinates of the face */
int y; /**< The y coordinates of the face */
int width; /**< The width of the face */
int height; /**< The height of the face */
} camera_detected_face_s;
/**
* @brief The structure type to preview stream data.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef struct {
camera_pixel_format_e format; /**< The format of the frame pixel */
int width; /**< The width of the frame */
int height; /**< The height of the frame */
int num_of_planes; /**< The number of planes */
unsigned int timestamp; /**< The timestamp of the frame */
union {
struct {
unsigned char *yuv; /**< The yuv data pointer */
unsigned int size; /**< The size of data */
} single_plane; /**< Single plane frame data */
struct {
unsigned char *y; /**< The y data pointer */
unsigned char *uv; /**< The uv data pointer */
unsigned int y_size; /**< The size of y data */
unsigned int uv_size; /**< The size of uv data */
} double_plane; /**< Double plane frame data */
struct {
unsigned char *y; /**< The y data pointer */
unsigned char *u; /**< The u data pointer */
unsigned char *v; /**< The v data pointer */
unsigned int y_size; /**< The size of y data */
unsigned int u_size; /**< The size of u data */
unsigned int v_size; /**< The size of v data */
} triple_plane; /**< Triple plane frame data */
struct {
unsigned char *data; /**< The encoded data pointer */
unsigned int size; /**< The size of encoded data */
} encoded_plane; /**< Encoded plane frame data */
struct {
unsigned char *data; /**< The depth data pointer */
unsigned int size; /**< The size of depth data */
} depth_plane; /**< Depth plane frame data (Since 5.0) */
struct {
unsigned char *data; /**< The RGB data pointer */
unsigned int size; /**< The size of RGB data */
} rgb_plane; /**< RGB plane frame data (Since 5.0) */
} data;
} camera_preview_data_s;
/**
* @brief The Camera handle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @see recorder_create_videorecorder()
*/
typedef struct camera_cli_s *camera_h;
/**
* @brief The Camera display handle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef void *camera_display_h;
#ifndef GET_DISPLAY
/**
* @brief Gets a display handle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
#define GET_DISPLAY(x) (void*)(x)
#endif
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @{
*/
/**
* @brief Enumeration for the camera display mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_DISPLAY_MODE_LETTER_BOX = 0, /**< Letter box */
CAMERA_DISPLAY_MODE_ORIGIN_SIZE, /**< Origin size */
CAMERA_DISPLAY_MODE_FULL, /**< Full screen */
CAMERA_DISPLAY_MODE_CROPPED_FULL, /**< Cropped full screen */
CAMERA_DISPLAY_MODE_ORIGIN_OR_LETTER_BOX, /**< Original size or letter box (Since 3.0) */
CAMERA_DISPLAY_MODE_CUSTOM_ROI, /**< Custom ROI (Since 3.0) */
} camera_display_mode_e;
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Enumeration for the color tone, which provides the impression of looking through a tinted glass.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_EFFECT_NONE = 0, /**< None */
CAMERA_ATTR_EFFECT_MONO, /**< Mono */
CAMERA_ATTR_EFFECT_SEPIA, /**< Sepia */
CAMERA_ATTR_EFFECT_NEGATIVE, /**< Negative */
CAMERA_ATTR_EFFECT_BLUE, /**< Blue */
CAMERA_ATTR_EFFECT_GREEN, /**< Green */
CAMERA_ATTR_EFFECT_AQUA, /**< Aqua */
CAMERA_ATTR_EFFECT_VIOLET, /**< Violet */
CAMERA_ATTR_EFFECT_ORANGE, /**< Orange */
CAMERA_ATTR_EFFECT_GRAY, /**< Gray */
CAMERA_ATTR_EFFECT_RED, /**< Red */
CAMERA_ATTR_EFFECT_ANTIQUE, /**< Antique */
CAMERA_ATTR_EFFECT_WARM, /**< Warm */
CAMERA_ATTR_EFFECT_PINK, /**< Pink */
CAMERA_ATTR_EFFECT_YELLOW, /**< Yellow */
CAMERA_ATTR_EFFECT_PURPLE, /**< Purple */
CAMERA_ATTR_EFFECT_EMBOSS, /**< Emboss */
CAMERA_ATTR_EFFECT_OUTLINE, /**< Outline */
CAMERA_ATTR_EFFECT_SOLARIZATION, /**< Solarization */
CAMERA_ATTR_EFFECT_SKETCH, /**< Sketch */
CAMERA_ATTR_EFFECT_WASHED, /**< Washed */
CAMERA_ATTR_EFFECT_VINTAGE_WARM, /**< Vintage warm */
CAMERA_ATTR_EFFECT_VINTAGE_COLD, /**< Vintage cold */
CAMERA_ATTR_EFFECT_POSTERIZATION, /**< Posterization */
CAMERA_ATTR_EFFECT_CARTOON, /**< Cartoon */
CAMERA_ATTR_EFFECT_SELECTIVE_RED, /**< Selective color - Red */
CAMERA_ATTR_EFFECT_SELECTIVE_GREEN, /**< Selective color - Green */
CAMERA_ATTR_EFFECT_SELECTIVE_BLUE, /**< Selective color - Blue */
CAMERA_ATTR_EFFECT_SELECTIVE_YELLOW, /**< Selective color - Yellow */
CAMERA_ATTR_EFFECT_SELECTIVE_RED_YELLOW, /**< Selective color - Red and Yellow */
CAMERA_ATTR_EFFECT_OTHER_GRAPHICS, /**< Other Graphic effects */
} camera_attr_effect_mode_e;
/**
* @brief Enumeration for the white balance levels of the camera.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_WHITE_BALANCE_NONE = 0, /**< None */
CAMERA_ATTR_WHITE_BALANCE_AUTOMATIC, /**< Automatic */
CAMERA_ATTR_WHITE_BALANCE_DAYLIGHT, /**< Daylight */
CAMERA_ATTR_WHITE_BALANCE_CLOUDY, /**< Cloudy */
CAMERA_ATTR_WHITE_BALANCE_FLUORESCENT, /**< Fluorescent */
CAMERA_ATTR_WHITE_BALANCE_INCANDESCENT, /**< Incandescent */
CAMERA_ATTR_WHITE_BALANCE_SHADE, /**< Shade */
CAMERA_ATTR_WHITE_BALANCE_HORIZON, /**< Horizon */
CAMERA_ATTR_WHITE_BALANCE_FLASH, /**< Flash */
CAMERA_ATTR_WHITE_BALANCE_CUSTOM, /**< Custom */
} camera_attr_whitebalance_e;
/**
* @brief Enumeration for the scene mode.
* @details The mode of operation can be in daylight, night, or back-light.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_SCENE_MODE_NORMAL = 0, /**< Normal */
CAMERA_ATTR_SCENE_MODE_PORTRAIT, /**< Portrait */
CAMERA_ATTR_SCENE_MODE_LANDSCAPE, /**< Landscape */
CAMERA_ATTR_SCENE_MODE_SPORTS, /**< Sports */
CAMERA_ATTR_SCENE_MODE_PARTY_N_INDOOR, /**< Party & indoor */
CAMERA_ATTR_SCENE_MODE_BEACH_N_INDOOR, /**< Beach & indoor */
CAMERA_ATTR_SCENE_MODE_SUNSET, /**< Sunset */
CAMERA_ATTR_SCENE_MODE_DUSK_N_DAWN, /**< Dusk & dawn */
CAMERA_ATTR_SCENE_MODE_FALL_COLOR, /**< Fall */
CAMERA_ATTR_SCENE_MODE_NIGHT_SCENE, /**< Night scene */
CAMERA_ATTR_SCENE_MODE_FIREWORK, /**< Firework */
CAMERA_ATTR_SCENE_MODE_TEXT, /**< Text */
CAMERA_ATTR_SCENE_MODE_SHOW_WINDOW, /**< Show window */
CAMERA_ATTR_SCENE_MODE_CANDLE_LIGHT, /**< Candle light */
CAMERA_ATTR_SCENE_MODE_BACKLIGHT, /**< Backlight */
CAMERA_ATTR_SCENE_MODE_AQUA, /**< Aqua */
} camera_attr_scene_mode_e;
/**
* @brief Enumeration for the auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_AF_NONE = 0, /**< auto-focus is not set */
CAMERA_ATTR_AF_NORMAL, /**< auto-focus in the normal mode */
CAMERA_ATTR_AF_MACRO, /**< auto-focus in the macro mode(close distance) */
CAMERA_ATTR_AF_FULL, /**< auto-focus in the full mode(all range scan, limited by device spec) */
} camera_attr_af_mode_e;
/**
* @brief Enumeration for the ISO levels of the camera.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_ISO_AUTO = 0, /**< ISO auto mode */
CAMERA_ATTR_ISO_50, /**< ISO 50 */
CAMERA_ATTR_ISO_100, /**< ISO 100 */
CAMERA_ATTR_ISO_200, /**< ISO 200 */
CAMERA_ATTR_ISO_400, /**< ISO 400 */
CAMERA_ATTR_ISO_800, /**< ISO 800 */
CAMERA_ATTR_ISO_1600, /**< ISO 1600 */
CAMERA_ATTR_ISO_3200, /**< ISO 3200 */
} camera_attr_iso_e;
/**
* @brief Enumeration for the camera exposure modes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_EXPOSURE_MODE_OFF = 0, /**< Off */
CAMERA_ATTR_EXPOSURE_MODE_ALL, /**< All mode */
CAMERA_ATTR_EXPOSURE_MODE_CENTER, /**< Center mode */
CAMERA_ATTR_EXPOSURE_MODE_SPOT, /**< Spot mode */
CAMERA_ATTR_EXPOSURE_MODE_CUSTOM, /**< Custom mode */
} camera_attr_exposure_mode_e;
/**
* @brief Enumeration for the orientation values of tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_TAG_ORIENTATION_TOP_LEFT = 1, /**< Row #0 is at the top, Column #0 is to the left */
CAMERA_ATTR_TAG_ORIENTATION_TOP_RIGHT = 2, /**< Row #0 is at the top, Column #0 is to the right (flipped) */
CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_RIGHT = 3, /**< Row #0 is at the bottom, Column #0 is to the right */
CAMERA_ATTR_TAG_ORIENTATION_BOTTOM_LEFT = 4, /**< Row #0 is at the bottom, Column #0 is to the left (flipped) */
CAMERA_ATTR_TAG_ORIENTATION_LEFT_TOP = 5, /**< Row #0 is to the left, Column #0 is at the top (flipped) */
CAMERA_ATTR_TAG_ORIENTATION_RIGHT_TOP = 6, /**< Row #0 is to the right, Column #0 is at the top */
CAMERA_ATTR_TAG_ORIENTATION_RIGHT_BOTTOM = 7, /**< Row #0 is to the right, Column #0 is at the bottom (flipped) */
CAMERA_ATTR_TAG_ORIENTATION_LEFT_BOTTOM = 8, /**< Row #0 is to the left, Column #0 is at the bottom */
} camera_attr_tag_orientation_e;
/**
* @brief Enumeration for the flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_FLASH_MODE_OFF = 0, /**< Always off */
CAMERA_ATTR_FLASH_MODE_ON, /**< Always splashes */
CAMERA_ATTR_FLASH_MODE_AUTO, /**< Depending on intensity of light, strobe starts to flash */
CAMERA_ATTR_FLASH_MODE_REDEYE_REDUCTION, /**< Red eye reduction. Multiple flash before capturing */
CAMERA_ATTR_FLASH_MODE_SLOW_SYNC, /**< Slow sync curtain synchronization */
CAMERA_ATTR_FLASH_MODE_FRONT_CURTAIN, /**< Front curtain synchronization */
CAMERA_ATTR_FLASH_MODE_REAR_CURTAIN, /**< Rear curtain synchronization */
CAMERA_ATTR_FLASH_MODE_PERMANENT, /**< Keep turned on until turning off */
} camera_attr_flash_mode_e;
/**
* @brief Enumeration to preview FPS.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_FPS_AUTO = 0, /**< AUTO FPS */
CAMERA_ATTR_FPS_7 = 7, /**< 7 FPS */
CAMERA_ATTR_FPS_8 = 8, /**< 8 FPS */
CAMERA_ATTR_FPS_15 = 15, /**< 15 FPS */
CAMERA_ATTR_FPS_20 = 20, /**< 20 FPS */
CAMERA_ATTR_FPS_24 = 24, /**< 24 FPS */
CAMERA_ATTR_FPS_25 = 25, /**< 25 FPS */
CAMERA_ATTR_FPS_30 = 30, /**< 30 FPS */
CAMERA_ATTR_FPS_60 = 60, /**< 60 FPS */
CAMERA_ATTR_FPS_90 = 90, /**< 90 FPS */
CAMERA_ATTR_FPS_120 = 120 /**< 120 FPS */
} camera_attr_fps_e;
/**
* @brief Enumeration for the theater mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_THEATER_MODE_DISABLE = 0, /**< Disable theater mode - External display shows same image as device display */
CAMERA_ATTR_THEATER_MODE_ENABLE = 2, /**< Enable theater mode - Preview image is displayed on external display with full screen mode, but preview image is not shown on device display */
CAMERA_ATTR_THEATER_MODE_CLONE = 1 /**< Clone mode - Preview image is displayed on external display with full screen mode. Also preview image is shown by the UI on device display */
} camera_attr_theater_mode_e;
/**
* @brief Enumeration for HDR capture mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef enum {
CAMERA_ATTR_HDR_MODE_DISABLE = 0, /**< Disable HDR capture */
CAMERA_ATTR_HDR_MODE_ENABLE, /**< Enable HDR capture */
CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL /**< Enable HDR capture and keep original image data */
} camera_attr_hdr_mode_e;
/**
* @brief Enumeration for PTZ (Pan Tilt Zoom) type.
* @since_tizen 3.0
*/
typedef enum {
CAMERA_ATTR_PTZ_TYPE_MECHANICAL = 0, /**< Move the camera device physically */
CAMERA_ATTR_PTZ_TYPE_ELECTRONIC /**< Zoom digitally and move into portion of the image */
} camera_attr_ptz_type_e;
/**
* @brief Enumeration for PTZ (Pan Tilt Zoom) movement type.
* @since_tizen 3.0
*/
typedef enum {
CAMERA_ATTR_PTZ_MOVE_ABSOLUTE = 0, /**< Move to a specific coordinate position */
CAMERA_ATTR_PTZ_MOVE_RELATIVE /**< Move a specific distance from the current position */
} camera_attr_ptz_move_type_e;
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
/**
* @brief Called when the camera state is changed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] previous The previous state of the camera
* @param[in] current The current state of the camera
* @param[in] by_policy If @c true the state is changed by policy, otherwise @c false
* @param[in] user_data The user data passed from the callback registration function
* @pre camera_start_preview(), camera_start_capture() or camera_stop_preview()
* will invoke this callback if you register this callback using camera_set_state_changed_cb().
* @see camera_set_state_changed_cb()
*/
typedef void (*camera_state_changed_cb)(camera_state_e previous, camera_state_e current, bool by_policy, void *user_data);
/**
* @brief Called when the camera device state is changed.
* @since_tizen 3.0
* @param[in] device The hardware camera type
* @param[in] state The state of the camera device
* @param[in] user_data The user data passed from the callback registration function
* @see camera_add_device_state_changed_cb()
*/
typedef void (*camera_device_state_changed_cb)(camera_device_e device, camera_device_state_e state, void *user_data);
/**
* @brief Called when the camera is interrupted by policy.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This callback is called after interrupt handling is completed.
* @param[in] policy The policy that interrupted the camera
* @param[in] previous The previous state of the camera
* @param[in] current The current state of the camera
* @param[in] user_data The user data passed from the callback registration function
* @see camera_set_interrupted_cb()
*/
typedef void (*camera_interrupted_cb)(camera_policy_e policy, camera_state_e previous, camera_state_e current, void *user_data);
/**
* @brief Called when the camera interrupt is started by policy.
* @since_tizen 4.0
* @remarks This callback is called before interrupt handling is started.
* @param[in] policy The policy that is interrupting the camera
* @param[in] state The current state of the camera
* @param[in] user_data The user data passed from the callback registration function
* @see camera_set_interrupt_started_cb()
*/
typedef void (*camera_interrupt_started_cb)(camera_policy_e policy, camera_state_e state, void *user_data);
/**
* @brief Called when the camera focus state is changed.
* @details When the camera auto focus completes or a change to the focus state occurs,
* this callback is invoked. \n \n
* Changes of focus state are as follows: \n
* #CAMERA_FOCUS_STATE_RELEASED -> start focusing -> #CAMERA_FOCUS_STATE_ONGOING -> working ->
* #CAMERA_FOCUS_STATE_FOCUSED or #CAMERA_FOCUS_STATE_FAILED.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] state The current state of the auto-focus
* @param[in] user_data The user data passed from the callback registration function
* @pre camera_start_focusing() will invoke this callback if you register it using camera_set_focus_changed_cb().
* @see camera_set_focus_changed_cb()
* @see camera_unset_focus_changed_cb()
* @see camera_start_focusing()
* @see camera_cancel_focusing()
*/
typedef void (*camera_focus_changed_cb)(camera_focus_state_e state, void *user_data);
/**
* @brief Called to register for notifications about delivering a copy of the new preview frame when every preview frame is displayed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n
* If the camera is used as a recorder then this callback function won't be called.
*
* @param[in] frame The reference pointer to preview stream data
* @param[in] user_data The user data passed from the callback registration function
* @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_preview_cb().
* @see camera_start_preview()
* @see camera_set_preview_cb()
* @see camera_unset_preview_cb()
*/
typedef void (*camera_preview_cb)(camera_preview_data_s *frame, void *user_data);
/**
* @brief Called to register for notifications about delivering media packet when every preview frame is displayed.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.\n
* If the camera is used as a recorder then this callback function won't be called.\n
* and the packet should be released by media_packet_destroy() after use.
*
* @param[in] pkt Reference pointer to media packet
* @param[in] user_data The user data passed from the callback registration function
* @pre camera_start_preview() will invoke this callback function if you register this callback using camera_set_media_packet_preview_cb().
* @see camera_start_preview()
* @see camera_set_media_packet_preview_cb()
* @see camera_unset_media_packet_preview_cb()
*/
typedef void (*camera_media_packet_preview_cb)(media_packet_h pkt, void *user_data);
/**
* @brief Called to get information about image data taken by the camera once per frame while capturing.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @remarks This function is issued in the context of internal framework so the UI update code should not be directly invoked.
* You must not call camera_start_preview() within this callback.
*
* @param[in] image The image data of the captured picture
* @param[in] postview The image data of the postview
* @param[in] thumbnail The image data of the thumbnail (it should be @c NULL if the available thumbnail data does not exist)
* @param[in] user_data The user data passed from the callback registration function
* @pre camera_start_capture() or camera_start_continuous_capture() will invoke this callback function if it is registered using camera_start_capture() or camera_start_continuous_capture().
* @see camera_start_capture()
* @see camera_start_continuous_capture()
* @see camera_capture_completed_cb()
*/
typedef void (*camera_capturing_cb)(camera_image_data_s *image, camera_image_data_s *postview, camera_image_data_s *thumbnail, void *user_data);
/**
* @brief Called when the camera capturing completes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @remarks The callback is called after camera_capturing_cb() is completed.\n
* If you want to show the user a preview after capturing is finished, \n
* an application can use camera_start_preview() after calling this callback.
* @param[in] user_data The user data passed from the callback registration function
* @pre This callback function is invoked if it is registered using camera_start_capture() or camera_start_continuous_capture().
* @see camera_start_capture()
* @see camera_start_continuous_capture()
* @see camera_capturing_cb()
*/
typedef void (*camera_capture_completed_cb)(void *user_data);
/**
* @brief Called when an error occurs.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @remarks This callback informs about a critical error situation.\n
* When this callback is invoked, the user should release the resource and terminate the application.\n
* In case of errors, one of these codes occur:\n
* #CAMERA_ERROR_DEVICE,\n
* #CAMERA_ERROR_INVALID_OPERATION,\n
* #CAMERA_ERROR_OUT_OF_MEMORY.
* @param[in] error The error code
* @param[in] current_state The current state of the camera
* @param[in] user_data The user data passed from the callback registration function
* @pre This callback function is invoked if it is registered using camera_set_error_cb().
* @see camera_set_error_cb()
* @see camera_unset_error_cb()
*/
typedef void (*camera_error_cb)(camera_error_e error, camera_state_e current_state, void *user_data);
/**
* @brief Called when a face is detected in the preview frame.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] faces The detected face array
* @param[in] count The length of the array
* @param[in] user_data The user data passed from the callback registration function
* @see camera_start_face_detection()
*/
typedef void (*camera_face_detected_cb)(camera_detected_face_s *faces, int count, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Called once for each supported preview resolution.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] width The preview image width
* @param[in] height The preview image height
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_foreach_supported_preview_resolution() will invoke this callback.
* @see camera_foreach_supported_preview_resolution()
*/
typedef bool (*camera_supported_preview_resolution_cb)(int width, int height, void *user_data);
/**
* @brief Called once for each supported capture resolution.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] width The capture resolution width
* @param[in] height The capture resolution height
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_foreach_supported_capture_resolution() will invoke this callback.
* @see camera_foreach_supported_capture_resolution()
*/
typedef bool (*camera_supported_capture_resolution_cb)(int width, int height, void *user_data);
/**
* @brief Called once for the pixel format of each supported capture format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] format The supported pixel format
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_foreach_supported_capture_format() will invoke this callback.
* @see camera_foreach_supported_capture_format()
*/
typedef bool (*camera_supported_capture_format_cb)(camera_pixel_format_e format, void *user_data);
/**
* @brief Called once for the pixel format of each supported preview format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] format The supported preview data format
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_foreach_supported_preview_format() will invoke this callback.
* @see camera_foreach_supported_preview_format()
*/
typedef bool (*camera_supported_preview_format_cb)(camera_pixel_format_e format, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
/**
* @brief Creates a new camera handle for controlling a camera.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks Multiple handles on a context at the same time are allowed to be created. However,
* camera cannot guarantee proper operation because of limited resources, such as
* camera device, audio device, and display device.\n.
* A @a camera must be released using camera_destroy().
* @remarks The privilege %http://tizen.org/privilege/camera is not required since 4.0,\n
* but it is required in all earlier versions.
* @param[in] device The hardware camera to access
* @param[out] camera A newly returned handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @post If it succeeds, the camera state will be #CAMERA_STATE_CREATED.
*
* @see camera_destroy()
*/
int camera_create(camera_device_e device, camera_h *camera);
/**
* @brief Changes the camera device.
*
* @since_tizen 3.0
* @remarks This function can be used to change camera device simply without camera_destroy() and camera_create().\n
* If display reuse hint is set by camera_set_display_reuse_hint() before stopping the preview,\n
* display handle will be reused and last frame on display can be kept even though camera device is changed.
* @param[in] camera The handle to the camera
* @param[in] device The hardware camera to access
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @post If it succeeds, the camera attributes and settings will be reset.
*
* @see camera_set_display_reuse_hint()
* @see camera_get_display_reuse_hint()
*/
int camera_change_device(camera_h camera, camera_device_e device);
/**
* @brief Destroys the camera handle and releases all its resources.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_create()
*/
int camera_destroy(camera_h camera);
/**
* @brief Starts capturing and drawing preview frames on the screen.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_RESOURCE_CONFLICT Resource conflict error
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_DEVICE_BUSY The device is being used in another application or is performing other operations
* @retval #CAMERA_ERROR_DEVICE_NOT_FOUND No camera device
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_CAPTURED.\n
* You must set the display handle. \n
* If needed, modify preview FPS(camera_attr_set_preview_fps()),
* preview resolution(camera_set_preview_resolution()), or preview format(camera_set_preview_format()).
* @post If it succeeds, the camera state will be #CAMERA_STATE_PREVIEW.\n
* camera_preview_cb() will be called when preview image data becomes available.
*
* @see camera_stop_preview()
* @see camera_set_display()
* @see camera_set_preview_cb()
* @see camera_set_media_packet_preview_cb()
* @see camera_foreach_supported_preview_resolution()
* @see camera_set_preview_resolution()
* @see camera_get_preview_resolution()
* @see camera_foreach_supported_preview_format()
* @see camera_set_preview_format()
* @see camera_get_preview_format()
* @see camera_attr_foreach_supported_fps()
* @see camera_attr_set_preview_fps()
* @see camera_attr_get_preview_fps()
*/
int camera_start_preview(camera_h camera);
/**
* @brief Stops capturing and drawing preview frames.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @post The camera state will be #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_unset_preview_cb()
* @see camera_unset_media_packet_preview_cb()
*/
int camera_stop_preview(camera_h camera);
/**
* @brief Starts capturing of still images.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @remarks This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
* and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
* The captured image will be delivered through camera_capturing_cb().\n
* camera_capture_completed_cb() callback notifies about completion of camera_capturing_cb(). \n
* The camera's preview should be restarted by calling camera_start_preview().
* @param[in] camera The handle to the camera
* @param[in] capturing_cb The callback for capturing data
* @param[in] completed_cb The callback for notification of completion
* @param[in] user_data The user data
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW. \n
* If needed, modify capture resolution(camera_set_capture_resolution()),
* capture format(camera_set_capture_format()), or image quality(camera_attr_set_image_quality()).
* @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
*
* @see camera_start_preview()
* @see camera_start_continuous_capture();
* @see camera_foreach_supported_capture_resolution()
* @see camera_set_capture_resolution()
* @see camera_get_capture_resolution()
* @see camera_foreach_supported_capture_format()
* @see camera_set_capture_format()
* @see camera_get_capture_format()
* @see camera_attr_set_image_quality()
* @see camera_attr_get_image_quality()
*/
int camera_start_capture(camera_h camera, camera_capturing_cb capturing_cb, camera_capture_completed_cb completed_cb, void *user_data);
/**
* @brief Starts continuously capturing still images.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @remarks If this is not supported zero shutter lag occurs. The capture resolution could be changed to the preview resolution.\n
* This function causes the transition of the camera state from #CAMERA_STATE_CAPTURING to #CAMERA_STATE_CAPTURED automatically\n
* and the corresponding callback function camera_capturing_cb() and camera_capture_completed_cb() will be invoked\n
* Each Captured image will be delivered through camera_capturing_cb().\n
* The camera_capture_completed_cb() callback notifies about the completion of an entire capture.\n
* The camera's preview should be restarted by calling camera_start_preview().\n.
* @param[in] camera The handle to the camera
* @param[in] count The number of still images
* @param[in] interval The interval of the capture (millisecond)
* @param[in] capturing_cb The callback for capturing data
* @param[in] completed_cb The callback for notification of completion
* @param[in] user_data The user data
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post If it succeeds the camera state will be #CAMERA_STATE_CAPTURED.
*
* @see camera_start_preview()
* @see camera_start_capture();
* @see camera_stop_continuous_capture()
* @see camera_is_supported_zero_shutter_lag()
*/
int camera_start_continuous_capture(camera_h camera, int count, int interval, camera_capturing_cb capturing_cb, camera_capture_completed_cb completed_cb, void *user_data);
/**
* @brief Aborts continuous capturing.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @remarks The camera state will be changed to #CAMERA_STATE_CAPTURED.
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
*
* @see camera_start_continuous_capture()
*/
int camera_stop_continuous_capture(camera_h camera);
/**
* @brief Gets the state of the camera.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] state The current state of the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_create()
* @see camera_start_preview()
* @see camera_stop_preview()
* @see camera_start_capture()
*/
int camera_get_state(camera_h camera, camera_state_e *state);
/**
* @brief Starts camera auto-focusing, asynchronously.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @remarks If continuous status is @c true, the camera continuously tries to focus.
* @param[in] camera The handle to the camera
* @param[in] continuous The status of continuous focusing
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @post The camera focus state will be #CAMERA_FOCUS_STATE_ONGOING.
*
* @see camera_cancel_focusing()
* @see camera_set_focus_changed_cb()
* @see camera_focus_changed_cb()
* @see camera_attr_set_af_mode()
*/
int camera_start_focusing(camera_h camera, bool continuous);
/**
* @brief Stops camera auto focusing.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
*
* @see camera_start_focusing()
* @see camera_focus_changed_cb()
*/
int camera_cancel_focusing(camera_h camera);
/**
* @brief Sets the display handle to show preview images.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function must be called before previewing (see camera_start_preview()).
* In Custom ROI display mode, camera_attr_set_display_roi_area() function must be called before calling this function.
* @remarks This function must be called in main thread of the application.
* Otherwise, it will return #CAMERA_ERROR_INVALID_OPERATION by internal restriction.
* To avoid #CAMERA_ERROR_INVALID_OPERATION in sub thread, ecore_thread_main_loop_begin() and
* ecore_thread_main_loop_end() can be used, but deadlock can occur if the main thread is busy.
* So, it's not recommended to use them. (Since 5.0)
* @param[in] camera The handle to the camera
* @param[in] type The display type
* @param[in] display The display handle from #GET_DISPLAY
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
*
* @see camera_start_preview()
* @see #GET_DISPLAY
* @see ecore_thread_main_loop_begin()
* @see ecore_thread_main_loop_end()
*/
int camera_set_display(camera_h camera, camera_display_type_e type, camera_display_h display);
/**
* @brief Sets the resolution of the preview.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function should be called before previewing (camera_start_preview()).
* @param[in] camera The handle to the camera
* @param[in] width The preview width
* @param[in] height The preview height
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
*
* @see camera_start_preview()
* @see camera_get_preview_resolution()
* @see camera_foreach_supported_preview_resolution()
*/
int camera_set_preview_resolution(camera_h camera, int width, int height);
/**
* @brief Gets the resolution of the preview.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] width The preview width
* @param[out] height The preview height
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_resolution()
* @see camera_foreach_supported_preview_resolution()
*/
int camera_get_preview_resolution(camera_h camera, int *width, int *height);
/**
* @brief Gets the recommended preview resolution.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks Depending on the capture resolution aspect ratio and display resolution, the recommended preview resolution is determined.
* @param[in] camera The handle to the camera
* @param[out] width The preview width
* @param[out] height The preview height
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_resolution()
* @see camera_foreach_supported_preview_resolution()
*/
int camera_get_recommended_preview_resolution(camera_h camera, int *width, int *height);
/**
* @brief Starts face detection.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @remarks This should be called after the preview is started.\n
* This callback will be invoked when the face is detected in the preview frame.\n
* Internally it starts continuous focus and focusing on the detected face.\n
* When face detection is running, the camera_start_focusing(), camera_cancel_focusing(), camera_attr_set_af_mode(), camera_attr_set_af_area(), camera_attr_set_exposure_mode(), and camera_attr_set_whitebalance() settings are ignored.\n
* If camera_stop_preview() is invoked, face detection is stopped and then preview is resumed using camera_start_preview(), this method should be called again to resume face detection.
* @param[in] camera The handle to the camera
* @param[in] callback The callback to notify face detection
* @param[in] user_data The user data to be passed to the callback function
*
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Not preview state
* @retval #CAMERA_ERROR_INVALID_OPERATION Not supported this feature
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be #CAMERA_STATE_PREVIEW.
*
* @see camera_stop_face_detection()
* @see camera_face_detected_cb()
* @see camera_is_supported_face_detection()
*/
int camera_start_face_detection(camera_h camera, camera_face_detected_cb callback, void *user_data);
/**
* @brief Stops face detection.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @privlevel public
* @privilege %http://tizen.org/privilege/camera
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre This should be called after face detection is started.
*
* @see camera_start_face_detection()
* @see camera_is_supported_face_detection()
*/
int camera_stop_face_detection(camera_h camera);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Gets continuous capture feature's supported state.
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true on supported, otherwise false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
*
*/
bool camera_is_supported_continuous_capture(camera_h camera);
/**
* @brief Retrieves all supported camera preview resolutions by invoking the callback function once for each supported camera preview resolution.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_preview_resolution_cb() repeatedly to retrieve each supported preview resolution.
*
* @see camera_set_preview_resolution()
* @see camera_get_preview_resolution()
* @see camera_supported_preview_resolution_cb()
*/
int camera_foreach_supported_preview_resolution(camera_h camera, camera_supported_preview_resolution_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Sets the display rotation.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function should be called before previewing (see camera_start_preview())
* @param[in] camera The handle to the camera
* @param[in] rotation The display rotation
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_start_preview()
* @see camera_get_display_rotation()
*/
int camera_set_display_rotation(camera_h camera, camera_rotation_e rotation);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Gets the display rotation.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] rotation The display rotation
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_rotation()
*/
int camera_get_display_rotation(camera_h camera, camera_rotation_e *rotation);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Sets the display flip.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] flip The display flip
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Display type is incorrect
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_get_display_flip()
*/
int camera_set_display_flip(camera_h camera, camera_flip_e flip);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Gets the display flip.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] flip The display flip
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_flip()
*/
int camera_get_display_flip(camera_h camera, camera_flip_e *flip);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Sets the visible property for display.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] visible The display visibility property
*
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_is_display_visible()
*/
int camera_set_display_visible(camera_h camera, bool visible);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Gets the visible property of display.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] visible @c true if camera display is visible, otherwise @c false
*
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_visible()
*/
int camera_is_display_visible(camera_h camera, bool *visible);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Sets the display mode.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] mode The display mode
*
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_get_display_mode()
*/
int camera_set_display_mode(camera_h camera, camera_display_mode_e mode);
/**
* @ingroup CAPI_MEDIA_CAMERA_DISPLAY_MODULE
* @brief Gets the display mode.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] mode The display mode
*
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_mode()
*/
int camera_get_display_mode(camera_h camera, camera_display_mode_e *mode);
/**
* @brief Sets the hint for display reuse.
* @details If the hint is set to true, the display will be reused when the camera device is changed with camera_change_device().
* @since_tizen 3.0
* @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
* @param[in] camera The handle to the camera
* @param[in] hint The hint for display reuse; true - reuse the display, false - do not reuse
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @see camera_get_display_reuse_hint()
* @see camera_change_device()
*/
int camera_set_display_reuse_hint(camera_h camera, bool hint);
/**
* @brief Gets the hint for display reuse.
* @since_tizen 3.0
* @remarks If the current display type is #CAMERA_DISPLAY_TYPE_NONE, this function will return #CAMERA_ERROR_INVALID_OPERATION.
* @param[in] camera The handle to the camera
* @param[out] hint The hint for display reuse; true - reuse the display, false - do not reuse
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_get_display_reuse_hint()
* @see camera_change_device()
*/
int camera_get_display_reuse_hint(camera_h camera, bool *hint);
/**
* @brief Sets the resolution of the captured image.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] width The capture width
* @param[in] height The capture height
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_capture()
* @see camera_get_capture_resolution()
* @see camera_foreach_supported_capture_resolution()
*/
int camera_set_capture_resolution(camera_h camera, int width, int height);
/**
* @brief Gets the resolution of the captured image.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] width The capture width
* @param[out] height The capture height
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_capture_resolution()
* @see camera_foreach_supported_capture_resolution()
*/
int camera_get_capture_resolution(camera_h camera, int *width, int *height);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported camera captured resolutions by invoking the callback function once for each supported camera capture resolution.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_capture_resolution_cb() repeatedly to retrieve each supported capture resolution.
* @see camera_set_capture_resolution()
* @see camera_get_capture_resolution()
* @see camera_supported_capture_resolution_cb()
*/
int camera_foreach_supported_capture_resolution(camera_h camera, camera_supported_capture_resolution_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
/**
* @brief Sets the format of an image to be captured.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function should be called before capturing (see camera_start_capture()).
* @param[in] camera The handle to the camera
* @param[out] format The format of the image to be captured
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_capture()
* @see camera_get_capture_format()
* @see camera_foreach_supported_capture_format()
*/
int camera_set_capture_format(camera_h camera, camera_pixel_format_e format);
/**
* @brief Gets the format of the image to be captured.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] format The format of the image to be captured
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_capture_format()
* @see camera_foreach_supported_capture_format()
*/
int camera_get_capture_format(camera_h camera, camera_pixel_format_e *format);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported camera capture formats by invoking the callback function once for each supported camera capture format.
*
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_capture_format_cb() repeatedly to retrieve each supported capture format.
* @see camera_set_capture_format()
* @see camera_get_capture_format()
* @see camera_supported_capture_format_cb()
*/
int camera_foreach_supported_capture_format(camera_h camera, camera_supported_capture_format_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
/**
* @brief Sets the preview data format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function should be called before previewing (see camera_start_preview()).
* @param[in] camera The handle to the camera
* @param[in] format The preview data format
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_get_preview_format()
* @see camera_foreach_supported_preview_format()
*/
int camera_set_preview_format(camera_h camera, camera_pixel_format_e format);
/**
* @brief Gets the format of the preview stream.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] format The preview data format
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_format()
* @see camera_foreach_supported_preview_format()
*/
int camera_get_preview_format(camera_h camera, camera_pixel_format_e *format);
/**
* @brief Gets the facing direction of camera module.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[out] facing_direction The facing direction of camera module
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int camera_get_facing_direction(camera_h camera, camera_facing_direction_e *facing_direction);
/**
* @brief Gets the camera's flash state.
* @since_tizen 3.0
* @param[in] device The hardware camera to access
* @param[out] state The current flash state
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_set_flash_mode()
* @see camera_attr_get_flash_mode()
*/
int camera_get_flash_state(camera_device_e device, camera_flash_state_e *state);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported camera preview formats by invoking the callback function once for each supported camera preview format.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_supported_preview_format_cb() repeatedly to retrieve each supported preview format.
* @see camera_set_preview_format()
* @see camera_get_preview_format()
* @see camera_supported_preview_format_cb()
*/
int camera_foreach_supported_preview_format(camera_h camera, camera_supported_preview_format_cb callback, void *user_data);
/**
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @brief Gets the face detection feature's supported state.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true if supported, otherwise @c false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_start_face_detection()
* @see camera_stop_face_detection()
*/
bool camera_is_supported_face_detection(camera_h camera);
/**
* @brief Gets the zero shutter lag feature's supported state.
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If supporting zero shutter lag, continuous shot can be done with full capture size. \n
* The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true if supported, otherwise @c false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
*/
bool camera_is_supported_zero_shutter_lag(camera_h camera);
/**
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @brief Gets the camera device count.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If the device supports primary and secondary camera, this returns @c 2. If @c 1 is returned, the device only supports primary camera.
* @param[in] camera The handle to the camera
* @param[out] device_count The device count
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int camera_get_device_count(camera_h camera, int *device_count);
/**
* @brief Gets the media packet preview callback feature's supported state.
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true if supported, otherwise @c false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
*
*/
bool camera_is_supported_media_packet_preview_cb(camera_h camera);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_MODULE
* @{
*/
/**
* @brief Registers a callback function to be called once per frame when previewing.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This callback does not work in the video recorder mode.\n
* Before 4.0, the only allowed state for calling this function was #CAMERA_STATE_CREATED.\n
* Since 4.0, #CAMERA_STATE_PREVIEW has been added as an allowed state,\n
* so that this function could be called before previewing or even while previewing.\n
* A registered callback is called on the internal thread of the camera.\n
* A video frame can be retrieved using a registered callback,\n
* and the buffer is only available in a registered callback.\n
* Since tizen 3.0, if you change the buffer in a registered callback,\n
* it could not be displayed on the device in case of copied buffer.\n
* and if camera_is_supported_media_packet_preview_cb() returns false,\n
* it's copied buffer case.
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be registered
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre Before 4.0 : The camera state must be set to #CAMERA_STATE_CREATED.\n
* Since 4.0 : The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_preview()
* @see camera_unset_preview_cb()
* @see camera_preview_cb()
*/
int camera_set_preview_cb(camera_h camera, camera_preview_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_preview_cb()
*/
int camera_unset_preview_cb(camera_h camera);
/**
* @brief Registers a media packet callback function to be called once per frame when previewing.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This callback does not work in video recorder mode.\n
* This function should be called before previewing (see camera_start_preview())\n
* A registered callback is called on the internal thread of the camera.\n
* A video frame can be retrieved using a registered callback as a media packet.\n
* The callback function holds the same buffer that will be drawn on the display device.\n
* So if you change the media packet in a registered callback, it will be displayed on the device\n
* and the media packet is available until it's destroyed by media_packet_destroy().
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be registered
* @param[in] user_data The user data to be passed to the callback function
* @return 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera's state should be #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_unset_media_packet_preview_cb()
* @see camera_media_packet_preview_cb()
*/
int camera_set_media_packet_preview_cb(camera_h camera, camera_media_packet_preview_cb callback, void *user_data);
/**
* @brief Unregisters the media packet callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_media_packet_preview_cb()
*/
int camera_unset_media_packet_preview_cb(camera_h camera);
/**
* @brief Registers a callback function to be called when the camera state changes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke camera_state_changed_cb() when the camera state changes.
* @see camera_unset_state_changed_cb()
* @see camera_state_changed_cb()
*/
int camera_set_state_changed_cb(camera_h camera, camera_state_changed_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_state_changed_cb()
*/
int camera_unset_state_changed_cb(camera_h camera);
/**
* @brief Registers a callback function to be called when the camera is interrupted by policy.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_unset_interrupted_cb()
* @see camera_interrupted_cb()
*/
int camera_set_interrupted_cb(camera_h camera, camera_interrupted_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_interrupted_cb()
*/
int camera_unset_interrupted_cb(camera_h camera);
/**
* @brief Registers a callback function to be called when the camera interrupt is started by policy.
* @since_tizen 4.0
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @see camera_unset_interrupt_started_cb()
* @see camera_interrupt_started_cb()
*/
int camera_set_interrupt_started_cb(camera_h camera, camera_interrupt_started_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen 4.0
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @see camera_set_interrupt_started_cb()
*/
int camera_unset_interrupt_started_cb(camera_h camera);
/**
* @brief Registers a callback function to be called when the auto-focus state changes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke camera_focus_changed_cb() when the auto-focus state changes.
* @see camera_start_focusing()
* @see camera_cancel_focusing()
* @see camera_unset_focus_changed_cb()
* @see camera_focus_changed_cb()
*/
int camera_set_focus_changed_cb(camera_h camera, camera_focus_changed_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_focus_changed_cb()
*/
int camera_unset_focus_changed_cb(camera_h camera);
/**
* @brief Registers a callback function to be called when an asynchronous operation error occurs.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This callback informs about a critical error situation.\n
* When this callback is invoked, the user should release the resource and terminate the application.\n
* In case of errors, one of the following codes will occur:\n
* #CAMERA_ERROR_DEVICE,\n
* #CAMERA_ERROR_INVALID_OPERATION,\n
* #CAMERA_ERROR_OUT_OF_MEMORY.
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function will invoke camera_error_cb() when an asynchronous operation error occurs.
* @see camera_unset_error_cb()
* @see camera_error_cb()
*/
int camera_set_error_cb(camera_h camera, camera_error_cb callback, void *user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_error_cb()
*/
int camera_unset_error_cb(camera_h camera);
/**
* @brief Gets the state of camera device.
* @since_tizen 3.0
* @param[in] device The hardware camera type
* @param[out] state The current state of the device
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
*/
int camera_get_device_state(camera_device_e device, camera_device_state_e *state);
/**
* @brief Registers a callback function to be called when the camera device state changes.
* @since_tizen 3.0
* @param[in] callback The callback function to register
* @param[in] user_data The user data to be passed to the callback function
* @param[out] cb_id The id of registered callback
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_OUT_OF_MEMORY Out of memory
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @post This function will invoke camera_device_state_changed_cb() when the camera device's state changes.
* @see camera_remove_device_state_changed_cb()
* @see camera_device_state_changed_cb()
*/
int camera_add_device_state_changed_cb(camera_device_state_changed_cb callback, void *user_data, int *cb_id);
/**
* @brief Unregisters the callback function.
* @since_tizen 3.0
* @param[in] cb_id The id of registered callback
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_add_device_state_changed_cb()
*/
int camera_remove_device_state_changed_cb(int cb_id);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Called to get each supported auto-focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] mode The supported auto-focus mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_af_mode() will invoke this callback.
* @see camera_attr_foreach_supported_af_mode()
*/
typedef bool (*camera_attr_supported_af_mode_cb)(camera_attr_af_mode_e mode, void *user_data);
/**
* @brief Called to get each supported exposure mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] mode The supported exposure mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_exposure_mode() will invoke this callback.
* @see camera_attr_foreach_supported_exposure_mode()
* @see #camera_attr_exposure_mode_e
*/
typedef bool (*camera_attr_supported_exposure_mode_cb)(camera_attr_exposure_mode_e mode, void *user_data);
/**
* @brief Called to get each supported ISO mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] iso The supported ISO mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_iso() will invoke this callback.
* @see camera_attr_foreach_supported_iso()
*/
typedef bool (*camera_attr_supported_iso_cb)(camera_attr_iso_e iso, void *user_data);
/**
* @brief Called to get each supported white balance.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] wb The supported white balance mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_whitebalance() will invoke this callback.
* @see camera_attr_foreach_supported_whitebalance()
* @see #camera_attr_whitebalance_e
*/
typedef bool (*camera_attr_supported_whitebalance_cb)(camera_attr_whitebalance_e wb, void *user_data);
/**
* @brief Called to get each supported effect mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] effect The supported effect mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_effect() will invoke this callback.
* @see camera_attr_foreach_supported_effect()
*/
typedef bool (*camera_attr_supported_effect_cb)(camera_attr_effect_mode_e effect, void *user_data);
/**
* @brief Called to get each supported scene mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] mode The supported scene mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_scene_mode() will invoke this callback.
* @see camera_attr_foreach_supported_scene_mode()
* @see #camera_attr_scene_mode_e
*/
typedef bool (*camera_attr_supported_scene_mode_cb)(camera_attr_scene_mode_e mode, void *user_data);
/**
* @brief Called to get each supported flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] mode The supported flash mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_flash_mode() will invoke this callback.
* @see camera_attr_foreach_supported_flash_mode()
*/
typedef bool (*camera_attr_supported_flash_mode_cb)(camera_attr_flash_mode_e mode, void *user_data);
/**
* @brief Called to get each supported FPS mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] fps The supported FPS mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n otherwise @c false to break out of the loop
* @pre camera_attr_foreach_supported_fps() will invoke this callback.
* @see camera_attr_foreach_supported_fps()
*/
typedef bool (*camera_attr_supported_fps_cb)(camera_attr_fps_e fps, void *user_data);
/**
* @brief Called to get each supported stream flip mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] flip The supported stream flip mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
* @pre camera_attr_foreach_supported_stream_flip() will invoke this callback.
* @see camera_attr_foreach_supported_stream_flip()
*/
typedef bool (*camera_attr_supported_stream_flip_cb)(camera_flip_e flip, void *user_data);
/**
* @brief Called to get each supported stream rotation mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] rotation The supported stream rotation mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
* @pre camera_attr_foreach_supported_stream_rotation() will invoke this callback.
* @see camera_attr_foreach_supported_stream_rotation()
*/
typedef bool (*camera_attr_supported_stream_rotation_cb)(camera_rotation_e rotation, void *user_data);
/**
* @brief Called to get each supported theater mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] mode The supported theater mode
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
* @pre camera_attr_foreach_supported_theater_mode() will invoke this callback.
* @see camera_attr_foreach_supported_theater_mode()
*/
typedef bool (*camera_attr_supported_theater_mode_cb)(camera_attr_theater_mode_e mode, void *user_data);
/**
* @brief Called to get each supported PTZ (Pan Tilt Zoom) type.
* @since_tizen 3.0
* @param[in] type The supported ptz type
* @param[in] user_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop
* @pre camera_attr_foreach_supported_ptz_mode() will invoke this callback.
* @see camera_attr_foreach_supported_ptz_mode()
*/
typedef bool (*camera_attr_supported_ptz_type_cb)(camera_attr_ptz_type_e type, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the preview frame rate.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This function should be called before previewing (see camera_start_preview()).
* @param[in] camera The handle to the camera
* @param[in] fps The frame rate
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_start_preview()
* @see camera_attr_get_preview_fps()
* @see camera_attr_foreach_supported_fps()
*/
int camera_attr_set_preview_fps(camera_h camera, camera_attr_fps_e fps);
/**
* @brief Gets the frames per second of a preview video stream.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] fps The frames per second of the preview video stream
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_preview_fps()
* @see camera_attr_foreach_supported_fps()
*/
int camera_attr_get_preview_fps(camera_h camera, camera_attr_fps_e *fps);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
* @see camera_attr_set_preview_fps()
* @see camera_attr_get_preview_fps()
* @see camera_attr_supported_fps_cb()
*/
int camera_attr_foreach_supported_fps(camera_h camera, camera_attr_supported_fps_cb callback, void *user_data);
/**
* @brief Retrieves all supported FPS modes by invoking the callback function once for each supported FPS mode.
* @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
* @param[in] camera The handle to the camera
* @param[in] width Required preview resolution's width
* @param[in] height Required preview resolution's height
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_fps_cb() repeatedly to get each supported FPS mode.
* @see camera_attr_set_preview_fps()
* @see camera_attr_get_preview_fps()
* @see camera_attr_supported_fps_cb()
*/
int camera_attr_foreach_supported_fps_by_resolution(camera_h camera, int width, int height, camera_attr_supported_fps_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets quality of the image.
* @details The range for image quality is 1 to 100. If @a quality is out of range, #CAMERA_ERROR_INVALID_PARAMETER error occurred.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] quality The quality of image (1 ~ 100)
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_start_preview()
* @see camera_attr_get_image_quality()
*/
int camera_attr_set_image_quality(camera_h camera, int quality);
/**
* @brief Gets the quality of a still image, which is captured.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] quality The quality of the image(1 ~ 100)
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_image_quality()
*/
int camera_attr_get_image_quality(camera_h camera, int *quality);
/**
* @brief Gets the bit rate of encoded preview.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[out] bitrate The bit rate of encoded preview
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_encoded_preview_bitrate()
*/
int camera_attr_get_encoded_preview_bitrate(camera_h camera, int *bitrate);
/**
* @brief Sets the bit rate of encoded preview.
* @since_tizen 3.0
* @remarks The recommended range is from 1,000 (1 kbps) to 100,000,000 (100 Mbps). \n
* But, due to codec limitations, it may not apply.
* @param[in] camera The handle to the camera
* @param[in] bitrate The bit rate of encoded preview
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_encoded_preview_bitrate()
*/
int camera_attr_set_encoded_preview_bitrate(camera_h camera, int bitrate);
/**
* @brief Gets the GOP (Group Of Pictures) interval of encoded preview.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[out] interval the GOP interval of encoded preview (millisecond)
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_encoded_preview_gop_interval()
*/
int camera_attr_get_encoded_preview_gop_interval(camera_h camera, int *interval);
/**
* @brief Sets the GOP (Group Of Pictures) interval of encoded preview.
* @since_tizen 3.0
* @remarks The recommended range is from 1,000 (1 second) to 600,000 (10 minutes). \n
* But, due to codec limitations, it may not apply.
* @param[in] camera The handle to the camera
* @param[in] interval the GOP interval of encoded preview (millisecond)
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_encoded_preview_gop_interval()
*/
int camera_attr_set_encoded_preview_gop_interval(camera_h camera, int interval);
/**
* @brief Sets the zoom level.
* @details The range for the zoom level is received from camera_attr_get_zoom_range(). If @a zoom is out of range, the #CAMERA_ERROR_INVALID_PARAMETER error occurs.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] zoom The zoom level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_zoom()
* @see camera_attr_get_zoom_range()
*/
int camera_attr_set_zoom(camera_h camera, int zoom);
/**
* @brief Gets the zoom level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] zoom The zoom level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_zoom()
* @see camera_attr_get_zoom_range()
*/
int camera_attr_get_zoom(camera_h camera, int *zoom);
/**
* @brief Gets the available zoom level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The minimum zoom level
* @param[out] max The maximum zoom level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_zoom()
* @see camera_attr_get_zoom()
*/
int camera_attr_get_zoom_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] mode The auto focus mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_af_mode()
* @see camera_attr_foreach_supported_af_mode()
* @see #camera_attr_af_mode_e
*/
int camera_attr_set_af_mode(camera_h camera, camera_attr_af_mode_e mode);
/**
* @brief Gets the auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] mode The auto focus mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_af_mode()
* @see camera_attr_set_af_mode()
* @see #camera_attr_af_mode_e
*/
int camera_attr_get_af_mode(camera_h camera, camera_attr_af_mode_e *mode);
/**
* @brief Sets auto focus area.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This API is invalid in the #CAMERA_ATTR_AF_NONE mode.\n
* The coordinates are mapped to preview area.
* @param[in] camera The handle to the camera
* @param[in] x The x coordinates of the focus area
* @param[in] y The y coordinates of the focus area
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_set_af_mode()
* @see camera_attr_clear_af_area()
*/
int camera_attr_set_af_area(camera_h camera, int x, int y);
/**
* @brief Clears the auto focus area.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The focusing area is set to the center.
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Invalid operation
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_af_mode()
* @see camera_attr_set_af_area()
*/
int camera_attr_clear_af_area(camera_h camera);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported auto focus modes by invoking the callback function once for each supported auto focus mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_af_mode_cb() to get all the supported auto focus modes.
* @see camera_attr_set_af_mode()
* @see camera_attr_get_af_mode()
* @see camera_attr_supported_af_mode_cb()
*/
int camera_attr_foreach_supported_af_mode(camera_h camera, camera_attr_supported_af_mode_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the exposure mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] mode The exposure mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_exposure_mode()
* @see camera_attr_foreach_supported_exposure_mode()
*/
int camera_attr_set_exposure_mode(camera_h camera, camera_attr_exposure_mode_e mode);
/**
* @brief Gets the exposure mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] mode The exposure mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_exposure_mode()
* @see camera_attr_foreach_supported_exposure_mode()
*/
int camera_attr_get_exposure_mode(camera_h camera, camera_attr_exposure_mode_e *mode);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported exposure modes by invoking the callback function once for each supported exposure mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_exposure_mode_cb() to get all the supported exposure modes.
* @see camera_attr_set_exposure_mode()
* @see camera_attr_get_exposure_mode()
* @see camera_attr_supported_exposure_mode_cb()
*/
int camera_attr_foreach_supported_exposure_mode(camera_h camera, camera_attr_supported_exposure_mode_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the exposure value.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] value The exposure value
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_exposure()
*/
int camera_attr_set_exposure(camera_h camera, int value);
/**
* @brief Gets the exposure value.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] value The exposure value
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_exposure()
*/
int camera_attr_get_exposure(camera_h camera, int *value);
/**
* @brief Gets the available exposure value.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The minimum exposure value
* @param[out] max The maximum exposure value
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_exposure()
*/
int camera_attr_get_exposure_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the ISO level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] iso The ISO level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_iso()
* @see camera_attr_foreach_supported_iso()
*/
int camera_attr_set_iso(camera_h camera, camera_attr_iso_e iso);
/**
* @brief Gets the ISO level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] iso The ISO level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_iso()
* @see camera_attr_foreach_supported_iso()
*/
int camera_attr_get_iso(camera_h camera, camera_attr_iso_e *iso);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported ISO levels by invoking the callback function once for each supported ISO level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_iso_cb() to get all the supported ISO levels.
* @see camera_attr_set_iso()
* @see camera_attr_get_iso()
* @see camera_attr_supported_iso_cb()
*/
int camera_attr_foreach_supported_iso(camera_h camera, camera_attr_supported_iso_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the theater mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If you want to display the preview image on the external display with the full screen mode, use this function.
* @param[in] camera The handle to the camera
* @param[in] mode The mode to change
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre This function is valid only when the external display is connected.
* @see camera_attr_get_theater_mode()
*/
int camera_attr_set_theater_mode(camera_h camera, camera_attr_theater_mode_e mode);
/**
* @brief Gets the theater mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] mode Current theater mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_theater_mode()
*/
int camera_attr_get_theater_mode(camera_h camera, camera_attr_theater_mode_e *mode);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported theater modes by invoking callback function once for each supported theater modes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_theater_mode_cb() to get all supported theater modes.
* @see camera_attr_set_theater_mode()
* @see camera_attr_get_theater_mode()
* @see camera_attr_supported_theater_mode_cb()
*/
int camera_attr_foreach_supported_theater_mode(camera_h camera, camera_attr_supported_theater_mode_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the brightness level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If the min value is greater than the max value from camera_attr_get_brightness_range(), \n
* it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[in] level The brightness level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_brightness()
* @see camera_attr_get_brightness_range()
*/
int camera_attr_set_brightness(camera_h camera, int level);
/**
* @brief Gets the brightness level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] level The brightness level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_brightness()
* @see camera_attr_get_brightness_range()
*/
int camera_attr_get_brightness(camera_h camera, int *level);
/**
* @brief Gets the available brightness level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The minimum brightness level
* @param[out] max The maximum brightness level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_brightness()
* @see camera_attr_get_brightness()
*/
int camera_attr_get_brightness_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the contrast level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] level The contrast level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_contrast()
* @see camera_attr_get_contrast_range()
*/
int camera_attr_set_contrast(camera_h camera, int level);
/**
* @brief Gets the contrast level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] level The contrast level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_contrast()
* @see camera_attr_get_contrast_range()
*/
int camera_attr_get_contrast(camera_h camera, int *level);
/**
* @brief Gets the available contrast level.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The minimum contrast level
* @param[out] max The maximum contrast level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_contrast()
* @see camera_attr_get_contrast()
*/
int camera_attr_get_contrast_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the hue level.
* @since_tizen 5.0
* @param[in] camera The handle to the camera
* @param[in] level The hue level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_get_hue()
* @see camera_attr_get_hue_range()
*/
int camera_attr_set_hue(camera_h camera, int level);
/**
* @brief Gets the hue level.
* @since_tizen 5.0
* @param[in] camera The handle to the camera
* @param[out] level The hue level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_set_hue()
* @see camera_attr_get_hue_range()
*/
int camera_attr_get_hue(camera_h camera, int *level);
/**
* @brief Gets the available hue level.
* @since_tizen 5.0
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The minimum hue level
* @param[out] max The maximum hue level
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_set_hue()
* @see camera_attr_get_hue()
*/
int camera_attr_get_hue_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the white balance mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] whitebalance The white balance mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_foreach_supported_whitebalance()
* @see camera_attr_get_whitebalance()
*/
int camera_attr_set_whitebalance(camera_h camera, camera_attr_whitebalance_e whitebalance);
/**
* @brief Gets the white balance mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] whitebalance The white balance mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_whitebalance()
* @see camera_attr_set_whitebalance()
*/
int camera_attr_get_whitebalance(camera_h camera, camera_attr_whitebalance_e *whitebalance);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported white balances by invoking the callback function once for each supported white balance.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to be invoked
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_whitebalance_cb() to get all the supported white balances.
* @see camera_attr_set_whitebalance()
* @see camera_attr_get_whitebalance()
* @see camera_attr_supported_whitebalance_cb()
*/
int camera_attr_foreach_supported_whitebalance(camera_h camera, camera_attr_supported_whitebalance_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the camera effect mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] effect The camera effect mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_foreach_supported_effect()
* @see camera_attr_get_effect()
*/
int camera_attr_set_effect(camera_h camera, camera_attr_effect_mode_e effect);
/**
* @brief Gets the camera effect mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] effect The camera effect mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_effect()
* @see camera_attr_set_effect()
*/
int camera_attr_get_effect(camera_h camera, camera_attr_effect_mode_e *effect);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported effect modes by invoking the callback function once for each supported effect mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_effect_cb() to get all the supported effect modes.
* @see camera_attr_set_effect()
* @see camera_attr_get_effect()
* @see camera_attr_supported_effect_cb()
*/
int camera_attr_foreach_supported_effect(camera_h camera, camera_attr_supported_effect_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the scene mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] mode The scene mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_foreach_supported_scene_mode()
* @see camera_attr_get_scene_mode()
*/
int camera_attr_set_scene_mode(camera_h camera, camera_attr_scene_mode_e mode);
/**
* @brief Gets the scene mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] mode The scene mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_scene_mode()
* @see camera_attr_set_scene_mode()
*/
int camera_attr_get_scene_mode(camera_h camera, camera_attr_scene_mode_e *mode);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported scene modes by invoking the callback function once for each supported scene mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_scene_mode_cb() to get all the supported scene modes.
* @see camera_attr_set_scene_mode()
* @see camera_attr_get_scene_mode()
* @see camera_attr_supported_scene_mode_cb()
*/
int camera_attr_foreach_supported_scene_mode(camera_h camera, camera_attr_supported_scene_mode_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Enables to write EXIF(Exchangeable image file format) tags in a JPEG file.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] enable If @c true writing EXIF tags in a JPEG file is enabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_tag()
*/
int camera_attr_enable_tag(camera_h camera, bool enable);
/**
* @brief Gets the value that indicates whether writing EXIF(Exchangeable image file format) tags in a JPEG file is enabled.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] enabled If @c true camera information is enabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_tag()
*/
int camera_attr_is_enabled_tag(camera_h camera, bool *enabled);
/**
* @brief Sets the camera image description in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] description The string with description
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tag_image_description()
*/
int camera_attr_set_tag_image_description(camera_h camera, const char *description);
/**
* @brief Gets the camera image description in EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks You must release @a description using free().
* @param[in] camera The handle to the camera
* @param[out] description A pointer to a string
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tag_image_description()
*/
int camera_attr_get_tag_image_description(camera_h camera, char **description);
/**
* @brief Sets the camera orientation in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] orientation The camera orientation
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tag_orientation()
*/
int camera_attr_set_tag_orientation(camera_h camera, camera_attr_tag_orientation_e orientation);
/**
* @brief Gets the camera orientation in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] orientation The camera orientation
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tag_orientation()
*/
int camera_attr_get_tag_orientation(camera_h camera, camera_attr_tag_orientation_e *orientation);
/**
* @brief Sets the software information in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] software The software information tag
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_tag_software()
*/
int camera_attr_set_tag_software(camera_h camera, const char *software);
/**
* @brief Gets the software information in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks You must release @a software using free().
* @param[in] camera The handle to the camera
* @param[out] software A pointer to a string
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tag_software()
*/
int camera_attr_get_tag_software(camera_h camera, char **software);
/**
* @brief Sets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] latitude The latitude data
* @param[in] longitude The longitude data
* @param[in] altitude The altitude data
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_geotag()
* @see camera_attr_remove_geotag()
*/
int camera_attr_set_geotag(camera_h camera, double latitude, double longitude, double altitude);
/**
* @brief Gets the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] latitude The latitude data
* @param[out] longitude The longitude data
* @param[out] altitude The altitude data
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_geotag()
* @see camera_attr_remove_geotag()
*/
int camera_attr_get_geotag(camera_h camera, double *latitude, double *longitude, double *altitude);
/**
* @brief Removes the geotag(GPS data) in the EXIF(Exchangeable image file format) tag.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_set_geotag()
* @see camera_attr_get_geotag()
*/
int camera_attr_remove_geotag(camera_h camera);
/**
* @brief Sets the camera's flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif, while setting the flash mode, if the flash was preempted by other APIs,\n
* then this function returns #CAMERA_ERROR_DEVICE_BUSY error.
* @param[in] camera The handle to the camera
* @param[in] mode The flash mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @retval #CAMERA_ERROR_DEVICE_BUSY The flash was preempted by other API
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_foreach_supported_flash_mode()
* @see camera_attr_get_flash_mode()
*/
int camera_attr_set_flash_mode(camera_h camera, camera_attr_flash_mode_e mode);
/**
* @brief Gets the camera's flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] mode The flash mode
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_foreach_supported_flash_mode()
* @see camera_attr_set_flash_mode()
*/
int camera_attr_get_flash_mode(camera_h camera, camera_attr_flash_mode_e *mode);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported flash modes by invoking the callback function once for each supported flash mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data passed to the callback registration function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_flash_mode_cb() to get all supported flash modes.
* @see camera_attr_set_flash_mode()
* @see camera_attr_get_flash_mode()
* @see camera_attr_supported_flash_mode_cb()
*/
int camera_attr_foreach_supported_flash_mode(camera_h camera, camera_attr_supported_flash_mode_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Gets the camera len's orientation angle.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] angle The orientation angle
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_set_display_rotation()
*/
int camera_attr_get_lens_orientation(camera_h camera, int *angle);
/**
* @brief Sets the stream rotation.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] rotation The stream rotation
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_get_stream_rotation()
*/
int camera_attr_set_stream_rotation(camera_h camera, camera_rotation_e rotation);
/**
* @brief Gets the stream rotation.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] rotation The stream rotation
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_set_stream_rotation()
*/
int camera_attr_get_stream_rotation(camera_h camera, camera_rotation_e *rotation);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported stream rotation modes by invoking callback function once for each supported stream rotation mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_stream_rotation_cb() to get all supported stream rotation mode.
* @see camera_attr_set_stream_rotation()
* @see camera_attr_get_stream_rotation()
* @see camera_attr_supported_stream_rotation_cb()
*/
int camera_attr_foreach_supported_stream_rotation(camera_h camera, camera_attr_supported_stream_rotation_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the stream flip.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] flip The stream flip
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_set_stream_rotation()
*/
int camera_attr_set_stream_flip(camera_h camera, camera_flip_e flip);
/**
* @brief Gets the stream flip.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] flip The stream flip
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED.
* @see camera_attr_set_stream_rotation()
*/
int camera_attr_get_stream_flip(camera_h camera, camera_flip_e *flip);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported stream flip modes by invoking callback function once for each supported stream flip mode.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_stream_flip_cb() to get all supported stream flip mode.
* @see camera_attr_set_stream_flip()
* @see camera_attr_get_stream_flip()
* @see camera_attr_supported_stream_flip_cb()
*/
int camera_attr_foreach_supported_stream_flip(camera_h camera, camera_attr_supported_stream_flip_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Called when the HDR capture process is updated.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] percent The progress percentage of HDR capture
* @param[in] user_data The user data passed from the callback registration function
* @pre camera_start_capture() will invoke this callback if you register it using camera_attr_set_hdr_capture_progress_cb().
* @see camera_attr_get_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_unset_hdr_capture_progress_cb()
* @see camera_attr_is_supported_hdr_capture()
*/
typedef void (*camera_attr_hdr_progress_cb)(int percent, void *user_data);
/**
* @brief Sets the mode of HDR (High Dynamic Range) capture.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks Taking multiple pictures at different exposure levels and intelligently stitching them together so that we eventually arrive at a picture that is representative in both dark and bright areas.\n
* If this attribute is set to @c true. camera_attr_hdr_progress_cb() is invoked during capture.\n
* If you set #CAMERA_ATTR_HDR_MODE_KEEP_ORIGINAL, the capturing callback is invoked twice. The first callback is delivering origin image data. The second callback is delivering improved image data.
* @param[in] camera The handle to the camera
* @param[in] mode The mode of HDR capture
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_unset_hdr_capture_progress_cb()
* @see camera_attr_is_supported_hdr_capture()
*
*/
int camera_attr_set_hdr_mode(camera_h camera, camera_attr_hdr_mode_e mode);
/**
* @brief Gets the mode of HDR (High Dynamic Range) capture.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] mode The mode of HDR capture
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_unset_hdr_capture_progress_cb()
* @see camera_attr_is_supported_hdr_capture()
*/
int camera_attr_get_hdr_mode(camera_h camera, camera_attr_hdr_mode_e *mode);
/**
* @brief Registers a callback function to be called when HDR capture is progressing.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This callback notifies progress of the HDR process.
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data passed to the callback registration function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_hdr_mode()
* @see camera_attr_get_hdr_mode()
* @see camera_attr_unset_hdr_capture_progress_cb()
* @see camera_attr_is_supported_hdr_capture()
*/
int camera_attr_set_hdr_capture_progress_cb(camera_h camera, camera_attr_hdr_progress_cb callback, void* user_data);
/**
* @brief Unregisters the callback function.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_hdr_mode()
* @see camera_attr_get_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_is_supported_hdr_capture()
*/
int camera_attr_unset_hdr_capture_progress_cb(camera_h camera);
/**
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @brief Gets the support state of HDR capture.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true if supported, otherwise @c false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_set_hdr_mode()
* @see camera_attr_get_hdr_mode()
* @see camera_attr_set_hdr_capture_progress_cb()
* @see camera_attr_unset_hdr_capture_progress_cb()
*/
bool camera_attr_is_supported_hdr_capture(camera_h camera);
/**
* @brief Enables/Disables the anti-shake feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks This feature is used for image capture.
* @param[in] camera The handle to the camera
* @param[in] enable If @c true the anti-shake feature is enabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_anti_shake()
* @see camera_attr_is_supported_anti_shake()
*
*/
int camera_attr_enable_anti_shake(camera_h camera, bool enable);
/**
* @brief Gets the state of the anti-shake feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] enabled The state of anti-shake
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_anti_shake()
* @see camera_attr_is_supported_anti_shake()
*/
int camera_attr_is_enabled_anti_shake(camera_h camera, bool *enabled);
/**
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @brief Gets the support state of the anti-shake feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true if supported, otherwise @c false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_enable_anti_shake()
* @see camera_attr_is_enabled_anti_shake()
*/
bool camera_attr_is_supported_anti_shake(camera_h camera);
/**
* @brief Enables/Disables the video stabilization feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks If video stabilization is enabled, zero shutter lag is disabled.\n
* This feature is used to record a video.
* @param[in] camera The handle to the camera
* @param[in] enable If @c true video stabilization is enabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_is_enabled_video_stabilization()
* @see camera_attr_is_supported_video_stabilization()
*
*/
int camera_attr_enable_video_stabilization(camera_h camera, bool enable);
/**
* @brief Gets the state of the video stabilization feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] enabled The state of video stabilization
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_video_stabilization()
* @see camera_attr_is_supported_video_stabilization()
*/
int camera_attr_is_enabled_video_stabilization(camera_h camera, bool *enabled);
/**
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @brief Gets the support state of the video stabilization feature.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return @c true if supported, otherwise @c false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_enable_video_stabilization()
* @see camera_attr_is_enabled_video_stabilization()
*/
bool camera_attr_is_supported_video_stabilization(camera_h camera);
/**
* @brief Enables/Disables auto contrast.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[in] enable If @c true auto contrast is enabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_CREATED or #CAMERA_STATE_PREVIEW.
* @see camera_attr_is_enabled_auto_contrast()
*/
int camera_attr_enable_auto_contrast(camera_h camera, bool enable);
/**
* @brief Gets the state of auto contrast.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @param[in] camera The handle to the camera
* @param[out] enabled The state of auto contrast
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_enable_auto_contrast()
*/
int camera_attr_is_enabled_auto_contrast(camera_h camera, bool *enabled);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Gets state of support of auto contrast feature.
* @ingroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
* @param[in] camera The handle to the camera
* @return true on supported, otherwise false
* @exception #CAMERA_ERROR_NONE Successful
* @exception #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @exception #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @exception #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @see camera_attr_enable_auto_contrast()
* @see camera_attr_is_enabled_auto_contrast()
*/
bool camera_attr_is_supported_auto_contrast(camera_h camera);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Disables shutter sound.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks In some countries, this operation is not permitted.
* @param[in] camera The handle to the camera
* @param[in] disable If @c true shutter sound is disabled, otherwise @c false
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_OPERATION Disabling shutter sound is not permitted
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
*/
int camera_attr_disable_shutter_sound(camera_h camera, bool disable);
/**
* @brief Sets the position to move horizontally.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[in] move_type The PTZ(Pan Tilt Zoom) move type
* @param[in] pan_step The step to move the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_pan()
* @see camera_attr_get_pan_range()
*/
int camera_attr_set_pan(camera_h camera, camera_attr_ptz_move_type_e move_type, int pan_step);
/**
* @brief Gets the current position of the camera.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[out] pan_step The current horizontal distance from the starting point.
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_pan()
* @see camera_attr_get_pan_range()
*/
int camera_attr_get_pan(camera_h camera, int *pan_step);
/**
* @brief Gets lower limit and upper limit for pan position.
* @since_tizen 3.0
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The lower limit for pan
* @param[out] max The upper limit for pan
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_pan()
* @see camera_attr_get_pan()
*/
int camera_attr_get_pan_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the position to move vertically.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[in] move_type The PTZ(Pan Tilt Zoom) move type
* @param[in] tilt_step The step to move the camera
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_tilt()
* @see camera_attr_get_tilt_range()
*/
int camera_attr_set_tilt(camera_h camera, camera_attr_ptz_move_type_e move_type, int tilt_step);
/**
* @brief Gets the current position of the camera.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[out] tilt_step The current vertical distance from the starting point.
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tilt()
* @see camera_attr_get_tilt_range()
*/
int camera_attr_get_tilt(camera_h camera, int *tilt_step);
/**
* @brief Gets lower limit and upper limit for tilt position.
* @since_tizen 3.0
* @remarks If the min value is greater than the max value, it means that this feature is not supported.
* @param[in] camera The handle to the camera
* @param[out] min The lower limit for tilt
* @param[out] max The upper limit for tilt
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_tilt()
* @see camera_attr_get_tilt()
*/
int camera_attr_get_tilt_range(camera_h camera, int *min, int *max);
/**
* @brief Sets the type of PTZ(Pan Tilt Zoom).
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[in] ptz_type PTZ type
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_INVALID_STATE Invalid state
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @pre The camera state must be set to #CAMERA_STATE_PREVIEW.
* @see camera_attr_get_pan()
* @see camera_attr_set_pan()
* @see camera_attr_get_pan_range()
* @see camera_attr_get_tilt()
* @see camera_attr_set_tilt()
* @see camera_attr_get_tilt_range()
* @see camera_attr_foreach_supported_ptz_type()
*/
int camera_attr_set_ptz_type(camera_h camera, camera_attr_ptz_type_e ptz_type);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_CAPABILITY_MODULE
* @{
*/
/**
* @brief Retrieves all supported PTZ(Pan Tilt Zoom) types by invoking callback function once for each supported ptz type.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[in] callback The callback function to invoke
* @param[in] user_data The user data to be passed to the callback function
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_PERMISSION_DENIED The access to the resources can not be granted
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @post This function invokes camera_attr_supported_ptz_type_cb() to get all supported ptz type.
* @see camera_attr_set_ptz_type()
*/
int camera_attr_foreach_supported_ptz_type(camera_h camera, camera_attr_supported_ptz_type_cb callback, void *user_data);
/**
* @}
*/
/**
* @addtogroup CAPI_MEDIA_CAMERA_ATTRIBUTES_MODULE
* @{
*/
/**
* @brief Sets the ROI(Region Of Interest) area of display.
* @since_tizen 3.0
* @remarks If no display is set, no operation is performed and
* the ROI area is valid only in #CAMERA_DISPLAY_MODE_CUSTOM_ROI display mode.
* @remarks The minimum value of width and height are 1.
* @remarks ROI area can be set before setting ROI display mode. (since 4.0)
* @param[in] camera The handle to the camera
* @param[in] x X coordinate of area
* @param[in] y Y coordinate of area
* @param[in] width Width of area
* @param[in] height Height of area
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_get_display_roi_area()
*/
int camera_attr_set_display_roi_area(camera_h camera, int x, int y, int width, int height);
/**
* @brief Gets the ROI(Region Of Interest) area of display.
* @since_tizen 3.0
* @param[in] camera The handle to the camera
* @param[out] x X coordinate of area
* @param[out] y Y coordinate of area
* @param[out] width Width of area
* @param[out] height Height of area
* @return @c 0 on success, otherwise a negative error value
* @retval #CAMERA_ERROR_NONE Successful
* @retval #CAMERA_ERROR_INVALID_OPERATION Internal error
* @retval #CAMERA_ERROR_INVALID_PARAMETER Invalid parameter
* @retval #CAMERA_ERROR_NOT_SUPPORTED The feature is not supported
* @retval #CAMERA_ERROR_SERVICE_DISCONNECTED The socket to multimedia server is disconnected
* @see camera_attr_set_display_roi_area()
*/
int camera_attr_get_display_roi_area(camera_h camera, int *x, int *y, int *width, int *height);
/**
* @}
*/
#ifdef __cplusplus
}
#endif
#endif /* __TIZEN_MULTIMEDIA_CAMERA_H__ */
|