guintptr handle);
static void
gst_tizen_wl_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
- guintptr wl_surface_id);
+ gint wl_surface_id);
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_set_video_source_roi_area (GstVideoOverlay *
/* use unique_id */
static void
gst_tizen_wl_sink_set_wl_window_wl_surface_id (GstVideoOverlay * overlay,
- guintptr wl_surface_id)
+ gint wl_surface_id)
{
GstTizenWlSink *sink = GST_TIZEN_WL_SINK (overlay);
FUNCTION;
g_return_if_fail (sink != NULL);
+ if (wl_surface_id <= 0) {
+ GST_ERROR_OBJECT (sink, "wl surface id (%d) is wrong <= 0", wl_surface_id);
+ return;
+ }
+ GST_WARNING ("wl_surface_id %d", wl_surface_id);
+
if (sink->window != NULL) {
GST_WARNING_OBJECT (sink, "changing window handle is not supported");
return;
}
+
g_mutex_lock (&sink->render_lock);
g_clear_object (&sink->window);
- GST_WARNING ("wl_surface_id %d 0x%x", (int) wl_surface_id,
- (guintptr) wl_surface_id);
-
- if (wl_surface_id) {
- if (G_LIKELY (gst_tizen_wl_sink_find_display (sink))) {
- /* we can use our own display with an external window handle */
- if (G_LIKELY (sink->display->own_display)) {
- sink->display->wl_surface_id = (int) wl_surface_id;
- sink->window =
- gst_wl_window_new_in_surface (sink->display, NULL,
- &sink->render_lock);
- }
- } else {
- GST_ERROR_OBJECT (sink, "Failed to find display handle, "
- "ignoring window handle");
+ if (G_LIKELY (gst_tizen_wl_sink_find_display (sink))) {
+ /* we can use our own display with an external window handle */
+ if (G_LIKELY (sink->display->own_display)) {
+ sink->display->wl_surface_id = wl_surface_id;
+ sink->window =
+ gst_wl_window_new_in_surface (sink->display, NULL,
+ &sink->render_lock);
}
+ } else {
+ GST_ERROR_OBJECT (sink, "Failed to find display handle, "
+ "ignoring window handle");
}
g_mutex_unlock (&sink->render_lock);