epggrab: ota - optimize the eit/opentv workflow
Assume that the EPG grab is completed when: - no EIT data are present and opentv completed - EIT data are present but opentv data were not seen
This commit is contained in:
parent
2141112aac
commit
0df3819a17
2 changed files with 6 additions and 1 deletions
|
@ -129,6 +129,7 @@ typedef struct opentv_event
|
|||
typedef struct opentv_status
|
||||
{
|
||||
opentv_module_t *os_mod;
|
||||
epggrab_ota_map_t *os_map;
|
||||
int os_refcount;
|
||||
epggrab_ota_mux_t *os_ota;
|
||||
} opentv_status_t;
|
||||
|
@ -453,6 +454,7 @@ opentv_table_callback
|
|||
/* Complete */
|
||||
done:
|
||||
if (!r) {
|
||||
sta->os_map->om_first = 0; /* valid data mark */
|
||||
tvhtrace(mt->mt_name, "pid %d complete remain %d",
|
||||
mt->mt_pid, sta->os_refcount-1);
|
||||
|
||||
|
@ -564,6 +566,7 @@ static int _opentv_start
|
|||
if (!sta) {
|
||||
sta = calloc(1, sizeof(opentv_status_t));
|
||||
sta->os_mod = mod;
|
||||
sta->os_map = map;
|
||||
}
|
||||
mt = mpegts_table_add(mm, DVB_BAT_BASE, DVB_BAT_MASK,
|
||||
opentv_bat_callback, sta,
|
||||
|
|
|
@ -309,9 +309,11 @@ epggrab_ota_complete
|
|||
LIST_FOREACH(map, &ota->om_modules, om_link) {
|
||||
if (map->om_module == mod) {
|
||||
map->om_complete = 1;
|
||||
} else if (!map->om_complete) {
|
||||
} else if (!map->om_complete && !map->om_first) {
|
||||
done = 0;
|
||||
}
|
||||
tvhtrace("epggrab", "%s complete %i first %i",
|
||||
map->om_module->id, map->om_complete, map->om_first);
|
||||
}
|
||||
if (!done) return;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue