videometa: add support for downstream parameters to ROI meta
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 9 Feb 2018 13:45:08 +0000 (14:45 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Wed, 21 Feb 2018 17:30:10 +0000 (12:30 -0500)
commitf5855d50ad9a1fb6d5e3e8d2318909dce342c1f1
treea9477d614b14124b75101d5284a2897862ad8b3d
parentd7397f0235082f16da736fcf7d81bd6eeac246c0
videometa: add support for downstream parameters to ROI meta

The current GstVideoRegionOfInterestMeta API allows elements to detect
and name ROI but doesn't tell anything about how this information is
meant to be consumed by downstream elements.
Typically, encoders may want to tweak their encoding settings for a
given ROI to increase or decrease their quality.
Each encoder has its own set of settings so that's not something that
can be standardized.

This patch adds encoder-specific parameters to the meta which can be
used to configure the encoding of a specific ROI.

A typical use case would be: source ! roi-detector ! encoder
with a buffer probe on the encoder sink pad set by the application.
Thanks to the probe the application will be able to tell to the encoder
how this specific region should be encoded.

Users could also develop their specific roi detectors meant to be used with a
specific encoder and directly putting the encoder parameters when
detecting the ROI.

https://bugzilla.gnome.org/show_bug.cgi?id=793338
gst-libs/gst/video/gstvideometa.c
gst-libs/gst/video/gstvideometa.h