return FALSE;
}
+/**
+ * gst_video_overlay_set_video_roi_area:
+ * @overlay: a #GstVideoOverlay
+ * @x_scale: x coordinate ratio value of video source area
+ * based on video width size, valid range is from 0.0 to 1.0.
+ * @y_scale: y coordinate ratio value of video source area
+ * based on video width size, valid range is from 0.0 to 1.0.
+ * @w_scale: width ratio value of the video source area
+ * based on video width size, valid range is from greater than 0.0 to 1.0.
+ * @h_scale: height ratio value of the video source area
+ * based on video width size, valid range is from greater than 0.0 to 1.0.
+ *
+ * Sets the ROI(Region Of Interest) area of video source.
+ * Returns: %FALSE if not supported by the sink.
+**/
+gboolean
+gst_video_overlay_set_video_roi_area (GstVideoOverlay * overlay,
+ gdouble x_scale, gdouble y_scale, gdouble w_scale, gdouble h_scale)
+{
+ GstVideoOverlayInterface *iface;
+
+ g_return_val_if_fail (overlay != NULL, FALSE);
+ g_return_val_if_fail (GST_IS_VIDEO_OVERLAY (overlay), FALSE);
+ g_return_val_if_fail (x_scale >= 0.0 && x_scale <= 1.0, FALSE);
+ g_return_val_if_fail (y_scale >= 0.0 && y_scale <= 1.0, FALSE);
+ g_return_val_if_fail (w_scale > 0.0 && w_scale <= 1.0, FALSE);
+ g_return_val_if_fail (h_scale > 0.0 && h_scale <= 1.0, FALSE);
+
+ iface = GST_VIDEO_OVERLAY_GET_INTERFACE (overlay);
+
+ if (iface->set_video_roi_area) {
+ iface->set_video_roi_area (overlay, x_scale, y_scale, w_scale, h_scale);
+ return TRUE;
+ }
+ return FALSE;
+}
#endif
/**
* gst_video_overlay_set_window_handle:
void (*set_display_roi_area) (GstVideoOverlay *overlay,
gint x, gint y,
gint width, gint height);
+
+ void (*set_video_roi_area) (GstVideoOverlay *overlay,
+ gdouble x_scale, gdouble y_scale,
+ gdouble w_scale, gdouble h_scale);
};
GType gst_video_overlay_get_type (void);
gboolean gst_video_overlay_set_display_roi_area (GstVideoOverlay * overlay,
gint x, gint y,
gint width, gint height);
-
+gboolean gst_video_overlay_set_video_roi_area (GstVideoOverlay * overlay,
+ gdouble x_scale, gdouble y_scale,
+ gdouble w_scale, gdouble h_scale);
G_END_DECLS