|
|
@@ -163,6 +163,7 @@ Encoder Definition Structure (obs_encoder_info)
|
|
|
values:
|
|
|
|
|
|
- **OBS_ENCODER_CAP_DEPRECATED** - Encoder is deprecated
|
|
|
+ - **OBS_ENCODER_CAP_ROI** - Encoder supports region of interest feature
|
|
|
|
|
|
|
|
|
Encoder Packet Structure (encoder_packet)
|
|
|
@@ -265,6 +266,27 @@ Raw Frame Data Structure (encoder_frame)
|
|
|
Presentation timestamp.
|
|
|
|
|
|
|
|
|
+Encoder Region of Interest Structure (obs_encoder_roi)
|
|
|
+-----------------------------------------
|
|
|
+
|
|
|
+.. struct:: obs_encoder_roi
|
|
|
+
|
|
|
+ Encoder region of interest structure.
|
|
|
+
|
|
|
+.. member:: uint32_t top
|
|
|
+ uint32_t bottom
|
|
|
+ uint32_t left
|
|
|
+ uint32_t right
|
|
|
+
|
|
|
+ The rectangle edges of the region are specified as number of pixels from the input video's top and left edges (i.e. row/column 0).
|
|
|
+
|
|
|
+.. member:: float priority
|
|
|
+
|
|
|
+ Priority is specified as a float value between *-1.0f* and *1*.
|
|
|
+ These are converted to encoder-specific values by the encoder.
|
|
|
+ Values above 0 tell the encoder to increase quality for that region, values below tell it to worsen it.
|
|
|
+ Not all encoders support negative values and they may be ignored.
|
|
|
+
|
|
|
General Encoder Functions
|
|
|
-------------------------
|
|
|
|
|
|
@@ -517,6 +539,42 @@ General Encoder Functions
|
|
|
|
|
|
---------------------
|
|
|
|
|
|
+.. function:: bool obs_encoder_add_roi(obs_encoder_t *encoder, const struct obs_encoder_roi *roi)
|
|
|
+
|
|
|
+ Adds a new region of interest to the encoder if ROI feature is supported.
|
|
|
+
|
|
|
+ :return: *true* if adding succeeded, *false* otherwise.
|
|
|
+
|
|
|
+---------------------
|
|
|
+
|
|
|
+.. function:: bool obs_encoder_has_roi(obs_encoder_t *encoder)
|
|
|
+
|
|
|
+ :return: *true* if encoder has ROI regions set, *false* otherwise.
|
|
|
+
|
|
|
+---------------------
|
|
|
+
|
|
|
+.. function:: void obs_encoder_clear_roi(obs_encoder_t *encoder)
|
|
|
+
|
|
|
+ Clear region of interest list, if any.
|
|
|
+
|
|
|
+---------------------
|
|
|
+
|
|
|
+.. function:: void obs_encoder_enum_roi(obs_encoder_t *encoder, void (*enum_proc)(void *, struct obs_encoder_roi *), void *param)
|
|
|
+
|
|
|
+ Enumerate currently configured ROIs by invoking callback for each entry, in reverse order of addition (i.e. most recent to oldest).
|
|
|
+
|
|
|
+ **Note:** If the encoder has scaling enabled the struct passed to the callback will be scaled accordingly.
|
|
|
+
|
|
|
+---------------------
|
|
|
+
|
|
|
+.. function:: uint32_t obs_encoder_get_roi_increment(const obs_encoder_t *encoder)
|
|
|
+
|
|
|
+ Encoders shall refresh their ROI configuration if the increment value changes.
|
|
|
+
|
|
|
+ :return: Increment/revision of ROI list
|
|
|
+
|
|
|
+---------------------
|
|
|
+
|
|
|
|
|
|
Functions used by encoders
|
|
|
--------------------------
|