EIT Cache Service

Introduction

The KreaTV EIT cache service is used to non-persistently cache DVB EIT data received embedded into MPEG transport streams. The cache supports the following features from EN 300 486 v1.8.1:

Overview

Using the Service

In the EIT cache, as in standard DVB EIT, an event is identified using an event_id and a service is identified using the triplet:

Interface

There are three (3) TOI interfaces that applications can use to interact with EIT service:

Configuring

Before the service can start caching DVB EIT data, two things must be configured in the cache:

EIT Cache Service Behaviour

EIT Cache Instances

Application use the IToiDvbEitService interface to create their own EIT cache instance(s). The EIT cache service maintains a database in which applications are paired with their EIT cache instances. An application is allowed to create more than one EIT cache instance. Also, it is allowed to have multiple applications with their own EIT cache instances at the same time. However the total number of EIT cache instances created at one time can be at most five (5). Here is some sample code (JavaScript) for creating an EIT cache instance:

The sample code calls the IToiDvbEitService::CreateInstance to create an EIT cache instance. It then sets the filter mode to PF and Schedule, which means both p/f and schedule EIT data is going to be cached in the current instance. The third line specifies an event handler to deal with ON_CACHE_UPDATED events, which are sent when the cache data has been updated.

Adding Events

After an instance has been creating and configured, the EIT service will begin collecting EIT data. All EIT data that is found in any transform stream played using a MediaPlayer will be processed. EIT data that matches the following criteria will be cached:

Removing Events

While updating events, the EIT cache will also remove events which are no longer needed. These are the cases when the EIT cache will remove events:

NVOD Event Handling

NVOD (Near Video On Demand) events are handled differently than standard EIT events.

Private Data Handling

Upon discovering a private data specifier, the EIT cache will start to extract private data and appends the data to the end of its private data buffer. This is done until the next specifier appears which means that the private data has reached its end. The private data can be retrieved by the application using IToiDvbEitCache::GetPrivateData().

Language

EIT cache service gets system language from the information object "cfg.locale.ui". Since EIT event descriptors can be available for multiple languages, EIT cache service has to check the language of the incoming EIT infomation.

When parsing EIT event, the name of the event is extracted from short event descriptor. If the language of the short event descriptor doesn't match current system language, the EIT event will not be cached. Further, the information in extended event descriptors may come with different languages too. When short event descriptor has the right language, if the extended event descriptor doesn't, it will be left blank.

Cache Updates

To inform the user that the cache has been updated (events added or removed), an OnCacheUpdated event is sent to all listeners. In order not to be clogged by these events, they are sent at most every 500 ms event if new events comes more frequent than that. The event contains information regarding which services and time intervals that have been updated.

Fetching Data

Fetching events from the cache is done in several steps depending on what information is needed:

See also: TOI DVB EIT Service Interface