Apply Video interface for unique id for wl_window 43/58143/3 accepted/tizen/mobile/20160202.113101 accepted/tizen/tv/20160202.113117 accepted/tizen/wearable/20160202.113142 submit/tizen/20160201.062702
authorHyunil <hyunil46.park@samsung.com>
Thu, 28 Jan 2016 01:42:42 +0000 (10:42 +0900)
committerHyunil <hyunil46.park@samsung.com>
Thu, 28 Jan 2016 08:08:34 +0000 (17:08 +0900)
Change-Id: I2bb7d0cbf3a6111b32c0d8877e8b575887809c2b
Signed-off-by: Hyunil <hyunil46.park@samsung.com>
src/player_priv.c

index 471c73bbe3cb9425a7af25b350abcfd114fe94ed..b496f71eb5d4c419c70f22873e1660fd3b8612ce 100644 (file)
@@ -50,7 +50,7 @@ static MMDisplaySurfaceType __player_mused_convet_display_type(player_display_ty
 {
        switch (type) {
        case PLAYER_DISPLAY_TYPE_OVERLAY:
-               return MM_DISPLAY_SURFACE_REMOTE;
+               return PLAYER_DISPLAY_TYPE_OVERLAY;
 #ifdef TIZEN_MOBILE
        case PLAYER_DISPLAY_TYPE_EVAS:
                return MM_DISPLAY_SURFACE_REMOTE;
@@ -63,7 +63,25 @@ static MMDisplaySurfaceType __player_mused_convet_display_type(player_display_ty
 }
 
 #ifdef HAVE_WAYLAND
-int player_set_display_wl_for_mused(player_h player, player_display_type_e type, intptr_t surface, int x, int y, int w, int h)
+int player_resize_video_render_rect(player_h player, int x, int y, int w, int h)
+{
+       PLAYER_INSTANCE_CHECK(player);
+       player_s *handle = (player_s *)player;
+       int ret;
+
+       LOGD("<Enter>");
+
+       ret = mm_player_set_attribute(handle->mm_handle, NULL, "wl_window_render_x", x, "wl_window_render_y", y, "wl_window_render_width", w, "wl_window_render_height", h, (char *)NULL);
+
+       if (ret != MM_ERROR_NONE) {
+               handle->display_type = PLAYER_DISPLAY_TYPE_NONE;
+               return __player_convert_error_code(ret, (char *)__FUNCTION__);
+       } else {
+               return PLAYER_ERROR_NONE;
+       }
+}
+
+int player_set_display_wl_for_mused(player_h player, player_display_type_e type, unsigned int parent_id, int x, int y, int w, int h)
 {
        PLAYER_INSTANCE_CHECK(player);
        player_s *handle = (player_s *)player;
@@ -99,13 +117,13 @@ int player_set_display_wl_for_mused(player_h player, player_display_type_e type,
                temp = handle->display_handle;
                if (type == PLAYER_DISPLAY_TYPE_OVERLAY) {
                        LOGI("Wayland overlay surface type");
-                       handle->display_handle = (void *)surface;
+                       LOGI("parent_id %d", parent_id);
+                       handle->display_handle = (void *)(uintptr_t)parent_id;
                        set_handle = &(handle->display_handle);
                        mmClientType = MM_DISPLAY_SURFACE_OVERLAY;
 #ifdef TIZEN_MOBILE
                } else if (type == PLAYER_DISPLAY_TYPE_EVAS) {
                        LOGI("Evas surface type");
-                       handle->display_handle = (void *)surface;
                        set_handle = &(handle->display_handle);
                        mmClientType = MM_DISPLAY_SURFACE_EVAS;
 #endif
@@ -119,7 +137,7 @@ int player_set_display_wl_for_mused(player_h player, player_display_type_e type,
        if (handle->display_type == PLAYER_DISPLAY_TYPE_NONE || type == handle->display_type) {
                /* first time or same type */
                LOGW("first time or same type");
-               ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_surface_type", mmType, "display_surface_client_type", mmClientType, "display_overlay", set_handle, sizeof(void *), "pipeline_type", mmPipelineType, NULL);
+               ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_surface_type", mmType, "display_surface_client_type", mmClientType, "display_overlay", set_handle, sizeof(parent_id), "pipeline_type", mmPipelineType, NULL);
 
                if (ret != MM_ERROR_NONE) {
                        handle->display_handle = temp;