th_descrambler_runtime_t *dr;
elementary_stream_t *st;
+ if (t->s_scrambled_pass)
+ return;
+
if (!((mpegts_service_t *)t)->s_dvb_forcecaid) {
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link)
if (st->es_type == SCT_CA)
continue;
+ if (tsb[3] & 0xc0) /* scrambled */
+ continue;
+
if(!streaming_pad_probe_type(&t->s_streaming_pad, SMT_PACKET))
continue;
avgstat_add(&t->s_rate, len, dispatch_clock);
- if((tsb[3] & 0xc0) ||
- (t->s_scrambled_seen && st && st->es_type != SCT_CA)) {
+ if(!t->s_scrambled_pass &&
+ ((tsb[3] & 0xc0) ||
+ (t->s_scrambled_seen && st && st->es_type != SCT_CA))) {
/**
* Lock for descrambling, but only if packet was not in error
t->s_streaming_status = 0;
t->s_streaming_live = 0;
t->s_scrambled_seen = 0;
+ t->s_scrambled_pass = !!(flags & SUBSCRIPTION_NODESCR);
t->s_start_time = dispatch_clock;
pthread_mutex_lock(&t->s_stream_mutex);
*/
struct th_descrambler_list s_descramblers;
- uint16_t s_scrambled_seen;
+ uint8_t s_scrambled_seen;
+ uint8_t s_scrambled_pass;
th_descrambler_runtime_t *s_descramble;
/**
#define SUBSCRIPTION_ONESHOT 0x080
#define SUBSCRIPTION_TABLES 0x100
#define SUBSCRIPTION_MINIMAL 0x200
+#define SUBSCRIPTION_NODESCR 0x400 ///< no decramble
#define SUBSCRIPTION_INITSCAN 0x1000 ///< for mux subscriptions
#define SUBSCRIPTION_IDLESCAN 0x2000 ///< for mux subscriptions
#define SUBSCRIPTION_USERSCAN 0x4000 ///< for mux subscriptions
const char *name;
void *tcp_id;
int res = HTTP_STATUS_SERVICE;
+ int flags, eflags = 0;
if(http_access_verify(hc, ACCESS_ADVANCED_STREAMING))
return HTTP_STATUS_UNAUTHORIZED;
+ if ((str = http_arg_get(&hc->hc_req_args, "descramble")))
+ if (strcmp(str ?: "", "0") == 0)
+ eflags |= SUBSCRIPTION_NODESCR;
+
+ flags = SUBSCRIPTION_MPEGTS | eflags;
+ if ((eflags & SUBSCRIPTION_NODESCR) == 0)
+ flags |= SUBSCRIPTION_PACKET;
if(!(pro = profile_find_by_list(hc->hc_access->aa_profiles,
http_arg_get(&hc->hc_req_args, "profile"),
- "service",
- SUBSCRIPTION_PACKET | SUBSCRIPTION_MPEGTS)))
+ "service", flags)))
return HTTP_STATUS_NOT_ALLOWED;
if((tcp_id = http_stream_preop(hc)) == NULL)
if (!profile_chain_open(&prch, NULL, 0, qsize)) {
s = subscription_create_from_service(&prch, NULL, weight, "HTTP",
- prch.prch_flags | SUBSCRIPTION_STREAMING,
+ prch.prch_flags | SUBSCRIPTION_STREAMING |
+ eflags,
hc->hc_peer_ipstr,
hc->hc_username,
http_arg_get(&hc->hc_args, "User-Agent"),