e_policy_wl_video: add implementation for version 2 of tizen_video 61/144461/2
authorJunSeok, Kim <juns.kim@samsung.com>
Wed, 16 Aug 2017 05:44:12 +0000 (14:44 +0900)
committerJuyeon Lee <juyeonne.lee@samsung.com>
Thu, 17 Aug 2017 02:13:12 +0000 (02:13 +0000)
The destructor added to tizen_video so add the implementation of server
side.

Change-Id: I094f01bf06c04d97a5b42632ed58ed8e1ec1843c

src/bin/e_comp_wl_video.c

index 708d4b7..08cea94 100644 (file)
@@ -2531,10 +2531,17 @@ _e_comp_wl_video_cb_get_viewport(struct wl_client *client,
      }
 }
 
+static void
+_e_comp_wl_video_cb_destroy(struct wl_client *client, struct wl_resource *resource)
+{
+   wl_resource_destroy(resource);
+}
+
 static const struct tizen_video_interface _e_comp_wl_video_interface =
 {
    _e_comp_wl_video_cb_get_object,
    _e_comp_wl_video_cb_get_viewport,
+   _e_comp_wl_video_cb_destroy,
 };
 
 static void
@@ -2544,7 +2551,7 @@ _e_comp_wl_video_cb_bind(struct wl_client *client, void *data, uint32_t version,
    const tbm_format *formats = NULL;
    int i, count = 0;
 
-   if (!(res = wl_resource_create(client, &tizen_video_interface, MIN(version, 1), id)))
+   if (!(res = wl_resource_create(client, &tizen_video_interface, MIN(version, 2), id)))
      {
         ERR("Could not create tizen_video_interface resource: %m");
         wl_client_post_no_memory(client);
@@ -2621,7 +2628,7 @@ e_comp_wl_video_init(void)
      }
 
    e_comp->wl_comp_data->video.global =
-      wl_global_create(e_comp_wl->wl.disp, &tizen_video_interface, 1, NULL, _e_comp_wl_video_cb_bind);
+      wl_global_create(e_comp_wl->wl.disp, &tizen_video_interface, 2, NULL, _e_comp_wl_video_cb_bind);
 
    /* try to add tizen_video to wayland globals */
    if (!e_comp->wl_comp_data->video.global)