Provide top level API call to allow all epg grabbers to be informed about tuning events, as OTA grabbers will need to know this.

This commit is contained in:
Adam Sutton 2012-06-17 13:57:15 +01:00
parent cbc7aa26fc
commit 2b86b25c89
3 changed files with 21 additions and 0 deletions

View file

@ -40,6 +40,8 @@
#include "notify.h"
#include "dvr/dvr.h"
#include "epggrab.h"
/**
* Return uncorrected block (since last read)
*
@ -515,7 +517,9 @@ dvb_fe_tune(th_dvb_mux_instance_t *tdmi, const char *reason)
gtimer_arm(&tda->tda_fe_monitor_timer, dvb_fe_monitor, tda, 1);
dvb_table_add_default(tdmi);
epggrab_tune(tdmi);
dvb_adapter_notify(tda);
return 0;

View file

@ -858,6 +858,14 @@ void epggrab_channel_mod ( channel_t *ch )
}
}
void epggrab_tune ( th_dvb_mux_instance_t *tdmi )
{
epggrab_module_t *m;
LIST_FOREACH(m, &epggrab_modules, link) {
if (m->tune) m->tune(m, tdmi);
}
}
epggrab_module_t* epggrab_module_find_by_id ( const char *id )
{
epggrab_module_t *m;

View file

@ -3,6 +3,7 @@
#include <pthread.h>
#include "channels.h"
#include "dvb/dvb.h"
typedef struct epggrab_module epggrab_module_t;
@ -117,6 +118,9 @@ struct epggrab_module
void (*ch_add) ( epggrab_module_t *m, channel_t *ch );
void (*ch_rem) ( epggrab_module_t *m, channel_t *ch );
void (*ch_mod) ( epggrab_module_t *m, channel_t *ch );
/* Transponder tuning */
void (*tune) ( epggrab_module_t *m, th_dvb_mux_instance_t *tdmi );
};
/*
@ -187,4 +191,9 @@ void epggrab_channel_add ( struct channel *ch );
void epggrab_channel_rem ( struct channel *ch );
void epggrab_channel_mod ( struct channel *ch );
/*
* Transport handling
*/
void epggrab_tune ( th_dvb_mux_instance_t *tdmi );
#endif /* __EPGGRAB_H__ */