static void
gst_tizen_wl_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
guintptr wl_surface_id);
-static void gst_tizen_wl_sink_set_render_rectangle (GstVideoOverlay * overlay,
+static void gst_tizen_wl_sink_set_roi_area (GstVideoOverlay * overlay,
gint x, gint y, gint w, gint h);
static void gst_tizen_wl_sink_expose (GstVideoOverlay * overlay);
gst_tizen_wl_sink_videooverlay_init (GstVideoOverlayInterface * iface)
{
iface->set_window_handle = gst_tizen_wl_sink_set_window_handle;
- iface->set_render_rectangle = gst_tizen_wl_sink_set_render_rectangle;
+ iface->set_render_rectangle = gst_tizen_wl_sink_set_roi_area;
iface->expose = gst_tizen_wl_sink_expose;
#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT /* use unique_id */
iface->set_wl_window_wl_surface_id =
gst_tizen_wl_sink_set_wl_window_wl_surface_id;
+ iface->set_display_roi_area = gst_tizen_wl_sink_set_roi_area;
#endif
}
}
static void
-gst_tizen_wl_sink_set_render_rectangle (GstVideoOverlay * overlay,
- gint x, gint y, gint w, gint h)
+gst_tizen_wl_sink_set_roi_area (GstVideoOverlay * overlay, gint x, gint y,
+ gint w, gint h)
{
GstTizenWlSink *sink = GST_TIZEN_WL_SINK (overlay);
FUNCTION;
if (!sink->window) {
g_mutex_unlock (&sink->render_lock);
GST_WARNING_OBJECT (sink,
- "set_render_rectangle called without window, ignoring");
+ "set roi area called without window, ignoring");
return;
}
GST_WARNING_OBJECT (sink, "window geometry changed to (%d, %d) %d x %d",
x, y, w, h);
- if (gst_wl_window_set_render_rectangle (sink->window, x, y, w, h)) {
+ if (gst_wl_window_set_roi_area (sink->window, x, y, w, h)) {
sink->video_info_changed = TRUE;
if (sink->display_geometry_method == DISP_GEO_METHOD_CUSTOM_ROI
gst_tizen_wl_shm_memory_construct_wl_buffer (gst_buffer_peek_memory (buf,
0), display, info);
if (G_UNLIKELY (!wlbuf)) {
- GST_ERROR ("could not create wl_buffer");
- gst_buffer_unref (buf);
- return;
+ GST_ERROR ("could not create wl_buffer");
+ gst_buffer_unref (buf);
+ return;
}
gwlbuf = gst_buffer_add_wl_buffer (buf, wlbuf, display);
}
/* set the initial size to be the same as the reported video size */
+
width =
gst_util_uint64_scale_int_round (info->width, info->par_n, info->par_d);
gst_wl_window_set_render_rectangle (window, 0, 0, width, info->height);
tizen_viewport_set_source (window->tizen_video_viewport,
window->mode_crop.x, window->mode_crop.y, window->mode_crop.w,
window->mode_crop.h);
+
window->mode_crop.changed = FALSE;
}
#if TIZEN_FEATURE_WLSINK_ENHANCEMENT
gboolean
-gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
+gst_wl_window_set_roi_area (GstWlWindow * window, gint x, gint y,
gint w, gint h)
{
FUNCTION;
void gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer,
const GstVideoInfo * info);
#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
-gboolean gst_wl_window_set_render_rectangle (GstWlWindow * window, gint x, gint y,
+gboolean gst_wl_window_set_roi_area (GstWlWindow * window, gint x, gint y,
gint w, gint h);
void gst_wl_window_set_video_info (GstWlWindow * window,
const GstVideoInfo * info);