epggrab: improve the tune callback, do tsid check for opentv
This commit is contained in:
parent
940da633dc
commit
f794f93d63
5 changed files with 16 additions and 6 deletions
|
@ -231,7 +231,8 @@ struct epggrab_module_ota
|
|||
/* Transponder tuning */
|
||||
void (*start) ( epggrab_module_ota_t *m, struct mpegts_mux *mm );
|
||||
void (*done) ( epggrab_module_ota_t *m );
|
||||
int (*tune) ( epggrab_module_ota_t *m, epggrab_ota_mux_t *om );
|
||||
int (*tune) ( epggrab_module_ota_t *m, epggrab_ota_mux_t *om,
|
||||
struct mpegts_mux *mm );
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -700,7 +700,7 @@ static void _eit_start
|
|||
}
|
||||
|
||||
static int _eit_tune
|
||||
( epggrab_module_ota_t *m, epggrab_ota_mux_t *om )
|
||||
( epggrab_module_ota_t *m, epggrab_ota_mux_t *om, mpegts_mux_t *mm )
|
||||
{
|
||||
int r = 0;
|
||||
mpegts_service_t *s;
|
||||
|
@ -708,6 +708,9 @@ static int _eit_tune
|
|||
|
||||
lock_assert(&global_lock);
|
||||
|
||||
/* Disabled */
|
||||
if (!m->enabled) return 0;
|
||||
|
||||
/* Have gathered enough info to decide */
|
||||
if (!om->om_complete)
|
||||
return 1;
|
||||
|
|
|
@ -693,8 +693,14 @@ static void _opentv_done( epggrab_module_ota_t *m )
|
|||
}
|
||||
|
||||
static int _opentv_tune
|
||||
( epggrab_module_ota_t *m, epggrab_ota_mux_t *om )
|
||||
( epggrab_module_ota_t *m, epggrab_ota_mux_t *om, mpegts_mux_t *mm )
|
||||
{
|
||||
opentv_module_t *mod = (opentv_module_t*)m;
|
||||
|
||||
/* Ignore */
|
||||
if (!m->enabled) return 0;
|
||||
if (mod->tsid != mm->mm_tsid) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -332,8 +332,7 @@ next_one:
|
|||
|
||||
/* Check we have modules attached and enabled */
|
||||
LIST_FOREACH(map, &om->om_modules, om_link) {
|
||||
if (map->om_module->enabled &&
|
||||
map->om_module->tune && map->om_module->tune(map->om_module, om))
|
||||
if (map->om_module->tune(map->om_module, om, mm))
|
||||
break;
|
||||
}
|
||||
if (!map) {
|
||||
|
|
|
@ -89,7 +89,8 @@ typedef struct epggrab_ota_module_ops {
|
|||
void (*start) (epggrab_module_ota_t *m, struct mpegts_mux *mm);
|
||||
int (*enable) (void *m, uint8_t e );
|
||||
void (*done) (epggrab_module_ota_t*m);
|
||||
int (*tune) (epggrab_module_ota_t *m, epggrab_ota_mux_t *om );
|
||||
int (*tune) (epggrab_module_ota_t *m, epggrab_ota_mux_t *om,
|
||||
struct mpegts_mux *mm);
|
||||
} epggrab_ota_module_ops_t;
|
||||
|
||||
epggrab_module_ota_t *epggrab_module_ota_create
|
||||
|
|
Loading…
Add table
Reference in a new issue