video: not create a video global object if exists 28/133628/1
authorBoram Park <boram1288.park@samsung.com>
Sun, 11 Jun 2017 00:09:54 +0000 (09:09 +0900)
committerBoram Park <boram1288.park@samsung.com>
Sun, 11 Jun 2017 03:22:40 +0000 (12:22 +0900)
Change-Id: I703499549036e1926ddc53ab62c1a6bca7a80fe0

src/e_devicemgr_video.c

index 8e8bff6aa8c6c77b0d5c6cc0c4be5d95f9ccf2d3..4459e7ca7823a0110fd06334d65ce57a1462f5b9 100755 (executable)
@@ -2545,6 +2545,7 @@ e_devicemgr_video_init(void)
 {
    if (!e_comp_wl) return 0;
    if (!e_comp_wl->wl.disp) return 0;
+   if (e_comp->wl_comp_data->video.global) return 1;
 
    e_info_server_hook_set("mbuf", _e_devicemgr_mbuf_print, NULL);
    e_info_server_hook_set("video-dst-change", _e_devicemgr_video_dst_change, NULL);
@@ -2558,10 +2559,11 @@ e_devicemgr_video_init(void)
         return 0;
      }
 
+   e_comp->wl_comp_data->video.global =
+     wl_global_create(e_comp_wl->wl.disp, &tizen_video_interface, 1, NULL, _e_devicemgr_video_cb_bind);
 
    /* try to add tizen_video to wayland globals */
-   if (!wl_global_create(e_comp_wl->wl.disp, &tizen_video_interface, 1,
-                         NULL, _e_devicemgr_video_cb_bind))
+   if (!e_comp->wl_comp_data->video.global)
      {
         ERR("Could not add tizen_video to wayland globals");
         return 0;