1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
|
/*
This file is part of the KDE project
Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org>
Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
Contact: Nokia Corporation (qt-info@nokia.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
/*!
\enum Phonon::DiscType
Enum to identify the media discs supported by MediaObject.
\value NoDisc
No disc was selected. This is only useful as a return value from
MediaSource::diskType().
\value Cd Identifies Audio CDs.
\value Dvd Identifies DVDs (not arbitrary data DVDs, only movie DVDs).
\value Vcd Identifies Video CDs.
\sa MediaSource, MediaObject
*/
/*!
\enum Phonon::MetaData
Provided as keys for Phonon::MediaObject::metaData(). The enum
values matches strings defined in the Ogg Vorbis specification
\value ArtistMetaData
\value AlbumMetaData
\value TitleMetaData
\value DateMetaData
\value GenreMetaData
\value TracknumberMetaData
\value DescriptionMetaData
\value MusicBrainzDiscIdMetaData
*/
/*!
\enum Phonon::State
\since 4.4
The state enum describes the different states a media object can
take. Several functions of \l{Phonon::}{MediaObject} are
asynchronous, so even if a you have requested a state change
through a function call, e.g., through
\l{Phonon::MediaObject::}{play()}, you cannot be sure that the
change has taken place before you receive the
\l{Phonon::MediaObject::}{stateChanged()} signal.
A media object can at any time change into any state, regardless
of the state it previously had. \omit In the
\l{Phonon::}{MediaObject} class description explains the typical
state changes in the life of a media object. \endomit
\value LoadingState
After construction it might take a while before the media object
is ready to \l{Phonon::MediaObject::}{play()}. This state is
commonly used by backends to initialize the \l{Phonon
Overview}{media graph} and loading the source. When
the object leaves the loading state, it will enter the
StoppedState unless an error occurred or another state is
requested through a function call, e.g.,
\l{Phonon::}{MediaObject::play()}.
\value StoppedState
In the stopped state, the media object is ready to play its
current media source. The current
\l{MediaObject::seek()}{position} in the media stream is then 0.
\value PlayingState
The media object is playing back its media source.
\value BufferingState
The Player is waiting for data to be able to start or continue
playing. This state is commonly used to wait for media data over a
network connection.
\value PausedState
The media player has currently paused its playback, i.e., it
stops playing but keeps the current playback position in the
stream.
\value ErrorState
When a media object enters the error state a problem with the
playback has occurred. The possible errors are grouped into
two categories by Phonon::ErrorType, and the type can be
queried through \l{Phonon::MediaObject::}{errorType()}. A
\l{Phonon::}{FatalError} implies that the playback
cannot continue, but one can still try with a new media
source. With a \l{Phonon::}{NormalError} it might
be possible to continue playback, and a media object may
therefore change state from the ErrorState.
\sa MediaObject
*/
/*!
\enum Phonon::Category
Sets the category your program should be listed in in the mixer.
\value NoCategory
Will make use of the default device.
\value NotificationCategory
If the sounds produced are notifications (ping, beep and such) you
should use this category.
\value MusicCategory
If your application is a music player (like a jukebox or media player
playing an audio file).
\value VideoCategory
If the sound is the audio channel of a video.
\value CommunicationCategory
If your applications produces sounds from communication with somebody
else (VoIP, voice chat).
\value GameCategory
Sound produced by a computer game should go into this category.
\value AccessibilityCategory
Sounds produced for accessibility (e.g., Text-To-Speech)
\omitvalue LastCategory
Holds the largest value of categories.
\omitvalue AccessibilityCategory
A Jukebox will set this to Music, a VoIP program to Communication, a
DVD player to video, and so on.
\note These categories can also become useful for an application that
controls the volumes automatically, like turning down the music when a call
comes in, or turning down the notifications when the media player knows
it's playing classical music.
*/
/*!
\enum Phonon::ErrorType
This enum describes the severity when an error has occurred during
playback.
After a media object has entered the \l{Phonon::}{ErrorState}, one
can query the type of error from
\l{Phonon::}{MediaObject::errorType()}. Note that you should query
the error when receiving the
\l{Phonon::}{MediaObject::stateChanged()} signal, because the
error type will be lost if the media object leaves the error
state.
\value NoError No error. MediaObject::errorType() returns this if
MediaObject::state() != Phonon::ErrorState.
\value NormalError An error has occurred with the playback of the current
source. It might be possible to continue playback, for instance, if only the
audio stream in a video cannot be played back. The media object will then
leave the error state again.
\value FatalError. Something important does not work. Your program cannot continue
the playback of the current source, but it might be possible to try another.
\sa MediaObject::errorType()
*/
/*!
\fn QString Phonon::categoryToString(Category c)
Returns a (translated) string to show to the user identifying the given
Category (\a c).
*/
/*!
\enum Phonon::ObjectDescriptionType
\relates Phonon::ObjectDescription
This enum defines the type of information that is contained in a
\l{Phonon::}{ObjectDescription} object.
\value AudioOutputDeviceType An audio output device (\l{Phonon::}{AudioOutputDevice}).
This can be soundcards (with different drivers),
sound servers, or other virtual outputs like playback on a different
computer on the network.
\value EffectType An audio effect (\l{Phonon::}{EffectDescription}).
\omitvalue SubtitleType
\omitvalue AudioCaptureDeviceType
\omitvalue AudioChannelType
*/
/*!
\typedef Phonon::AudioOutputDevice
\relates Phonon::ObjectDescription
This typedef of \l{Phonon::}{ObjectDescription} describes an audio output
device, such as soundcards (with different drivers), sound servers, or other
virtual outputs like playback on a different computer on the network.
\omit
For Hardware devices the backend should use libkaudiodevicelist
(AudioDevice and AudioDeviceEnumerator) which will list removable
devices even when they are unplugged and provide a unique identifier
that can make backends use the same identifiers.
\endomit
A list of available devices is given by the backend with
Backendcapabilities::availableAudioOutputDevices()
\snippet doc/src/snippets/phononobjectdescription.cpp 1
*/
/*!
\fn Phonon::phononVersion()
\inmodule Phonon
\since 4.5
Returns the Phonon version.
*/
/*!
\class Phonon::ObjectDescription
\inmodule Phonon
\inheaderfile Phonon/ObjectDescription
\since 4.4
\brief The ObjectDescription class provides information about Phonon objects.
Phonon currently uses this class to describe audio effects and
audio output devices - using the typedefs AudioOutputDevice and
EffectDescription. The type of an ObjectDescription is also
described through the \l{Phonon::}{ObjectDescriptionType} enum.
Objects of the same \l{Phonon::ObjectDescriptionType}{type} are
uniquely identified by an index().
The class gives a description() and a name() of the object, both
of which are strings appropriate for end users of a Phonon
application. You can also check whether the device or effect
described is \l{isValid()}{valid}. This does not guarantee that
the device or effect functions as expected, but that the
ObjectDescription describes an existing device or effect.
Audio output devices and effect descriptions are used to select
the audio output device to be used for playback and to create
effects; we show examples of this in the snippet below. The
available descriptions can be fetched with
\l{Phonon::BackendCapabilities::}{availableAudioOutputDevices()}
and \l{Phonon::BackendCapabilities::}{availableAudioEffects()}
static functions in the Phonon::BackendCapabilities namespace
\snippet doc/src/snippets/phononobjectdescription.cpp 0
Other types of ObjectDescriptions might be possible in the future,
e.g., descriptions of audio capture devices, such as microphones.
\omit Not implemented yet.
Need a new paragraph on that some descriptions 'belong
together', such as chained audio effects.
Some parts give the end user choices, e.g. what source to capture
audio from. These choices are described by the name and
description methods of this class and identified with the id
method. Subclasses then define additional information like which
audio and video choices belong together. \endomit
\sa Phonon::AudioOutputDevice, Phonon::EffectDescription, {Capabilities Example}, {Phonon Module}
*/
/*!
\fn Phonon::ObjectDescription::ObjectDescription()
\brief constructs a new object description.
\internal
*/
/*!
\fn Phonon::ObjectDescription::ObjectDescription (int index, const QHash<QByteArray, QVariant> & properties)
\internal
*/
/*!
\fn Phonon::ObjectDescription::ObjectDescription(const QExplicitlySharedDataPointer<ObjectDescriptionData> &dd)
\internal
*/
/*!
\fn static inline ObjectDescription<T> Phonon::ObjectDescription::fromIndex(int index)
\internal
\omit Currently indices are not unique for all ObjectDescription types, making
the behavior of this function undefined. \endomit
Returns a new description object that describes the
device/effect/codec/... with the given \a index.
*/
/*!
\fn inline bool Phonon::ObjectDescription::operator==(const ObjectDescription &otherDescription) const
Returns \c true if this ObjectDescription describes the same
object as \a otherDescription; otherwise, returns \c false.
*/
/*!
\fn inline bool Phonon::ObjectDescription::operator!=(const ObjectDescription &otherDescription) const
Returns \c false if this ObjectDescription describes the same
as \a otherDescription; otherwise, returns \c true.
*/
/*!
\fn inline QString Phonon::ObjectDescription::name() const
Returns a string appropriate for a user to select between
object descriptions, e.g., from a QComboBox.
\sa description()
*/
/*!
\fn inline QString Phonon::ObjectDescription::description() const
Returns a more extensive description than the name() function.
For example, in the case of \l{Phonon::}{AudioOutputDevice}s, this
text should make clear which sound source is described; this is
sometimes hard to describe or understand from just the name.
The text is appropriate to present to an end user in for example
tool tips of items, with the name()'s as text, in a QComboBox.
*/
/*!
\fn inline QVariant Phonon::ObjectDescription::property(const char *name) const
Returns the property named \a name. A property can be used for
extended information, such as the manufacturer of a sound card. The
information will usually be given as text.
If the property is not set an invalid QVariant is returned.
Qt's backends do not use properties at the time of this writing.
\sa propertyNames()
*/
/*!
\fn inline QList<QByteArray> Phonon::ObjectDescription::propertyNames() const
Properties can be used for extended information about a
ObjectDescription, e.g., a manufacturer of a sound card. The
information will usually be given text.
This function returns all names that return valid data when
property() is called.
Currently, Qt backends do not use properties for their object
descriptions.
\sa property()
*/
/*!
\fn inline bool Phonon::ObjectDescription::isValid() const
Returns true if the device or effect described exists.
An ObjectDescription that is invalid, will also have an
index() of -1.
\sa index()
*/
/*!
\fn inline int Phonon::ObjectDescription::index() const
Returns a unique identifier for this ObjectDescription. Used
internally to distinguish between the descriptions.
Notice that the identifiers are only unique to the type of
description, e.g., \l{Phonon::}{AudioOutputDevice} or
\l{Phonon::}{EffectDescription}.
*/
/*!
\class Phonon::ObjectDescriptionPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::StreamInterface
\inmodule Phonon
\since 4.4
\brief Backend interface to handle media streams (AbstractMediaStream).
\internal
*/
/*!
\fn virtual Phonon::StreamInterface::~StreamInterface()
*/
/*!
\fn virtual void Phonon::StreamInterface::writeData(const QByteArray &data) = 0
\internal
*/
/*!
\fn virtual void Phonon::StreamInterface::endOfData() = 0
\internal
*/
/*!
\fn virtual void Phonon::StreamInterface::setStreamSize(qint64 newSize) = 0
\internal
*/
/*!
\fn virtual void Phonon::StreamInterface::setStreamSeekable(bool s) = 0
\internal
*/
/*!
\fn void Phonon::StreamInterface::connectToSource(const MediaSource &mediaSource)
\internal
*/
/*!
\fn void Phonon::StreamInterface::needData()
\internal
*/
/*!
\fn void Phonon::StreamInterface::enoughData()
\internal
*/
/*!
\fn void Phonon::StreamInterface::seekStream(qint64)
\internal
*/
/*!
\fn void Phonon::StreamInterface::reset()
\internal
*/
/*!
\fn Phonon::StreamInterface::StreamInterface()
\internal
\omit
For subclasses.
\endomit
*/
/*!
\class StreamInterfacePrivate
\inmodule Phonon
\internal
*/
/*!
\class Phonon::AbstractVideoOutput
\inmodule Phonon
\internal
\since 4.4
\brief The AbstractVideoOutput class is the common base class for all video output classes.
\sa VideoWidget
*/
/*!
\namespace Phonon::Experimental
\internal
*/
/*!
\fn Phonon::AbstractVideoOutput::AbstractVideoOutput(AbstractVideoOutputPrivate &d)
\internal
Constructor that is called from derived classes.
\param parent Standard QObject parent.
*/
/*!
\class Phonon::AbstractVideoOutputPrivate
\inmodule Phonon
\internal
\since 4.4
*/
/*!
\class Phonon::VolumeFaderEffect
\inmodule Phonon
\internal
\since 4.4
This effect differs from gradually changing the output volume in that
a dedicated effect can change the volume in the smallest possible
steps while every other volume control will make more or less
noticeable steps.
\sa AudioOutput::volume()
*/
/*!
\property Phonon::VolumeFaderEffect::volume
This is the current volume of the output as voltage factor.
Setting this property changes the volume immediately.
1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
\sa volumeDecibel
*/
/*!
\property Phonon::VolumeFaderEffect::volumeDecibel
This is the current volume of the output in decibel.
Setting this property changes the volume immediately.
0 dB means no change in volume, -6dB means an attenuation of the
voltage to 50% and an attenuation of the power to 25%, -inf dB means
silence.
\sa volume
*/
/*!
\property Phonon::VolumeFaderEffect::fadeCurve
This property holds the fade curve to be used for the fadeIn(), fadeOut()
and fadeTo() slots.
Defaults to Fade3Decibel.
\sa FadeCurve
*/
/*!
\enum Phonon::VolumeFaderEffect::FadeCurve
Determines the curve of the volume change.
\value Fade3Decibel Crossfade curve/fast fade out.
This is the default fade curve.
\value Fade6Decibel Linear fade out.
\value Fade9Decibel Slow fade out.
\value Fade12Decibel A more extreme version of the -9dB fade.
\bold{Notes:}
\c Fade3Decibel is often the best fade for a crossfade, as after half
of the time the volume reached -3dB. This means that half the
possible power (which is proportional to the square of the
voltage) is reached. Summed, the maximum power of two audio
signals fading with a -3dB curve will always be equal.
For fading in or out the -3dB curve is too abrupt in the end.
With a -6dB fade curve, a volume of -6dB is reached after half of
the fading time. -6dB is equal to half of the voltage meaning
that the voltage multiplier changes linearly from the start
of the fade to the end.
With the \c Fade9Decibel fade, a volume of -9dB is reached after
half of the fade time, so the fade is fast in the beginning and
slow at the end. This is a good fade for ending music.
*/
/*!
\fn void Phonon::VolumeFaderEffect::fadeIn(int fadeTime)
Tells the Fader to change the volume from the current volume to 100%
in \a fadeTime milliseconds.
Short for \c fadeTo(1.0, fadeTime).
\param fadeTime the fade duration in milliseconds
\sa fadeTo(), volume
*/
/*!
\fn void Phonon::VolumeFaderEffect::fadeOut(int fadeTime)
Tells the Fader to change the volume from the current volume to 0%
in \a fadeTime milliseconds.
Short for \c fadeTo(0.0, fadeTime).
\param fadeTime the fade duration in milliseconds
\sa fadeTo
*/
/*!
\fn void Phonon::VolumeFaderEffect::fadeTo(float volume, int fadeTime)
Tells the Fader to change the volume from the current value to
\a volume in \a fadeTime milliseconds.
\sa fadeIn(), fadeOut()
*/
/*!
\class Phonon::VolumeFaderEffectPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::VolumeFaderInterface
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn virtual Phonon::VolumeFaderInterface::~VolumeFaderInterface()
\internal
*/
/*!
\fn virtual float Phonon::VolumeFaderInterface::volume() const
\internal
*/
/*!
\fn virtual void Phonon::VolumeFaderInterface::setVolume(float)
\internal
*/
/*!
\fn virtual Phonon::VolumeFaderEffect::FadeCurve Phonon::VolumeFaderInterface::fadeCurve() const
\internal
*/
/*!
\fn virtual void Phonon::VolumeFaderInterface::setFadeCurve(Phonon::VolumeFaderEffect::FadeCurve)
\internal
*/
/*!
\fn virtual void Phonon::VolumeFaderInterface::fadeTo(float, int)
\internal
*/
/*!
\class Phonon::AbstractMediaStream
\inmodule Phonon
\internal
\since 4.4
\brief The AbstractMediaStream class is the base class for custom media data streams.
\inheaderfile Phonon/AbstractMediaStream
This class is subclassed to provide custom data streams for
\l{Phonon::}{MediaSource}s.
The \l{Phonon::}{MediaSource} knows how to handle the most common
media sources, such as files and CD. If you need to fetch
multimedia from other sources, you can reimplement this class,
which can be used by a \l{Phonon::}{MediaSource}.
When a backend needs more data from the stream, needData() will be
called. You must then use writeData() to write the data to the
backend. You can either write one time and wait for a new
needData() call, or continue to write data until you receive an
enoughData() call. When the stream is at its end, call endOfData()
instead of writeData().
Before the custom stream is passed to a \l{Phonon::}{MediaSource},
setStreamSize() needs to be called, and also setStreamSeekable()
(if the stream is seekable). A good place to do this work is in
the constructor. A seekable stream must also reimplement
seekStream().
We show two examples. The first writes data repeatedly until it
receives the enoughData() call, while the second only writes once
and waits for a new needData() call.
Example where data is written repeatedly.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 0
Example where data is written once:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 1
\sa Phonon::MediaSource, Phonon::MediaObject
*/
/*!
\fn Phonon::AbstractMediaStream::AbstractMediaStream(QObject *parent = 0)
\internal
Constructs an AbstractMediaStream object with the given \a parent.
*/
/*!
\fn qint64 Phonon::AbstractMediaStream::streamSize() const
Returns the stream size that was set with setStreamSize().
A negative value means that the length of the stream cannot be known.
Defaults to 0.
\sa setStreamSize()
*/
/*!
\fn void Phonon::AbstractMediaStream::setStreamSize(qint64 size)
Sets the \a size of the stream in number of bytes.
A negative value means that the length of the stream cannot be known.
Defaults to 0.
This function has to be called. A backend will not call needData()
until the stream size is set.
\sa streamSize()
*/
/*!
\fn bool Phonon::AbstractMediaStream::streamSeekable() const
Returns whether your data stream is set as seekable.
Defaults to \c false.
\sa setStreamSeekable()
*/
/*!
\fn void Phonon::AbstractMediaStream::setStreamSeekable(bool s)
Sets whether your data stream is seekable. \a s should be true if
the stream is seekable; otherwise false.
Defaults to \c false.
If you set this to \c true you have to implement the seekStream()
function.
\sa streamSeekable()
*/
/*!
\fn void Phonon::AbstractMediaStream::writeData(const QByteArray &data)
Sends the media \a data to the backend for decoding.
Use this function to send data to the backend after needData() has
been called.
If your stream is a push stream, data should be written until the
enoughData() function is called. For a pull stream, write data
once before the call to needData() function returns.
If the data is depleted, call endOfData() instead of writeData().
\warning Don't call this function before the first needData() is emitted.
\sa needData(), endOfData()
*/
/*!
\fn void Phonon::AbstractMediaStream::endOfData()
Tells the backend that the media data stream is at its end.
\warning Don't call this function before the first needData() is emitted.
\sa writeData(), needData()
*/
/*!
\fn void Phonon::AbstractMediaStream::error(Phonon::ErrorType errorType, const QString &errorString)
If an I/O error occurs you should call this function to make
MediaObject go into ErrorState. \c errorType classifies the error,
while \a errorString is a textual description of the error suitable
for users of Phonon applications.
\sa MediaObject::errorType(), MediaObject::errorString()
*/
/*!
\fn virtual void Phonon::AbstractMediaStream::reset() = 0
Reimplement this function to reset the stream. Subsequent calls to writeData should start
from the first position of the data unless a seek is requested.
The function is necessary for the case where a non-seekable MediaStream is
played more than once. For a seekable stream the implementation can simply call
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 2
\sa writeData(), needData()
*/
/*!
\fn virtual void Phonon::AbstractMediaStream::needData() = 0
Reimplement this function to be notified when the backend needs data.
When this function is called you should write data to the backend
(See writeData()).
\sa writeData(), endOfData(), enoughData()
*/
/*!
\fn virtual void Phonon::AbstractMediaStream::enoughData()
If your stream is a push stream, reimplement this function to be
notified when the backend has enough data and your stream object
may take a break.
This method is important for pushing data to the backend in order
to not fill the backend buffer unnecessarily.
\sa needData()
*/
/*!
\fn virtual void Phonon::AbstractMediaStream::seekStream(qint64 offset)
Reimplement this function if your stream is seekable.
When this function is called the next call to writeData has to be at the
requested \a offset.
\warning Do not call the parent implementation.
\sa setStreamSeekable(), streamSeekable(), needData()
*/
/*!
\class Phonon::BackendInterface
\inmodule Phonon
\since 4.4
\brief Main Backend class interface
\internal
This interface defines the main factory of the backend. The createObject() function creates all the
objects needed by the frontend.
The objectDescriptionIndexes and objectDescriptionProperties functions return information about
available devices, effects and codecs.
An implementation could look like this:
\snippet snippets/phonon/samplebackend/main.cpp snippet
*/
/*!
\fn virtual Phonon::BackendInterface::~BackendInterface()
\internal
Silence gcc's warning.
*/
/*!
\enum Phonon::BackendInterface::Class
\internal
Classes that the createObject() function has to handle.
\value MediaObjectClass Request to return a \c MediaObject object.
\value VolumeFaderEffectClass Request to return a \c VolumeFaderEffect
object.
\value AudioOutputClass Request to return an \c AudioOutput object.
\value AudioDataOutputClass Request to return an \c AudioDataOutput object.
\value VisualizationClass Request to return a \c Visualization object.
\value VideoDataOutputClass Request to return a \c VideoDataOutput object.
\value EffectClass Request to return a \c Effect object.
Takes an additional int that specifies the effect ID.
\value VideoWidgetClass Request to return a \c VideoWidget object.
*/
/*!
\fn virtual QObject *Phonon::BackendInterface::createObject(Class c, QObject *parent, const QList<QVariant> &args = QList<QVariant>()) = 0
\internal
Returns a new instance of the requested class.
\param c The requested class.
\param parent The parent object.
\param args Additional arguments (documented in Class).
*/
/*!
\fn virtual QList<int> Phonon::BackendInterface::objectDescriptionIndexes(ObjectDescriptionType type) const = 0
\internal
Returns the unique identifiers for the devices/effects/codecs of the given \a type.
\param type see ObjectDescriptionType
*/
/*!
\fn virtual QHash<QByteArray, QVariant> Phonon::BackendInterface::objectDescriptionProperties(ObjectDescriptionType type, int index) const = 0
\internal
Given a unique identifier that was returned from objectDescriptionIndexes this function
returns a hash mapping property names to values.
The property "name" must always be present. All other properties are optional.
\table
\header \o Property \o Description
\row \o name \o The name of the device/effect/codec/...
\row \o description \o A text explaining what this device/effect/codec/... is/can do
\row \o icon \o An icon name (using the freedesktop naming scheme) or a QIcon for this
device/effect/codec/...
\row \o available \o A bool telling whether the device is present or unplugged.
\endtable
\param type see ObjectDescriptionType
\param index The unique identifier that is returned from objectDescriptionIndexes
*/
/*!
\fn virtual bool Phonon::BackendInterface::startConnectionChange(QSet<QObject *>) = 0;
\internal
When this function is called the nodes given in the parameter list should
not lose any signal data when connections are changed.
*/
/*!
\fn virtual bool Phonon::BackendInterface::connectNodes(QObject *, QObject *) = 0
\internal
Defines a signal connection between the two given nodes.
*/
/*!
\fn virtual bool Phonon::BackendInterface::disconnectNodes(QObject *, QObject *) = 0
\internal
Cuts a signal connection between the two given nodes.
*/
/*!
\fn virtual bool Phonon::BackendInterface::endConnectionChange(QSet<QObject *>) = 0
\internal
When this function is called the nodes given in the parameter list may lose
signal data when a port is not connected.
*/
/*!
\fn virtual QStringList Phonon::BackendInterface::availableMimeTypes() const = 0
\internal
Returns all available MIME types.
*/
/*!
\class Phonon::MediaSource
\inmodule Phonon
\inheaderfile Phonon/MediaSource
\since 4.4
\brief The MediaSource class provides multimedia data for media objects.
The MediaSource class manages a source of multimedia content, such
as a music or video file, of which data is given to a
\l{Phonon::}{MediaObject}.
The media source knows how fetch its data from several sources,
e.g., from files, a QIODevice, or a CD. The possible source types
are described by the \l{MediaSource::}{Type} enum. The type of the
source is set by the media source itself, and is dependent on the
constructor used to create it. Note that it is possible to provide
data from any source by implementing a QIODevice.
The class has several functions to acquire information about the
source it manages, e.g., fileName() and url(). The return from
these functions are dependent on the type() of the media source.
Normally, a programmer does not need to be concerned with media
sources. It's constructors are implicit, so one can, for instance,
send an URL or filename directly to the constructors of the
\l{Phonon::}{MediaObject}.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 3
A MediaSource object cannot be reused for another multimedia
source. It is possible to play the same source again, and also
stop and start a non-seekable media source, such as a radio
stream, with the same MediaSource object.
\section1 Qt Backends
Currently, Qt's backends support files in local and remote
locations. Support for other sources, such as CD/DVD, are planned
for the future.
\sa MediaObject, {Phonon Module}
*/
/*!
\enum Phonon::MediaSource::Type
Identifies the type of media described by the MediaSource object.
\value Invalid The MediaSource object does not describe any valid source.
\value LocalFile The MediaSource object describes a local file.
\value Url The MediaSource object describes an URL, which can be either a
local file or a file on the network.
\value Disc The MediaSource object describes a disc, e.g., a CD.
\value Stream The MediaSource object describes a data stream.
This is the type used for \l{QIODevice}s. Note
that a stream opened with a QUrl, will still be of the Url type.
\sa MediaSource::type()
*/
/*!
\fn Phonon::MediaSource::MediaSource()
\internal
Creates an invalid MediaSource object.
\sa Invalid
*/
/*!
\fn Phonon::MediaSource::MediaSource(const QString &fileName)
Creates a MediaSource object for the file specified by \a
fileName. You can also use this constructor with \l{The Qt
Resource System}{Qt resources}
\omit
\param fileName file name of a local media file or a Qt resource that was compiled in.
\endomit
*/
/*!
\fn Phonon::MediaSource::MediaSource(const QUrl &url)
Creates a MediaSource object for a the URL specified by \a url.
If the multimedia content you would like to play back is on a
remote network location, you should use this constructor; though,
it also possible to specify an URL to a local file.
\sa QUrl
*/
/*!
\fn Phonon::MediaSource::MediaSource(Phonon::DiscType discType, const QString &deviceName = QString())
Creates a MediaSource object for the type of disc specified by \a discType in the named
device referred to by \a deviceName.
\note \a deviceName is a platform dependent device name. It can be useful to specify this
if the computer has more than one CD drive. On KDE, it is recommended to use the Solid
hardware discovery framework to retrieve the device name in a portable way.
*/
/*!
\fn Phonon::MediaSource::MediaSource(AbstractMediaStream *stream)
\internal
Creates a MediaSource object for a data stream.
Your application can provide the media data by subclassing AbstractMediaStream and
passing a pointer to that object. Phonon will never delete the \a stream.
\param stream The AbstractMediaStream subclass to provide the media data.
\sa setAutoDelete
*/
/*!
\fn Phonon::MediaSource::MediaSource(QIODevice *ioDevice)
Creates a MediaSource object for the QIODevice specified by \a ioDevice.
This constructor can be very handy in the combination of
QByteArray and QBuffer.
If you need to fetch multimedia data from a source that is not
supported by MediaSource, you should subclass QIODevice and use
this MediaSource constructor. It is important that you reimplement
QIODevice::isSequential(), as it is used by MediaSource to
determine if the media source is seekable.
\a ioDevice is an arbitrary readable QIODevice subclass. If the device is not opened
MediaSource will open it as QIODevice::ReadOnly.
\note Sequential devices can also be used, but MediaObject::isSeekable() will
return false as a result.
\warning On Windows, we only support \l{QIODevice}s containing the
\c avi, \c mp3, or \c mpg formats. Use the constructor that takes
a file name to open files (the Qt backend does not use a QFile
internally).
\sa setAutoDelete()
*/
/*!
\fn Phonon::MediaSource::MediaSource(MediaSourcePrivate &)
\internal
*/
/*!
\fn Phonon::MediaSource::~MediaSource()
Destroys the MediaSource object. You should never delete a
MediaSource yourself, the MediaObject will handle this.
*/
/*!
\fn Phonon::MediaSource::MediaSource(const MediaSource &other)
Constructs a copy of the \a other media source.
This constructor is fast thanks to explicit sharing.
*/
/*!
\fn MediaSource &Phonon::MediaSource::operator=(const MediaSource &other)
Assigns the \a other media source to this media source and returns a
reference to it.
This operation is fast thanks to explicit sharing.
*/
/*!
\fn bool Phonon::MediaSource::operator==(const MediaSource &other) const
Returns true if this media source is equal to the \a other media source;
otherwise returns false.
*/
/*!
\fn void Phonon::MediaSource::setAutoDelete(bool enable)
If \a enable is true, the media source will take ownership of the
object passed in the \l{Phonon::}{MediaSource}'s constructor
object that was passed in the constructor; otherwise, the
programmer is responsible for deletion of this object.
This setting is false by default. If you enable it, you should
only access the stream or device as long as you keep the media
source object around. As long as you keep the media source
wrapping the stream or device, the object will not get deleted.
\sa autoDelete()
*/
/*!
\fn bool Phonon::MediaSource::autoDelete() const
Returns the setting of the auto-delete option. The default is
false.
\sa setAutoDelete()
*/
/*!
\fn Type Phonon::MediaSource::type() const
Returns the type of the MediaSource (depends on the constructor
that was used).
\sa Type
*/
/*!
\fn QString Phonon::MediaSource::fileName() const
Returns the file name of the MediaSource if type() ==
LocalFile; otherwise, returns QString().
\sa type()
*/
/*!
\fn QUrl Phonon::MediaSource::url() const
Returns the URL of the MediaSource if type() == URL or type() == LocalFile;
otherwise returns QUrl().
\sa type()
*/
/*!
\fn Phonon::DiscType Phonon::MediaSource::discType() const
Returns the disc type of the MediaSource if type() == Disc; otherwise
returns NoDisc.
\sa type()
*/
/*!
\fn QString Phonon::MediaSource::deviceName() const
Returns the device name of the MediaSource if type() == Disc; otherwise
returns QString().
\sa type()
*/
/*!
\fn AbstractMediaStream *Phonon::MediaSource::stream() const
\internal
Returns the media stream of the MediaSource if type() == Stream; otherwise
returns 0.
QIODevices are handled as streams, too.
*/
/*!
\class Phonon::MediaSourcePrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::SeekSlider
\inmodule Phonon
\inheaderfile Phonon/SeekSlider
\since 4.4
\brief The SeekSlider class provides a slider for seeking to positions in media streams.
The SeekSlider connects to a \l{Phonon::}{MediaObject}, and
controls the seek position in the object's media stream.
The slider will connect to the necessary signals to keep track of
the sliders maximum, minimum, and current values. It will also
disable itself for non-seekable streams, and update the media
object when the current value of the slider changes.
Here follows a typical example of SeekSlider usage:
\snippet doc/src/snippets/seekslider.cpp 0
\sa Phonon::VolumeSlider, Phonon::VideoWidget, {Music Player Example}, {Phonon Module}
*/
/*!
\property Phonon::SeekSlider::iconVisible
\brief whether the icon next to the slider is visible
By default the icon is visible if the platform provides an icon; else
it's hidden.
*/
/*!
\property Phonon::SeekSlider::tracking
\brief whether slider tracking is enabled
If tracking is enabled (the default), the media seeks
while the slider is being dragged. If tracking is
disabled, the media seeks only when the user
releases the slider.
*/
/*!
\property Phonon::SeekSlider::pageStep
\brief the page step interval
The larger of two natural steps that a slider provides and
typically corresponds to the user pressing PageUp or PageDown.
Defaults to 5 seconds.
*/
/*!
\property Phonon::SeekSlider::singleStep
\brief the single step interval
The smaller of two natural steps that a slider provides and
typically corresponds to the user pressing an arrow key.
Defaults to 0.5 seconds.
*/
/*!
\property Phonon::SeekSlider::orientation
\brief the orientation of the slider
The orientation must be Qt::Vertical or Qt::Horizontal (the default).
*/
/*!
\property Phonon::SeekSlider::iconSize
\brief the icon size used for the mute button/icon.
The default size is defined by the GUI style.
*/
/*!
\fn explicit Phonon::SeekSlider::SeekSlider(QWidget *parent = 0)
Constructs a seek slider widget with the given \a parent.
*/
/*!
\fn explicit Phonon::SeekSlider::SeekSlider(MediaObject *media, QWidget *parent = 0)
Constructs a seek slider widget for the specified \a media with the
given \a parent.
*/
/*!
\fn Phonon::SeekSlider::~SeekSlider()
Destroys the seek slider.
*/
/*!
\fn Phonon::MediaObject *Phonon::SeekSlider::mediaObject() const
Return the media object this SeekSlider controls.
*/
/*!
\class Phonon::SeekSliderPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn void Phonon::SeekSlider::setMediaObject(MediaObject *media)
Sets the media object to be controlled by this slider to the \a media specified.
*/
/*!
\class Phonon::VideoPlayer
\inmodule Phonon
\inheaderfile Phonon/VideoPlayer
\since 4.4
\brief The VideoPlayer widget is used to perform playback of video.
With VideoPlayer you can get results quickly and easily. You can
do the standard playback tasks like play(), pause(), and stop(),
but also set a playback volume and seek - if the media and backend
supports seeking.
VideoPlayer is provided for convenience and removes the need to
create a media graph with a \l{Phonon::}{MediaObject},
\l{Phonon::}{AudioOutput}, and \l{Phonon::}{VideoWidget}. If
you need functionality not supported by the player, you can build
this \l{Building Graphs}{graph} yourself.
Keep in mind that when the VideoPlayer instance is deleted the
playback will stop.
Note also that most of the functions in this class are
asynchronous. For instance, a media source may not play
immediately after you call the play() function.
A play and forget code example:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 4
\sa {Phonon Module}, MediaObject
*/
/*!
\fn Phonon::VideoPlayer::VideoPlayer(QWidget *parent = 0)
Constructs a new video widget with a \a parent using
Phonon::VideoCategory as its category.
\param parent The QObject parent.
*/
/*!
\fn Phonon::VideoPlayer::VideoPlayer(Phonon::Category category, QWidget *parent = 0)
Constructs a new VideoPlayer instance with the specified \a
parent.
\a category is the category used for the audio output device.
*/
/*!
\fn Phonon::VideoPlayer::~VideoPlayer()
On destruction the playback is stopped, also the audio output is
removed so that the desktop mixer will not show the application
anymore. If you need a persistent audio output don't use
VideoPlayer but MediaObject, VideoPath and VideoOutput.
*/
/*!
\fn qint64 Phonon::VideoPlayer::totalTime() const
Get the total time (in milliseconds) of the file currently being played.
*/
/*!
\fn qint64 Phonon::VideoPlayer::currentTime() const
Get the current time (in milliseconds) of the file currently being played.
*/
/*!
\fn float Phonon::VideoPlayer::volume() const
This is the current volume of the output as voltage factor.
1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
*/
/*!
\fn bool Phonon::VideoPlayer::isPlaying() const
Returns true if it is currently playing; otherwise returns false if it
is currently stopped or paused
*/
/*!
\fn bool Phonon::VideoPlayer::isPaused() const
Returns true if it is currently paused; otherwise returns false if it
is currently playing or stopped.
*/
/*!
\fn void Phonon::VideoPlayer::load(const Phonon::MediaSource &source)
Starts pre-loading the media data from the specified \a source and
filling audio buffers in the backend.
When there's already a media playing (or paused) it will be stopped
(the finished signal will not be emitted).
\sa MediaObject::setCurrentSource()
*/
/*!
\fn void Phonon::VideoPlayer::play(const Phonon::MediaSource &source)
Plays the media from the given \a source. Starts playback as fast as
possible.
This can take a considerable time depending on the URL and the
backend.
If you need low latency between calling play() and the sound actually
starting to play on your output device you need to use MediaObject
and be able to set the URL before calling play(). Note that
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 5
doesn't make a difference: the application should be idle between the
load and play calls so that the backend can start preloading the
media and fill audio buffers.
*/
/*!
\fn void Phonon::VideoPlayer::play()
Continues playback of paused media. Restarts playback of a stopped
(or newly loaded) media.
\sa MediaObject::play(), play()
*/
/*!
\fn void Phonon::VideoPlayer::pause()
Pauses the playback.
\sa MediaObject::pause()
*/
/*!
\fn void Phonon::VideoPlayer::stop()
Stops the playback.
\sa MediaObject::stop()
*/
/*!
\fn void Phonon::VideoPlayer::seek(qint64 ms)
Seeks to the requested time. Note that the backend is free to
ignore the seek request if the media source isn't seekable; you
can check this by asking the media object of the VideoPlayer.
\snippet doc/src/snippets/videomedia.cpp 0
The \a ms parameter is the time in milliseconds from the start of
the media.
The call is asynchronous, so currentTime() can still be the old
value right after this method was called. If all you need is a
slider that shows the current position and allows the user to
seek, use the class SeekSlider.
\sa MediaObject::seek(), MediaObject::isSeekable(), mediaObject()
*/
/*!
\fn void Phonon::VideoPlayer::setVolume(float volume)
Sets the \a volume of the output as voltage factor.
1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
*/
/*!
\fn MediaObject *Phonon::VideoPlayer::mediaObject() const
Returns the media object being used by the player.
The media object can be accessed directly instead of using the
\l{VideoPlayer}s convenience functions, e.g., play() and stop().
It is also possible to give the object to other Phonon widgets,
e.g., a \l{Phonon::}{SeekSlider} or a \l{Phonon::}{VolumeSlider}.
\sa Phonon::SeekSlider, Phonon::MediaObject
*/
/*!
\fn AudioOutput *Phonon::VideoPlayer::audioOutput() const
Returns the audio output object being used by the player.
*/
/*!
\fn VideoWidget *Phonon::VideoPlayer::videoWidget() const
Returns the video widget being used by the player.
*/
/*!
\fn void Phonon::VideoPlayer::finished()
This signal is emitted when the playback finished.
*/
/*!
\class Phonon::VideoWidgetPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::MediaObject
\inmodule Phonon
\inheaderfile Phonon/MediaObject
\since 4.4
\brief The MediaObject class provides an interface for media playback.
The media object manages a \l{Phonon::}{MediaSource}, which
supplies the media object with multimedia content, e.g., from a
file. A playback in Phonon is always started by calling the
\l{Phonon::MediaObject::}{play()} function.
The state of play (play, pause, stop, seek) is controlled by the
media object, and you can also query the current
\l{Phonon::MediaObject::}{state()}. It keeps track of the playback
position in the media stream, and emits the
\l{Phonon::MediaObject::}{tick()} signal when the current position
in the stream changes.
Notice that most functions of this class are asynchronous, so you
cannot rely on that a state is entered after a function call
before you receive the \l{Phonon::MediaObject::}{stateChanged()}
signal. The description of the \l{Phonon::}{State} enum gives a
description of the different states.
Before play() is called, the media object should be connected to
\l{Sinks}{output nodes}, which outputs the media to the
underlying hardware. The output nodes required are dependent on
the contents of the multimedia file that is played back. Phonon
has currently two output nodes: the \l{Phonon::}{AudioOutput} for
audio content and \l{Phonon::}{VideoWidget} for video content. If
a \l{Phonon::}{MediaSource} contains both audio and video, both
nodes need to be connected to the media object.
\snippet snippets/phonon.cpp 4
\snippet snippets/phonon.cpp 5
The media object can queue sources for playback. When it has
finished to play one source, it will start playing the next in the
queue; the new source is then removed from the queue. The
queue can be altered at any time.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 7
You can also make use of the
\l{Phonon::MediaObject::}{aboutToFinish()} signal, which is
guaranteed to be emitted in time for altering the queue.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 8
When playback is finishing, i.e., when a media source has been
played to the end and the queue is empty, several signals are
emitted. First, the media object will emit aboutToFinish() -
shortly before the playback has finished - and then finished().
The stateChanged() signal will also be emitted with
\l{Phonon::}{PausedState}, which is the state the media object
takes when the playback is finished. If you wish to enter another
state, you can connect a slot to finished() and set a new state
there.
The media object resolves the meta information, such as title,
artist, and album. The meta data is not resolved immediately after
a new source is provided, but will be resolved before the object
leaves the \l{Phonon::}{LoadingState}. The data is queried by
string keys - which should follow the Ogg Vorbis specification
\l http://xiph.org/vorbis/doc/v-comment.html - or by using the
\l{Phonon::}{MetaData} enum. The data available will depend on the
type and content of the individual media files. metaDataChanged()
will be emitted when the media object has resolved new meta data.
Errors encountered during playback and loading of media sources
are reported by emitting a state changed signal with
\l{Phonon::}{ErrorState}. The severity of the error can be queried
by the \l{Phonon::}{ErrorType}. With a \l{Phonon::}{NormalError},
it might be possible to continue the playback, for instance, if
only audio playback fails for a media source which also has video.
A \l{Phonon::}{FatalError} indicates that Phonon cannot continue
playback of the current source, but it is possible to try with a
different one. A user readable error message is given by
errorString().
\sa Phonon::MediaSource, Phonon::AudioOutput, VideoWidget,
{Music Player Example}, {Phonon Overview}, Phonon::VideoPlayer,
Phonon::createPlayer(), {Phonon Module}
*/
/*!
\property Phonon::MediaObject::transitionTime
\brief Defines the time between playback of two media sources
in the media queue.
A positive transition time defines a gap of silence between queued
media sources.
A transition time of 0 ms requests gapless playback (i.e., the
next source in the media queue starts immediately after the
playback of the current source finishes).
A negative transition time defines a crossfade between the queued
media sources.
Defaults to 0 (gapless playback).
\warning This feature might not work reliably with every
backend.
*/
/*!
\property Phonon::MediaObject::prefinishMark
\brief the time when the prefinishMarkReached signal is emitted before playback ends.
This property specifies the time in milliseconds the
prefinishMarkReached() signal is emitted before the playback
finishes. A value of \c 0 disables the signal. The signal is only
emitted for the last source in the \l{queue()}{media queue}.
Defaults to \c 0 (disabled).
\warning For some media data the total time cannot be determined
accurately, therefore the accuracy of the prefinishMarkReached signal
can be bad sometimes. Still, it is better to use this method than to
look at totalTime() and currentTime() to emulate the behavior
because the backend might have more information available than your
application does through totalTime() and currentTime().
\sa prefinishMarkReached()
*/
/*!
\property Phonon::MediaObject::tickInterval
\brief The time interval in milliseconds between two ticks.
The tick() signal is emitted continuously during playback.
The tick interval is the time that elapses between the emission of two tick signals.
If you set the interval to \c 0 the tick signal gets disabled.
The tick() signal can, for instance, be used to update widgets
that show the current position in the playback of a media source.
Defaults to \c 0 (disabled).
\warning The back-end is free to choose a different tick interval close
to what you asked for. This means that the following code \c may fail:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 9
On the other hand the following is guaranteed:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 10
\sa tick()
*/
/*!
\fn Phonon::MediaObject::~MediaObject()
Destroys the MediaObject.
*/
/*!
\fn State Phonon::MediaObject::state() const
Returns the current Phonon::State of the object.
\sa Phonon::State, stateChanged()
*/
/*!
\fn bool Phonon::MediaObject::hasVideo() const
Check whether the current media source includes a video stream.
\warning This information is not resolved immediately after a
media object gets a new source. Listen to the hasVideoChanged()
signal instead.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 11
Returns \c true if the media contains video data; otherwise,
returns \c false.
\sa hasVideoChanged()
*/
/*!
\fn bool Phonon::MediaObject::isSeekable() const
Check whether it is possible to seek, i.e., change the
playback position in the media stream.
\warning This information is not solved immediately after the
media object gets a new media source. The hasVideoChanged() signal
is emitted after this information is available.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 12
Returns \c true if the current media may be seeked; otherwise,
returns \c false.
\sa seekableChanged()
*/
/*!
\fn QStringList Phonon::MediaObject::metaData(const QString &key) const
Returns the strings associated with the given \a key.
Backends should use the keys specified in the Ogg Vorbis
documentation: \l http://xiph.org/vorbis/doc/v-comment.html
Therefore the following should work with every backend:
Note that meta data is not resolved before the \c
metaDataChanged() signal is emitted.
A typical usage looks like this:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 13
*/
/*!
\fn QStringList Phonon::MediaObject::metaData(Phonon::MetaData key) const
Returns the strings associated with the given \a key.
Same as above except that the keys are defined in the
Phonon::MetaData enum.
\sa metaDataChanged()
*/
/*!
\fn QMultiMap<QString, QString> Phonon::MediaObject::metaData() const
Returns all meta data in a multi map.
\sa metaDataChanged()
*/
/*!
\fn QString Phonon::MediaObject::errorString() const
Returns a human-readable description of the last error that occurred.
The strings given may vary between backends.
The error description can be used to give a message to the user -
and the developer - when the stateChanged() signal is emitted with
\l{Phonon::}{ErrorState}.
\section1 Qt Backends
On Windows, Qt fetches its error messages from the DirectShow
backend. This usually includes an error number, which can be
looked up in the DirectShow documentation:
\l{http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/htm/errorandsuccesscodes.asp}.
On Linux and Mac, the error strings are not fetched directly from
the backend, but are created in the backend.
\sa Phonon::ErrorState, stateChanged()
*/
/*!
\fn ErrorType Phonon::MediaObject::errorType() const
Tells your program what to do about the last error that occurred.
Use this function after receiving a stateChanged() signal with
\l{Phonon::}{ErrorState}.
\sa Phonon::ErrorType, Phonon::ErrorState, stateChanged()
*/
/*!
\fn MediaSource Phonon::MediaObject::currentSource() const
Returns the current media source, i.e., the media source that is
being played back. The current source is either set with
setCurrentSource() or taken from the media queue() when a media
source has finished playing.
\sa setCurrentSource()
*/
/*!
\fn void Phonon::MediaObject::setCurrentSource(const MediaSource &source)
Set the media source the MediaObject should use.
After the media object receives a new source, it will enter the
\l{Phonon::}{LoadingState}. When it is ready to play, it
enters the \l{Phonon::}{StoppedState} unless another state
has been requested, e.g., by calling play().
\a source is the MediaSource object to the media data. You can
just as well use a QUrl or QString (for a local file) here.
We show an example:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 14
\sa currentSource(), MediaSource
*/
/*!
\fn QList<MediaSource> Phonon::MediaObject::queue() const
Returns the queued media sources.
This does list does not include the current source,
returned by currentSource().
\sa enqueue()
*/
/*!
\fn void Phonon::MediaObject::setQueue(const QList<MediaSource> &sources)
Set the \a sources to play when the current source has finished.
This function will overwrite the current queue.
\sa clearQueue(), enqueue()
*/
/*!
\fn void Phonon::MediaObject::setQueue(const QList<QUrl> &urls)
Set the \a urls to play when the current media has finished.
This function overwrites the current queue.
\sa clearQueue(), enqueue()
*/
/*!
\fn void Phonon::MediaObject::enqueue(const MediaSource &source)
Appends \a source to the queue.
You can use this function to provide the next source after the
aboutToFinish() signal has been emitted.
\sa aboutToFinish(), setQueue(), clearQueue()
*/
/*!
\fn void Phonon::MediaObject::enqueue(const QList<MediaSource> &sources)
Appends multiple \a sources to the queue.
\sa setQueue(), clearQueue()
*/
/*!
\fn void Phonon::MediaObject::enqueue(const QList<QUrl> &urls)
Appends the URLs in \a urls to the media source queue.
The function will create \l{MediaSource}s from the \l{QUrl}s, and
append these to the queue.
\sa setQueue(), clearQueue()
*/
/*!
\fn void Phonon::MediaObject::clearQueue()
Clears the queue of media sources.
\sa queue(), enqueue()
*/
/*!
\fn qint64 Phonon::MediaObject::currentTime() const
Returns the current time (in milliseconds), i.e., position in the
media stream, of the file currently being played.
\sa tick(), totalTime(), remainingTime()
*/
/*!
\fn qint64 Phonon::MediaObject::totalTime() const
Get the total time (in milliseconds) of the file currently being played.
Returns the total time in milliseconds.
\warning The total time is not defined before the media object
enters the \l{Phonon::}{LoadingState}.
\sa totalTimeChanged()
*/
/*!
\fn qint64 Phonon::MediaObject::remainingTime() const
Get the remaining time (in milliseconds) of the file currently being played.
Returns the remaining time in milliseconds.
\sa totalTime(), currentTime(), totalTimeChanged()
*/
/*!
\fn void Phonon::MediaObject::play()
Requests playback of the media data to start.
Playback starts when the stateChanged() signal is emitted with
\l{Phonon::}{PlayingState}.
If the media object is already in a
\l{Phonon::}{PlayingState}, nothing happens.
\sa stop(), pause(), stateChanged()
*/
/*!
\fn void Phonon::MediaObject::pause()
Requests playback to pause, and the media object to enter the
\l{Phonon::}{PausedState}. If it was paused already, nothing
changes.
This function is asynchronous and the media might not be paused
immediately.
\sa play(), stop(), stateChanged()
*/
/*!
\fn void Phonon::MediaObject::stop()
Requests playback to stop, and the media object to enter the
\l{Phonon::}{StoppedState}. If it was stopped before
nothing changes.
This function is asynchronous and the media might not be
stopped immediately.
\sa play(), pause(), stateChanged()
*/
/*!
\fn void Phonon::MediaObject::seek(qint64 time)
Requests a seek to the \a time indicated, specified in milliseconds.
You can only seek if state() is PlayingState, BufferingState or PausedState.
The call is asynchronous, so currentTime can still be the old
value right after this method was called. If all you need is a
slider that shows the current position and allows the user to
seek, use the class SeekSlider.
If the current source of the media object is not seekable, calls
to this functions do nothing.
\sa SeekSlider, tick()
*/
/*!
\fn void Phonon::MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate)
This signal is emitted when the state of the MediaObject has changed.
The \a oldstate and \a newstate parameters indicate the previous
state and current state of the media object.
If you are only interested in the new state of the media object, you can
connect this signal to a slot that accepts only one State argument.
*/
/*!
\fn void Phonon::MediaObject::tick(qint64 time)
This signal is emitted in intervals defined by the
\l{tickInterval} property. The current position of the media
object in the stream is given by the \a time parameter. The \a
time is specified in milliseconds.
\sa tickInterval
*/
/*!
\fn void Phonon::MediaObject::metaDataChanged()
This signal is emitted when the media object has resolved new meta
data. This will happen before the media object leaves the
\l{Phonon::}{LoadingState} after a new source has been set.
This signal is not emitted when the media object removes the
current data, i.e., when a new source is set or an error has
occurred. If you need to know this, you can listen for the
\l{Phonon::}{ErrorState}, and connect to the
\l{Phonon::MediaObject::}{currentSourceChanged()} signal.
You can get the new meta data with the metaData methods.
\sa metaData(), currentSourceChanged(), stateChanged(), Phonon::State
*/
/*!
\fn void Phonon::MediaObject::seekableChanged(bool isSeekable)
This signal is emitted when the media object's ability to seek in
the media stream changes. \a isSeekable is true if it is possible
to seek(); otherwise, it is false.
Change in the ability to seek in the stream usually happens when
the current source changes or when an error occurs.
\omit Emitted whenever the return value of isSeekable()
changes. \endomit
Normally you'll check isSeekable() after setting a new media
source, and then let this signal tell you when seeking is
possible. That way you don't have to poll isSeekable().
*/
/*!
\fn void Phonon::MediaObject::hasVideoChanged(bool hasVideo)
Emitted whenever the return value of hasVideo() changes, i.e.,
the media source being played back contains video.
Normally you'll check hasVideo() first and then let this signal
tell you whether video is available now or not. That way you
don't have to poll hasVideo().
\a hasVideo is true when the stream contains video and adding a
VideoWidget will show a video, and false if there is no video data
in the stream and adding a VideoWidget will show an empty (black)
VideoWidget.
*/
/*!
\fn void Phonon::MediaObject::bufferStatus(int percentFilled)
Provides information about the status of the buffer.
When a MediaObject is in the \l{Phonon::}{BufferingState}, it will
send this signal regularly. \a percentFilled is a number between 0
and 100 telling you how much the buffer is filled.
You can use this signal to show a progress bar to the user when
in BufferingState:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 15
Note that the \l{Phonon::}{BufferingState} is commonly used when
waiting for data over a network connection, but this might not be
true for all backends.
*/
/*!
\fn void Phonon::MediaObject::finished()
Emitted when the object has finished playback. It is not emitted
if you call stop(), pause() or load(). It is emitted only when the
current media source has finished playing and the media queue() is
empty, or when a \l{Phonon::FatalError}{fatal error} occurs.
\warning This signal is not emitted when the current source has
finished and there's another source in the queue. It is only
emitted when the queue is empty.
\sa currentSourceChanged(), aboutToFinish(), prefinishMarkReached()
*/
/*!
\fn void Phonon::MediaObject::currentSourceChanged(const Phonon::MediaSource &newSource)
Emitted when the MediaObject fetches a new MediaSource from the
queue() and before it enters the \l{Phonon::}{LoadingState} for
the new source. The media object will take a new source from the
queue() when it has finished the playback of the
\l{currentSource()}{current source}.
\a newSource is the source that starts to play at the time the
signal is emitted.
*/
/*!
\fn void Phonon::MediaObject::aboutToFinish()
Emitted before the playback of the whole queue ends. When this
signal is emitted you still have time to enqueue() a new
MediaSource, so that playback continues.
If you need a signal to be emitted at a specific time before
playback is finished, you should use the prefinishMarkReached()
signal instead.
\sa enqueue(), prefinishMark, prefinishMarkReached()
*/
/*!
\fn void Phonon::MediaObject::prefinishMarkReached(qint32 msecToEnd)
Emitted when there are only \a msecToEnd milliseconds left
of playback.
\warning This signal is not emitted when there is another source
in the queue. It is only emitted when the queue is empty.
\sa setPrefinishMark(), prefinishMark(), aboutToFinish(), finished()
*/
/*!
\fn void Phonon::MediaObject::totalTimeChanged(qint64 newTotalTime)
This signal is emitted as soon as the total time of the media file is
known or has changed. For most non-local media data the total
time of the media can only be known after some time. At that time the
totalTime function can not return useful information. You have
to wait for this signal to know the real total time.
\a newTotalTime is the length of the media file in milliseconds.
\sa totalTime()
*/
/*!
\fn MediaObject *Phonon::createPlayer(Phonon::Category category, const MediaSource &source = MediaSource())
Convenience function to create a MediaObject and AudioOutput
connected by a path. The \l{Phonon::}{MediaObject} return will
have \a source set as its current source and the specified \a
category.
*/
/*!
\class Phonon::MediaObjectPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\namespace Phonon::BackendCapabilities
\inmodule Phonon
\since 4.4
\brief The BackendCapabilities namespace contains functions to describe the capabilities of the multimedia backend.
*/
/*!
\class Phonon::BackendCapabilitiesPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::BackendCapabilities::Notifier
\since 4.4
\inmodule Phonon
\inheaderfile Phonon/BackendCapabilities
Notifications about backend capabilities.
*/
/*!
\fn void Phonon::BackendCapabilities::Notifier::capabilitiesChanged()
This signal is emitted if the capabilities have changed. This can
happen if the user has requested a backend change.
*/
/*!
\fn void Phonon::BackendCapabilities::Notifier::availableAudioOutputDevicesChanged()
This signal is emitted when audio output devices were plugged or
unplugged.
Check BackendCapabilities::availableAudioOutputDevices to get the
current list of available devices.
*/
/*!
\fn Notifier *Phonon::BackendCapabilities::notifier()
Use this function to get a QObject pointer to connect to the capabilitiesChanged signal.
\return a pointer to a QObject.
The capabilitiesChanged signal is emitted if the capabilities have changed. This can
happen if the user has requested a backend change.
To connect to this signal do the following:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 16
\sa Notifier::capabilitiesChanged()
*/
/*!
\fn QStringList Phonon::BackendCapabilities::availableMimeTypes()
Returns a list of mime types that the Backend can decode.
\sa isMimeTypeAvailable()
*/
/*!
\fn bool Phonon::BackendCapabilities::isMimeTypeAvailable(const QString &mimeType)
Often all you want to know is whether one given MIME type can be
decoded by the backend. Use this method in favor of
availableMimeTypes() as it can give you a negative answer without
having a backend loaded.
Returns true if the given \a mimeType is supported by the backend;
otherwise, returns false.
\sa availableMimeTypes()
*/
/*!
\fn QList<AudioOutputDevice> Phonon::BackendCapabilities::availableAudioOutputDevices()
Returns the audio output devices the backend supports.
\return A list of AudioOutputDevice objects that give a name and
description for every supported audio output device.
*/
/*!
\fn QList<EffectDescription> Phonon::BackendCapabilities::availableAudioEffects()
Returns descriptions for the audio effects the backend supports.
\return A list of AudioEffectDescription objects that give a name and
description for every supported audio effect.
*/
/*!
\internal
\class ObjectDescriptionModelData
\internal
\inmodule Phonon
\brief Data class for models for ObjectDescription objects.
*/
/*!
\typedef Phonon::EffectDescription
\relates Phonon::ObjectDescription
EffectDescription gives a description of an \l{Processors}{audio
effect}. It is a typedef of the \l{Phonon::}{ObjectDescription}
class. Please see its class description for details.
EffectDescription is used to create audio \l{Phonon::}{Effect}s,
which can be inserted into a media graph, altering an audio
stream.
\sa Phonon::ObjectDescription, {Capabilities Example}, {Media
Player}
*/
/*!
\class Phonon::ObjectDescriptionModel
\inmodule Phonon
\internal
\since 4.4
\brief The ObjectDescriptionModel class provides a model from
a list of ObjectDescription objects.
ObjectDescriptionModel is a read only model that supplies a list
using ObjectDescription::name() for the text and
ObjectDescription::description() for the tooltip. If set the properties
"icon" and "available" are used to set the decoration and disable the
item (disabled only visually, you can still select and drag it).
It also provides the methods moveUp() and moveDown() to order the list.
Additionally drag and drop is possible so that
QAbstractItemView::InternalMove can be used.
The resulting order of the ObjectDescription::index() values can then be
retrieved using tupleIndexOrder().
An example use case would be to give the user a QComboBox to select
the output device:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 17
And to retrieve the selected AudioOutputDevice:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 18
*/
/*!
\fn inline int Phonon::ObjectDescriptionModel::rowCount(const QModelIndex &parent = QModelIndex()) const
Returns the number of rows in the model. This value corresponds
to the size of the list passed through setModelData.
\param parent The optional \a parent argument is used in most models to specify
the parent of the rows to be counted. Because this is a list if a
valid parent is specified the result will always be 0.
Reimplemented from QAbstractItemModel.
\sa QAbstractItemModel::rowCount()
*/
/*!
\fn inline QVariant Phonon::ObjectDescriptionModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const
Returns data from the item with the given \a index for the specified
\a role.
If the view requests an invalid index, an invalid variant is
returned.
Reimplemented from QAbstractItemModel.
\sa QAbstractItemModel::data(), Qt::ItemDataRole
*/
/*!
\fn inline Qt::ItemFlags Phonon::ObjectDescriptionModel::flags(const QModelIndex &index) const
\internal
Reimplemented to show unavailable devices as disabled (but still
selectable). The \a index of the model index for which to return
flags.
*/
/*!
\fn inline QList<int> Phonon::ObjectDescriptionModel::tupleIndexOrder() const
Returns a list of indexes in the same order as they are in the
model. The indexes come from the ObjectDescription::index
method.
This is useful to let the user define a list of preference.
*/
/*!
\fn inline int Phonon::ObjectDescriptionModel::tupleIndexAtPositionIndex(int positionIndex) const
Returns the ObjectDescription::index for the tuple
at the given position \a positionIndex. For example a
QComboBox will give you the currentIndex as the
position in the list. But to select the according
AudioOutputDevice using AudioOutputDevice::fromIndex
you can use this method.
\param positionIndex The position in the list.
*/
/*!
\class Phonon::ObjectDescriptionModelDataPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn inline QMimeData *Phonon::ObjectDescriptionModel::mimeData(const QModelIndexList &indexes) const
\internal
Returns the MIME data that dropMimeData() can use to create new
items.
*/
/*!
\fn inline void Phonon::ObjectDescriptionModel::moveUp(const QModelIndex &index)
Moves the item at the given \a index up. In the resulting list
the items at index.row() and index.row() - 1 are swapped.
Connected views are updated automatically.
*/
/*!
\fn inline void Phonon::ObjectDescriptionModel::moveDown(const QModelIndex &index)
Moves the item at the given \a index down. In the resulting list
the items at index.row() and index.row() + 1 are swapped.
Connected views are updated automatically.
*/
/*!
\fn explicit inline Phonon::ObjectDescriptionModel::ObjectDescriptionModel(QObject *parent = 0)
Constructs a ObjectDescription model with the
given \a parent.
*/
/*!
\fn explicit inline Phonon::ObjectDescriptionModel::ObjectDescriptionModel(const QList<ObjectDescription<type> > &data, QObject *parent = 0)
Constructs a ObjectDescription model with the
given \a parent and the given \a data.
*/
/*!
\fn inline void Phonon::ObjectDescriptionModel::setModelData(const QList<ObjectDescription<type> > &data)
Sets the model data using the list provided by \a data.
All previous model data is cleared.
*/
/*!
\fn inline QList<ObjectDescription<type> > Phonon::ObjectDescriptionModel::modelData() const
Returns the model data.
As the order of the list might have changed this can be different
to what was set using setModelData().
*/
/*!
\fn inline ObjectDescription<type> Phonon::ObjectDescriptionModel::modelData(const QModelIndex &index) const
Returns one ObjectDescription of the model data for the given \a index.
*/
/*!
\fn inline Qt::DropActions Phonon::ObjectDescriptionModel::supportedDropActions() const
This model supports drag and drop to copy or move
items.
*/
/*!
\fn inline bool Phonon::ObjectDescriptionModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Accept drops from other models of the same ObjectDescriptionType.
The \a data is dropped at the given \a row and \a column; you
also receive the \a parent model index.
If a valid \a parent is given the dropped items will be inserted
above that item.
*/
/*!
\fn inline bool Phonon::ObjectDescriptionModel::removeRows(int row, int count, const QModelIndex &parent = QModelIndex())
Removes count rows starting with the given row.
If a valid \a parent is given no rows are removed since this is a
list model.
Returns true if the rows were successfully removed; otherwise returns false.
*/
/*!
\fn inline QStringList Phonon::ObjectDescriptionModel::mimeTypes() const
Returns a list of supported drag and drop MIME types. Currently
it only supports one type used internally.
*/
/*!
\class Phonon::EffectInterface
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::Effect
\inmodule Phonon
\inheaderfile Phonon/Effect
\since 4.4
\brief The Effect class is used to transform audio streams.
An effect is a media node which is inserted into a path between a
\l{Phonon::}{MediaObject} and an audio output node, for instance,
an \l{Phonon::}{AudioOutput}. The Effect transforms the media
stream on that path.
Examples may include simple modifiers, such as fading or pitch
shifting, and more complex mathematical transformations. You can
query the backend for available effects with
BackendCapabilities::availableAudioEffects(). Note that the
effects available is dependent on the underlying system
(DirectDraw, GStreamer, or QuickTime).
In order to use an effect, insert it into the path as follows:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 19
The effect will immediately begin applying it's transformations on
the path. To stop it, remove the Effect from the path.
To create an effect, you use the \l{Phonon::}{EffectDescription}
class, which you get from
\l{BackendCapabilities::}{availableAudioEffects()}. We give a code
example below.
\snippet doc/src/snippets/audioeffects.cpp 0
An effect can have one or more parameters, which let you alter how
the effect works, for instance, by specifying the depth of a
reverb effect. See the EffectParameter class description for
details.
Phonon also provides EffectWidget, which lets the user modify the
parameters of an effect an the fly; e.g., with combo boxes.
\sa {Phonon Module}, EffectWidget
*/
/*!
\fn explicit Phonon::Effect::Effect(const EffectDescription &description, QObject *parent = 0)
Constructs a new effect object with the given \a description and \a parent object.
The EffectDescription object determines the type of the effect.
\sa {Phonon::BackendCapabilities::availableAudioEffects()}
*/
/*!
\fn Phonon::Effect::Effect(EffectPrivate &dd, QObject *parent)
\internal
*/
/*!
\fn Phonon::Effect::~Effect()
\internal
*/
/*!
\fn QVariant Phonon::Effect::parameterValue(const EffectParameter ¶meter) const
Returns the value of the given effect \a parameter. You can fetch
the available parameters for an effect with parameters().
\sa setParameterValue(), EffectParameter
*/
/*!
\fn void Phonon::Effect::setParameterValue(const EffectParameter ¶meter, const QVariant &value)
Sets the given effect \a parameter to the specified \a value.
Parameters for an effect are returned by parameters(). You can
check which QVariant::Type an EffectParameter takes with the
EffectParameter::type() function.
\sa parameterValue(), EffectParameter
*/
/*!
\fn EffectDescription Phonon::Effect::description() const;
Returns the description of this effect. This is the same
description that was passed to the constructor.
*/
/*!
\fn QList<EffectParameter> Phonon::Effect::parameters() const;
Returns a list of parameters that this effect provides to control
its behavior.
\sa EffectParameter, EffectWidget
*/
/*!
\class Phonon::EffectPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::AudioOutput
\inmodule Phonon
\inheaderfile Phonon/AudioOutput
\since 4.4
\brief The AudioOutput class is used to send data to audio output devices.
The AudioOutput class plays sound over a sound device. The audio
output needs to be connected to a \l{Phonon::}{MediaObject} using
\l{Phonon::}{createPath()}. To start playback, you call
\l{Phonon::MediaObject::}{play()} on the media object.
\snippet snippets/phonon.cpp 2
The class supports changing the volume(). It is also possible to
mute the sound.
To find out what \l{Phonon::}{AudioOutputDevice}s are available
for AudioOutput, you can call
BackendCapabilities::availableAudioOutputDevices(). A default device is
selected by the backend, but it is possible to set the device to
be used with setOutputDevice(). The outputDeviceChanged() signal
will be emitted if the device changes.
If an error occurs with the playback, for instance, if no valid
output device is found, the media object will receive a
stateChanged() signal with the \l{Phonon::}{ErrorState}.
Note that the default values of properties are dependent on the
backend.
\sa Phonon::VolumeSlider, {Music Player Example}, BackendCapabilities, {Phonon Module}
*/
/*!
\property Phonon::AudioOutput::name
This is the name that appears in Mixer applications that control
the volume of this output.
*/
/*!
\property Phonon::AudioOutput::volume
This is the current loudness of the output. \omit The volume is a
real value between 0.0 (minimum) and 1.0 (maximum). The volume
follows the sound device used, with 1.0 being the maximum volume
the device can produce. \endomit
(it is using Stevens' law
to calculate the change in voltage internally).
\sa volumeDecibel
*/
/*!
\property Phonon::AudioOutput::volumeDecibel
This is the current volume of the output in decibel.
0 dB means no change in volume, -6dB means an attenuation of the
voltage to 50% and an attenuation of the power to 25%, -inf dB means
silence.
\sa volume
*/
/*!
\property Phonon::AudioOutput::outputDevice
This property holds the (hardware) destination for the output.
The default device is determined by the \l{Phonon::}{Category} and the global
configuration for that category. Normally you don't need
to override this setting - letting the user change the global
configuration is the right choice. You can still override the
device though, if you have good reasons to do so.
\sa outputDeviceChanged()
*/
/*!
\property Phonon::AudioOutput::muted
This property tells whether the output is muted.
Muting the output has the same effect as calling setVolume(0.0).
*/
/*!
\fn explicit Phonon::AudioOutput::AudioOutput(Phonon::Category category, QObject *parent = 0)
Creates a new AudioOutput with the given \a parent that defines
output to a physical device.
The \a category can be used by mixer applications to group volume
controls of applications into categories. That makes it easier for
the user to identify the programs.
The category is also used for the default output device that is
configured centrally. As an example: often users want to have the
audio signal of a VoIP application go to their USB headset while
all other sounds should go to the internal soundcard.
\sa Phonon::categoryToString(), outputDevice
*/
/*!
\fn explicit Phonon::AudioOutput::AudioOutput(QObject *parent = 0)
Creates a new AudioOutput that defines output to the system
default device with the \{Phonon::Category::}{NoCategory} category
\sa Phonon::categoryToString(), outputDevice
*/
/*!
\fn Phonon::Category Phonon::AudioOutput::category() const
Returns the category of this output.
\sa Phonon::AudioOutput::AudioOutput()
*/
/*!
\fn void Phonon::AudioOutput::volumeChanged(qreal newVolume)
This signal is emitted whenever the volume has changed. As the
volume can change without a call to setVolume (calls over dbus)
this is important to keep a widget showing the current volume up
to date.
\a newVolume is the new volume level.
\sa setVolume(), volume()
*/
/*!
\fn void Phonon::AudioOutput::mutedChanged(bool muted)
This signal is emitted when the muted property has changed. The \a muted
value passed by the signal indicates the state of the muted property.
As this property can change by IPC (DBus) calls a UI element showing
the muted property should listen to this signal.
*/
/*!
\fn void Phonon::AudioOutput::outputDeviceChanged(const Phonon::AudioOutputDevice &newAudioOutputDevice)
This signal is emitted when the (hardware) device for the output
has changed. \a newAudioOutputDevice is the new device.
The change can happen either through setOutputDevice or if the
global configuration for the used category has changed.
\sa outputDevice
*/
/*!
\class Phonon::AudioOutputPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::EffectParameter
\inmodule Phonon
\inheaderfile Phonon/EffectParameter
\since 4.4
\brief The EffectParameter class describes one parameter of an effect.
You fetch the parameters of an \l{Phonon::}{Effect} with
\l{Phonon::}{Effect::parameters()}.
\snippet doc/src/snippets/phononeffectparameter.cpp 0
To describe itself, an effect parameter gives a name() and
possibly description() (depending on the backend used). These are
suited to present the effect parameter to the user of a Phonon
application.
Note that effects are created by the backend, and that
their name and descriptions may vary.
The value of an effect parameter is stored in a \l{QVariant},
of which type() is usually \c int or \c double.
The value is retrieved with \l{Phonon::}{Effect::parameterValue()}
and set with \l{Phonon::Effect::}{setParameterValue()} - both of
which takes the EffectParameter as argument. Note that not all
effect parameters support setting of their value.
You get the values a parameter can take with possibleValues(); an
empty list is returned if the values are continuous.
A parameter may also specify default(), minimum(), and maximum()
values. Values are returned as \l{QVariant}s. If the parameter
does not have the requested value, an \l{QVariant::Invalid}
invalid QVariant is returned from these functions.
The \l{Phonon::}{EffectWidget} provides a widget with which one
can control the parameters of an \l{Phonon::}{Effect}.
\snippet doc/src/snippets/phononeffectparameter.cpp 1
\sa Effect, EffectWidget, {Capabilities Example}, {Phonon Module}
*/
/*!
\fn Phonon::EffectParameter::EffectParameter()
\internal
Creates an invalid effect parameter.
*/
/*!
\fn Phonon::EffectParameter::~EffectParameter()
Destroys the effect parameter.
*/
/*!
\fn Phonon::EffectParameter::EffectParameter(const EffectParameter &other)
Constructs a copy of the \a other effect parameter.
*/
/*!
\fn const QString &Phonon::EffectParameter::name() const
The name of the parameter. Can be used as the label.
\return A label for the parameter.
*/
/*!
\fn const QString &Phonon::EffectParameter::description() const
The parameter may come with a description (LADSPA doesn't have a
field for this, so don't expect many effects to provide a
description).
The description can be used for a tooltip or WhatsThis help.
\return A text describing the parameter.
*/
/*!
\fn QVariant::Type Phonon::EffectParameter::type() const
Returns the parameter type.
Common types are QVariant::Int, QVariant::Double, QVariant::Bool and QVariant::String. When
QVariant::String is returned you get the possible values from possibleValues.
*/
/*!
\fn bool Phonon::EffectParameter::isLogarithmicControl() const
Returns whether the parameter should be
displayed using a logarithmic scale. This is particularly useful for
frequencies and gains.
*/
/*!
\fn QVariant Phonon::EffectParameter::minimumValue() const
The minimum value to be used for the control to edit the parameter.
If the returned QVariant is invalid the value is not bounded from
below.
*/
/*!
\fn QVariant Phonon::EffectParameter::maximumValue() const
The maximum value to be used for the control to edit the parameter.
If the returned QVariant is invalid the value is not bounded from
above.
*/
/*!
\fn QVariant Phonon::EffectParameter::defaultValue() const
The default value.
*/
/*!
\fn QVariantList Phonon::EffectParameter::possibleValues() const
The possible values to be used for the control to edit the parameter.
if the value of this parameter is to be picked from predefined values
this returns the list (otherwise it returns an empty QVariantList).
*/
/*!
\fn bool Phonon::EffectParameter::operator<(const EffectParameter &rhs) const
\internal
compares the ids of the parameters
*/
/*!
\fn bool Phonon::EffectParameter::operator>(const EffectParameter &rhs) const
\internal
compares the ids of the parameters
*/
/*!
\fn bool Phonon::EffectParameter::operator==(const EffectParameter &rhs) const
\internal
compares the ids of the parameters
*/
/*!
\fn Phonon::EffectParameter &Phonon::EffectParameter::operator=(const EffectParameter &other)
Assigns the \a other effect parameter to this parameter and returns
a reference to this parameter.
*/
/*!
\enum Phonon::EffectParameter::Hint
Only for backend developers:
Flags to set the return values of isToggleControl(),
isLogarithmicControl(), isIntegerControl(), isBoundedBelow() and
isBoundedAbove(). The values of the flags correspond to the values
used for LADSPA effects.
\value ToggledHint
If this hint is set it means that
the control has only two states: zero and non-zero
(see isToggleControl()).
\value LogarithmicHint
LADSPA's SAMPLE_RATE hint needs to be translated by the backend
to normal bounds, as the backend knows the sample rate - and the
frontend doesn't (see isLogarithmicControl()).
\value IntegerHint See isIntegerControl().
*/
/*!
\fn Phonon::EffectParameter::EffectParameter(int parameterId,
const QString &name, EffectParameter::Hints hints,
const QVariant &defaultValue, const QVariant &min = QVariant(),
const QVariant &max = QVariant(), const QVariantList &values = QVariantList(),
const QString &description = QString())
Only to be used by backend implementations:
Creates a new effect parameter.
\a parameterId This is a number to uniquely identify the
parameter. The id is used for value() and setValue().
\a name is the name/label for this parameter.
\a hints sets the hints for the type of parameter.
\a defaultValue The value that should be used as a default.
\a min is the minimum value allowed for this parameter. You only
need to set this if the BoundedBelowHint is set.
\a max is the maximum value allowed for this parameter. You only
need to set this if the BoundedAboveHint is set.
The \a values parameter is the values that the effect parameter
can take (only applies if non-continuous)
\a description is a descriptive text for the parameter
(explaining what it controls) to be used as a tooltip or
WhatsThis help.
*/
/*!
\fn int Phonon::EffectParameter::id() const
\internal
Returns the parameter's identifier.
*/
/*!
\class Phonon::AudioOutputInterface40
\inmodule Phonon
\since 4.4
\internal
\brief Interface for AudioOutput objects
*/
/*!
\fn virtual Phonon::AudioOutputInterface40::~AudioOutputInterface40()
\internal
*/
/*!
\fn virtual qreal Phonon::AudioOutputInterface40::volume() const = 0
\internal
*/
/*!
\fn virtual void Phonon::AudioOutputInterface40::setVolume(qreal) = 0
\internal
*/
/*!
\fn virtual int Phonon::AudioOutputInterface40::outputDevice() const = 0
\internal
*/
/*!
\fn virtual bool Phonon::AudioOutputInterface40::setOutputDevice(int) = 0
\internal
*/
/*!
\class Phonon::Path
\inmodule Phonon
\inheaderfile Phonon/Path
\since 4.4
\brief The Path class describes connections between media nodes.
In a \l{Building Graphs}{media graph}, \l{Phonon::}{MediaNode}s
are connected by Paths. The multimedia travels in streams over
these paths.
You create a path between two media nodes using the static
Phonon::createPath() function, which takes two nodes as arguments.
The first argument will send the media stream to the second.
Please refer to the class description of the individual media
nodes and the Phonon \l{Phonon Overview}{overview} to see which
nodes can be connected to each other.
Paths are also used to insert audio \l{Phonon::}{Effect}s between
two media nodes. The effect will then alter the stream on the
path. Notice that \l{Phonon::}{Effect}s also are media nodes, but
that insertEffect() - instead of Phonon::createPath() - is used to
insert them into the media graph.
The following code example shows how to create a path between two
media nodes and insert an effect on that path.
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 20
\sa Phonon::MediaNode, Phonon::MediaObject, Phonon::AudioOutput,
Phonon::VideoWidget, {Phonon Module}
*/
/*!
\fn Phonon::Path::~Path();
Destroys this reference to the Path. If the path was valid the connection is not broken
as both the source and the sink MediaNodes still keep a reference to the Path.
\sa disconnect()
*/
/*!
\fn Phonon::Path::Path();
Creates an invalid path.
You can still make it a valid path by calling reconnect. It is
recommended to use the Phonon::createPath() function to create
paths.
\sa Phonon::createPath(), isValid()
*/
/*!
\fn Phonon::Path::Path(const Path &path);
Constructs a copy of the other \a path specified.
This constructor is fast thanks to explicit sharing.
*/
/*!
\fn bool Phonon::Path::isValid() const;
A path is considered valid if it is connected to two media nodes,
in which case this function returns true. If it is connected to
one or no media nodes, it is consider invalid, and this function
will then return false.
*/
/*!
\fn Effect *Phonon::Path::insertEffect(const EffectDescription &desc, Effect *insertBefore = 0);
Creates and inserts an effect into the path.
You may insert effects of the same class as often as you like,
but if you insert the same object, the call will fail.
\a desc is the EffectDescription object for the effect to be inserted.
If you already inserted an effect you can
tell with \a insertBefore in which order the data gets
processed. If this is \c 0 the effect is appended at the end of
the processing list. If the effect has not been inserted before
the method will do nothing and return \c false.
Returns a pointer to the effect object if it could be inserted
at the specified position. If \c 0 is returned, the effect was not
inserted.
Below is a code example for inserting an effect into a path:
\snippet doc/src/snippets/audioeffects.cpp 0
\sa removeEffect(), effects()
*/
/*!
\fn bool Phonon::Path::insertEffect(Effect *effect, Effect *insertBefore = 0);
Inserts the given \a effect into the path before the effect specified by \a insertBefore
and returns true if successful; otherwise returns false.
If \a insertBefore is zero, the effect is appended to the processing list.
You may insert effects of the same class as often as you like, but if you insert
the same object, the call will fail.
\a effect will be inserted right before \a insertBefore. If
\a insertBefore is \c 0, the effect is appended at the end of the
processing list. If the effect has not been inserted before the
method will do nothing and return \c false.
Returns whether the effect could be inserted at the specified
position. If \c false is returned the effect was not inserted.
\sa removeEffect(), effects()
*/
/*!
\fn bool Phonon::Path::removeEffect(Effect *effect);
Removes the given \a effect from the path and returns true; otherwise returns false.
Removes an \a effect from the path.
If the effect is deleted while it is still connected, the effect will be removed
automatically.
\omit
\param effect The effect to be removed.
\return Returns whether the call was successful. If it returns
\c false the effect could not be found in the path, meaning it
has not been inserted before.
\endomit
\sa insertEffect(), effects()
*/
/*!
\fn QList<Effect *> Phonon::Path::effects() const;
Returns a list of Effect objects that are currently
used as effects. The order in the list determines the order the
signal is sent through the effects.
\return A list with all current effects.
\sa insertEffect(), removeEffect()
*/
/*!
\fn bool Phonon::Path::reconnect(MediaNode *source, MediaNode *sink);
Changes the media nodes the path is connected to by connecting the path
to the \a source and \a sink nodes specified. Returns true if successful;
otherwise returns false.
If unsuccessful, the path remains connected to the same nodes as before.
\sa Phonon::createPath(), {Phonon Overview}
*/
/*!
\fn bool Phonon::Path::disconnect();
Tries to disconnect the path from the MediaNodes it is connected to, returning
true if successful or false if unsuccessful.
If successful, the path is invalidated: isValid() will returns false.
*/
/*!
\fn Path &Phonon::Path::operator=(const Path &p);
Assigns \a p to this Path and returns a reference to this Path.
This operation is fast thanks to explicit sharing.
*/
/*!
\fn bool Phonon::Path::operator==(const Path &p) const;
Returns true if this Path is equal to \a p; otherwise returns false;
*/
/*!
\fn bool Phonon::Path::operator!=(const Path &p) const;
Returns true if this Path is not equal to \a p; otherwise returns false;
*/
/*!
\fn Path Phonon::createPath(MediaNode *source, MediaNode *sink);
\relates Phonon::Path
Creates a new Path connecting the two MediaNodes \a source and \a sink.
The implementation will automatically select the right format and media type. E.g. connecting a
MediaObject and AudioOutput will create a Path object connecting the audio. This might be
represented as PCM or perhaps even AC3 depending on the AudioOutput object.
\param source The MediaNode to connect an output from
\param sink The MediaNode to connect to.
*/
/*!
\class Phonon::PathPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::MediaObjectInterface
\inmodule Phonon
\since 4.4
\internal
\brief Backend interface for media sources.
The backend implementation has to provide two signals, that are not defined
in this interface:
\list
\o \target phonon_MediaObjectInterface_stateChanged
void stateChanged(Phonon::State newstate, Phonon::State oldstate)
Emitted when the state of the MediaObject has changed.
In case you're not interested in the old state you can also
connect to a slot that only has one State argument.
\param newstate The state the Player is in now.
\param oldstate The state the Player was in before.
\o \target phonon_MediaObjectInterface_tick
void tick(qint64 time)
This signal gets emitted every tickInterval milliseconds.
\param time The position of the media file in milliseconds.
\sa setTickInterval()
\sa tickInterval()
\endlist
\sa MediaObject
*/
/*!
\fn virtual Phonon::MediaObjectInterface::~MediaObjectInterface()
\internal
*/
/*!
\fn virtual qint64 Phonon::MediaObjectInterface::remainingTime() const
\internal
*/
/*!
\fn virtual qint32 Phonon::MediaObjectInterface::prefinishMark() const = 0
\internal
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::setPrefinishMark(qint32) = 0
\internal
*/
/*!
\fn virtual qint32 Phonon::MediaObjectInterface::transitionTime() const = 0
\internal
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::setTransitionTime(qint32) = 0
\internal
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::play() = 0
\internal
Requests the playback to start.
This method is only called if the state transition to PlayingState is possible.
The backend should react immediately
by either going into PlayingState or BufferingState if the
former is not possible.
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::pause() = 0
\internal
Requests the playback to pause.
This method is only called if the state transition to PausedState is possible.
The backend should react as fast as possible. Go to PausedState
as soon as playback is paused.
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::stop() = 0
\internal
Requests the playback to be stopped.
This method is only called if the state transition to StoppedState is possible.
The backend should react as fast as possible. Go to StoppedState
as soon as playback is stopped.
A subsequent call to play() will start playback at the beginning of
the media.
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::seek(qint64 milliseconds) = 0
\internal
Requests the playback to be seeked to the given time.
The backend does not have to finish seeking while in this function
(i.e. the backend does not need to block the thread until the seek is
finished; even worse it might lead to deadlocks when using a
ByteStream which gets its data from the thread this function would
block).
As soon as the seek is done the currentTime() function and
the tick() signal will report it.
\param milliseconds The time where playback should seek to in
milliseconds.
*/
/*!
\fn virtual qint32 Phonon::MediaObjectInterface::tickInterval() const = 0
\internal
Return the time interval in milliseconds between two ticks.
Returns the tick interval that it was set to (might not
be the same as you asked for).
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::setTickInterval(qint32 interval) = 0
\internal
Change the interval the tick signal is emitted. Set \a interval to 0 to
disable the signal.
\a interval tick interval in milliseconds
Returns the tick interval that it was set to (might not be the same as you
asked for).
*/
/*!
\fn virtual bool Phonon::MediaObjectInterface::hasVideo() const = 0
\internal
Check whether the media data includes a video stream.
Returns true if the media contains video data.
*/
/*!
\fn virtual bool Phonon::MediaObjectInterface::isSeekable() const = 0
\internal
If the current media may be seeked this function returns true;
otherwise, false.
Returns whether the current media may be seeked.
*/
/*!
\fn virtual qint64 Phonon::MediaObjectInterface::currentTime() const = 0
\internal
Get the current time (in milliseconds) of the file currently being played.
*/
/*!
\fn virtual Phonon::State Phonon::MediaObjectInterface::state() const = 0
\internal
Get the current state.
*/
/*!
\fn virtual QString Phonon::MediaObjectInterface::errorString() const = 0
\internal
A translated string describing the error.
*/
/*!
\fn virtual Phonon::ErrorType Phonon::MediaObjectInterface::errorType() const = 0
\internal
Tells your program what to do about the error.
\sa Phonon::ErrorType
*/
/*!
\fn virtual qint64 Phonon::MediaObjectInterface::totalTime() const = 0
\internal
Returns the total time of the media in milliseconds.
If the total time is not know return -1. Do not block until it is
known, instead emit the totalTimeChanged signal as soon as the total
time is known or changes.
*/
/*!
\fn virtual MediaSource Phonon::MediaObjectInterface::source() const = 0
\internal
Returns the current source.
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::setSource(const MediaSource &) = 0
\internal
Sets the current source. When this function is called the MediaObject is
expected to stop all current activity and start loading the new
source (i.e. go into LoadingState).
It is expected that the
backend now starts preloading the media data, filling the audio
and video buffers and making all media meta data available. It
will also trigger the totalTimeChanged signal.
If the backend does not know how to handle the source it needs to
change state to Phonon::ErrorState. Don't bother about handling KIO
URLs. It is enough to handle AbstractMediaStream sources correctly.
\warning Keep the MediaSource object around as long as the backend
uses the AbstractMediaStream returned by the MediaSource. In case
that no other reference to the MediaSource exists and it is set to
MediaSource::autoDelete, the AbstractMediaStream is deleted when the
last MediaSource ref is deleted.
*/
/*!
\fn virtual void Phonon::MediaObjectInterface::setNextSource(const MediaSource &source) = 0
\internal
Sets the next source to be used for transitions. When a next source
is set playback should continue with the new source. In that case
finished and prefinishMarkReached are not emitted.
\param source The source to transition to (crossfade/gapless/gap). If
\a source is an invalid MediaSource object then the queue is empty
and the playback should stop normally.
\warning Keep the MediaSource object around as long as the backend
uses the AbstractMediaStream returned by the MediaSource. In case
that no other reference to the MediaSource exists and it is set to
MediaSource::autoDelete, the AbstractMediaStream is deleted when the
last MediaSource ref is deleted.
*/
/*!
\class Phonon::EffectWidget effectwidget.h Phonon/EffectWidget
\inmodule Phonon
\inheaderfile Phonon/EffectWidget
\since 4.4
\brief The EffectWidget class provides a widget to control the parameters of an Effect.
The EffectWidget class provides a widget, with which an effects
parameters can be controlled. The widget does not have an API,
and is constructed with the \l{Phonon::}{Effect}, of which
parameters should be controlled.
\snippet doc/src/snippets/audioeffects.cpp 1
The following image shows an example of an effect widget.
\image effectwidget.png
Note that some audio effects do not have parameters, and the
widget will then not \l{QWidget::}{show()} at all.
\sa Effect, BackendCapabilities, EffectDescription, {Phonon Module}
*/
/*!
\class Phonon::AbstractAudioOutput
\inmodule Phonon
\internal
\brief Provides a common base class for all audio outputs.
\sa AudioOutput
*/
/*!
\fn Phonon::AbstractAudioOutput::~AbstractAudioOutput()
\internal
*/
/*!
\class Phonon::AbstractAudioOutputPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class AudioOutputAdaptor
\inmodule Phonon
\brief Provides an adaptor class for interface org.kde.Phonon.AudioOutput
\internal
*/
/*!
\class Phonon::VolumeSlider
\inmodule Phonon
\inheaderfile Phonon/VolumeSlider
\since 4.4
\brief The VolumeSlider widget provides a slider that is used to control the volume of an audio output device.
The slider also displays an icon indicating if the volume of the
\l{Phonon::}{AudioOutput} it is connected to is muted. The icon
can be removed with setMuteVisible().
It is possible to set the \l{maximumVolume}{maximum} value of the
slider. By default, the minimum and maximum values of the slider
are 0.0 (no sound) to 1.0 (the maximum volume the audio output can
produce).
Here follows a code example:
\snippet doc/src/snippets/volumeslider.cpp 0
\omit mention how to change the style of the slider. \endomit
\sa {Phonon Module}
*/
/*!
\property Phonon::VolumeSlider::maximumVolume
This property holds the maximum volume that can be set with this slider.
By default the maximum value is 1.0 (100%).
*/
/*!
\property Phonon::VolumeSlider::orientation
This property holds the orientation of the slider.
The orientation must be Qt::Vertical (the default) or Qt::Horizontal.
*/
/*!
\property Phonon::VolumeSlider::tracking
This property holds whether slider tracking is enabled.
If tracking is enabled (the default), the volume changes
while the slider is being dragged. If tracking is
disabled, the volume changes only when the user
releases the slider.
*/
/*!
\property Phonon::VolumeSlider::pageStep
This property holds the page step.
The larger of two natural steps that a slider provides and
typically corresponds to the user pressing PageUp or PageDown.
Defaults to 5 (5% of the voltage).
*/
/*!
\property Phonon::VolumeSlider::singleStep
This property holds the single step.
The smaller of two natural steps that a slider provides and
typically corresponds to the user pressing an arrow key.
Defaults to 1 (1% of the voltage).
*/
/*!
\property Phonon::VolumeSlider::muteVisible
This property holds whether the mute button/icon next to the slider is visible.
By default the mute button/icon is visible.
*/
/*!
\property Phonon::VolumeSlider::iconSize
\brief the icon size used for the mute button/icon.
The default size is defined by the GUI style.
*/
/*!
\fn explicit Phonon::VolumeSlider::VolumeSlider(QWidget *parent = 0)
Constructs a new volume slider with the given \a parent.
*/
/*!
\fn explicit Phonon::VolumeSlider::VolumeSlider(AudioOutput *output, QWidget *parent = 0)
Constructs a new volume slider with the given \a output object and \a parent.
*/
/*!
\fn Phonon::VolumeSlider::~VolumeSlider()
*/
/*!
\fn AudioOutput *Phonon::VolumeSlider::audioOutput() const
*/
/*!
\fn void Phonon::VolumeSlider::setAudioOutput(Phonon::AudioOutput *output)
Sets the audio output object to be controlled by this slider to the specified
\a output object.
*/
/*!
\class Phonon::VolumeSliderPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::MediaController
\inmodule Phonon
\inheaderfile Phonon/MediaController
\since 4.4
\brief The MediaController class controls optional features of a media file/device.
Some media sources have content that the \l{Phonon::}{MediaObject}
does not provide control over, for instance, chapters in a DVD
file. The functionality the media controller offers is
dependent on the type of media source that is played back.
Commonly, the media controller allows you to:
\list
\o Navigate between \bold chapters.
\o Navigate between \bold titles.
\o Select between \bold angles.
\endlist
The \l{Phonon::MediaController::}{Feature} enum explains these
terms in more detail, and their context in playback of CD and DVD.
The media controller keeps a \l{Phonon::}{MediaObject}, of which
\l{Phonon::MediaObject::currentSource()}{media source} is played
back. You can still call the media object's functions, e.g.,
\l{Phonon::MediaObject::}{stop()}; this is all handled correctly
by the media controller. You have the option of letting the media
controller play all titles of a source in sequence by setting the
\l{autoplayTitles()}{autoplay titles} option.
To start a playback using a media object, you call
\l{Phonon::MediaObject::}{play()} on the media object. To play a
specific title, use setCurrentTitle() and then call
\l{Phonon::MediaObject::}{play()}.
\warning The Phonon::MediaController class is not yet supported by
Qt backends.
\sa {Phonon Module}
*/
/*!
\fn int Phonon::MediaController::availableAudioChannels() const
\internal
*/
/*!
\fn void Phonon::MediaController::availableAudioChannelsChanged()
\internal
*/
/*!
\fn QList<SubtitleDescription> Phonon::MediaController::availableSubtitles() const
\internal
*/
/*!
\fn void Phonon::MediaController::availableSubtitlesChanged()
\internal
*/
/*!
\fn AudioChannelDescription Phonon::MediaController::currentAudioChannel() const
\internal
*/
/*!
\fn SubtitleDescription Phonon::MediaController::currentSubtitle() const
\internal
*/
/*!
\fn void Phonon::MediaController::setCurrentAudioChannel(const Phonon::AudioChannelDescription &stream)
\internal
*/
/*!
\fn void Phonon::MediaController::setCurrentSubtitle(const Phonon::SubtitleDescription &stream)
\internal
*/
/*!
\fn Phonon::BackendCapabilities::availableAudioCaptureDevices()
\internal
*/
/*!
\fn Phonon::BackendCapabilities::Notifier::availableAudioCaptureDevicesChanged()
\internal
*/
/*!
\enum Phonon::MediaController::Feature
The values of this enum are interpreted differently depending on
the type of media source, e.g., DVD or CD. We give examples for
these sources.
\value Angles In the VOB (DVD) format, it is possible to to give
several video streams of the same scene, each of which displays
the scene from a different angle. The DVD viewer can then change
between these angles.
\value Chapters In the VOB format, chapters are points in a
single video stream that can be played and seeked to
separately.
\value Titles On a CD, a title is a separate sound track. On DVD,
a title is a separate VOB file.
*/
/*!
\fn Phonon::MediaController::MediaController(MediaObject *parent)
Constructs a new MediaController with the media object (\a parent)
to be used by the media controller.
\sa MediaObject, Feature
*/
/*!
\fn Phonon::MediaController::~MediaController()
*/
/*!
\fn Features Phonon::MediaController::supportedFeatures() const
*/
/*!
\fn int Phonon::MediaController::availableAngles() const
Returns the available angles that is available for the current
media source.
\sa Feature
*/
/*!
\fn int Phonon::MediaController::currentAngle() const
Returns the angle that is currently used.
\sa Feature
*/
/*!
\fn int Phonon::MediaController::availableChapters() const
Returns the number of chapters the current media source
contains.
\sa Feature
*/
/*!
\fn int Phonon::MediaController::currentChapter() const
Returns the chapter that is currently being played back.
\sa Feature
*/
/*!
\fn int Phonon::MediaController::availableTitles() const
Returns the number of titles that the current media source
contains.
\sa Feature
*/
/*!
\fn int Phonon::MediaController::currentTitle() const
Returns the title that is currently played back.
The current title is 0 (the first) by default.
\sa Feature
*/
/*!
\fn bool Phonon::MediaController::autoplayTitles() const
Returns true if titles will automatically be played when the media
is played; otherwise returns false.
The media controller will play the titles of the media source in
sequence when the media object's \l{Phonon::MediaObject::}{play()}
function is called. If the autoplay option is disabled, the media
object will play the
\l{Phonon::}{MediaController::currentTitle()}{current title} and then
finish the playback.
\sa setAutoplayTitles(), currentTitle()
*/
/*!
\fn void Phonon::MediaController::setAutoplayTitles(bool enable)
Sets the titles to play automatically when the media is played if
\a enable is true; otherwise disables this option.
The media controller will play the titles of the media source in
sequence when the media object's \l{Phonon::MediaObject::}{play()}
function is called. If the autoplay option is disabled, the media
object will play the
\l{Phonon::}{MediaController::currentTitle()}{current title} and then
finish the playback.
\sa autoplayTitles(), currentTitle()
*/
/*!
\fn void Phonon::MediaController::setCurrentAngle(int angleNumber)
Sets the current angle to the given \a angleNumber if the media
file or device supports navigation by angle number.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::setCurrentChapter(int chapterNumber)
Sets the current chapter to the given \a chapterNumber if the media
file or device supports navigation by chapter number.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::setCurrentTitle(int titleNumber)
Skips to the given title \a titleNumber.
If it was playing before the title change it will start playback on the new title if
autoplayTitles is enabled.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::nextTitle()
Skips to the next title.
If it was playing before the title change it will start playback on the next title if
autoplayTitles is enabled.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::previousTitle()
Skips to the previous title.
If it was playing before the title change it will start playback on the previous title if
autoplayTitles is enabled.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::availableAnglesChanged(int availableAngles)
This signal is emitted whenever the number of available angles changes.
The new number of available angles is given by \a availableAngles.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::angleChanged(int angleNumber)
This signal is emitted whenever the current angle changes.
The new angle number is given by \a angleNumber.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::availableChaptersChanged(int availableChapters)
This signal is emitted whenever the number of available chapters changes.
The new number of available chapters is given by \a availableChapters.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::chapterChanged(int chapterNumber)
This signal is emitted whenever the current chapter changes.
The new chapter number is given by \a chapterNumber.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::availableTitlesChanged(int availableTitles)
This signal is emitted whenever the number of available titles changes.
The new number of available titles is given by \a availableTitles.
\sa Feature
*/
/*!
\fn void Phonon::MediaController::titleChanged(int titleNumber)
This signal is emitted whenever the current title changes.
The new title number is given by \a titleNumber.
\sa Feature
*/
/*!
\class Phonon::VideoWidget
\inmodule Phonon
\inheaderfile Phonon/VideoWidget
\since 4.4
\ingroup advanced
\ingroup multimedia
\brief The VideoWidget class provides a widget that is used to display video.
The VideoWidget class renders the video of a media stream on a
QWidget. It is connected to the \l{Phonon::}{MediaObject}, of
which video stream it should render. You connect the two objects
using the Phonon::createPath() function.
The widget has some possibilities to manipulate the video
stream. You can change the brightness(), hue(), saturation(),
and contrast().
Resizing of the video is handled automatically, but you can affect
the way the video is resized with the aspectRatio and scaleMode
properties. By default, the widget will use the aspect ratio of
the video stream itself.
The video widget takes the size of the video when it receives a new video
stream (i.e., when a new MediaSource is set on the MediaObject to which it is
connected). If you need to know the size of the video, you can call
\l{QWidget::}{sizeHint()} after the video has been loaded (i.e., after the
MediaObject leaves the \l{Phonon::}{LoadingState}).
It is also possible to go to \l{fullScreen}{full screen} mode.
A typical example of usage follows below:
\snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 21
\sa {Phonon Module}
*/
/*!
\fn Phonon::VideoWidget::VideoWidget(QWidget *parent = 0)
Constructs a new video widget with the specified \a parent.
*/
/*!
\fn Phonon::VideoWidget::VideoWidget(VideoWidgetPrivate &d, QWidget *parent)
\internal
Constructs a new video widget with the specified \a parent.
*/
/*!
\fn bool Phonon::VideoWidget::event(QEvent *)
\reimp
*/
/*!
\fn void Phonon::VideoWidget::mouseMoveEvent(QMouseEvent *)
\reimp
*/
/*!
\enum Phonon::VideoWidget::ScaleMode
The ScaleMode enum describes how to treat aspect ratio during
resizing of video.
\value FitInView The video will be fitted to fill the view
keeping aspect ratio.
\value ScaleAndCrop The video is scaled
*/
/*!
\property Phonon::VideoWidget::fullScreen
This property holds whether the video is shown using the complete
screen.
The property differs from QWidget::fullScreen in that it is
writeable.
By default the widget is not shown in fullScreen.
\warning When switching to full screen mode using setFullScreen(),
the widget onto which the video is rendered is shown as a
top-level window. Key event forwarding is handled by VideoWidget,
but if you need to handle other events, e.g., mouse events, you
should handle fullscreen mode yourself.
*/
/*!
\property Phonon::VideoWidget::aspectRatio
Defaults to AspectRatioAuto.
\sa AspectRatio
*/
/*!
\property Phonon::VideoWidget::scaleMode
If the size of the widget and the size of the video are not equal.
The video will be zoomed to fit the widget. The smaller zoom
(AddBarsScaleMode) adds black bars at the left/right or top/bottom to
make all of the image visible (default). The bigger zoom (ExpandMode)
fills the widget completely, keeping all information in one direction
and leaving parts of the image outside of the widget in the other
direction.
*/
/*!
\property Phonon::VideoWidget::brightness
This property holds brightness of the video.
Default is 0. Acceptable values are in range of -1, 1.
*/
/*!
\property Phonon::VideoWidget::contrast
This property holds the contrast of the video.
Default is 0. Acceptable values are in range of -1, 1.
*/
/*!
\property Phonon::VideoWidget::hue
This property holds the hue of the video.
Default is 0. Acceptable values are in range of -1, 1.
*/
/*!
\property Phonon::VideoWidget::saturation
This property holds saturation of the video.
Default is 0. Acceptable values are in range of -1, 1.
*/
/*!
\enum Phonon::VideoWidget::AspectRatio
Defines the width:height to be used for the video.
\value AspectRatioAuto
Let the decoder find the aspect ratio automatically from the
media file (this is the default).
\value AspectRatioWidget
Fits the video into the widget making the aspect ratio depend
solely on the size of the widget. This way the aspect ratio
is freely resizeable by the user.
\value AspectRatio4_3
Make width/height == 4/3, which is the old TV size and
monitor size (1024/768 == 4/3). (4:3)
\value AspectRatio16_9
Make width/height == 16/9, which is the size of most current
media. (16:9)
*/
/*!
\fn void Phonon::VideoWidget::exitFullScreen()
Convenience slot, calling setFullScreen(false)
*/
/*!
\fn void Phonon::VideoWidget::enterFullScreen()
Convenience slot, calling setFullScreen(true)
*/
/*!
\class Phonon::VideoWidgetInterface
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn virtual Phonon::VideoWidgetInterface::~VideoWidgetInterface()
*/
/*!
\fn virtual Phonon::VideoWidget::AspectRatio Phonon::VideoWidgetInterface::aspectRatio() const = 0
\internal
*/
/*!
\fn virtual void Phonon::VideoWidgetInterface::setAspectRatio(Phonon::VideoWidget::AspectRatio ratio) = 0
\internal
*/
/*!
\fn virtual qreal Phonon::VideoWidgetInterface::brightness() const = 0
\internal
*/
/*!
\fn virtual void Phonon::VideoWidgetInterface::setBrightness(qreal) = 0
\internal
*/
/*!
\fn virtual Phonon::VideoWidget::ScaleMode Phonon::VideoWidgetInterface::scaleMode() const = 0
\internal
*/
/*!
\fn virtual void Phonon::VideoWidgetInterface::setScaleMode(Phonon::VideoWidget::ScaleMode mode) = 0
\internal
*/
/*!
\fn virtual qreal Phonon::VideoWidgetInterface::contrast() const = 0
\internal
*/
/*!
\fn virtual void Phonon::VideoWidgetInterface::setContrast(qreal) = 0
\internal
*/
/*!
\fn virtual qreal Phonon::VideoWidgetInterface::hue() const = 0
\internal
*/
/*!
\fn virtual void Phonon::VideoWidgetInterface::setHue(qreal) = 0
\internal
*/
/*!
\fn virtual qreal Phonon::VideoWidgetInterface::saturation() const = 0
\internal
*/
/*!
\fn virtual void Phonon::VideoWidgetInterface::setSaturation(qreal) = 0
\internal
*/
/*!
\fn virtual QWidget *Phonon::VideoWidgetInterface::widget() = 0
\internal
*/
/*!
\class Phonon::PlatformPlugin
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn virtual AbstractMediaStream *Phonon::PlatformPlugin::createMediaStream(const QUrl &url, QObject *parent) = 0
Creates a AbstractMediaStream object with the given \a parent that provides the data
for the given URL specified by \a url.
\omit
On KDE this uses KIO.
\endomit
*/
/*!
\fn virtual QIcon Phonon::PlatformPlugin::icon(const QString &name) const = 0
Returns the icon for the given icon name.
*/
/*!
\fn virtual void Phonon::PlatformPlugin::notification(const char *notificationName, const QString &text,
const QStringList &actions, QObject *receiver, const char *actionSlot) const = 0
Shows a notification pop-up with the given \a notificationName and \a text.
Each action in the associated list of \a actions is connected to the \a actionSlot
of the specified \a receiver object, which is expected to act on the actions as
they are triggered by the user.
*/
/*!
\fn virtual QString Phonon::PlatformPlugin::applicationName() const = 0
Returns the name of the application. For most Qt application this is
QCoreApplication::applicationName(), but for KDE this is overridden by KAboutData.
*/
/*!
\fn virtual QObject *Phonon::PlatformPlugin::createBackend() = 0
Creates a backend object. This way the platform can decide the backend preference.
*/
/*!
\fn virtual QObject *Phonon::PlatformPlugin::createBackend(const QString &library, const QString &version) = 0
Using the library loader of the platform, loads a given backend provided the
specified \a library and \a version.
*/
/*!
\fn virtual bool Phonon::PlatformPlugin::isMimeTypeAvailable(const QString &mimeType) const = 0
Tries to check whether the default backend supports the MIME type specified by \a mimeType
without loading the actual backend library.
\omit
On KDE this reads the MIME type list from the .desktop file of
the backend.
\endomit
*/
/*!
\fn virtual void Phonon::PlatformPlugin::saveVolume(const QString &outputName, qreal volume) = 0
Saves the volume for the given output.
*/
/*!
\fn virtual qreal Phonon::PlatformPlugin::loadVolume(const QString &outputName) const = 0
Loads the volume for the given output.
*/
/*!
\class Phonon::MediaNode
\inmodule Phonon
\inheaderfile Phonon/MediaNode
\since 4.4
\brief The MediaNode class is the base class for all nodes in a media graph.
In all phonon applications, one builds a media graph consisting of
MediaNodes. The graph will take multimedia content, e.g., from a
file, as input. After its nodes have processed the multimedia, the
graph will output the media again, e.g., to a sound card.
The multimedia content is streamed over \l{Phonon::}{Path}s
between the nodes in the graph. You can query the paths that are
connected to a media node with inputPaths() and outputPaths().
You can check whether the node is implemented by the current
backend by calling isValid(). This does not guarantee that an
instance of the class works as expected, but that the backend has
implemented functionality for the class.
Currently, Phonon has four media nodes: \l{Phonon::}{MediaObject},
\l{Phonon::}{AudioOutput}, \l{Phonon::}{VideoWidget}, and \l{Phonon::}{Effect}.
Please refer to their class descriptions for details about their usage, and to
find out which nodes can be connected to each other. See also \l{Building
Graphs} in Phonon's \l{Phonon Overview}{overview} document.
Two nodes are connected to each other using the
Phonon::createPath() or \l{Phonon::}{Path::insertEffect()}
functions (only \l{Phonon::Effect}s use
\l{Phonon::Path::}{insertEffect()}). We show a code example below,
in which we build a media graph for video playback and then query
its media nodes for their \l{Phonon::}{Path}s:
\snippet doc/src/snippets/medianodesnippet.cpp 0
When you create a Phonon application, you will likely build the
graph yourself. This makes isValid() the most useful function of
this class. The other two functions help navigate the graph, which
you do not need to do as you created the nodes yourself.
\sa {Phonon Overview}, Phonon::MediaObject,
Phonon::AudioOutput, Phonon::VideoWidget, {Phonon Module}
*/
/*!
\fn virtual Phonon::MediaNode::~MediaNode()
Destroys the media node and any paths connecting it to other
nodes. Any \l{Phonon::}{Effect}s connected to these paths will
also be deleted.
*/
/*!
\fn bool Phonon::MediaNode::isValid() const
Returns true if the backend provides an implementation of this
class; otherwise returns false.
This does not guarantee that instances of the class works as
expected, but that the backend has implemented the functionality
for this class. For instance, Qt's GStreamer backend will return
true for instances of the \l{Phonon::}{AudioOutput} class, even if
there is a problem with GStreamer and it could not play sound.
*/
/*!
\fn QList<Path> Phonon::MediaNode::inputPaths() const
Returns the paths that inputs multimedia to this media node.
\sa outputPaths()
*/
/*!
\fn QList<Path> Phonon::MediaNode::outputPaths() const
Returns the paths to which this media node outputs media.
\sa inputPaths()
*/
/*!
\fn Phonon::MediaNode::MediaNode(MediaNodePrivate &dd)
\internal
*/
/*!
\class Phonon::GlobalConfig
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn Phonon::GlobalConfig::GlobalConfig()
\internal
*/
/*!
\fn Phonon::GlobalConfig::~GlobalConfig()
\internal
*/
/*!
\fn QList<int> Phonon::GlobalConfig::audioOutputDeviceListFor(Phonon::Category category, int override = AdvancedDevicesFromSettings) const
\internal
*/
/*!
\fn int Phonon::GlobalConfig::audioOutputDeviceFor(Phonon::Category category, int override = AdvancedDevicesFromSettings) const
\internal
*/
/*!
\class Phonon::ObjectDescriptionData
\inmodule Phonon
\since 4.4
\internal
\brief Data class for objects describing devices or features of the backend.
\sa Phonon::BackendCapabilities
*/
/*!
\fn bool Phonon::ObjectDescriptionData::operator==(const ObjectDescriptionData &otherDescription) const
Returns \c true if this ObjectDescription describes the same
as \a otherDescription; otherwise returns \c false.
*/
/*!
\fn QString Phonon::ObjectDescriptionData::name() const
Returns the name of the capture source.
\return A string that should be presented to the user to
choose the capture source.
*/
/*!
\fn QString Phonon::ObjectDescriptionData::description() const
Returns a description of the capture source. This text should
make clear what sound source this is, which is sometimes hard
to describe or understand from just the name.
\return A string describing the capture source.
*/
/*!
\fn QVariant Phonon::ObjectDescriptionData::property(const char *name) const
Returns a named property.
If the property is not set an invalid value is returned.
\sa propertyNames()
*/
/*!
\fn QList<QByteArray> Phonon::ObjectDescriptionData::propertyNames() const
Returns all names that return valid data when property() is called.
\sa property()
*/
/*!
\fn bool Phonon::ObjectDescriptionData::isValid() const
Returns true if the Tuple is valid (index != -1); otherwise returns
false.
*/
/*!
\fn int Phonon::ObjectDescriptionData::index() const
A unique identifier for this device/. Used internally
to distinguish between the devices/.
\return An integer that uniquely identifies every device.
*/
/*!
\fn static ObjectDescriptionData *Phonon::ObjectDescriptionData::fromIndex(ObjectDescriptionType type, int index)
\internal
*/
/*!
\fn Phonon::ObjectDescriptionData::~ObjectDescriptionData()
\internal
*/
/*!
\fn Phonon::ObjectDescriptionData::ObjectDescriptionData(ObjectDescriptionPrivate * = 0)
\internal
*/
/*!
\class Phonon::AddonInterface
\inmodule Phonon
\since 4.4
\internal
\brief Interface for Menu, Chapter, Angle and Title/Track control.
*/
/*!
\fn virtual Phonon::AddonInterface::~AddonInterface()
\internal
*/
/*!
\enum Phonon::AddonInterface::Interface
This enum describes the type of interface represented by an AddonInterface object.
\value NavigationInterface
\value ChapterInterface
\value AngleInterface
\value TitleInterface
*/
/*!
\enum Phonon::AddonInterface::NavigationCommand
\internal
\value Menu1Button
*/
/*!
\enum Phonon::AddonInterface::ChapterCommand
\internal
\value availableChapters
\value chapter
\value setChapter
*/
/*!
\enum Phonon::AddonInterface::AngleCommand
\internal
\value availableAngles
\value angle
\value setAngle
*/
/*!
\enum Phonon::AddonInterface::TitleCommand
\internal
\value availableTitles
\value title
\value setTitle
\value autoplayTitles
\value setAutoplayTitles
*/
/*!
\fn virtual bool Phonon::AddonInterface::hasInterface(Interface iface) const = 0
\internal
*/
/*!
\fn virtual QVariant Phonon::AddonInterface::interfaceCall(Interface iface, int command,
const QList<QVariant> &arguments) = 0
\internal
*/
/*!
\class Phonon::MediaNodePrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\namespace Phonon::Factory
\inmodule Phonon
\internal
*/
/*!
\fn Sender *Phonon::Factory::sender()
Returns a pointer to the object emitting the signals.
\sa Sender::backendChanged()
*/
/*!
\fn QObject *Phonon::Factory::createMediaObject(QObject *parent = 0)
Create a new backend object for a MediaObject.
\return a pointer to the MediaObject the backend provides.
*/
/*!
\fn QObject *Phonon::Factory::createEffect(int effectId, QObject *parent = 0)
Create a new backend object for a Effect.
\return a pointer to the Effect the backend provides.
*/
/*!
\fn QObject *Phonon::Factory::createVolumeFaderEffect(QObject *parent = 0)
Create a new backend object for a VolumeFaderEffect.
\return a pointer to the VolumeFaderEffect the backend provides.
*/
/*!
\fn QObject *Phonon::Factory::createAudioOutput(QObject *parent = 0)
Create a new backend object for a AudioOutput.
\return a pointer to the AudioOutput the backend provides.
*/
/*!
\fn QObject *Phonon::Factory::createVideoWidget(QObject *parent = 0)
Create a new backend object for a VideoWidget.
\return a pointer to the VideoWidget the backend provides.
*/
/*!
\fn QObject *Phonon::Factory::backend(bool createWhenNull = true)
\return a pointer to the backend interface.
*/
/*!
\fn QString Phonon::Factory::identifier()
Unique identifier for the Backend. Can be used in configuration files
for example.
*/
/*!
\fn QString Phonon::Factory::backendName()
Get the name of the Backend.
\omit
It's the name from the .desktop file.
\endomit
*/
/*!
\fn QString Phonon::Factory::backendComment()
Get the comment of the Backend.
\omit
It's the comment from the .desktop file.
\endomit
*/
/*!
\fn QString Phonon::Factory::backendVersion()
Get the version of the Backend.
\omit
It's the version from the .desktop file.
\endomit
The version is especially interesting if there are several versions
available for binary incompatible versions of the backend's media
framework.
*/
/*!
\fn QString Phonon::Factory::backendIcon()
Get the icon (name) of the Backend.
\omit
It's the icon from the .desktop file.
\endomit
*/
/*!
\fn QString Phonon::Factory::backendWebsite()
Get the website of the Backend.
\omit
It's the website from the .desktop file.
\endomit
*/
/*!
\fn QObject *Phonon::Factory::registerQObject(QObject *object)
Registers the given backend \a object with the factory.
*/
/*!
\fn bool Phonon::Factory::isMimeTypeAvailable(const QString &mimeType)
*/
/*!
\fn void Phonon::Factory::registerFrontendObject(MediaNodePrivate *)
\internal
*/
/*!
\fn void Phonon::Factory::deregisterFrontendObject(MediaNodePrivate *)
\internal
*/
/*!
\fn void Phonon::Factory::setBackend(QObject *)
*/
/*!
\fn PlatformPlugin *Phonon::Factory::platformPlugin()
*/
/*!
/*!
\class Phonon::AbstractMediaStreamPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::FrontendInterfacePrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::EffectWidgetPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::IODeviceStream
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn explicit Phonon::IODeviceStream::IODeviceStream(QIODevice *ioDevice, QObject *parent = 0)
\internal
Creates a new IODeviceStream with the given \a ioDevice and \a
parent.
*/
/*!
\fn Phonon::IODeviceStream::~IODeviceStream()
\internal
*/
/*!
\fn void Phonon::IODeviceStream::reset()
\internal
*/
/*!
\fn void Phonon::IODeviceStream::needData()
\internal
*/
/*!
\fn void Phonon::IODeviceStream::seekStream(qint64)
\internal
*/
/*!
\namespace Phonon::Platform
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::EffectDescriptionModel
\inmodule Phonon
\brief provides a item view model containing available audio effects.
*/
/*!
\typedef Phonon::SubtitleDescription
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::SubtitleDescriptionModel
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::AudioChannelDescription
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::AudioChannelDescriptionModel
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::AudioCaptureDevice
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::AudioCaptureDeviceModel
\inmodule Phonon
\internal
*/
/*!
\typedef typedef void (*CleanUpFunction)()
\inmodule Phonon
\internal
*/
/*!
\typedef Phonon::QObjectPair
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\typedef Phonon::AudioOutputDeviceModel
\inmodule Phonon
\brief provides an item view model containing available audio output devices.
*/
/*!
\fn uint Phonon::qHash(const Phonon::EffectParameter ¶m)
\internal
*/
/*!
\fn Phonon::CleanUpGlobalStatic::~CleanUpGlobalStatic()
\internal
*/
/*!
\class Phonon::ConstIface
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::CleanUpGlobalStatic
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::EffectParameterPrivate
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::QSettingsGroup
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class Phonon::MediaNodeDestructionHandler
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\fn Phonon::MediaNodeDestructionHandler::~MediaNodeDestructionHandler()
\internal
Called from Base::~Base if this object was registered
using BasePrivate::addDestructionHandler().
*/
/*!
\fn Phonon::MediaNodeDestructionHandler::phononObjectDestroyed(MediaNodePrivate *)
\internal
*/
/*!
\fn explicit Phonon::EffectWidget::EffectWidget(Effect *effect, QWidget *parent = 0)
\internal
Constructs a new EffectWidget for the specified \a effect and with
the specified \a parent.
*/
/*!
\fn Phonon::EffectWidget::~EffectWidget()
\internal
*/
/*!
\fn QDebug Phonon::operator<<(QDebug s, const ObjectDescription<T> &o)
\internal
*/
/*!
\class Phonon::ListModelHelper
\inmodule Phonon
\since 4.4
\internal
*/
/*!
\class AudioOutputInterface42
\inmodule Phonon
\since 4.4
\internal
*/
|