Creating or building the EIT output is the main task of cherryEPG. The builder takes schedule data of each service stored in the database and builds present/following and schedule tables.
The output of the builder is a 60 second transport stream chunk. The chunk is a recording of transport stream packets containing packetized EIT data. The data in this block must be repeated several times so that it can be displayed to the viewer as quickly as possible when changing programs. In order to save the bit rate, not all tables are repeated with the same frequency.
The repetition rate for tables is hard-coded inside cherryEPG1.
|EIT table type||Repetition time|
|EIT present/following||actual||every <2s|
|EIT present/following||other||every <10s|
|EIT schedule for 1 day||actual||every 10s|
|EIT schedule for 1 day||other||every 30s|
|EIT schedule > 1 day||actual/other||every 30s|
The building process is started every 60 seconds. The builder checks every time whether there are changes in the database or whether an event has been started / stopped since the last creation. The output is only build when changes have occurred. This saves computing time.
To prevent the build process from running more than once at the same time, the builder checks whether a build process is currently running. In this case, the builder stops with a warning.
The building process is using multi-threading. The output is written in cherry transport stream file format to the
The configuration of the builder is done by the scheme file. The columns relevant for configuring the builder are Segments, Codepage and Language.
In EPG a segment is a time interval of 8 hours starting an 00:00 midnight. The segment contains all events starting within this interval. The number of segments specifies the time frame for which schedule data will be build.
To build a schedule for 7 days in future the number of segments must be: 7 days x 3 segments/day = 24 segments
When only present/following tables are required, schedule table building can be also disables. Therefore the number of segments should be 0.
Event data is always UTF-8 encoded. Before building the EIT all text data is encoded to the final codepage. It is important that TV sets and STB support the chosen codepage.
According to DVB specification the used codepage is signaled by prefixing the text with special characters. Following codepages are currently supported by cherryEPG.
|iso-8859-1||10 00 01|
|iso-8859-2||10 00 02|
|iso-8859-3||10 00 03|
|iso-8859-4||10 00 04|
|iso-8859-10||10 00 0a|
|iso-8859-11||10 00 0b|
|iso-8859-12||10 00 0c|
|iso-8859-13||10 00 0d|
|iso-8859-14||10 00 0e|
|iso-8859-15||10 00 0f|
Inside some of the descriptors used by EIT the used language is signaled. The language is signaled as 3-letter code according to ISO 639.
The builder is invoked from command-line with the cherryTool script.
makes the EIT ready for playing. The builder is called and if changes have occurred since the last creation, EIT is build.
To force the creation of EIT regardless whether changes have occurred, we need to run
With adding the verbose flag, it is possible to follow the building process in detail
cherryTool - ver. 1.41 Copyright 2019 Bojan Ramsak Building (forced Make) TRACE builder : start eit multibuild with 16 tasks [-|-] TRACE builder : build EIT [-|1] TRACE builder : build EIT [-|2] TRACE builder : build EIT [-|3] TRACE builder : export 378068 bytes to [eit_002.cts.tmp] [-|2] TRACE builder : lock destination [eit_002.cts] [-|2] TRACE builder : export 376188 bytes to [eit_001.cts.tmp] [-|1] TRACE builder : lock destination [eit_001.cts] [-|1] TRACE builder : export 378068 bytes to [eit_003.cts.tmp] [-|3] TRACE builder : lock destination [eit_003.cts] [-|3] spent: 1.02 s