DTVKit’s Native IP Implementation is an additional module in DVBCore. The architecture of the NIP module is outlined in the diagram below:
The NIP module is compatible with both GSE and MPE delivered NIP streams. The module performs MPE or GSE-Lite HEM decapsulation and FLUTE transport file extraction for NIP configuration files: NIF/SIF/DVB-I and Mutlicast Gateway Config. For chosen services the module then manages the retrieval and caching of the associated DASH MPD and AV segment data. All data is cached in a RAM file store, which is managed by the NIP module the size of which is configurable. Note: Playback of a NIP service is not supported by the DVBCore module and this is left to the application to implement. The NIP service lists and associated AV content can be accessed via native APIs which can also be mapped to a simple http server (e.g. mongoose) to provide http endpoints for service list information and AV (DASH) content.
The NIP module builds as part of DVBCore but to enable it the following options must be configured in the ‘example_setenv.sh’
# Set to 1 and export to enable DVB-NIP. When this is enabled, XML2 is also required
export DTVKIT_INTEGRATE_DVBNIP=1
# Export the following values to compile in ADB functions to import/export the service database
and specify the location of the libxml2 include directory
export DTVKIT_XML_SUPPORT=1
export DTVKIT_LIBXML2_INCLUDE_PATH=/usr/include/libxml2
In additional the following additional libraries are required in your build environment:
Once these prerequisites are met then DVBCore can be built in the normal way, and it will produce a library with the NIP functionality enabled.
The DTVkit Application can then be built in the usual way for the desktop PC. (See instructions here) The application is able to read transport stream (MPE), or PCAP (GSE) files from the “ts” folder in the App’s root directory. For NIP services the application is expecting a satellite stream, so the file needs to be named as the L-band frequency, i.e. the Ku-band frequency specified on the scan dialog minus the LNB frequency, e.g. for a universal LNB, 9,750MHz for low band, and 10,600MHz for high band.
For example:
The DTVKit Application does not support native playback of NIP services as these are typically DASH or HLS based. Instead, the NIP module includes a simple HTTP server that makes DVB NIP services available for playback using a web based or standard desktop player such as VLC. The list of DVBNIP services is presented as the index page of the HTTP server together with all files in the RAM file store including the dash MPDs and associated AV segment data.
Steps:
By default, when a NIP service is identified, the NIP engine will wait for a request via DVBNIP_GetFile() before caching the related AV segments. To have faster initialisation & channel change experience it is possible to override this behaviour, so the AV data is cached sooner. NIP services can be in one of the following states:
To control / query the status of the service, two API methods are available:
These APIs can be used in conjunction with DVBNIP_ListServices () to cache services data at the desired level and offer a faster start/change time. Full details of the APIs are available in DVbCore’s API guide.
All files in the filestore will be cleaned after MAX_AGE_CONTENT (currently 30 seconds), or when the total of all the files exceeds MAX_MEMORY_USAGE, (currently 100Mbytes), and of manifests, when these remain inactive for MAX_AGE_CONTENT seconds, then it removes the media segments, the manifests, and unsubscribes it from the FLUTE session.
Full details of DVBCore’s NIP related APIs and data structure is available in DVBCore’s reference manual documentation. The reference manual can be built using doxygen from the source code, or an online copy Is available https://www.dtvkit.org/wiki/DVBCore_24_10_0_api/html.
Additional platform APIs have been included to facilitate GSE tuning – the extra parameters are needed to tune to these carriers.