opentv: Add the local channel number mapping
This commit is contained in:
parent
2f9ab1bc14
commit
e6d2f393fa
3 changed files with 14 additions and 1 deletions
|
@ -400,6 +400,8 @@ opentv_desc_channels
|
|||
/* Find the service */
|
||||
svc = mpegts_service_find(mm, sid, 0, 0, NULL);
|
||||
tvhtrace(mt->mt_name, " svc %p [%s]", svc, svc ? svc->s_nicename : NULL);
|
||||
if (svc)
|
||||
svc->s_dvb_opentv_chnum = cnum;
|
||||
if (svc && LIST_FIRST(&svc->s_channels)) {
|
||||
ec =_opentv_find_epggrab_channel(mod, cid, 1, &save);
|
||||
ecl = LIST_FIRST(&ec->channels);
|
||||
|
|
|
@ -435,6 +435,7 @@ struct mpegts_service
|
|||
*/
|
||||
|
||||
int s_dvb_eit_enable;
|
||||
uint16_t s_dvb_opentv_chnum;
|
||||
|
||||
/*
|
||||
* Link to carrying multiplex and active adapter
|
||||
|
|
|
@ -101,6 +101,13 @@ const idclass_t mpegts_service_class =
|
|||
.opts = PO_RDONLY,
|
||||
.off = offsetof(mpegts_service_t, s_dvb_channel_num),
|
||||
},
|
||||
{
|
||||
.type = PT_U16,
|
||||
.id = "lcn2",
|
||||
.name = "OpenTV Channel Number",
|
||||
.opts = PO_RDONLY,
|
||||
.off = offsetof(mpegts_service_t, s_dvb_opentv_chnum),
|
||||
},
|
||||
{
|
||||
.type = PT_STR,
|
||||
.id = "svcname",
|
||||
|
@ -360,7 +367,10 @@ mpegts_service_grace_period(service_t *t)
|
|||
static int
|
||||
mpegts_service_channel_number ( service_t *s )
|
||||
{
|
||||
return ((mpegts_service_t*)s)->s_dvb_channel_num;
|
||||
int r = ((mpegts_service_t*)s)->s_dvb_channel_num;
|
||||
if (r <= 0)
|
||||
r = ((mpegts_service_t*)s)->s_dvb_opentv_chnum;
|
||||
return r;
|
||||
}
|
||||
|
||||
static const char *
|
||||
|
|
Loading…
Add table
Reference in a new issue