htsmsg_add_str(msg, NULL, sd->sd_info.addr);
htsmsg_add_str(msg, NULL, sd->sd_info.location);
htsmsg_add_str(msg, NULL, sd->sd_info.server);
+ htsmsg_add_s64(msg, NULL, sd->sd_info.rtsp_port);
snprintf(buf, sizeof(buf), "/input/mpegts/satip/%s", idnode_uuid_as_str(&sd->th_id));
dbus_emit_signal(buf, sig_name, msg);
#endif
return strdup("err");
}
+/*
+ *
+ */
+char *
+satip_device_nicename( satip_device_t *sd, char *buf, int len )
+{
+ if (sd->sd_info.rtsp_port != 554)
+ snprintf(buf, len, "%s:%d", sd->sd_info.addr, sd->sd_info.rtsp_port);
+ else
+ snprintf(buf, len, "%s", sd->sd_info.addr);
+ return buf;
+}
+
/*
* SAT-IP client
*/
.opts = PO_RDONLY | PO_NOSAVE,
.off = offsetof(satip_device_t, sd_info.addr),
},
+ {
+ .type = PT_INT,
+ .id = "rtsp",
+ .name = "RTSP Port",
+ .opts = PO_RDONLY | PO_NOSAVE,
+ .off = offsetof(satip_device_t, sd_info.rtsp_port),
+ },
{
.type = PT_STR,
.id = "device_uuid",
char *argv[10];
int i, j, n, m, fenum, t2, save = 0;
dvb_fe_type_t type;
+ char buf2[60];
satip_device_calc_uuid(&uuid, info->uuid);
m = atoi(argv[i] + 5);
}
if (type == DVB_TYPE_NONE) {
- tvhlog(LOG_ERR, "satip", "%s: bad tuner type [%s]", sd->sd_info.addr, argv[i]);
+ tvhlog(LOG_ERR, "satip", "%s: bad tuner type [%s]",
+ satip_device_nicename(sd, buf2, sizeof(buf2)), argv[i]);
} else if (m < 0 || m > 32) {
- tvhlog(LOG_ERR, "satip", "%s: bad tuner count [%s]", sd->sd_info.addr, argv[i]);
+ tvhlog(LOG_ERR, "satip", "%s: bad tuner count [%s]",
+ satip_device_nicename(sd, buf2, sizeof(buf2)), argv[i]);
} else {
for (j = 0; j < m; j++)
if (satip_frontend_create(feconf, sd, type, t2, fenum))
{
const idclass_t *idc;
const char *uuid = NULL, *override = NULL;
- char id[16], lname[256];
+ char id[16], lname[256], nname[60];
satip_frontend_t *lfe;
uint32_t master = 0;
int i, def_positions = sd->sd_info.srcs;
strstr(lfe->mi_name, " Tuner ") &&
strstr(lfe->mi_name, " #"))) {
snprintf(lname, sizeof(lname), "SAT>IP %s Tuner #%i (%s)",
- dvb_type2str(type), num, sd->sd_info.addr);
+ dvb_type2str(type), num,
+ satip_device_nicename(sd, nname, sizeof(nname)));
free(lfe->mi_name);
lfe->mi_name = strdup(lname);
}