Platform independent DVB stack for Android
Published on Monday, 17 August 2020 10:08
OBS and DTVKit have continued to provide Android DVB solutions for over 3 years now. We started by integrating the DTVKit DVB stack with Android ‘N’, using the TV Input Framework (TIF) to ensure compatibility with the Android architecture. From there we migrated to ‘O’ which was fairly straightforward, but then came ‘P’ with the new ‘Treble’ architecture. This was a more challenging task, but we successfully updated the DVB stack integration to use HIDL. In doing so we enabled DTVKit to provide a solution to its members that was fully compatible with the ‘Treble’ architecture of ‘P’ that also held for Android ’10’ (‘Q’).
Android ’11’ moves the TV framework architecture forward once again, with the addition of new HAL APIs specifically for the tuner, demux, and descrambler. These have to be implemented by the SoC vendors as part of the Android porting process to their chipsets. Although this creates change for the DTVKit DVB stack integration, it is fundamentally a better approach. It means that now there is a standard set of interfaces that can be used to incorporate DVB functionality within Android itself.
Prior to the advent of the ‘TunerHAL’ the DVB stack sat in the hardware abstraction layer as it relied on specific SoC vendor platforms APIs to gain access to the tuner, demux, and descrambler. A private API was then used to interface with Android TIF, enabling Apps to access the DVB functionality. This worked, and was compliant with the Android architecture at the time, but was not the most elegant solution.
Now with the advent of ‘TunerHAL’ we have a set of standard interfaces within Android that provide access to DVB hardware capabilities. This means that the DVB stack can sit properly within the TIF module and does not have to rely on proprietary SoC Vendor APIs. This is a great advantage in that the DVB stack effectively becomes platform independent. It is no longer necessary to maintain a hardware abstraction layer for each of the leading SoC vendors’ platforms. The DVB stack only has to integrate with Android APIs, and the same integration will work on any SoC, as long as they have implemented ‘TunerHAL’.
‘TunerHAL’ does bring with it its own challenges, in that we need to look at how AV decoding is supported for DVB services again. Previously the AV decoding would be handled by the SoC vendors’ media APIs, and now we need to migrate towards using the Android media framework for all AV decoding. However, this is the right direction to be going in, as it enables DTVKit to provide a truly platform independent DVB stack for all Android platforms.
Accordingly, OBS is now working hard to migrate the DTVKit DVB stack to the new ‘TunerHAL’ APIs. We are not quite there yet and hope to have something for release in Q4 of this year, so please keep an eye open for further announcements over the coming months. As soon as we have something demonstrable we’ll post a video here. In the meantime if you’d like more information please get in touch at: email@example.com.