Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
perexg committed Jul 30, 2014
1 parent 2141112 commit 0df3819
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/epggrab/module/opentv.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion src/epggrab/otamux.c
Expand Up @@ -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;

Expand Down

0 comments on commit 0df3819

Please sign in to comment.