Video playback for embedded devices such as infotainment systems and mediacenters demands hardware accelerators to achieve reasonable performance.Unfortunately, vendors provide the drivers for the accelerators only as binaryblobs. We demonstrate how we built a video playback system that uses hardwareacceleration on i.MX6 by using solely open source software includingGstreamer, Qt QML, the etnaviv GPU driver, and the coda video decoder driver. While hardware accelerators are necessary to provide reasonable performancefor video playback on embedded devices, the drivers that are provided asbinary blobs by hardware vendors cause a lot of problems. They are linked tospecific versions of the Linux kernel, may contain security and performanceissues, and are pretty much impossible to debug by developers trying to builda system based on these drivers. We built an i.MX6 based embedded system that simultaneously decodes anddisplays four videos. Our system solely uses open source drivers to controlthe available hardware accelerators. The GUI consists of a Qt application based on QML. Using Qt and QML allows usto use OpenGL for compositing the user interface. OpenGL is backed by the opensource etnativ GPU driver and the Vivante GPU. The Qt application receives the video streams from a Gstreamer pipeline (usingplaybin). The Gstreamer pipeline contains a v4l2 decoder element, which usesthe coda v4l2 driver for the CODA 960 video encoder and decoder IP core (VPUin the Freescale/NXP Reference Manual), and a sink element to make the framesavailable to the Qt application. The entire pipeline including the Gstreamer to Qt handover uses dma_bufs toavoid copies in software. This example shows how to use open source drivers to ease the development ofvideo and graphics applications on embedded systems. |