/*
- * Tvheadend - Linux DVB Multiplex
+ * Tvheadend - DVB Multiplex
*
* Copyright (C) 2013 Adam Sutton
*
*/
/* Macro to define mux class str get/set */
-#define dvb_mux_class_R(c, f, l, ...)\
+#define dvb_mux_class_R(c, f, l, t, ...)\
static const void * \
dvb_mux_##c##_class_##l##_get (void *o)\
{\
static const char *s;\
dvb_mux_t *lm = o;\
- s = dvb_##l##2str(lm->lm_tuning.dmc_fe_##f);\
+ s = dvb_##t##2str(lm->lm_tuning.dmc_fe_##f);\
return &s;\
}\
static int \
dvb_mux_##c##_class_##l##_set (void *o, const void *v)\
{\
dvb_mux_t *lm = o;\
- lm->lm_tuning.dmc_fe_##f = dvb_str2##l ((const char*)v);\
+ lm->lm_tuning.dmc_fe_##f = dvb_str2##t ((const char*)v);\
return 1;\
}\
static htsmsg_t *\
{\
static const int t[] = { __VA_ARGS__ };\
int i;\
- htsmsg_t *m = htsmsg_create_list();\
- for (i = 0; i < ARRAY_SIZE(t); i++)\
- htsmsg_add_str(m, NULL, tvh_gettext_lang(lang, dvb_##l##2str(t[i])));\
+ htsmsg_t *m = htsmsg_create_list(), *e;\
+ for (i = 0; i < ARRAY_SIZE(t); i++) {\
+ e = htsmsg_create_map(); \
+ htsmsg_add_str(e, "key", dvb_##t##2str(t[i]));\
+ htsmsg_add_str(e, "val", tvh_gettext_lang(lang, dvb_##t##2str(t[i])));\
+ htsmsg_add_msg(m, NULL, e);\
+ }\
return m;\
}
-#define dvb_mux_class_X(c, f, p, l, ...)\
+#define dvb_mux_class_X(c, f, p, l, t, ...)\
static const void * \
dvb_mux_##c##_class_##l##_get (void *o)\
{\
static const char *s;\
dvb_mux_t *lm = o;\
- s = dvb_##l##2str(lm->lm_tuning.u.dmc_fe_##f.p);\
+ s = dvb_##t##2str(lm->lm_tuning.u.dmc_fe_##f.p);\
return &s;\
}\
static int \
dvb_mux_##c##_class_##l##_set (void *o, const void *v)\
{\
dvb_mux_t *lm = o;\
- lm->lm_tuning.u.dmc_fe_##f.p = dvb_str2##l ((const char*)v);\
+ lm->lm_tuning.u.dmc_fe_##f.p = dvb_str2##t ((const char*)v);\
return 1;\
}\
static htsmsg_t *\
htsmsg_t *m = htsmsg_create_list(), *e;\
for (i = 0; i < ARRAY_SIZE(t); i++) {\
e = htsmsg_create_map(); \
- htsmsg_add_str(e, "key", dvb_##l##2str(t[i]));\
- htsmsg_add_str(e, "val", tvh_gettext_lang(lang, dvb_##l##2str(t[i])));\
+ htsmsg_add_str(e, "key", dvb_##t##2str(t[i]));\
+ htsmsg_add_str(e, "val", tvh_gettext_lang(lang, dvb_##t##2str(t[i])));\
htsmsg_add_msg(m, NULL, e);\
}\
return m;\
{
.ic_super = &mpegts_mux_class,
.ic_class = "dvb_mux",
- .ic_caption = N_("Linux DVB multiplex"),
+ .ic_caption = N_("DVB multiplex"),
.ic_properties = (const property_t[]){
{}
}
* DVB-T
*/
-dvb_mux_class_X(dvbt, ofdm, bandwidth, bw,
+dvb_mux_class_X(dvbt, ofdm, bandwidth, bw, bw,
DVB_BANDWIDTH_AUTO, DVB_BANDWIDTH_10_MHZ,
DVB_BANDWIDTH_8_MHZ, DVB_BANDWIDTH_7_MHZ,
DVB_BANDWIDTH_6_MHZ, DVB_BANDWIDTH_5_MHZ,
DVB_BANDWIDTH_1_712_MHZ);
-dvb_mux_class_R(dvbt, modulation, qam,
+dvb_mux_class_R(dvbt, modulation, qam, qam,
DVB_MOD_QAM_AUTO, DVB_MOD_QPSK, DVB_MOD_QAM_16,
DVB_MOD_QAM_64, DVB_MOD_QAM_256);
-dvb_mux_class_X(dvbt, ofdm, transmission_mode, mode,
+dvb_mux_class_X(dvbt, ofdm, transmission_mode, mode, mode,
DVB_TRANSMISSION_MODE_AUTO, DVB_TRANSMISSION_MODE_32K,
DVB_TRANSMISSION_MODE_16K, DVB_TRANSMISSION_MODE_8K,
DVB_TRANSMISSION_MODE_2K, DVB_TRANSMISSION_MODE_1K);
-dvb_mux_class_X(dvbt, ofdm, guard_interval, guard,
+dvb_mux_class_X(dvbt, ofdm, guard_interval, guard, guard,
DVB_GUARD_INTERVAL_AUTO, DVB_GUARD_INTERVAL_1_32,
DVB_GUARD_INTERVAL_1_16, DVB_GUARD_INTERVAL_1_8,
DVB_GUARD_INTERVAL_1_4, DVB_GUARD_INTERVAL_1_128,
DVB_GUARD_INTERVAL_19_128, DVB_GUARD_INTERVAL_19_256);
-dvb_mux_class_X(dvbt, ofdm, hierarchy_information, hier,
+dvb_mux_class_X(dvbt, ofdm, hierarchy_information, hier, hier,
DVB_HIERARCHY_AUTO, DVB_HIERARCHY_NONE,
DVB_HIERARCHY_1, DVB_HIERARCHY_2, DVB_HIERARCHY_4);
-dvb_mux_class_X(dvbt, ofdm, code_rate_HP, fechi,
+dvb_mux_class_X(dvbt, ofdm, code_rate_HP, fechi, fechi,
DVB_FEC_AUTO, DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4,
DVB_FEC_3_5, DVB_FEC_4_5, DVB_FEC_5_6, DVB_FEC_7_8);
-dvb_mux_class_X(dvbt, ofdm, code_rate_LP, feclo,
+dvb_mux_class_X(dvbt, ofdm, code_rate_LP, feclo, feclo,
DVB_FEC_AUTO, DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4,
DVB_FEC_3_5, DVB_FEC_4_5, DVB_FEC_5_6, DVB_FEC_7_8);
{
.ic_super = &dvb_mux_class,
.ic_class = "dvb_mux_dvbt",
- .ic_caption = N_("Linux DVB-T multiplex"),
+ .ic_caption = N_("DVB-T multiplex"),
.ic_properties = (const property_t[]){
{
MUX_PROP_STR("delsys", N_("Delivery system"), dvbt, delsys, "DVBT"),
* DVB-C
*/
-dvb_mux_class_R(dvbc, modulation, qam,
+dvb_mux_class_R(dvbc, modulation, qam, qam,
DVB_MOD_QAM_AUTO, DVB_MOD_QAM_16, DVB_MOD_QAM_32,
DVB_MOD_QAM_64, DVB_MOD_QAM_128, DVB_MOD_QAM_256);
-dvb_mux_class_X(dvbc, qam, fec_inner, fec,
+dvb_mux_class_X(dvbc, qam, fec_inner, fec, fec,
DVB_FEC_AUTO, DVB_FEC_NONE,
DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, DVB_FEC_4_5,
DVB_FEC_5_6, DVB_FEC_8_9, DVB_FEC_9_10);
{
.ic_super = &dvb_mux_class,
.ic_class = "dvb_mux_dvbc",
- .ic_caption = N_("Linux DVB-C multiplex"),
+ .ic_caption = N_("DVB-C multiplex"),
.ic_properties = (const property_t[]){
{
MUX_PROP_STR("delsys", N_("Delivery system"), dvbc, delsys, "DVB-C"),
}
};
-dvb_mux_class_X(dvbs, qpsk, fec_inner, fec,
+/*
+ * DVB-S
+ */
+
+dvb_mux_class_X(dvbs, qpsk, fec_inner, fec, fec,
DVB_FEC_AUTO, DVB_FEC_NONE,
DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, DVB_FEC_3_5,
DVB_FEC_4_5, DVB_FEC_5_6, DVB_FEC_7_8, DVB_FEC_8_9,
DVB_FEC_9_10);
+dvb_mux_class_R(dvbs, modulation, qam, qam,
+ DVB_MOD_AUTO, DVB_MOD_QPSK, DVB_MOD_QAM_16,
+ DVB_MOD_PSK_8, DVB_MOD_APSK_16, DVB_MOD_APSK_32);
+dvb_mux_class_R(dvbs, rolloff, rolloff, rolloff,
+ DVB_ROLLOFF_35, DVB_ROLLOFF_20, DVB_ROLLOFF_25);
+dvb_mux_class_R(dvbs, pilot, pilot, pilot,
+ DVB_PILOT_AUTO, DVB_PILOT_ON, DVB_PILOT_OFF);
+dvb_mux_class_X(dvbs, qpsk, polarisation, polarisation, pol,
+ DVB_POLARISATION_VERTICAL, DVB_POLARISATION_HORIZONTAL,
+ DVB_POLARISATION_CIRCULAR_LEFT, DVB_POLARISATION_CIRCULAR_RIGHT);
+dvb_mux_class_R(dvbs, pls_mode, pls_mode, plsmode,
+ DVB_PLS_ROOT, DVB_PLS_GOLD, DVB_PLS_COMBO);
static int
dvb_mux_dvbs_class_frequency_set ( void *o, const void *v )
return 0;
}
-static const void *
-dvb_mux_dvbs_class_polarity_get (void *o)
-{
- static const char *s;
- dvb_mux_t *lm = o;
- s = dvb_pol2str(lm->lm_tuning.u.dmc_fe_qpsk.polarisation);
- return &s;
-}
-
-static int
-dvb_mux_dvbs_class_polarity_set (void *o, const void *s)
-{
- dvb_mux_t *lm = o;
- lm->lm_tuning.u.dmc_fe_qpsk.polarisation = dvb_str2pol((const char*)s);
- return 1;
-}
-
-static htsmsg_t *
-dvb_mux_dvbs_class_polarity_enum (void *o, const char *lang)
-{
- htsmsg_t *list = htsmsg_create_list();
- htsmsg_add_str(list, NULL, dvb_pol2str(DVB_POLARISATION_VERTICAL));
- htsmsg_add_str(list, NULL, dvb_pol2str(DVB_POLARISATION_HORIZONTAL));
- htsmsg_add_str(list, NULL, dvb_pol2str(DVB_POLARISATION_CIRCULAR_LEFT));
- htsmsg_add_str(list, NULL, dvb_pol2str(DVB_POLARISATION_CIRCULAR_RIGHT));
- return list;
-}
-
-static const void *
-dvb_mux_dvbs_class_modulation_get ( void *o )
-{
- static const char *s;
- dvb_mux_t *lm = o;
- s = dvb_qam2str(lm->lm_tuning.dmc_fe_modulation);
- return &s;
-}
-
-static int
-dvb_mux_dvbs_class_modulation_set (void *o, const void *s)
-{
- int mod = dvb_str2qam(s);
- dvb_mux_t *lm = o;
- if (mod != lm->lm_tuning.dmc_fe_modulation) {
- lm->lm_tuning.dmc_fe_modulation = mod;
- return 1;
- }
- return 0;
-}
-
-static htsmsg_t *
-dvb_mux_dvbs_class_modulation_list ( void *o, const char *lang )
-{
- htsmsg_t *list = htsmsg_create_list();
- htsmsg_add_str(list, NULL, tvh_gettext_lang(lang, dvb_qam2str(DVB_MOD_AUTO)));
- htsmsg_add_str(list, NULL, dvb_qam2str(DVB_MOD_QPSK));
- htsmsg_add_str(list, NULL, dvb_qam2str(DVB_MOD_QAM_16));
- htsmsg_add_str(list, NULL, dvb_qam2str(DVB_MOD_PSK_8));
- htsmsg_add_str(list, NULL, dvb_qam2str(DVB_MOD_APSK_16));
- htsmsg_add_str(list, NULL, dvb_qam2str(DVB_MOD_APSK_32));
- return list;
-}
-
-static const void *
-dvb_mux_dvbs_class_rolloff_get ( void *o )
-{
- static const char *s;
- dvb_mux_t *lm = o;
- s = dvb_rolloff2str(lm->lm_tuning.dmc_fe_rolloff);
- return &s;
-}
-
-static int
-dvb_mux_dvbs_class_rolloff_set ( void *o, const void *s )
-{
- dvb_mux_t *lm = o;
- lm->lm_tuning.dmc_fe_rolloff = dvb_str2rolloff(s);
- return 1;
-}
-
-static htsmsg_t *
-dvb_mux_dvbs_class_rolloff_list ( void *o, const char *lang )
-{
- htsmsg_t *list = htsmsg_create_list();
- htsmsg_add_str(list, NULL, dvb_rolloff2str(DVB_ROLLOFF_35));
- // Note: this is a bit naff, as the below values are only relevant
- // to S2 muxes, but currently have no way to model that
- htsmsg_add_str(list, NULL, dvb_rolloff2str(DVB_ROLLOFF_20));
- htsmsg_add_str(list, NULL, dvb_rolloff2str(DVB_ROLLOFF_25));
- htsmsg_add_str(list, NULL, tvh_gettext_lang(lang, dvb_rolloff2str(DVB_ROLLOFF_AUTO)));
- return list;
-}
-
-static const void *
-dvb_mux_dvbs_class_pilot_get ( void *o )
-{
- static const char *s;
- dvb_mux_t *lm = o;
- s = dvb_pilot2str(lm->lm_tuning.dmc_fe_pilot);
- return &s;
-}
-
-static int
-dvb_mux_dvbs_class_pilot_set ( void *o, const void *s )
-{
- dvb_mux_t *lm = o;
- lm->lm_tuning.dmc_fe_pilot = dvb_str2pilot(s);
- return 1;
-}
-static htsmsg_t *
-dvb_mux_dvbs_class_pilot_list ( void *o, const char *lang )
-{
- htsmsg_t *list = htsmsg_create_list();
- htsmsg_add_str(list, NULL, tvh_gettext_lang(lang, dvb_pilot2str(DVB_PILOT_AUTO)));
- htsmsg_add_str(list, NULL, dvb_pilot2str(DVB_PILOT_ON));
- htsmsg_add_str(list, NULL, dvb_pilot2str(DVB_PILOT_OFF));
- return list;
-}
-
-static const void *
-dvb_mux_dvbs_class_pls_mode_get ( void *o )
-{
- static const char *s;
- dvb_mux_t *lm = o;
- s = dvb_plsmode2str(lm->lm_tuning.dmc_fe_pls_mode);
- return &s;
-}
-
-static int
-dvb_mux_dvbs_class_pls_mode_set ( void *o, const void *s )
-{
- dvb_mux_t *lm = o;
- lm->lm_tuning.dmc_fe_pls_mode = dvb_str2plsmode(s);
- return 1;
-}
-
-static htsmsg_t *
-dvb_mux_dvbs_class_pls_mode_list ( void *o, const char *lang )
-{
- htsmsg_t *list = htsmsg_create_list();
- htsmsg_add_str(list, NULL, dvb_plsmode2str(DVB_PLS_ROOT));
- htsmsg_add_str(list, NULL, dvb_plsmode2str(DVB_PLS_GOLD));
- htsmsg_add_str(list, NULL, dvb_plsmode2str(DVB_PLS_COMBO));
- return list;
-}
-
#define dvb_mux_dvbs_class_delsys_get dvb_mux_class_delsys_get
#define dvb_mux_dvbs_class_delsys_set dvb_mux_class_delsys_set
{
.ic_super = &dvb_mux_class,
.ic_class = "dvb_mux_dvbs",
- .ic_caption = N_("Linux DVB-S multiplex"),
+ .ic_caption = N_("DVB-S multiplex"),
.ic_properties = (const property_t[]){
{
MUX_PROP_STR("delsys", N_("Delivery system"), dvbs, delsys, "DVBS"),
.set = dvb_mux_dvbs_class_symbol_rate_set,
},
{
- MUX_PROP_STR("polarisation", N_("Polarization"), dvbs, polarity, NULL)
+ MUX_PROP_STR("polarisation", N_("Polarization"), dvbs, polarisation, NULL)
},
{
- .type = PT_STR,
- .id = "modulation",
- .name = N_("Modulation"),
- .desc = N_("The modulation used on the mux."),
- .set = dvb_mux_dvbs_class_modulation_set,
- .get = dvb_mux_dvbs_class_modulation_get,
- .list = dvb_mux_dvbs_class_modulation_list,
- .def.s = "AUTO",
+ MUX_PROP_STR("modulation", N_("Modulation"), dvbs, qam, NULL)
},
{
MUX_PROP_STR("fec", N_("FEC"), dvbs, fec, "AUTO")
},
{
- .type = PT_STR,
- .id = "rolloff",
- .name = N_("Rolloff"),
- .desc = N_("The mux rolloff. Leave as AUTO unless you know the "
- "exact rolloff for this mux."),
- .set = dvb_mux_dvbs_class_rolloff_set,
- .get = dvb_mux_dvbs_class_rolloff_get,
- .list = dvb_mux_dvbs_class_rolloff_list,
- .def.s = "AUTO"
+ MUX_PROP_STR("rolloff", N_("Rolloff"), dvbs, rolloff, "AUTO")
},
{
- .type = PT_STR,
- .id = "pilot",
- .name = N_("Pilot"),
- .desc = N_("Use pilot on this mux. AUTO is the recommended "
- "value."),
- .opts = PO_ADVANCED,
- .set = dvb_mux_dvbs_class_pilot_set,
- .get = dvb_mux_dvbs_class_pilot_get,
- .list = dvb_mux_dvbs_class_pilot_list,
+ MUX_PROP_STR("pilot", N_("Pilot"), dvbs, pilot, "AUTO")
},
{
.type = PT_INT,
.opts = PO_ADVANCED
},
{
- .type = PT_STR,
- .id = "pls_mode",
- .name = N_("PLS mode"),
- .set = dvb_mux_dvbs_class_pls_mode_set,
- .get = dvb_mux_dvbs_class_pls_mode_get,
- .list = dvb_mux_dvbs_class_pls_mode_list,
- .def.s = "ROOT",
- .opts = PO_ADVANCED
+ MUX_PROP_STR("pls_mode", N_("PLS mode"), dvbs, pls_mode, "ROOT")
},
{
.type = PT_U32,
}
};
+/*
+ * ATSC-T
+ */
+
#define dvb_mux_atsc_t_class_delsys_get dvb_mux_class_delsys_get
#define dvb_mux_atsc_t_class_delsys_set dvb_mux_class_delsys_set
return list;
}
-dvb_mux_class_R(atsc_t, modulation, qam,
+dvb_mux_class_R(atsc_t, modulation, qam, qam,
DVB_MOD_QAM_AUTO, DVB_MOD_QAM_256, DVB_MOD_VSB_8);
const idclass_t dvb_mux_atsc_t_class =
{
.ic_super = &dvb_mux_class,
.ic_class = "dvb_mux_atsc_t",
- .ic_caption = N_("Linux ATSC-T multiplex"),
+ .ic_caption = N_("ATSC-T multiplex"),
.ic_properties = (const property_t[]){
{
MUX_PROP_STR("delsys", N_("Delivery system"), atsc_t, delsys, "ATSC-T"),
}
};
+/*
+ * ATSC-C
+ */
+
#define dvb_mux_atsc_c_class_delsys_get dvb_mux_class_delsys_get
#define dvb_mux_atsc_c_class_delsys_set dvb_mux_class_delsys_set
{
.ic_super = &dvb_mux_class,
.ic_class = "dvb_mux_atsc_c",
- .ic_caption = N_("Linux ATSC-C multiplex"),
+ .ic_caption = N_("ATSC-C multiplex"),
.ic_properties = (const property_t[]){
{
MUX_PROP_STR("delsys", N_("Delivery system"), atsc_c, delsys, "ATSC-C"),
}
};
+/*
+ * ISDB-T
+ */
+
+#define dvb_mux_isdb_t_class_delsys_get dvb_mux_class_delsys_get
+#define dvb_mux_isdb_t_class_delsys_set dvb_mux_class_delsys_set
+
+static htsmsg_t *
+dvb_mux_isdb_t_class_delsys_enum (void *o, const char *lang)
+{
+ htsmsg_t *list = htsmsg_create_list();
+ htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_ISDBT));
+ return list;
+}
+
+dvb_mux_class_X(isdb_t, isdbt, bandwidth, bw, bw,
+ DVB_BANDWIDTH_AUTO, DVB_BANDWIDTH_10_MHZ,
+ DVB_BANDWIDTH_8_MHZ, DVB_BANDWIDTH_7_MHZ,
+ DVB_BANDWIDTH_6_MHZ, DVB_BANDWIDTH_5_MHZ,
+ DVB_BANDWIDTH_1_712_MHZ);
+dvb_mux_class_X(isdb_t, isdbt, guard_interval, guard, guard,
+ DVB_GUARD_INTERVAL_AUTO, DVB_GUARD_INTERVAL_1_32,
+ DVB_GUARD_INTERVAL_1_16, DVB_GUARD_INTERVAL_1_8,
+ DVB_GUARD_INTERVAL_1_4, DVB_GUARD_INTERVAL_1_128,
+ DVB_GUARD_INTERVAL_19_128, DVB_GUARD_INTERVAL_19_256);
+dvb_mux_class_X(isdb_t, isdbt, layers[0].modulation, isdbt_mod_a, qam,
+ DVB_MOD_QAM_AUTO, DVB_MOD_QPSK, DVB_MOD_QAM_16,
+ DVB_MOD_QAM_64, DVB_MOD_QAM_256);
+dvb_mux_class_X(isdb_t, isdbt, layers[0].fec, isdbt_fec_a, fec,
+ DVB_FEC_AUTO, DVB_FEC_NONE,
+ DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, DVB_FEC_4_5,
+ DVB_FEC_5_6, DVB_FEC_8_9, DVB_FEC_9_10);
+dvb_mux_class_X(isdb_t, isdbt, layers[1].modulation, isdbt_mod_b, qam,
+ DVB_MOD_QAM_AUTO, DVB_MOD_QPSK, DVB_MOD_QAM_16,
+ DVB_MOD_QAM_64, DVB_MOD_QAM_256);
+dvb_mux_class_X(isdb_t, isdbt, layers[1].fec, isdbt_fec_b, fec,
+ DVB_FEC_AUTO, DVB_FEC_NONE,
+ DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, DVB_FEC_4_5,
+ DVB_FEC_5_6, DVB_FEC_8_9, DVB_FEC_9_10);
+dvb_mux_class_X(isdb_t, isdbt, layers[2].modulation, isdbt_mod_c, qam,
+ DVB_MOD_QAM_AUTO, DVB_MOD_QPSK, DVB_MOD_QAM_16,
+ DVB_MOD_QAM_64, DVB_MOD_QAM_256);
+dvb_mux_class_X(isdb_t, isdbt, layers[2].fec, isdbt_fec_c, fec,
+ DVB_FEC_AUTO, DVB_FEC_NONE,
+ DVB_FEC_1_2, DVB_FEC_2_3, DVB_FEC_3_4, DVB_FEC_4_5,
+ DVB_FEC_5_6, DVB_FEC_8_9, DVB_FEC_9_10);
+
+const idclass_t dvb_mux_isdb_t_class =
+{
+ .ic_super = &dvb_mux_class,
+ .ic_class = "dvb_mux_isdbt",
+ .ic_caption = N_("ISDB-T multiplex"),
+ .ic_properties = (const property_t[]){
+ {
+ MUX_PROP_STR("delsys", N_("Delivery system"), isdb_t, delsys, "ISDB-T"),
+ .desc = N_("Select the delivery system used by your provider."),
+ },
+ {
+ .type = PT_U32,
+ .id = "frequency",
+ .name = N_("Frequency (Hz)"),
+ .desc = N_("The frequency of the mux (in Hertz)."),
+ .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_freq),
+ .set = dvb_mux_dvbt_class_frequency_set,
+ },
+ {
+ MUX_PROP_STR("bandwidth", N_("Bandwidth"), isdb_t, bw, N_("AUTO")),
+ .desc = N_("Select the bandwidth the mux uses. "
+ "If you're not sure of the value leave as AUTO "
+ "but be aware that tuning may fail as some drivers "
+ "do not like the AUTO setting."),
+ },
+ {
+ MUX_PROP_STR("guard_interval", N_("Guard interval"), isdb_t, guard, N_("AUTO")),
+ .desc = N_("Select the guard interval used by the mux. "
+ "If you're not sure of the value leave as AUTO."),
+ },
+ /* Layer A */
+ {
+ MUX_PROP_STR("layera_fec", N_("Layer A: FEC"), isdb_t, isdbt_fec_a, N_("AUTO")),
+ },
+ {
+ MUX_PROP_STR("layera_mod", N_("Layer A: Constellation"), isdb_t, isdbt_mod_a, N_("AUTO")),
+ },
+ {
+ .type = PT_U32,
+ .id = "layera_segcnt",
+ .name = N_("Layer A: Segment count"),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_isdbt.layers[0].segment_count),
+ },
+ {
+ .type = PT_U32,
+ .id = "layera_timint",
+ .name = N_("Layer A: Time interleaving"),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_isdbt.layers[0].time_interleaving),
+ },
+ /* Layer B */
+ {
+ MUX_PROP_STR("layerb_fec", N_("Layer B: FEC"), isdb_t, isdbt_fec_b, N_("AUTO")),
+ },
+ {
+ MUX_PROP_STR("layerb_mod", N_("Layer B: Constellation"), isdb_t, isdbt_mod_b, N_("AUTO")),
+ },
+ {
+ .type = PT_U32,
+ .id = "layerb_segcnt",
+ .name = N_("Layer B: Segment count"),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_isdbt.layers[1].segment_count),
+ },
+ {
+ .type = PT_U32,
+ .id = "layerb_timint",
+ .name = N_("Layer B: Time interleaving"),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_isdbt.layers[1].time_interleaving),
+ },
+ /* Layer C */
+ {
+ MUX_PROP_STR("layerb_fec", N_("Layer C: FEC"), isdb_t, isdbt_fec_c, N_("AUTO")),
+ },
+ {
+ MUX_PROP_STR("layerb_mod", N_("Layer C: Constellation"), isdb_t, isdbt_mod_c, N_("AUTO")),
+ },
+ {
+ .type = PT_U32,
+ .id = "layerc_segcnt",
+ .name = N_("Layer C: Segment count"),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_isdbt.layers[2].segment_count),
+ },
+ {
+ .type = PT_U32,
+ .id = "layerb_timint",
+ .name = N_("Layer C: Time interleaving"),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_isdbt.layers[2].time_interleaving),
+ },
+ {}
+ }
+};
+
+/*
+ * ISDB-C
+ */
+
+const idclass_t dvb_mux_isdb_c_class =
+{
+ .ic_super = &dvb_mux_class,
+ .ic_class = "dvb_mux_isdbc",
+ .ic_caption = N_("ISDB-C multiplex"),
+ .ic_properties = (const property_t[]){
+ {
+ MUX_PROP_STR("delsys", N_("Delivery system"), dvbc, delsys, "DVB-C"),
+ .desc = N_("Select the delivery system used by your cable provider."),
+ },
+ {
+ .type = PT_U32,
+ .id = "frequency",
+ .name = N_("Frequency (Hz)"),
+ .desc = N_("The frequency of the mux (in Hertz)."),
+ .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_freq),
+ .set = dvb_mux_dvbt_class_frequency_set,
+ },
+ {
+ .type = PT_U32,
+ .id = "symbolrate",
+ .name = N_("Symbol rate (Sym/s)"),
+ .desc = N_("The symbol rate."),
+ .off = offsetof(dvb_mux_t, lm_tuning.u.dmc_fe_qam.symbol_rate),
+ },
+ {
+ MUX_PROP_STR("constellation", N_("Constellation"), dvbc, qam, N_("AUTO")),
+ .desc = N_("Select the quadrature amplitude modulation (QAM) used by the mux. "
+ "If you're not sure of the value leave as AUTO."),
+ },
+ {
+ MUX_PROP_STR("fec", N_("FEC"), dvbc, fec, N_("AUTO")),
+ .desc = N_("Select the forward error correction used on the mux."),
+ },
+ {}
+ }
+};
+
+/*
+ * ISDB-S
+ */
+
+#define dvb_mux_isdb_s_class_delsys_get dvb_mux_class_delsys_get
+#define dvb_mux_isdb_s_class_delsys_set dvb_mux_class_delsys_set
+
+static htsmsg_t *
+dvb_mux_isdb_s_class_delsys_enum (void *o, const char *lang)
+{
+ htsmsg_t *list = htsmsg_create_list();
+ htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_ISDBS));
+ return list;
+}
+
+const idclass_t dvb_mux_isdb_s_class =
+{
+ .ic_super = &dvb_mux_class,
+ .ic_class = "dvb_mux_isdbs",
+ .ic_caption = N_("ISDB-S multiplex"),
+ .ic_properties = (const property_t[]){
+ {
+ MUX_PROP_STR("delsys", N_("Delivery system"), isdb_s, delsys, "ISDBS"),
+ },
+ {
+ .type = PT_U32,
+ .id = "frequency",
+ .name = N_("Frequency (kHz)"),
+ .desc = N_("The frequency of the mux (in Hertz)."),
+ .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_freq),
+ .set = dvb_mux_dvbs_class_frequency_set,
+ },
+ {
+ .type = PT_INT,
+ .id = "stream_id",
+ .name = N_("Stream ID"),
+ .desc = N_("The stream ID used for this mux."),
+ .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_stream_id),
+ .def.i = DVB_NO_STREAM_ID_FILTER,
+ .opts = PO_ADVANCED
+ },
+ {}
+ }
+};
+
+/*
+ * DAB
+ */
+
+#define dvb_mux_dab_class_delsys_get dvb_mux_class_delsys_get
+#define dvb_mux_dab_class_delsys_set dvb_mux_class_delsys_set
+
+static htsmsg_t *
+dvb_mux_dab_class_delsys_enum (void *o, const char *lang)
+{
+ htsmsg_t *list = htsmsg_create_list();
+ htsmsg_add_str(list, NULL, dvb_delsys2str(DVB_SYS_DAB));
+ return list;
+}
+
+const idclass_t dvb_mux_dab_class =
+{
+ .ic_super = &dvb_mux_class,
+ .ic_class = "dvb_mux_dab",
+ .ic_caption = N_("DAB multiplex"),
+ .ic_properties = (const property_t[]){
+ {
+ MUX_PROP_STR("delsys", N_("Delivery system"), dab, delsys, "DAB"),
+ .desc = N_("Select the delivery system used by your cable provider."),
+ },
+ {
+ .type = PT_U32,
+ .id = "frequency",
+ .name = N_("Frequency (Hz)"),
+ .desc = N_("The frequency of the mux (in Hertz)."),
+ .off = offsetof(dvb_mux_t, lm_tuning.dmc_fe_freq),
+ .set = dvb_mux_dvbt_class_frequency_set,
+ },
+ {}
+ }
+};
+
/* **************************************************************************
* Class methods
* *************************************************************************/