GstQtOverlay Architecture

From RidgeRun Developer Connection
Jump to: navigation, search


Previous: GstQtOverlay Overview Index Next: GstQtOverlay Overview/Supported Platforms






GstQtOverlay brings together GStreamer, Qt, and OpenGL to render beautiful graphical components in a video stream taking advantage of the GPU power. GstQtOverlay element's architecture can be viewed in four layers, summarized in Figure 1:

Figure 1. GstQtOverlay Element Architecture


GStreamer


2560px-Gstreamer-logo.svg.png

This layer provides the necessary classes to expose GstQtOverlay as a GStreamer element. As such, GstQtOverlay can be linked into any compatible GStreamer pipeline and will participate in the standard pipeline lifecycle. This includes among other, caps and allocator negotiation, and pipeline state changes.


Qt/QML


PluginIcon.png
On top of GStreamer, a Qt-powered class is instantiated in order to manage graphic resources in a decoupled way. Here, the Qt event loop is specially processed in order to have both Glib's and Qt's event sources active. Finally, a QML engine is created to read and render the user's QML file.








OpenGL


Opengl log.pngThe OpenGL layer will render Qt content into the image data using the GPU's parallel power. The blitting to merge the Qt image onto a video frame is performed into a copy of the frame image so that the integrity of the original data is preserved.


HAL

The Hardware Abstraction Layer (or simply HAL) is a thin layer that acts as an adapter between Qt and OpenGL in order to leverage the platform-specific GPU utilities and maximize performance. This layer is the only one that is hardware dependent and will be conditionally built via configuration parameters. The HAL ensures that data transfers are hardware-accelerated so that there is no performance penalty.


Previous: GstQtOverlay Overview Index Next: GstQtOverlay Overview/Supported Platforms