Bug #5593 ยป gitdiff.patch
src/input/mpegts/dvb.h | ||
---|---|---|
428 | 428 |
DVB_TYPE_ISDB_T, /* terrestrial - japan, brazil */ |
429 | 429 |
DVB_TYPE_ISDB_C, /* cable - japan, brazil */ |
430 | 430 |
DVB_TYPE_ISDB_S, /* satellite - japan, brazil */ |
431 |
DVB_TYPE_DTMB, /* DTMB - china, cuba, hong kong, macau */ |
|
432 | 431 |
DVB_TYPE_DAB, /* digital radio (europe) */ |
433 | 432 |
DVB_TYPE_LAST = DVB_TYPE_DAB |
434 | 433 |
} dvb_fe_type_t; |
src/input/mpegts/dvb_support.c | ||
---|---|---|
740 | 740 |
case DVB_SYS_DVBT: |
741 | 741 |
case DVB_SYS_DVBT2: |
742 | 742 |
case DVB_SYS_TURBO: |
743 |
case DVB_SYS_DTMB: |
|
743 | 744 |
return DVB_TYPE_T; |
744 | 745 |
case DVB_SYS_DVBS: |
745 | 746 |
case DVB_SYS_DVBS2: |
... | ... | |
760 | 761 |
return DVB_TYPE_ISDB_C; |
761 | 762 |
case DVB_SYS_ISDBS: |
762 | 763 |
return DVB_TYPE_ISDB_S; |
763 |
case DVB_SYS_DTMB: |
|
764 |
return DVB_TYPE_DTMB; |
|
765 | 764 |
case DVB_SYS_DAB: |
766 | 765 |
return DVB_TYPE_DAB; |
767 | 766 |
default: |
src/input/mpegts/linuxdvb/linuxdvb_frontend.c | ||
---|---|---|
461 | 461 |
} |
462 | 462 |
}; |
463 | 463 | |
464 |
const idclass_t linuxdvb_frontend_dtmb_class = |
|
465 |
{ |
|
466 |
.ic_super = &linuxdvb_frontend_class, |
|
467 |
.ic_class = "linuxdvb_frontend_dab", |
|
468 |
.ic_caption = N_("TV Adapters - DTMB Frontend"), |
|
469 |
.ic_properties = (const property_t[]){ |
|
470 |
{} |
|
471 |
} |
|
472 |
}; |
|
473 | ||
474 | 464 |
const idclass_t linuxdvb_frontend_dab_class = |
475 | 465 |
{ |
476 | 466 |
.ic_super = &linuxdvb_frontend_class, |
... | ... | |
1786 | 1776 |
p.inversion = TR(inversion, inv_tbl, INVERSION_AUTO); |
1787 | 1777 |
switch (dmc->dmc_fe_type) { |
1788 | 1778 |
case DVB_TYPE_T: |
1789 |
case DVB_TYPE_DTMB: |
|
1790 | 1779 |
#define _OFDM(xyz) p.u.ofdm.xyz |
1791 | 1780 |
_OFDM(bandwidth) = TRU(ofdm.bandwidth, bw_tbl, BANDWIDTH_AUTO); |
1792 | 1781 |
_OFDM(code_rate_HP) = TRU(ofdm.code_rate_HP, fec_tbl, FEC_AUTO); |
... | ... | |
1855 | 1844 |
S2CMD(DTV_INVERSION, p.inversion); |
1856 | 1845 | |
1857 | 1846 |
/* DVB-T */ |
1858 |
if (lfe->lfe_type == DVB_TYPE_T || lfe->lfe_type == DVB_TYPE_DTMB) {
|
|
1847 |
if (lfe->lfe_type == DVB_TYPE_T) { |
|
1859 | 1848 |
S2CMD(DTV_BANDWIDTH_HZ, dvb_bandwidth(dmc->u.dmc_fe_ofdm.bandwidth)); |
1860 | 1849 |
#if DVB_VER_ATLEAST(5,1) |
1861 | 1850 |
S2CMD(DTV_CODE_RATE_HP, p.u.ofdm.code_rate_HP); |
... | ... | |
2163 | 2152 |
idc = &linuxdvb_frontend_isdb_c_class; |
2164 | 2153 |
else if (type == DVB_TYPE_ISDB_S) |
2165 | 2154 |
idc = &linuxdvb_frontend_isdb_s_class; |
2166 |
else if (type == DVB_TYPE_DTMB) |
|
2167 |
idc = &linuxdvb_frontend_dtmb_class; |
|
2168 | 2155 |
else if (type == DVB_TYPE_DAB) |
2169 | 2156 |
idc = &linuxdvb_frontend_dab_class; |
2170 | 2157 |
else { |
src/input/mpegts/mpegts_dvb.h | ||
---|---|---|
54 | 54 |
extern const idclass_t dvb_network_isdb_t_class; |
55 | 55 |
extern const idclass_t dvb_network_isdb_c_class; |
56 | 56 |
extern const idclass_t dvb_network_isdb_s_class; |
57 |
extern const idclass_t dvb_network_dtmb_class; |
|
58 | 57 |
extern const idclass_t dvb_network_dab_class; |
59 | 58 | |
60 | 59 |
void dvb_network_init ( void ); |
... | ... | |
93 | 92 |
extern const idclass_t dvb_mux_isdb_t_class; |
94 | 93 |
extern const idclass_t dvb_mux_isdb_c_class; |
95 | 94 |
extern const idclass_t dvb_mux_isdb_s_class; |
96 |
extern const idclass_t dvb_mux_dtmb_class; |
|
97 | 95 |
extern const idclass_t dvb_mux_dab_class; |
98 | 96 | |
99 | 97 |
dvb_mux_t *dvb_mux_create0 |
src/input/mpegts/mpegts_mux_dvb.c | ||
---|---|---|
180 | 180 |
htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_DVBT)); |
181 | 181 |
htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_DVBT2)); |
182 | 182 |
htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_TURBO)); |
183 |
htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_DTMB)); |
|
183 | 184 |
return list; |
184 | 185 |
} |
185 | 186 | |
... | ... | |
924 | 925 |
} |
925 | 926 |
}; |
926 | 927 | |
927 |
/* |
|
928 |
* DTMB, fixme: review actually used parameters! |
|
929 |
*/ |
|
930 | ||
931 |
dvb_mux_class_X(dtmb, ofdm, bandwidth, bw, bw, |
|
932 |
DVB_BANDWIDTH_AUTO, DVB_BANDWIDTH_10_MHZ, |
|
933 |
DVB_BANDWIDTH_8_MHZ, DVB_BANDWIDTH_7_MHZ, |
|
934 |
DVB_BANDWIDTH_6_MHZ, DVB_BANDWIDTH_5_MHZ, |
|
935 |
DVB_BANDWIDTH_1_712_MHZ); |
|
936 |
dvb_mux_class_R(dtmb, modulation, qam, qam, |
|
937 |
DVB_MOD_QAM_AUTO, DVB_MOD_QPSK, DVB_MOD_QAM_16, |
|
938 |
DVB_MOD_QAM_64, DVB_MOD_QAM_256); |
|
939 |
dvb_mux_class_X(dtmb, ofdm, transmission_mode, mode, mode, |
|
940 |
DVB_TRANSMISSION_MODE_AUTO, DVB_TRANSMISSION_MODE_32K, |
|
941 |
DVB_TRANSMISSION_MODE_16K, DVB_TRANSMISSION_MODE_8K, |
|
942 |
DVB_TRANSMISSION_MODE_2K, DVB_TRANSMISSION_MODE_1K); |
|
943 |
dvb_mux_class_X(dtmb, ofdm, guard_interval, guard, guard, |
|
944 |
DVB_GUARD_INTERVAL_AUTO, DVB_GUARD_INTERVAL_1_32, |
|
945 |
DVB_GUARD_INTERVAL_1_16, DVB_GUARD_INTERVAL_1_8, |
|
946 |
DVB_GUARD_INTERVAL_1_4, DVB_GUARD_INTERVAL_1_128, |
|
947 |
DVB_GUARD_INTERVAL_19_128, DVB_GUARD_INTERVAL_19_256); |
|
948 |
dvb_mux_class_X(dtmb, ofdm, hierarchy_information, hier, hier, |
|
949 |
DVB_HIERARCHY_AUTO, DVB_HIERARCHY_NONE, |
|
950 |
DVB_HIERARCHY_1, DVB_HIERARCHY_2, DVB_HIERARCHY_4); |
|
951 |
dvb_mux_class_X(dtmb, ofdm, code_rate_HP, fechi, fechi, |
|
952 |
DVB_FEC_AUTO, DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, |
|
953 |
DVB_FEC_3_5, DVB_FEC_4_5, DVB_FEC_5_6, DVB_FEC_7_8); |
|
954 |
dvb_mux_class_X(dtmb, ofdm, code_rate_LP, feclo, feclo, |
|
955 |
DVB_FEC_AUTO, DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, |
|
956 |
DVB_FEC_3_5, DVB_FEC_4_5, DVB_FEC_5_6, DVB_FEC_7_8); |
|
957 | ||
958 |
#define dvb_mux_dtmb_class_delsys_get dvb_mux_class_delsys_get |
|
959 |
#define dvb_mux_dtmb_class_delsys_set dvb_mux_class_delsys_set |
|
960 | ||
961 |
static htsmsg_t * |
|
962 |
dvb_mux_dtmb_class_delsys_enum (void *o, const char *lang) |
|
963 |
{ |
|
964 |
htsmsg_t *list = htsmsg_create_list(); |
|
965 |
htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_DTMB)); |
|
966 |
return list; |
|
967 |
} |
|
968 | ||
969 |
static int |
|
970 |
dvb_mux_dtmb_class_frequency_set ( void *o, const void *v ) |
|
971 |
{ |
|
972 |
dvb_mux_t *lm = o; |
|
973 |
uint32_t val = *(uint32_t *)v; |
|
974 | ||
975 |
if (val < 1000) |
|
976 |
val *= 1000000; |
|
977 |
else if (val < 1000000) |
|
978 |
val *= 1000; |
|
979 | ||
980 |
if (val != lm->lm_tuning.dmc_fe_freq) { |
|
981 |
lm->lm_tuning.dmc_fe_freq = val; |
|
982 |
return 1; |
|
983 |
} |
|
984 |
return 0; |
|
985 |
} |
|
986 | ||
987 |
const idclass_t dvb_mux_dtmb_class = |
|
988 |
{ |
|
989 |
.ic_super = &dvb_mux_class, |
|
990 |
.ic_class = "dvb_mux_dtmb", |
|
991 |
.ic_caption = N_("DTMB multiplex"), |
|
992 |
.ic_properties = (const property_t[]){ |
|
993 |
{ |
|
994 |
MUX_PROP_STR("delsys", N_("Delivery system"), dtmb, delsys, "DVBT"), |
|
995 |
.desc = N_("The delivery system the mux uses. " |
|
996 |
"Make sure that your tuner supports the delivery " |
|
997 |
"system selected here."), |
|
998 |
}, |
|
999 |
{ |
|
1000 |
.type = PT_U32, |
|
1001 |
.id = "frequency", |
|
1002 |
.name = N_("Frequency (Hz)"), |
|
1003 |
.desc = N_("The frequency of the mux (in Hertz)."), |
|
1004 |
.off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_freq), |
|
1005 |
.set = dvb_mux_dtmb_class_frequency_set, |
|
1006 |
}, |
|
1007 |
{ |
|
1008 |
MUX_PROP_STR("bandwidth", N_("Bandwidth"), dtmb, bw, N_("AUTO")), |
|
1009 |
.desc = N_("The bandwidth the mux uses. " |
|
1010 |
"If you're not sure of the value leave as AUTO " |
|
1011 |
"but be aware that tuning may fail as some drivers " |
|
1012 |
"do not like the AUTO setting."), |
|
1013 |
}, |
|
1014 |
{ |
|
1015 |
MUX_PROP_STR("constellation", N_("Constellation"), dtmb, qam, N_("AUTO")), |
|
1016 |
.desc = N_("The COFDM modulation used by the mux. " |
|
1017 |
"If you're not sure of the value leave as AUTO."), |
|
1018 |
}, |
|
1019 |
{ |
|
1020 |
MUX_PROP_STR("transmission_mode", N_("Transmission mode"), dtmb, mode, N_("AUTO")), |
|
1021 |
.desc = N_("The transmission/OFDM mode used by the mux. " |
|
1022 |
"If you're not sure of the value leave as AUTO " |
|
1023 |
"but be aware that tuning may fail as some drivers " |
|
1024 |
"do not like the AUTO setting."), |
|
1025 |
}, |
|
1026 |
{ |
|
1027 |
MUX_PROP_STR("guard_interval", N_("Guard interval"), dtmb, guard, N_("AUTO")), |
|
1028 |
.desc = N_("The guard interval used by the mux. " |
|
1029 |
"If you're not sure of the value leave as AUTO."), |
|
1030 |
}, |
|
1031 |
{ |
|
1032 |
MUX_PROP_STR("hierarchy", N_("Hierarchy"), dtmb, hier, N_("AUTO")), |
|
1033 |
.desc = N_("The hierarchical modulation used by the mux. " |
|
1034 |
"Most people will not need to change this setting."), |
|
1035 |
}, |
|
1036 |
{ |
|
1037 |
MUX_PROP_STR("fec_hi", N_("FEC high"), dtmb, fechi, N_("AUTO")), |
|
1038 |
.desc = N_("The forward error correction high value. " |
|
1039 |
"Most people will not need to change this setting."), |
|
1040 |
}, |
|
1041 |
{ |
|
1042 |
MUX_PROP_STR("fec_lo", N_("FEC low"), dtmb, feclo, N_("AUTO")), |
|
1043 |
.desc = N_("The forward error correction low value. " |
|
1044 |
"Most people will not need to change this setting."), |
|
1045 |
}, |
|
1046 |
{ |
|
1047 |
.type = PT_INT, |
|
1048 |
.id = "plp_id", |
|
1049 |
.name = N_("PLP ID"), |
|
1050 |
.desc = N_("The physical layer pipe ID. " |
|
1051 |
"Most people will not need to change this setting."), |
|
1052 |
.off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_stream_id), |
|
1053 |
.def.i = DVB_NO_STREAM_ID_FILTER, |
|
1054 |
}, |
|
1055 |
{} |
|
1056 |
} |
|
1057 |
}; |
|
1058 | ||
1059 | 928 |
/* |
1060 | 929 |
* DAB |
1061 | 930 |
*/ |
... | ... | |
1211 | 1080 |
} else if (ln->ln_type == DVB_TYPE_ISDB_S) { |
1212 | 1081 |
idc = &dvb_mux_isdb_s_class; |
1213 | 1082 |
delsys = DVB_SYS_ISDBS; |
1214 |
} else if (ln->ln_type == DVB_TYPE_DTMB) { |
|
1215 |
idc = &dvb_mux_dtmb_class; |
|
1216 |
delsys = DVB_SYS_DTMB; |
|
1217 | 1083 |
} else if (ln->ln_type == DVB_TYPE_DAB) { |
1218 | 1084 |
idc = &dvb_mux_dab_class; |
1219 | 1085 |
delsys = DVB_SYS_DAB; |
src/input/mpegts/mpegts_network_dvb.c | ||
---|---|---|
142 | 142 |
type = "isdb-c"; |
143 | 143 |
else if (clazz == &dvb_network_isdb_s_class) |
144 | 144 |
type = "isdb-s"; |
145 |
else if (clazz == &dvb_network_dtmb_class) |
|
146 |
type = "dtmb"; |
|
147 | 145 |
else if (clazz == &dvb_network_dab_class) |
148 | 146 |
type = "dab"; |
149 | 147 |
else |
... | ... | |
178 | 176 |
SCANFILE_LIST(isdb_t); |
179 | 177 |
SCANFILE_LIST(isdb_c); |
180 | 178 |
SCANFILE_LIST(isdb_s); |
181 |
SCANFILE_LIST(dtmb); |
|
182 | 179 |
SCANFILE_LIST(dab); |
183 | 180 | |
184 | 181 |
static const void * |
... | ... | |
439 | 436 |
} |
440 | 437 |
}; |
441 | 438 | |
442 |
const idclass_t dvb_network_dtmb_class = |
|
443 |
{ |
|
444 |
.ic_super = &dvb_network_class, |
|
445 |
.ic_class = "dvb_network_dtmb", |
|
446 |
.ic_caption = N_("DTMB Network"), |
|
447 |
.ic_properties = (const property_t[]) { |
|
448 |
{ |
|
449 |
.type = PT_STR, |
|
450 |
.id = "scanfile", |
|
451 |
.name = N_("Pre-defined muxes"), |
|
452 |
.desc = N_("Use a pre-defined list of DTMB muxes. " |
|
453 |
"Note: these lists can sometimes be outdated and " |
|
454 |
"may cause scanning to take longer than usual."), |
|
455 |
.doc = prop_doc_predefinedmuxlist, |
|
456 |
.set = dvb_network_class_scanfile_set, |
|
457 |
.get = dvb_network_class_scanfile_get, |
|
458 |
.list = dvb_network_class_scanfile_list_dtmb, |
|
459 |
.opts = PO_NOSAVE, |
|
460 |
}, |
|
461 |
{} |
|
462 |
} |
|
463 |
}; |
|
464 | ||
465 | 439 |
const idclass_t dvb_network_dab_class = |
466 | 440 |
{ |
467 | 441 |
.ic_super = &dvb_network_class, |
... | ... | |
503 | 477 |
{ |
504 | 478 |
switch (dmc->dmc_fe_type) { |
505 | 479 |
case DVB_TYPE_T: |
506 |
case DVB_TYPE_DTMB: |
|
507 | 480 |
return dvb_network_check_bandwidth(lm->lm_tuning.u.dmc_fe_ofdm.bandwidth, |
508 | 481 |
dmc->u.dmc_fe_ofdm.bandwidth); |
509 | 482 |
case DVB_TYPE_C: |
... | ... | |
648 | 621 |
return &dvb_mux_isdb_c_class; |
649 | 622 |
if (idnode_is_instance(&mn->mn_id, &dvb_network_isdb_s_class)) |
650 | 623 |
return &dvb_mux_isdb_s_class; |
651 |
if (idnode_is_instance(&mn->mn_id, &dvb_network_dtmb_class)) |
|
652 |
return &dvb_mux_dtmb_class; |
|
653 | 624 |
if (idnode_is_instance(&mn->mn_id, &dvb_network_dab_class)) |
654 | 625 |
return &dvb_mux_dab_class; |
655 | 626 |
return NULL; |
... | ... | |
776 | 747 |
save |= COMPAREN(dmc_fe_pilot, CBIT_PILOT); |
777 | 748 |
switch (dmc->dmc_fe_type) { |
778 | 749 |
case DVB_TYPE_T: |
779 |
case DVB_TYPE_DTMB: |
|
780 | 750 |
save |= COMPARE(dmc_fe_stream_id, CBIT_STREAM_ID); |
781 | 751 |
save |= COMPAREN(u.dmc_fe_ofdm.bandwidth, CBIT_BANDWIDTH); |
782 | 752 |
save |= COMPAREN(u.dmc_fe_ofdm.hierarchy_information, CBIT_HIERARCHY); |
... | ... | |
1037 | 1007 |
return &dvb_network_isdb_c_class; |
1038 | 1008 |
else if (type == DVB_TYPE_ISDB_S) |
1039 | 1009 |
return &dvb_network_isdb_s_class; |
1040 |
else if (type == DVB_TYPE_DTMB) |
|
1041 |
return &dvb_network_dtmb_class; |
|
1042 | 1010 |
else if (type == DVB_TYPE_DAB) |
1043 | 1011 |
return &dvb_network_dab_class; |
1044 | 1012 | |
... | ... | |
1065 | 1033 |
return DVB_TYPE_ISDB_C; |
1066 | 1034 |
else if (idc == &dvb_network_isdb_s_class) |
1067 | 1035 |
return DVB_TYPE_ISDB_S; |
1068 |
else if (idc == &dvb_network_dtmb_class) |
|
1069 |
return DVB_TYPE_DTMB; |
|
1070 | 1036 |
else if (idc == &dvb_network_dab_class) |
1071 | 1037 |
return DVB_TYPE_DAB; |
1072 | 1038 |
src/input/mpegts/mpegts_service.c | ||
---|---|---|
569 | 569 |
if (mux_idc == &dvb_mux_isdb_t_class) return "ISDB-T"; |
570 | 570 |
if (mux_idc == &dvb_mux_isdb_c_class) return "ISDB-C"; |
571 | 571 |
if (mux_idc == &dvb_mux_isdb_s_class) return "ISDB-S"; |
572 |
if (mux_idc == &dvb_mux_dtmb_class) return "DTMB";
|
|
572 |
//#if (mux_idc == &dvb_mux_dtmb_class) return "DTMB";
|
|
573 | 573 |
if (mux_idc == &dvb_mux_dab_class) return "DAB"; |
574 | 574 |
return NULL; |
575 | 575 |
} |