I'm just starting to write some (C++) code on a Ubuntu 14.04.4 system to access DVB streams via a DVB TV USB tuner. I'm using libdvbv5. I'm in the UK using terrestrial freeview.
Trying to grab the off-air event information (EIT). Managed to do so - produces a list of events with service id, start time, duration, name, description etc. All seems fine - except that it only grabs up to 3 days in advance, whereas I notice that other apps manage to get 7 days in advance.
Had a look at some other projects for this, such as dvbtee and mythtv, but not yet managed to work out what is wrong (lots of code). Nothing I do filters out by date, nor from what I can see, does libdvbv5.
The EIT program id is 0x12, and the full schedule table id is 0x50 (to 0x5f). As I say, it grabs all the information without any errors, but only for 3 days in advance and I know there is definitely more available.
Makes me think I am doing the right thing, but looking in the wrong place? Any suggestions welcome.
Found the answer myself:
Table with TID 0x50 has the first 3-4 days, 0x51 the next 3+ and so on. In theory it can go up to 0x5f. So to get all the future events that are available one needs to loop round repeating the process using TID 0x50+[0x00 ... 0x0f] until either the end is reached or one of them provides no more events.
However, it appears that one cannot do this with libdvbv5 as it stands: In descriptors.c there is a table of dvb_table_initializers[256] for the various types of table, but it only initialises the base DVB_TABLE_EIT_SCHEDULE (0x50), not all the others. It will therefore not parse the other tables. Thus one needs to rebuild libdvbv5 with a change to descriptors.c as shown below to initialise all relevant TIDs:
const dvb_table_init_func dvb_table_initializers[256] = {
[0 ... 255] = NULL,
[DVB_TABLE_PAT] = TABLE_INIT(dvb_table_pat),
[DVB_TABLE_CAT] = TABLE_INIT(dvb_table_cat),
[DVB_TABLE_PMT] = TABLE_INIT(dvb_table_pmt),
[DVB_TABLE_NIT] = TABLE_INIT(dvb_table_nit),
[DVB_TABLE_SDT] = TABLE_INIT(dvb_table_sdt),
[DVB_TABLE_EIT] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x01] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x02] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x03] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x04] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x05] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x06] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x07] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x08] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x09] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x0a] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x0b] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x0c] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x0d] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x0e] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE + 0x0f] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x01] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x02] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x03] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x04] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x05] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x06] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x07] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x08] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x09] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x0a] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x0b] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x0c] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x0d] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x0e] = TABLE_INIT(dvb_table_eit),
[DVB_TABLE_EIT_SCHEDULE_OTHER + 0x0f] = TABLE_INIT(dvb_table_eit),
[ATSC_TABLE_MGT] = TABLE_INIT(atsc_table_mgt),
[ATSC_TABLE_EIT] = TABLE_INIT(atsc_table_eit),
[ATSC_TABLE_TVCT] = TABLE_INIT(atsc_table_vct),
[ATSC_TABLE_CVCT] = TABLE_INIT(atsc_table_vct),
};
I also did it for DVB_TABLE_EIT_SCHEDULE_OTHER, which I assume is correct, though have not tried that. It does appear to work for DVB_TABLE_EIT_SCHEDULE though.