Skip to content

overlay: new GstOverlayMeta to store video overlay rendering meta data

Aaron Boxer requested to merge boxerab/gst-plugins-bad:overlay into master

Screenshot_from_2021-04-28_14-28-20

Summary

To meet the needs of new elements that generate overlay data on the fly, e.g. the upcoming object detection element, we need a way of storing this overlay data in the video buffer, to be consumed by a downstream overlay rendering element if present in the pipeline.

API

  1. GstOverlayMeta can store a hash map of overlay shapes, hashed by an integer id. Each shape has a z-order, and each meta also has a z-order. A renderer just needs to sort the hash by z order, and then can easily access each shape for rendering.
  2. The meta can store a reference to a specific GstVideoOverlayCompositionMeta attached to the buffer, so that a renderer can render into this composition meta. If NULL, renderer will decide for itself how best to render the overlay.

Current limitations

  1. only Text and Rectangle shapes are supported
  2. z ordering between a collection of GstOverlayMeta objects and a collection of GstVideoOverlayCompositionMeta objects is not defined

Related issue: #1537 (closed)

Edited by Aaron Boxer

Merge request reports