FUNCTION;
#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
- if (self->display->use_tbm) {
+ if (self->display->use_tbm && !self->display->mapping_sub_surface) {
tbm_bo_handle virtual_addr;
idx = self->display->tbm_bo_idx++;
struct wl_buffer *wbuffer;
FUNCTION;
- if (display->use_tbm) {
+ if (display->use_tbm && !display->mapping_sub_surface) {
tbm_surface_info_s ts_info;
tbm_surface_h tsurface;
#ifdef TIZEN_FEATURE_WLSINK_ENHANCEMENT
static void
-gst_wl_window_map_sub_surface (GstWlDisplay * display, GstWlWindow * window,
+gst_wl_window_mapping_sub_surface (GstWlDisplay * display, GstWlWindow * window,
GstVideoInfo * info)
{
/* A sub-surface becomes mapped, when a non-NULL wl_buffer is applied
g_return_if_fail (window != NULL);
g_return_if_fail (info != NULL);
+ display->mapping_sub_surface = TRUE;
self = GST_TIZEN_WL_SHM_ALLOCATOR (gst_tizen_wl_shm_allocator_get ());
self->display = display;
/* at this point, the GstWlBuffer keeps the buffer
* alive and will free it on wl_buffer::release */
gst_buffer_unref (buf);
+ display->mapping_sub_surface = FALSE;
}
#endif
/* tizen_video(tbm) render on video_surface */
window->video_object =
tizen_video_get_object (display->tizen_video, window->video_surface);
-
- /* to use shm memory for mapping sub-surface, set FALSE to use_tbm */
- window->display->use_tbm = FALSE;
- gst_wl_window_map_sub_surface (display, window, &info);
- /*restore use_tbm */
- window->display->use_tbm = TRUE;
- } else {
- gst_wl_window_map_sub_surface (display, window, &info);
}
+
+ gst_wl_window_mapping_sub_surface (display, window, &info);
#else /* open source */
buf =
gst_buffer_new_allocate (gst_tizen_wl_shm_allocator_get (), info.size,