int first;
tvh_strlcatf(buf, sizeof(buf), l,
- "%s:%s [%c%c%c%c%c%c%c%c%c%c], conn=%u:s%u:r%u:l%u%s",
+ "%s:%s [%c%c%c%c%c%c%c%c%c%c%c], conn=%u:s%u:r%u:l%u%s",
a->aa_representative ?: "<no-id>",
a->aa_username ?: "<no-user>",
a->aa_rights & ACCESS_STREAMING ? 'S' : ' ',
a->aa_rights & ACCESS_ALL_RECORDER ? 'L' : ' ',
a->aa_rights & ACCESS_ALL_RW_RECORDER ? 'D' : ' ',
a->aa_rights & ACCESS_FAILED_RECORDER ? 'F' : ' ',
+ a->aa_rights & ACCESS_HTSP_ANONYMIZE ? 'H' : ' ',
a->aa_rights & ACCESS_ADMIN ? '*' : ' ',
a->aa_conn_limit,
a->aa_conn_limit_streaming,
r |= ACCESS_ALL_RW_RECORDER;
if (ae->ae_failed_dvr)
r |= ACCESS_FAILED_RECORDER;
+ if (ae->ae_htsp_anonymize)
+ r |= ACCESS_HTSP_ANONYMIZE;
if (ae->ae_admin)
r |= ACCESS_ADMIN;
ae->ae_rights = r;
.off = offsetof(access_entry_t, ae_failed_dvr),
.opts = PO_ADVANCED | PO_HIDDEN,
},
+ {
+ .type = PT_BOOL,
+ .id = "htsp_anonymize",
+ .name = N_("Anonymize HTSP access"),
+ .desc = N_("Do not send any stream specific information to"
+ "the HTSP client like signal strenght, input source"
+ "etc."),
+ .off = offsetof(access_entry_t, ae_htsp_anonymize),
+ .opts = PO_ADVANCED | PO_HIDDEN,
+ },
{
.type = PT_STR,
.islist = 1,
return 1;
}
+static inline int
+htsp_anonymize(htsp_connection_t *htsp)
+{
+ return (htsp->htsp_granted_access->aa_rights & ACCESS_HTSP_ANONYMIZE) != 0;
+}
+
/**
*
*/
uuid_bin2hex(&si->si_network_uuid, &hex);
htsmsg_add_str(sourceinfo, "network_uuid", hex.hex);
}
- if(si->si_adapter ) htsmsg_add_str(sourceinfo, "adapter", si->si_adapter );
- if(si->si_mux ) htsmsg_add_str(sourceinfo, "mux" , si->si_mux );
- if(si->si_network ) htsmsg_add_str(sourceinfo, "network", si->si_network );
- if(si->si_network_type) htsmsg_add_str(sourceinfo, "network_type", si->si_network_type );
- if(si->si_provider) htsmsg_add_str(sourceinfo, "provider", si->si_provider);
- if(si->si_service ) htsmsg_add_str(sourceinfo, "service", si->si_service );
- if(si->si_satpos ) htsmsg_add_str(sourceinfo, "satpos", si->si_satpos );
+ if (!htsp_anonymize(hs->hs_htsp)) {
+ htsmsg_add_str2(sourceinfo, "adapter", si->si_adapter );
+ htsmsg_add_str2(sourceinfo, "mux", si->si_mux );
+ htsmsg_add_str2(sourceinfo, "network", si->si_network );
+ htsmsg_add_str2(sourceinfo, "network_type", si->si_network_type);
+ htsmsg_add_str2(sourceinfo, "provider", si->si_provider );
+ htsmsg_add_str2(sourceinfo, "service", si->si_service );
+ htsmsg_add_str2(sourceinfo, "satpos", si->si_satpos );
+ }
htsmsg_add_msg(m, "sourceinfo", sourceinfo);
htsmsg_t *m = htsmsg_create_map();
htsmsg_add_str(m, "method", "signalStatus");
htsmsg_add_u32(m, "subscriptionId", hs->hs_sid);
- htsmsg_add_str(m, "feStatus", sig->status_text);
- if((sig->snr != -2) && (sig->snr_scale == SIGNAL_STATUS_SCALE_RELATIVE))
- htsmsg_add_u32(m, "feSNR", sig->snr);
- if((sig->signal != -2) && (sig->signal_scale == SIGNAL_STATUS_SCALE_RELATIVE))
- htsmsg_add_u32(m, "feSignal", sig->signal);
- if(sig->ber != -2)
- htsmsg_add_u32(m, "feBER", sig->ber);
- if(sig->unc != -2)
- htsmsg_add_u32(m, "feUNC", sig->unc);
+ if (!htsp_anonymize(hs->hs_htsp)) {
+ htsmsg_add_str(m, "feStatus", sig->status_text);
+ if((sig->snr != -2) && (sig->snr_scale == SIGNAL_STATUS_SCALE_RELATIVE))
+ htsmsg_add_u32(m, "feSNR", sig->snr);
+ if((sig->signal != -2) && (sig->signal_scale == SIGNAL_STATUS_SCALE_RELATIVE))
+ htsmsg_add_u32(m, "feSignal", sig->signal);
+ if(sig->ber != -2)
+ htsmsg_add_u32(m, "feBER", sig->ber);
+ if(sig->unc != -2)
+ htsmsg_add_u32(m, "feUNC", sig->unc);
+ } else {
+ htsmsg_add_str(m, "feStatus", "");
+ }
htsp_send_message(hs->hs_htsp, m, &hs->hs_htsp->htsp_hmq_qstatus);
}
/* don't bother old clients */
if (hs->hs_htsp->htsp_version < 24)
return;
+ if (htsp_anonymize(hs->hs_htsp))
+ return;
htsmsg_t *m = htsmsg_create_map();
htsmsg_add_str(m, "method", "descrambleInfo");
'streaming,adv_streaming,htsp_streaming,' +
'profile,conn_limit_type,conn_limit,' +
'dvr,htsp_dvr,all_dvr,all_rw_dvr,' +
- 'failed_dvr,dvr_config,channel_min,channel_max,' +
- 'channel_tag_exclude,channel_tag,comment';
+ 'failed_dvr,htsp_anonymize,dvr_config,' +
+ 'channel_min,channel_max,channel_tag_exclude,' +
+ 'channel_tag,comment';
tvheadend.idnode_grid(panel, {
id: 'access_entry',