mpegts dvb service: add CA PID filter (lock) mode 2 to force CA PID
- works for both cwc and capmt
This commit is contained in:
parent
07e2ad24ac
commit
b611d69fdc
3 changed files with 22 additions and 1 deletions
|
@ -1530,6 +1530,9 @@ capmt_caid_change(th_descrambler_t *td)
|
||||||
lock_assert(&t->s_stream_mutex);
|
lock_assert(&t->s_stream_mutex);
|
||||||
|
|
||||||
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
|
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
|
||||||
|
if (t->s_dvb_prefcapid_lock == 2 &&
|
||||||
|
t->s_dvb_prefcapid != st->es_pid)
|
||||||
|
continue;
|
||||||
LIST_FOREACH(c, &st->es_caids, link) {
|
LIST_FOREACH(c, &st->es_caids, link) {
|
||||||
/* search ecmpid in list */
|
/* search ecmpid in list */
|
||||||
LIST_FOREACH(cce, &ct->ct_caid_ecm, cce_link)
|
LIST_FOREACH(cce, &ct->ct_caid_ecm, cce_link)
|
||||||
|
@ -1809,6 +1812,9 @@ capmt_service_start(service_t *s)
|
||||||
pthread_mutex_lock(&t->s_stream_mutex);
|
pthread_mutex_lock(&t->s_stream_mutex);
|
||||||
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
|
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
|
||||||
caid_t *c;
|
caid_t *c;
|
||||||
|
if (t->s_dvb_prefcapid_lock == 2 &&
|
||||||
|
t->s_dvb_prefcapid != st->es_pid)
|
||||||
|
continue;
|
||||||
LIST_FOREACH(c, &st->es_caids, link) {
|
LIST_FOREACH(c, &st->es_caids, link) {
|
||||||
if(c == NULL || c->use == 0)
|
if(c == NULL || c->use == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1992,6 +1992,9 @@ cwc_service_start(service_t *t)
|
||||||
LIST_FOREACH(pcard, &cwc->cwc_cards, cs_card) {
|
LIST_FOREACH(pcard, &cwc->cwc_cards, cs_card) {
|
||||||
if (pcard->cwc_caid == 0) continue;
|
if (pcard->cwc_caid == 0) continue;
|
||||||
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
|
TAILQ_FOREACH(st, &t->s_filt_components, es_filt_link) {
|
||||||
|
if (((mpegts_service_t *)t)->s_dvb_prefcapid_lock == 2 &&
|
||||||
|
((mpegts_service_t *)t)->s_dvb_prefcapid != st->es_pid)
|
||||||
|
continue;
|
||||||
LIST_FOREACH(c, &st->es_caids, link) {
|
LIST_FOREACH(c, &st->es_caids, link) {
|
||||||
if (c->use && c->caid == pcard->cwc_caid)
|
if (c->use && c->caid == pcard->cwc_caid)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -55,6 +55,17 @@ mpegts_service_class_get_network ( void *ptr )
|
||||||
return &s;
|
return &s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static htsmsg_t *
|
||||||
|
mpegts_service_pref_capid_lock_list ( void *o )
|
||||||
|
{
|
||||||
|
static const struct strtab tab[] = {
|
||||||
|
{ "Off", 0 },
|
||||||
|
{ "On", 1 },
|
||||||
|
{ "Only Pref. CA PID", 2 },
|
||||||
|
};
|
||||||
|
return strtab2htsmsg(tab);
|
||||||
|
}
|
||||||
|
|
||||||
const idclass_t mpegts_service_class =
|
const idclass_t mpegts_service_class =
|
||||||
{
|
{
|
||||||
.ic_super = &service_class,
|
.ic_super = &service_class,
|
||||||
|
@ -134,11 +145,12 @@ const idclass_t mpegts_service_class =
|
||||||
.opts = PO_ADVANCED,
|
.opts = PO_ADVANCED,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
.type = PT_BOOL,
|
.type = PT_INT,
|
||||||
.id = "prefcapid_lock",
|
.id = "prefcapid_lock",
|
||||||
.name = "Lock Pref. CA PID",
|
.name = "Lock Pref. CA PID",
|
||||||
.off = offsetof(mpegts_service_t, s_dvb_prefcapid_lock),
|
.off = offsetof(mpegts_service_t, s_dvb_prefcapid_lock),
|
||||||
.opts = PO_ADVANCED,
|
.opts = PO_ADVANCED,
|
||||||
|
.list = mpegts_service_pref_capid_lock_list,
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue