From: Lauri Myllari Date: Sat, 10 Jan 2015 06:47:34 +0000 (-0800) Subject: psip: parse ETT source and event IDs X-Git-Tag: v4.2.1~1834 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0e6acc297b78ebba2f1b4263a9515232d5431b2;p=thirdparty%2Ftvheadend.git psip: parse ETT source and event IDs --- diff --git a/src/epggrab/module/psip.c b/src/epggrab/module/psip.c index 7b936bf00..965f5210d 100644 --- a/src/epggrab/module/psip.c +++ b/src/epggrab/module/psip.c @@ -123,7 +123,7 @@ _psip_ett_callback int r; int sect, last, ver; uint16_t tsid; - uint32_t extraid; + uint32_t extraid, sourceid, eventid; mpegts_table_state_t *st; /* Validate */ @@ -137,7 +137,14 @@ _psip_ett_callback r = dvb_table_begin(mt, ptr, len, tableid, extraid, 7, &st, §, &last, &ver); if (r != 1) return r; - tvhdebug("psip", "0x%04x: ETT tsid %04X (%d), ver %d", mt->mt_pid, tsid, tsid, ver); + + sourceid = ptr[6] << 8 | ptr[7]; + eventid = ptr[8] << 8 | ptr[9]; + if (eventid == 0) { + tvhdebug("psip", "0x%04x: channel ETT tsid 0x%04X (%d), sourceid 0x%04X, ver %d", mt->mt_pid, tsid, tsid, sourceid, ver); + } else { + tvhdebug("psip", "0x%04x: ETT tsid 0x%04X (%d), sourceid 0x%04X, eventid 0x%04X, ver %d", mt->mt_pid, tsid, tsid, sourceid, eventid, ver); + } return dvb_table_end(mt, st, sect); } @@ -272,6 +279,7 @@ static int _psip_tune return 1; /* Check if any services are mapped */ + // FIXME: copied from the eit module - is this a good idea here? // TODO: using indirect ref's like this is inefficient, should // consider changeing it? for (osl = RB_FIRST(&map->om_svcs); osl != NULL; osl = nxt) {