mdi_mtv.h
75.9 KB
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
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*****************************************************************************
*
* Filename:
* ---------
* mdi_mtv.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
* Mobile TV interface header file
*
* Author:
* -------
* -------
*
*============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*============================================================================
****************************************************************************/
#ifndef _MDI_MTV_H_
/* The macro is used to avoid re-include the same header file */
#define _MDI_MTV_H_
#if defined(__MMI_ATV_SUPPORT__) || defined(__MMI_MOBILE_TV_CMMB_SUPPORT__)
#ifndef _MDI_DATATYPE_H_
#error "Please include mdi_datatype.h before mdi_mtv.h"
#endif
#ifndef _MDI_ENUM_H_
#include "mdi_enum.h"
#endif
#include "med_global.h"
#include "med_struct.h"
#include "mtv_error.h"
#if defined(__MMI_MOBILE_TV_CMMB_SUPPORT__)
#include "mtv_esg_define.h"
#include "mtv_esg_query_datatype.h"
#include "cmmb_eb.h"
#include "app_datetime.h"
#endif
#include "MMI_features.h"
#include "mdi_datatype.h"
#include "MMIDataType.h"
#include "kal_general_types.h"
#include "gdi_datatype.h"
#include "mmi_frm_events_gprot.h"
#include "DtcntSrvGprot.h"
#include "drv_sw_features_video.h"
/*****************************************************************************
* Compile option
*****************************************************************************/
#if defined(__MTK_TARGET__)
/* HW Rotator support */
#define __MDI_MTV_HW_ROTATOR_SUPPORT__
#define __MDI_MTV_HW_ROTATOR_BY_IDP__
#endif
#if defined(VA2_RENDERER_VP_VIDEO_PROCESSING_SUPPORTED)
#define __MDI_MTV_VIDEO_PROCESSING_SUPPORT__
#endif
#define MDI_MTV_MBBMS_DESC_LENGTH (MEDIA_MTV_MAX_APPEND_LEN)
/*****************************************************************************
* Define
*****************************************************************************/
/* Brightness value which is darker than default value by 5 levels */
#define MDI_MTV_BRIGHTNESS_N5 0
/* Brightness value which is darker than default value by 4 levels */
#define MDI_MTV_BRIGHTNESS_N4 1
/* Brightness value which is darker than default value by 3 levels */
#define MDI_MTV_BRIGHTNESS_N3 2
/* Brightness value which is darker than default value by 2 levels */
#define MDI_MTV_BRIGHTNESS_N2 3
/* Brightness value which is darker than default value by 1 level */
#define MDI_MTV_BRIGHTNESS_N1 4
/* Default brightness value */
#define MDI_MTV_BRIGHTNESS_0 5
/* Brightness value which is brighter than default value by 1 level */
#define MDI_MTV_BRIGHTNESS_P1 6
/* Brightness value which is brighter than default value by 2 levels */
#define MDI_MTV_BRIGHTNESS_P2 7
/* Brightness value which is brighter than default value by 3 levels */
#define MDI_MTV_BRIGHTNESS_P3 8
/* Brightness value which is brighter than default value by 4 levels */
#define MDI_MTV_BRIGHTNESS_P4 9
/* Brightness value which is brighter than default value by 5 levels */
#define MDI_MTV_BRIGHTNESS_P5 10
/* Contrast value which is lower than default value by 5 levels */
#define MDI_MTV_CONTRAST_N5 0
/* Contrast value which is lower than default value by 4 levels */
#define MDI_MTV_CONTRAST_N4 1
/* Contrast value which is lower than default value by 3 levels */
#define MDI_MTV_CONTRAST_N3 2
/* Contrast value which is lower than default value by 2 levels */
#define MDI_MTV_CONTRAST_N2 3
/* Contrast value which is lower than default value by 1 levels */
#define MDI_MTV_CONTRAST_N1 4
/* Default contrast value */
#define MDI_MTV_CONTRAST_0 5
/* Contrast value which is higher than default value by 1 levels */
#define MDI_MTV_CONTRAST_P1 6
/* Contrast value which is higher than default value by 2 levels */
#define MDI_MTV_CONTRAST_P2 7
/* Contrast value which is higher than default value by 3 levels */
#define MDI_MTV_CONTRAST_P3 8
/* Contrast value which is higher than default value by 4 levels */
#define MDI_MTV_CONTRAST_P4 9
/* Contrast value which is higher than default value by 5 levels */
#define MDI_MTV_CONTRAST_P5 10
/* Saturation value which is lower than default value by 5 levels */
#define MDI_MTV_SATURATION_N5 0
/* Saturation value which is lower than default value by 4 levels */
#define MDI_MTV_SATURATION_N4 1
/* Saturation value which is lower than default value by 3 levels */
#define MDI_MTV_SATURATION_N3 2
/* Saturation value which is lower than default value by 2 levels */
#define MDI_MTV_SATURATION_N2 3
/* Saturation value which is lower than default value by 1 levels */
#define MDI_MTV_SATURATION_N1 4
/* Default saturation value */
#define MDI_MTV_SATURATION_0 5
/* Saturation value which is higher than default value by 1 levels */
#define MDI_MTV_SATURATION_P1 6
/* Saturation value which is higher than default value by 2 levels */
#define MDI_MTV_SATURATION_P2 7
/* Saturation value which is higher than default value by 3 levels */
#define MDI_MTV_SATURATION_P3 8
/* Saturation value which is higher than default value by 4 levels */
#define MDI_MTV_SATURATION_P4 9
/* Saturation value which is higher than default value by 5 levels */
#define MDI_MTV_SATURATION_P5 10
/* Taiwan band */
#define MDI_MTV_TDMB_BAND_TAIWAN MEDIA_MTV_TDMB_BAND_III
/* Korea band */
#define MDI_MTV_TDMB_BAND_KOREA MEDIA_MTV_TDMB_KOREA_BAND
/* China band */
#define MDI_MTV_TDMB_BAND_CHINA MEDIA_MTV_TDMB_CHINESE_BAND
/* L band */
#define MDI_MTV_TDMB_L_BAND MEDIA_MTV_TDMB_L_BAND
/* U band */
#define MDI_MTV_CMMB_U_BAND MEDIA_MTV_CMMB_U_BAND
/* Country type for Analog TV */
#define MDI_MTV_ATV_AFGHANISTAN MEDIA_MTV_ATV_AFGHANISTAN
#define MDI_MTV_ATV_ARGENTINA MEDIA_MTV_ATV_ARGENTINA
#define MDI_MTV_ATV_AUSTRALIA MEDIA_MTV_ATV_AUSTRALIA
#define MDI_MTV_ATV_BRAZIL MEDIA_MTV_ATV_BRAZIL
#define MDI_MTV_ATV_BURMA MEDIA_MTV_ATV_BURMA
#define MDI_MTV_ATV_CAMBODIA MEDIA_MTV_ATV_CAMBODIA
#define MDI_MTV_ATV_CANADA MEDIA_MTV_ATV_CANADA
#define MDI_MTV_ATV_CHILE MEDIA_MTV_ATV_CHILE
#define MDI_MTV_ATV_CHINA MEDIA_MTV_ATV_CHINA
#define MDI_MTV_ATV_CHINA_HONGKONG MEDIA_MTV_ATV_CHINA_HONGKONG
#define MDI_MTV_ATV_CHINA_SHENZHEN MEDIA_MTV_ATV_CHINA_SHENZHEN
#define MDI_MTV_ATV_CONGO MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_EUROPE_EASTERN MEDIA_MTV_ATV_EUROPE_EASTERN
#define MDI_MTV_ATV_EUROPE_WESTERN MEDIA_MTV_ATV_EUROPE_WESTERN
#define MDI_MTV_ATV_FRANCE MEDIA_MTV_ATV_FRANCE
#define MDI_MTV_ATV_FRENCH_COLONIE MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_GABON MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_INDIA MEDIA_MTV_ATV_INDIA
#define MDI_MTV_ATV_INDONESIA MEDIA_MTV_ATV_INDONESIA
#define MDI_MTV_ATV_IRAN MEDIA_MTV_ATV_IRAN
#define MDI_MTV_ATV_IRELAND MEDIA_MTV_ATV_IRELAND
#define MDI_MTV_ATV_ITALY MEDIA_MTV_ATV_ITALY
#define MDI_MTV_ATV_IVORYCOAST MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_JAPAN MEDIA_MTV_ATV_JAPAN
#define MDI_MTV_ATV_KOREA MEDIA_MTV_ATV_KOREA
#define MDI_MTV_ATV_LAOS MEDIA_MTV_ATV_LAOS
#define MDI_MTV_ATV_MADAGASCAR MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_MALAYSIA MEDIA_MTV_ATV_MALAYSIA
#define MDI_MTV_ATV_MEXICO MEDIA_MTV_ATV_MEXICO
#define MDI_MTV_ATV_MOROCCO MEDIA_MTV_ATV_MOROCCO
#define MDI_MTV_ATV_NEWZEALAND MEDIA_MTV_ATV_NEWZEALAND
#define MDI_MTV_ATV_PAKISTAN MEDIA_MTV_ATV_PAKISTAN
#define MDI_MTV_ATV_PARAGUAY MEDIA_MTV_ATV_PARAGUAY
#define MDI_MTV_ATV_PHILIPPINES MEDIA_MTV_ATV_PHILIPPINES
#define MDI_MTV_ATV_PORTUGAL MEDIA_MTV_ATV_PORTUGAL
#define MDI_MTV_ATV_REUNION MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_RUSSIA MEDIA_MTV_ATV_RUSSIA
#define MDI_MTV_ATV_RWANDA MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_SENEGAL MEDIA_MTV_ATV_FRENCH_COLONIE
#define MDI_MTV_ATV_SINGAPORE MEDIA_MTV_ATV_SINGAPORE
#define MDI_MTV_ATV_SOUTHAFRICA MEDIA_MTV_ATV_SOUTHAFRICA
#define MDI_MTV_ATV_SPAIN MEDIA_MTV_ATV_SPAIN
#define MDI_MTV_ATV_TAIWAN MEDIA_MTV_ATV_TAIWAN
#define MDI_MTV_ATV_THAILAND MEDIA_MTV_ATV_THAILAND
#define MDI_MTV_ATV_TURKEY MEDIA_MTV_ATV_TURKEY
#define MDI_MTV_ATV_UNITED_ARAB_EMIRATES MEDIA_MTV_ATV_UNITED_ARAB_EMIRATES
#define MDI_MTV_ATV_UNITED_KINGDOM MEDIA_MTV_ATV_UNITED_KINGDOM
#define MDI_MTV_ATV_USA MEDIA_MTV_ATV_USA
#define MDI_MTV_ATV_URUGUAY MEDIA_MTV_ATV_URUGUAY
#define MDI_MTV_ATV_VENEZUELA MEDIA_MTV_ATV_VENEZUELA
#define MDI_MTV_ATV_VIETNAM MEDIA_MTV_ATV_VIETNAM
/* Audio mode */
#define MDI_ATV_DEFAULT ATV_DEFAULT_MODE
#define MDI_ATV_MONO ATV_MTS_MONO
#define MDI_ATV_MTS_STEREO ATV_MTS_STEREO
#define MDI_ATV_MTS_SAP ATV_MTS_SAP
#define MDI_ATV_MPX_MONO ATV_MPX_MONO
#define MDI_ATV_MPX_STEREO ATV_MPX_STEREO
#define MDI_ATV_MPX_SUB ATV_MPX_SUB
#define MDI_ATV_MPX_MAIN_SUB ATV_MPX_MAIN_SUB
#define MDI_ATV_MPX_MAIN ATV_MPX_MAIN
#define MDI_ATV_FM_MONO ATV_FM_MONO
#define MDI_ATV_A2_STEREO ATV_A2_STEREO
#define MDI_ATV_A2_DUAL1 ATV_A2_DUAL1
#define MDI_ATV_A2_DUAL2 ATV_A2_DUAL2
#define MDI_ATV_NICAM_MONO ATV_NICAM_MONO
#define MDI_ATV_NICAM_STEREO ATV_NICAM_STEREO
#define MDI_ATV_NICAM_DUAL1 ATV_NICAM_DUAL1
#define MDI_ATV_NICAM_DUAL2 ATV_NICAM_DUAL2
/* Chinese language */
#define MDI_MTV_LANG_ZHO ESG_QUERY_LANG_ZHO
/* English language */
#define MDI_MTV_LANG_ENG ESG_QUERY_LANG_ENG
/* The length of CAS smart card number */
#define MDI_MTV_CARD_NUMBER_LEN 8
#if defined(ISP_SUPPORT)
/* LCD rotate: 0 degree */
#define MDI_MTV_LCD_ROTATE_0 LCD_LAYER_ROTATE_NORMAL
/* LCD rotate: 90 degree */
#define MDI_MTV_LCD_ROTATE_90 LCD_LAYER_ROTATE_90
/* LCD rotate: 180 degree */
#define MDI_MTV_LCD_ROTATE_180 LCD_LAYER_ROTATE_180
/* LCD rotate: 270 degree */
#define MDI_MTV_LCD_ROTATE_270 LCD_LAYER_ROTATE_270
#else /* defined(ISP_SUPPORT) */
/* LCD rotate: 0 degree */
#define MDI_MTV_LCD_ROTATE_0 0
/* LCD rotate: 90 degree */
#define MDI_MTV_LCD_ROTATE_90 1
/* LCD rotate: 180 degree */
#define MDI_MTV_LCD_ROTATE_180 2
/* LCD rotate: 270 degree */
#define MDI_MTV_LCD_ROTATE_270 3
#endif /* defined(ISP_SUPPORT) */
/*****************************************************************************
* Enumeration
*****************************************************************************/
/* System event */
typedef enum
{
MDI_MTV_SYSTEM_OPENED = 0, /* System is opened successfully */
MDI_MTV_SYSTEM_CLOSED, /* System is closed successfully */
MDI_MTV_SYSTEM_FATAL_ERROR, /* A severe problem happens */
MDI_MTV_SYSTEM_BAD_RECEPTION = 10, /* Signal reception is bad */
MDI_MTV_SYSTEM_GOOD_RECEPTION, /* Signal reception is good */
MDI_MTV_SYSTEM_DATE_TIME = 20, /* Current date and time is received */
MDI_MTV_SYSTEM_EMERGENCY_MSG = 30, /* An emergency message is received */
MDI_MTV_SYSTEM_ESG_NEW_AVAILABLE = 40, /* A new ESG is available */
MDI_MTV_SYSTEM_ESG_DOWNLOADED, /* A new ESG is downloaded, but is not ready for query */
MDI_MTV_SYSTEM_ESG_UPDATED, /* A new ESG is ready for query */
MDI_MTV_SYSTEM_UNSAVED_RECORDING_DISCARDED /* Unsaved recorded material is discarded */
} mdi_mtv_system_event_enum;
/* Service event */
typedef enum
{
MDI_MTV_SERVICE_STARTED, /* A service is started to connect */
MDI_MTV_SERVICE_READY, /* The service is connected successfully */
MDI_MTV_SERVICE_STOPPED, /* The service is stopped */
MDI_MTV_SERVICE_ABORTED, /* The service is aborted because some error occurs */
MDI_MTV_SERVICE_ADDED, /* A new service is available */
MDI_MTV_SERVICE_REMOVED, /* An existing service is removed */
MDI_MTV_SERVICE_UPDATED, /* The information of an existing service is updated */
MDI_MTV_SERVICE_ACCESS_GRANTED, /* The access permission of a service is granted */
MDI_MTV_SERVICE_ACCESS_DENIED, /* The access permission of a service is denied */
MDI_MTV_SERVICE_BAD_RECEPTION, /* The signal reception is bad */
MDI_MTV_SERVICE_GOOD_RECEPTION, /* The signal reception is good */
MDI_MTV_SERVICE_FATAL_ERROR, /* A severe problem happens */
MDI_MTV_SERVICE_DATE_TIME, /* Current date and time is received */
MDI_MTV_SERVICE_PROGRAM_INFO, /* Current program info is received */
MDI_MTV_SERVICE_EMERGENCY_MSG, /* An emergency message is received */
MDI_MTV_SERVICE_ESG_NEW_AVAILABLE, /* A new ESG is available */
MDI_MTV_SERVICE_ESG_DOWNLOADED, /* A new ESG is downloaded, but is not ready for query */
MDI_MTV_SERVICE_ESG_UPDATED, /* ESG is updated */
MDI_MTV_SERVICE_UPGRADE_RET, /* Upgrade */
MDI_MTV_SERVICE_AREA_RETRIEVE_RET, /* Area retrieve */
MDI_MTV_SERVICE_INTERACTIVITY_RETRIEVE_RET, /* Area retrieve */
MDI_MTV_SERVICE_SG_UPDATE_RET, /* ESG fails to update */
MDI_MTV_SERVICE_SUBSCRIPTION_RET, /* Subscription table fails to update */
MDI_MTV_SERVICE_ACCOUNT_INQUIRY_DONE, /* Account inquiry done */
MDI_MTV_SERVICE_GBA_RET, /* GBA process ret */
MDI_MTV_SERVICE_SUBSCRIBE_DONE, /* Subscribe done */
MDI_MTV_SERVICE_UNSUBSCRIBE_DONE, /* Unsubscribe done */
MDI_MTV_SERVICE_MSK_RETRIEVE_DONE, /* msk retrieve done */
MDI_MTV_SERVICE_IMD_READY, /* IMD ready */
MDI_MTV_SERVICE_SET_EMM_DONE,
MDI_MTV_SERVICE_GET_CA_DONE
} mdi_mtv_service_event_enum;
/* Player event */
typedef enum
{
MDI_MTV_PLAYER_STARTED, /* The player is started */
MDI_MTV_PLAYER_TIMESHIFT_PAUSED, /* The playback of time-shift buffer content is paused */
MDI_MTV_PLAYER_TIMESHIFT_DELAYED, /* The time-shift buffered content is played */
MDI_MTV_PLAYER_TIMESHIFT_LIVE, /* The live content is played */
MDI_MTV_PLAYER_TIMESHIFT_ERROR, /* Time-shift buffer encounters some error */
MDI_MTV_PLAYER_BEGINNING_OF_CONTENT,/* A rewind hits the beginning of time-shift buffer */
MDI_MTV_PLAYER_END_OF_CONTENT, /* a forward playback catches up with the live content */
MDI_MTV_PLAYER_SNAPSHOT_TAKEN, /* A snapshot of the current video frame is taken */
MDI_MTV_PLAYER_DYNAMIC_LABEL, /* A dynamic label segment is received */
MDI_MTV_PLAYER_ERROR, /* The playback encounters some error */
MDI_MTV_PLAYER_STOPPED, /* The player is stopped */
MDI_MTV_PLAYER_RATE_CHANGE /* The play speed is updated */
} mdi_mtv_player_event_enum;
/* Recorder event */
typedef enum
{
MDI_MTV_RECORDER_STARTED, /* The recorder is started */
MDI_MTV_RECORDER_SAVING, /* The recorder enters saving status */
MDI_MTV_RECORDER_SAVING_SUCCEEDED, /* The recording content is saved successfully */
MDI_MTV_RECORDER_SAVING_FAILED, /* The recording content is saved fail */
MDI_MTV_RECORDER_ERROR, /* The recorder enters some error */
MDI_MTV_RECORDER_STOPPED, /* The recorder is stopped */
MDI_MTV_RECORDER_RECORDING_DISCARDED/* The recording content is discarded */
} mdi_mtv_recorder_event_enum;
typedef enum
{
MDI_MTV_RECORDER_SIZE_QCIF,
MDI_MTV_RECORDER_SIZE_QVGA,
MDI_MTV_RECORDER_SIZE_HVGA,
MDI_MTV_RECORDER_SIZE_COUNT
} mdi_mtv_recorder_size_enum;
typedef enum
{
MDI_MTV_RECORDER_STORAGE_PHONE,
MDI_MTV_RECORDER_STORAGE_CARD
} mdi_mtv_recorder_storage_enum;
typedef enum
{
MDI_MTV_MBBMS_OK = 0,
MDI_MTV_MBBMS_DEVICE_AUTHENTICATION_FAILED = 1,
MDI_MTV_MBBMS_PURCHASE_ITEM_UNKNOWN = 3,
MDI_MTV_MBBMS_SERVICE_ERROR = 7,
MDI_MTV_MBBMS_MAL_FORMED_MESSAGE_ERROR = 8,
MDI_MTV_MBBMS_NO_SUBSCRIPTION = 10,
MDI_MTV_MBBMS_OPERATION_NOT_PERMITTED = 11,
MDI_MTV_MBBMS_REQUESTED_SERVICE_UNAVAILABLE = 15,
MDI_MTV_MBBMS_REQUESTED_SERVICE_ACCEPTED = 16,
MDI_MTV_MBBMS_INVALID_REQUEST = 22,
MDI_MTV_MBBMS_DELIVERY_OF_WRONG_KEY_INFORMATION = 24,
MDI_MTV_MBBMS_ALREADY_IN_USE = 27,
MDI_MTV_MBBMS_NO_MATCHING_FRAGMENT = 28,
MDI_MTV_MBBMS_NOW_SUBSCRIBED = 29,
MDI_MTV_MBBMS_LOCATION_DETECT_FAIL = 30, /* MBBMS 3.0 */
MDI_MTV_MBBMS_INSUFFICIENT_CHARGE = 131,
MDI_MTV_MBBMS_SET_CHANNEL_FAIL = MTV_E_INVALID_PARAM,
MDI_MTV_MBBMS_NW_TIMEOUT = MTV_E_TIMEOUT
} mdi_mtv_mbbms_status_enum;
typedef enum
{
MDI_MTV_FAVO_CHANNEL,
MDI_MTV_FAVO_CONTENT,
MDI_MTV_FAVO_LOCAL_PURCHASE_ITEM,
MDI_MTV_FAVO_EB
} mdi_mtv_favorite_type_enum;
typedef enum
{
MDI_MTV_SOURCE_LIVE_SIGNAL, /**< scanning services from live signal */
MDI_MTV_SOURCE_LOCAL_DATABASE /**< load service info from local cache */
} mdi_mtv_service_source_enum;
typedef enum
{
MDI_MTV_MTS_TYPE_GBA,
MDI_MTV_MTS_TYPE_MSK_RETRIEVE
} mdi_mtv_mts_type_enum;
typedef enum
{
MDI_MTV_IMD_TYPE_SERVICE = MED_MTV_IMD_TYPE_SERVICE,
MDI_MTV_IMD_TYPE_CONTENT = MED_MTV_IMD_TYPE_CONTENT
} mdi_mtv_imd_type_enum;
/*****************************************************************************
* Structure
*****************************************************************************/
typedef struct
{
U8 bdscell_id[17];
MMI_BOOL is_usim;
CHAR imsi[16];
U16 sim_id;
MMI_BOOL same_imsi;
} mdi_mtv_cas_sim_struct;
typedef struct
{
U32 net_id; /* data account id */
CHAR prx_ip[SRV_DTCNT_PROF_MAX_PROXY_ADDR_LEN]; /* proxy ip */
U8 use_proxy;
U16 prx_port; /* proxy port */
U8 app_id; /* app id */
CHAR sg_url[30];
U16 sg_port;
} mdi_mtv_cas_net_struct;
typedef struct
{
/* Input */
S32 imd_index;
S32 desc_len; /* UCS2 len, not include null termination */
/* Output */
MMI_BOOL *if_read;
WCHAR *desc;
} mdi_mtv_imd_desc_struct;
typedef struct
{
/* Input */
mdi_mtv_imd_type_enum imd_type;
S32 path_len; /* UCS2 len, not include null termination */
/* For service type */
S32 imd_index;
/* For contetnt type */
CHAR *content_id;
/* Output */
WCHAR *path;
} mdi_mtv_imd_detail_struct;
typedef struct
{
S32 ret;
WCHAR desc[MDI_MTV_MBBMS_DESC_LENGTH];
} mdi_mtv_purchase_desc_struct;
typedef struct
{
U32 randvalue[2];
U32 demodType;
U32 caType;
U8 cardSN[8];
//must pedding at tail
U32 result;
} mdi_mtv_ca_info_struct;
typedef struct
{
U16 nYear;
U8 nMonth;
U8 nDay;
U8 nHour;
U8 nMin;
U8 nSec;
U8 week;
} mdi_mtv_nit_time_struct;
/* MTV setting structure */
typedef struct
{
U32 max_timeshift_buffer_kb;/* The maximal disk size that the time shift buffer engine could use */
U16 brightness; /* The player's brightness value */
U16 contrast; /* The player's contrast value */
U16 saturation; /* The player's saturation value */
U16 volume_level; /* The player's volume level */
U8 record_size; /* The player's record size */
PU8 record_dir; /* The recorder's destination folder */
pBOOL is_timeshift_enabled; /* Used to enable or disable time shift buffer engine */
mdi_mtv_cas_sim_struct *sim;
}mdi_mtv_setting_struct;
/* Service info structure */
typedef struct
{
U32 service_id; /* Service identifier */
CHAR *service_name; /* Service name in UCS2 encoding */
U32 service_number; /* Service serial number */
mdi_mtv_service_type_enum service_type; /* Service type, such as TV, Radio or data service */
S32 service_flags; /* Access right information of the service */
kal_uint32 audio_mode; /**< the current audio mode. @see matvctrl.h */
kal_uint32 supported_audio_mode;
}mdi_mtv_service_info_struct;
/* this is the struct for account inquiry done event */
typedef struct
{
kal_uint8 *fragment_id;
kal_uint8 *purchaseitem_id;
kal_wchar *purchaseitem_name;
kal_wchar *purchaseitem_desc;
kal_uint8 type;
kal_uint8 period;
float price;
} mdi_mtv_account_item_struct;
typedef struct
{
kal_uint32 purchase_count;
mdi_mtv_account_item_struct purchase_info[5];
} mdi_mtv_account_inquiry_struct;
/* this is the struct for recommended city event */
typedef struct
{
kal_wchar *city_name;
} mdi_mtv_city_struct;
typedef struct
{
kal_uint32 city_count;
mdi_mtv_city_struct city_info[5];
} mdi_mtv_city_info_struct;
/* Player setting structure */
typedef struct
{
gdi_handle play_layer_handle; /* Provide the TV layer handle */
U32 blt_layer_flag; /* Provide the blt layer configuration */
U32 play_layer_flag; /* Provide the TV layer configuration */
MMI_BOOL is_visual_update; /* Set the visibility of the TV layer */
U8 play_audio; /* Play audio or not */
U16 rotate;
mdi_mtv_recorder_storage_enum storage;
}mdi_mtv_player_setting_struct;
/* Service status structure */
typedef struct
{
mdi_mtv_service_state_enum state; /* Service state */
U32 signal_strength; /* Signal strength */
pBOOL timeshift_available; /* Notify if the current disk storage size is enough to enable time shift buffer engine */
}mdi_mtv_service_status_struct;
/* Player status structure */
typedef struct
{
mdi_mtv_player_state_enum state; /* Player state */
U32 play_delay; /* Playback delay in time shift buffer. The unit is millisecond. */
U32 max_delay; /* Maximal playback delay in time shift buffer. The unit is millisecond. */
U32 buffer_duration; /* Allowable time shift buffer duration in millisecond */
S32 play_rate; /* Play speed */
}mdi_mtv_player_status_struct;
#if defined(__MMI_MOBILE_TV_CMMB_SUPPORT__)
/* Program info structure */
typedef struct
{
U32 record_num; /* Indicate the number of the program info */
struct
{
U32 date; /* 16-bit MJD value */
U32 time; /* 24-bit UTC value */
U32 duration; /* The program duration in seconds */
kal_wchar *title; /* The program title in UCS2 encoding */
} records[2];
} mdi_mtv_program_info_struct;
/* Order status Structure */
typedef struct
{
CHAR *gid;
U8 subscribed;
} mdi_mtv_order_struct;
/* Order status Structure */
typedef struct
{
U32 id;
CHAR rid[21];
S32 lang_type;
applib_time_struct *time;
WCHAR *keyword;
U32 start_idx;
U32 query_num;
} mdi_mtv_query_struct;
#endif /* __MMI_MOBILE_TV_CMMB_SUPPORT__ */
/* The service found callback function */
typedef void (*mdi_mtv_service_found_callback)(mdi_mtv_service_info_struct *service_info, void *user_data);
/* The service scan progress notification callback function */
typedef void (*mdi_mtv_search_progress_callback)(S32 value, void *user_data);
/* The unsaved recorded content is completely recovered callback function */
typedef void (*mdi_mtv_complete_recovering_callback)(S32 value, void *user_data);
/* The callback function to notify some event */
typedef void (*mdi_mtv_event_callback)(U32 event_id, S32 param, void *user_data);
typedef void (*mdi_mtv_account_callback)(mdi_mtv_account_inquiry_struct *account, void *user_data);
typedef void (*mdi_mtv_city_found_callback)(mdi_mtv_city_info_struct *city, void *user_data);
/* MTV configuration structure */
typedef struct
{
mdi_mtv_service_found_callback service_found_hdlr; /* Service found callback function */
mdi_mtv_search_progress_callback search_progress_hdlr; /* Service scan progress callback function */
mdi_mtv_complete_recovering_callback complete_recovering_hdlr; /* The unsaved recording completely recovered callback function */
mdi_mtv_event_callback system_event_hdlr; /* System event callback function */
mdi_mtv_event_callback service_event_hdlr; /* Service event callback function */
mdi_mtv_event_callback player_event_hdlr; /* Player event callback function */
mdi_mtv_event_callback recorder_event_hdlr; /* Recorder event callback function */
mdi_mtv_account_callback account_inquiry_hdlr; /* Service found callback function */
mdi_mtv_city_found_callback city_found_hdlr; /* Service found callback function */
void *user_data;
}mdi_mtv_service_config_struct;
/*****************************************************************************
* Extern Global Function
*****************************************************************************/
/*
* System function
*/
/*****************************************************************************
* FUNCTION
* mdi_mtv_open
* DESCRIPTION
* This function is to open Mobile TV engine and check if there is unsaved
* recording content. If so, the application could invoke
* mdi_mtv_recover_recording() to save the unsaved recording content.
* PARAMETERS
* mtv_handle : [OUT] The handle of a Mobile TV engine
* mtv_setting : [IN] Configuration of mtv setting
* mtv_service_config : [IN] Configuration of callback function
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FIND_UNSAVED_RECORDING_FAIL : Success, but found out unsaved recording content
* MDI_RES_MTV_FAILED FALSE : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_open(const U16 app_id,
U32 *mtv_handle,
mdi_mtv_setting_struct* mtv_setting,
mdi_mtv_service_config_struct* mtv_service_config);
/*****************************************************************************
* FUNCTION
* mdi_mtv_close
* DESCRIPTION
* This function is to close Mobile TV engine.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_close(U32 mtv_handle);
#ifdef __MTV_REC_SUPPORT__
/*****************************************************************************
* FUNCTION
* mdi_mtv_recover_recording
* DESCRIPTION
* This function is to recover the unsaved recording content. When the
* application opens the Mobile TV engine, if the return value of
* mdi_mtv_open() is MDI_RES_MTV_FIND_UNSAVED_RECORDING_FAIL, the application
* could call this function to save the unsaved recording content.
* The recovering process is asyncronous and when the process is finished,
* application will be notified by the callback function complete_recovering_hdlr
* defined in mdi_mtv_service_config_struct.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recover_recording(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_discard_unsaved_recording
* DESCRIPTION
* This function is to discard the unsaved recording content. When the
* application opens the Mobile TV engine, if the return value of
* mdi_mtv_open() is MDI_RES_MTV_FIND_UNSAVED_RECORDING_FAIL, the application
* could call this function to discard the unsaved recording content. The
* process is asyncronous and when the process is finished, application will
* be notified by the callback function system_event_hdlr defined in
* mdi_mtv_service_config_struct with the event type,
* MDI_MTV_SYSTEM_UNSAVED_RECORDING_DISCARDED.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_discard_unsaved_recording(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_abort_recovering
* DESCRIPTION
* This function is to abort recovering process after mdi_mtv_recover_recording()
* is invoked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_abort_recovering(U32 mtv_handle);
#endif /* __MTV_REC_SUPPORT__ */
/*****************************************************************************
* FUNCTION
* mdi_mtv_scan_services_on_air
* DESCRIPTION
* This function is to scan available services on air. When available services
* are found, service_found_hdlr defined in mdi_mtv_service_config_struct will
* be invoked to notify application. When the scanning process is finished,
* search_progress_hdlr will also be invoked with the progress value, 100.
* MED will store the available services to reduce the scanning time at the next
* time
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* band : [IN] The band value
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_scan_services(U32 mtv_handle, mdi_mtv_service_source_enum source, U32 band, void *param);
/*****************************************************************************
* FUNCTION
* mdi_mtv_abort_scan_services
* DESCRIPTION
* This function is to abort scanning process after mdi_mtv_scan_services_on_air()
* or mdi_mtv_scan_services_from_database() is invoked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_abort_scan_services(U32 mtv_handle);
/*
* Service function
*/
/*****************************************************************************
* FUNCTION
* mdi_mtv_start_service
* DESCRIPTION
* This function is to start a service and is an asyncronous function. After
* the service connects successfully, service_event_hdlr with the event
* MDI_MTV_SERVICE_READY will invoked to notify the application. Application
* could use the 4th parameter, which is auto_play, to ask MED task to or not to
* play the service automatically after the service is connected successfully.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* service_type : [IN] The service type
* auto_play : [IN] Ask MED task to or not to automatically play the service
* setting_p : [IN] The video setting
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_start_service(
U32 mtv_handle,
U32 service_id,
mdi_mtv_service_type_enum service_type,
MMI_BOOL auto_play,
mdi_mtv_player_setting_struct *setting_p);
/*****************************************************************************
* FUNCTION
* mdi_mtv_stop_service
* DESCRIPTION
* This function is to stop a service.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_stop_service(U32 mtv_handle, U32 service_id);
/*****************************************************************************
* FUNCTION
* mdi_mtv_service_get_status
* DESCRIPTION
* This function is to query the status of a service
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* status : [OUT] The service status
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_service_get_status(U32 mtv_handle, mdi_mtv_service_status_struct *status);
/*
* Player function
*/
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_set_hw_rotator
* DESCRIPTION
* This function is to set hw rotater
* PARAMETERS
* rotate : [IN] Rotate angle
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_set_hw_rotator(U16 rotate);
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_play
* DESCRIPTION
* This function is to start a Mobile TV player
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* setting_p : [IN] The video setting
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_play(U32 mtv_handle, mdi_mtv_player_setting_struct *setting_p);
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_stop
* DESCRIPTION
* This function is to stop a Mobile TV player
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_stop(U32 mtv_handle);
#ifdef __MTV_TS_SUPPORT__
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_pause
* DESCRIPTION
* This function is to pause a Mobile TV player
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_ERR_PAUSE_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_pause(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_seek
* DESCRIPTION
* This function is to forward or rewind the time shift buffer
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* play_delay : [IN] The play delay of the time shift buffer
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_seek(U32 mtv_handle, U32 play_delay);
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_get_status
* DESCRIPTION
* This function is to query the status of the Mobile TV player
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* status : [OUT] The player status
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_get_status(U32 mtv_handle, mdi_mtv_player_status_struct *status);
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_set_speed
* DESCRIPTION
* This function is to set play speed of the Mobile TV player.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* speed : [IN] The play speed
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_ERR_SET_SPEED_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_set_speed(U32 mtv_handle, S32 speed);
/*****************************************************************************
* FUNCTION
* mdi_mtv_start_timeshift
* DESCRIPTION
* This function is to start time shift function. Normally, time shift is
* automatically started after the Mobile TV player enters playing status. If
* a application hopes the time shift function starts when the player is at
* stopped status, then the function could be invoked to reach the goal.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_start_timeshift(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_enable_timeshift
* DESCRIPTION
* This function is to re-configure record_dir and is_timeshift_enabled in
* the structure mdi_mtv_setting_struct.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* record_dir : [IN] The recorder's destination folder
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_enable_timeshift(U32 mtv_handle,PU8 record_dir);
/*****************************************************************************
* FUNCTION
* mdi_mtv_disable_timeshift
* DESCRIPTION
* This function is to re-configure is_timeshift_enabled in the structure
* mdi_mtv_setting_struct as false
* is invoked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_disable_timeshift(U32 mtv_handle);
#endif /* __MTV_TS_SUPPORT__ */
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_brightness
* DESCRIPTION
* This function is to set brightness value
* PARAMETERS
* brightness : [IN] The brightness value
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern void mdi_mtv_set_brightness(U16 brightness);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_contrast
* DESCRIPTION
* This function is to set contrast value
* PARAMETERS
* contrast : [IN] The contrast value
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern void mdi_mtv_set_contrast(U16 contrast);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_saturation
* DESCRIPTION
* This function is to set saturation value
* PARAMETERS
* contrast : [IN] The saturation value
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern void mdi_mtv_set_saturation(U16 saturation);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_audio_sample_rate
* DESCRIPTION
* This function is to query audio sample rate
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] Service ID
* sample_rate : [OUT] Audio sampling rate
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_audio_sample_rate (U32 mtv_handle, U32 service_id, U32 *sample_rate);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_audio_channel_number
* DESCRIPTION
* This function is to query audio channel number
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] Service ID
* aud_channel_num : [OUT] Audio channel number
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_audio_channel_number (U32 mtv_handle, U32 service_id, U32 *aud_channel_num);
/*
* Recorder function
*/
#ifdef __MTV_REC_SUPPORT__
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_record_size
* DESCRIPTION
* This function is to set record size
* PARAMETERS
* size : [IN] The record size
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern void mdi_mtv_set_record_size(U8 size);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_start
* DESCRIPTION
* This function is to start a recorder. If some error happens during the
* recording process, the callback function recorder_event_hdlr with the event
* MDI_MTV_RECORDER_ERROR will be invoked to notify the application.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* file_name : [IN] The destination file name
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_ERR_RECORD_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_start(U32 mtv_handle, CHAR *file_name);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_stop
* DESCRIPTION
* This function is to stop a recorder.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_stop(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_pause
* DESCRIPTION
* This function is to pause a recorder.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_pause(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_resume
* DESCRIPTION
* This function is to resume a recorder.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_resume(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_save
* DESCRIPTION
* This function is to save the recording content. Application should invoke
* mdi_mtv_recorder_stop() to stop recording first and then invoke the function
* to save the recording content. The function is asyncronous and when the saving
* process is finished, the callback function recorder_event_hdlr with the event
* MDI_MTV_RECORDER_SAVING_SUCCEEDED or MDI_MTV_RECORDER_SAVING_FAILED will be
* invoked to notify the application.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_save(U32 mtv_handle, WCHAR *file_path);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_discard_recording
* DESCRIPTION
* This function is to discard the recording content. Application should invoke
* mdi_mtv_recorder_stop() to stop recording first and then invoke the function
* to discard the recording content. The function is asyncronous and when the
* discarding process is finished, the callback function recorder_event_hdlr
* with the event MDI_MTV_RECORDER_RECORDING_DISCARDED will be invoked to notify
* the application.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_discard_recording(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_recorder_abort_saving
* DESCRIPTION
* This function is to abort the saving process after mdi_mtv_recorder_save()
* is invoked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_recorder_abort_saving(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_storage
* DESCRIPTION
* This function is to re-configure record_dir and is_timeshift_enabled in
* the structure mdi_mtv_setting_struct.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* record_dir : [IN] The recorder's destination folder
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_set_storage(U32 mtv_handle,PU8 record_dir);
#endif /* __MTV_REC_SUPPORT__ */
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_snapshot
* DESCRIPTION
* This function is to get snapshot
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* layer_handle : [IN] The layer handle of video
* file_path : [IN] The snapshot's destination folder
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_snapshot(U32 mtv_handle, gdi_handle layer_handle, WCHAR *file_path);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_hw_layer_buffer_content
* DESCRIPTION
* This function is to get buffer content
* PARAMETERS
* layer_handle : [IN] The GDI layer handle
* dst_buff_p : [IN] The destination buffer address
* dst_buff_size : [IN] The destination buffer size
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_hw_layer_buffer_content(gdi_handle layer_handle, U8 *dst_buff_p, U32 dst_buff_size);
#if defined(__MMI_ATV_SUPPORT__)
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_supported_record_size
* DESCRIPTION
* This function is to get snapshot
* PARAMETERS
* record_size_num : [OUT] The number of supported record size
* record_size_list : [OUT] The list of supported record size
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_supported_record_size(U32 mtv_handle, S32 *record_size_num, mdi_mtv_recorder_size_enum *record_size_list);
/*****************************************************************************
* FUNCTION
* mdi_mtv_pause_engine
* DESCRIPTION
* This function is to pause Mobile TV engine.
* PARAMETERS
* void
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_pause_engine(void);
/*****************************************************************************
* FUNCTION
* mdi_mtv_resume_engine
* DESCRIPTION
* This function is to resume Mobile TV engine.
* PARAMETERS
* void
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_resume_engine(void);
/*****************************************************************************
* FUNCTION
* mdi_mtv_delete_channel
* DESCRIPTION
* The function is to delete a service from the service list.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_delete_channel(U32 mtv_handle, U32 service_id);
/*****************************************************************************
* FUNCTION
* mdi_mtv_rename_channel
* DESCRIPTION
* The function is to rename a service.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* service_name : [IN] The service name
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_rename_channel(U32 mtv_handle, U32 service_id, CHAR* service_name);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_audio_mode
* DESCRIPTION
* The function is to set audio mode.
* PARAMETERS
* mode : [IN] The audio mode
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_set_audio_mode(U32 mtv_handle, U32 service_id, U32 mode);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_service_by_index
* DESCRIPTION
* The function is to get service by index.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* index : [IN] The service index
* service_info : [OUT] The service info
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_service_by_index(U32 mtv_handle, S32 index, mdi_mtv_service_info_struct *service_info);
#endif /* __MMI_ATV_SUPPORT__ */
#if defined(__MMI_MOBILE_TV_CMMB_SUPPORT__)
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_resume_visual_update
* DESCRIPTION
* This function is to resume visual update
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* setting_p : [IN] The video setting
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_resume_visual_update(U32 mtv_handle, mdi_mtv_player_setting_struct *setting_p);
/*****************************************************************************
* FUNCTION
* mdi_mtv_player_pause_visual_update
* DESCRIPTION
* This function is to pause visual update
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
*****************************************************************************/
extern MDI_RESULT mdi_mtv_player_pause_visual_update(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_start_esg_download
* DESCRIPTION
* This function is to start to download ESG and is an asyncronous function.
* After one application invokes mdi_mtv_scan_services_on_air or mdi_mtv_scan_services_from_database
* to enter scanning state, if it receives the service event, MEDIA_MTV_SERVICE_ESG_NEW_AVAILABLE,
* during the scanning state, it could invoke the function immediately to download
* ESG, after the scanning process is finished.
* After ESG is downloaded successfully, service_event_hdlr with the event type
* MEDIA_MTV_SERVICE_ESG_DOWNLOADED will be invoked to notify the application.
* The downloaded ESG is processed in the background and when the ESG is ready to
* query information, the application will receive another service event called
* MEDIA_MTV_SERVICE_ESG_UPDATED. And then the application could use ESG query APIs
* to query ESG related information.
* The number of connecting service at the same time has limitation. Therefore,
* application MUST stop all the TV or radio service before invoking the function
* to download ESG and wait until it receives the service event, MEDIA_MTV_SERVICE_ESG_DOWNLOADED,
* then the application could start the TV and radio service again.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_start_esg_download(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_abort_esg_download
* DESCRIPTION
* This function is to abort ESG downloading process after mdi_mtv_start_esg_download()
* is invoked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_abort_esg_download(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_add_favorite
* DESCRIPTION
* The function is to add a service into favorite service list.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_add_favorite(
U32 mtv_handle,
mdi_mtv_favorite_type_enum type,
U32 id,
CHAR *rid);
/*****************************************************************************
* FUNCTION
* mdi_mtv_delete_favorite
* DESCRIPTION
* The function is to delete a service from the favorite service list.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_delete_favorite(
U32 mtv_handle,
mdi_mtv_favorite_type_enum type,
U32 id,
CHAR *rid);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_net_info
* DESCRIPTION
* This function is to network info.
* is invoked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* net : [IN] The network information
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_set_net_info(U32 mtv_handle, mdi_mtv_cas_net_struct *net);
/*****************************************************************************
* FUNCTION
* mdi_mtv_subscribe_purchase_item
* DESCRIPTION
* This function is to subscribe purchase item. It's an asynchronous function.
* Application should wait until service event: MEDIA_MTV_SERVICE_SUBSCRIBE_DONE
* is callbacked. Subscribe action doesn't have abort function.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* id : [IN] The fragment ID in SG
* gid : [IN] The global ID in SG
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_subscribe_purchase_item(U32 mtv_handle, CHAR *id, CHAR *gid);
/*****************************************************************************
* FUNCTION
* mdi_mtv_unsubscribe_purchase_item
* DESCRIPTION
* This function is to unsubscribe purchase item. It's an asynchronous function.
* Application should wait until service event: MEDIA_MTV_SERVICE_UNSUBSCRIBE_DONE
* is callbacked. Unsubscribe action doesn't have abort function.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* id : [IN] The fragment ID in SG
* gid : [IN] The global ID in SG
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_unsubscribe_purchase_item(U32 mtv_handle, CHAR *id, CHAR *gid);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_services_ca
* DESCRIPTION
* This function is get CA related attribute of a service.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* flag : [OUT] The CA attribute. Please refer to media_mtv_service_flag_enum
* purchase_id : [OUT] reserved now
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_services_ca(U32 mtv_handle, U32 service_id, U32 *flag, CHAR *purchase_id);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_mbbms_description
* DESCRIPTION
* This function is get mbbms description
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* service_id : [IN] The service ID
* desc : [OUT] The CA attribute. Please refer to media_mtv_service_flag_enum
* desc_len : [IN] UCS2 len, not include null termination
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_get_mbbms_description(U32 mtv_handle, U32 service_id, WCHAR *desc, S32 desc_len);
/*****************************************************************************
* FUNCTION
* mdi_mtv_esg_query
* DESCRIPTION
* This function is query ESG database.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* source : [IN] If MTV engine is closed, the source should be MEDIA_MTV_ESG_SOURCE_MBBMS
* query_type : [IN] The query type
* query_param : [IN] The query paramter
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_esg_query(
U32 mtv_handle,
media_mtv_esg_source_enum source,
esg_query_type_enum query_type,
mdi_mtv_query_struct *query_param);
/*****************************************************************************
* FUNCTION
* mdi_mtv_esg_get_result
* DESCRIPTION
* This function is get query result from ESG database.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* source : [IN] If MTV engine is closed, the source should be MEDIA_MTV_ESG_SOURCE_MBBMS
* query_type : [IN] The query type
* buf_ptr : [OUT] Structure pointer to the query result
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_esg_get_result(
U32 mtv_handle,
media_mtv_esg_source_enum source,
esg_query_type_enum query_type,
void **buf_ptr);
/*****************************************************************************
* FUNCTION
* mdi_mtv_open_stand_alone_db
* DESCRIPTION
* This function is to open SG database when MTV engine is closed.
* PARAMETERS
* db_handle : [OUT] The database handle
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_open_stand_alone_db(const U16 app_id, U32 *db_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_close_stand_alone_db
* DESCRIPTION
* This function is to close SG database when MTV engine is closed.
* PARAMETERS
* db_handle : [IN] The database handle
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_close_stand_alone_db(U32 db_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_purify_program_reminder
* DESCRIPTION
* This function is to purify program reminder. The program time which is greater
* than input time will be removed from database.
* PARAMETERS
* db_handle : [IN] The database handle
* time : [IN] The input time. For example, current time.
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_purify_program_reminder(U32 mtv_handle, applib_time_struct *time);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_preview_data_downloaded
* DESCRIPTION
* This function is to tell MED if the preview data is downloaded
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* file_path : [IN] The file path of the downloaded preview data
* downloaded : [IN] If the file path is downloaded or not
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_set_preview_data_downloaded(U32 mtv_handle, WCHAR *file_path, MMI_BOOL downloaded);
/*****************************************************************************
* FUNCTION
* mdi_mtv_account_inquiry
* DESCRIPTION
* This function is to do account inquiry. The function is an asynchronous
* function. MDI will call account_inquiry_hdlr() to notify application the subscribed
* purchase item and use the service event: MEDIA_MTV_SERVICE_ACCOUNT_INQUIRY_DONE
* to notify application the action is done.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_account_inquiry(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_upgrade_query
* DESCRIPTION
* This function is to send a query request to server to know if the client
* needs to upgrade. The function is an asynchronous function and application
* should wait until service event: MEDIA_MTV_SERVICE_UPGRADE_RET is callbacked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_upgrade_query(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_account_inquiry
* DESCRIPTION
* This function is to do area set retrieve. The function is an asynchronous
* function. MDI will call city_found_hdlr() to notify application the recommended
* city list and use the service event: MEDIA_MTV_SERVICE_AREA_RETRIEVE_RET
* to notify application the action is done.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_area_set_retrieve(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_download_service_guide
* DESCRIPTION
* This function is to download service guide with specified city name
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* param : [IN] The city name. If it's null, MED will do SG retrieve with auto detecting city mode
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_download_service_guide(U32 mtv_handle, void *param);
/*****************************************************************************
* FUNCTION
* mdi_mtv_interactivity_retrieve
* DESCRIPTION
* This function is to retrieve the interactivity URL of the specified content.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* content_id : [IN] The content ID
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_interactivity_retrieve(U32 mtv_handle, CHAR *content_id);
extern MDI_RESULT mdi_mtv_get_imd_detail(
U32 mtv_handle,
U32 service_id,
mdi_mtv_imd_detail_struct *imd_detail);
extern MDI_RESULT mdi_mtv_get_imd_desc(
U32 mtv_handle,
U32 service_id,
mdi_mtv_imd_desc_struct *imd_desc);
extern MDI_RESULT mdi_mtv_get_imd_count(
U32 mtv_handle,
U32 service_id,
U32 *count,
U32 *unread_count,
U32 *first_unread_idx);
/*****************************************************************************
* FUNCTION
* mdi_mtv_update_service_guide
* DESCRIPTION
* This function is to ask MED to update service list from SG
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_update_service_guide(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_set_sim_info
* DESCRIPTION
* This function is to set SIM related information
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* sim : [IN] SIM related information
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_set_sim_info(U32 mtv_handle, mdi_mtv_cas_sim_struct *sim);
/*****************************************************************************
* FUNCTION
* mdi_mtv_subscription_update
* DESCRIPTION
* This function is to update subscription table. The function is an asynchronous
* function and application should wait until service event: MEDIA_MTV_SERVICE_SUBSCRIPTION_UPDATE_RET
* is callbacked.
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_subscription_update(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_cancel_subscription_update
* DESCRIPTION
* This function is to cancel subscription table updating
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_cancel_subscription_update(U32 mtv_handle);
/*****************************************************************************
* FUNCTION
* mdi_mtv_mts_test
* DESCRIPTION
* This function is to do the test item defined in MTS system
* PARAMETERS
* mtv_handle : [IN] The handle of the Mobile TV engine
* type : [IN] The action type
* service_id : [IN] service ID
* RETURNS
* MDI_RES_MTV_SUCCEED : Success
* MDI_RES_MTV_FAILED : Fail
*****************************************************************************/
extern MDI_RESULT mdi_mtv_mts_test(U32 mtv_handle, mdi_mtv_mts_type_enum type, S32 service_id);
#endif /* __MMI_MOBILE_TV_CMMB_SUPPORT__ */
/*****************************************************************************
* FUNCTION
* mdi_mtv_init
* DESCRIPTION
* The function is to initialize parameters.
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
extern void mdi_mtv_init(void);
/*****************************************************************************
* FUNCTION
* mdi_mtv_is_playing
* DESCRIPTION
* The function is to query if Mobile TV player is at playing status.
* PARAMETERS
* void
* RETURNS
* MDI_TRUE : Mobile TV player is playing.
* MDI_FALSE : Mobile TV player is not playing.
*****************************************************************************/
extern MMI_BOOL mdi_mtv_is_playing(void);
/*****************************************************************************
* FUNCTION
* mdi_mtv_is_opened
* DESCRIPTION
* The function is to query if Mobile TV player is at opened status.
* PARAMETERS
* void
* RETURNS
* MDI_TRUE : Mobile TV player is opened.
* MDI_FALSE : Mobile TV player is not opened.
*****************************************************************************/
extern MMI_BOOL mdi_mtv_is_opened(void);
/*****************************************************************************
* FUNCTION
* mdi_mtv_get_error_info
* DESCRIPTION
* The function is to query error string and pop up type.
* PARAMETERS
* error_code : [IN] The MDI error code
* popup_type : [OUT] The popup type
* RETURNS
* MMI_EVENT_FAILURE : Pop up type is FAILURE
* MMI_EVENT_ERROR : Pop up type is ERROR
*****************************************************************************/
extern MMI_ID_TYPE mdi_mtv_get_error_info(MDI_RESULT error_code, mmi_event_notify_enum* popup_type);
extern MDI_RESULT mdi_mtv_set_emm(U32 mtv_handle, U32 emm_len, U8* emm_data);
extern MDI_RESULT mdi_mtv_get_nit_time(U32 mtv_handle, mdi_mtv_nit_time_struct *nit_time);
extern MDI_RESULT mdi_mtv_get_nit_area_code(U32 mtv_handle, U8* net_mode, U16* area_code);
extern MDI_RESULT mdi_mtv_ca_query(U32 mtv_handle, U32 block_len , U32* block_data);
#endif /* (__MMI_ATV_SUPPORT__) || (__MMI_MOBILE_TV_CMMB_SUPPORT__) */
#endif /* _MDI_MTV_H_ */