return ret;
}
-int disp_set_evas_display_old_info(void *display, void *evas_handle, int mode, int rotation, int visible)
+int disp_set_evas_display_old_info(void *display, MMHandleType evas_handle, int mode, int rotation, int visible)
{
int ret = MM_ERROR_NONE;
return_val_if_fail(display != NULL, MM_ERROR_INVALID_ARGUMENT);
return_val_if_fail(evas_handle != NULL, MM_ERROR_INVALID_HANDLE);
LOGW("set evas information mode %d, rotation %d, visible %d", mode, rotation, visible);
-
ret = mm_evas_renderer_set_geometry(evas_handle, mode);
- ret |= mm_evas_renderer_set_rotation(evas_handle, mode);
-
+ ret |= mm_evas_renderer_set_rotation(evas_handle, rotation);
/* if user didn't set visible, it will be set to true in player_start */
if (visible != DISP_EVAS_VISIBLE_NONE)
ret |= mm_evas_renderer_set_visible(evas_handle, (visible == DISP_EVAS_VISIBLE_TRUE) ? true : false);
+
return ret;
}
-int disp_destroty_evas_display(MMHandleType *evas_handle)
+int disp_destroy_evas_display(MMHandleType *evas_handle)
{
int ret = MM_ERROR_NONE;
return_val_if_fail(evas_handle != NULL, MM_ERROR_INVALID_HANDLE);
int disp_get_evas_display_visible(MMHandleType evas_handle, bool *p_visible);
int disp_set_evas_display_visible(MMHandleType evas_handle, bool visible);
int disp_set_evas_display_roi_area(MMHandleType evas_handle, int x, int y, int width, int height);
-int disp_set_evas_display_old_info(void *display, void *evas_handle, int mode, int rotation, int visible);
-int disp_destroty_evas_display(MMHandleType *evas_handle);
+int disp_set_evas_display_old_info(void *display, MMHandleType evas_handle, int mode, int rotation, int visible);
+int disp_destroy_evas_display(MMHandleType *evas_handle);
int disp_create_evas_display(void *display, MMHandleType *evas_handle);
void disp_media_packet_video_decode_cb(media_packet_h packet, void *evas_handle);
player_cli_s *pc = (player_cli_s *) player;
char *ret_buf = NULL;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
- int (*p_disp_destroty_evas_display)(void **) = NULL;
+ int (*p_disp_destroy_evas_display)(void **) = NULL;
#endif
LOGD("ENTER");
if (CALLBACK_INFO(pc) && EVAS_INFO(pc)->support_video) {
if (EVAS_HANDLE(pc)) {
player_unset_media_packet_video_frame_decoded_cb(player);
- PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_destroty_evas_display, "disp_destroty_evas_display");
- if (p_disp_destroty_evas_display(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
+ PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_destroy_evas_display, "disp_destroy_evas_display");
+ if (p_disp_destroy_evas_display(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
LOGW("fail to unset evas client");
__player_unset_retrieve_buffer_cb(player);
g_free(pc->cb_info->evas_info);
player_state_e state = PLAYER_STATE_NONE;
unsigned int (*p_disp_set_wl_display)(int, void *) = NULL;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
- int (*p_disp_destroty_evas_display)(void **) = NULL;
+ int (*p_disp_destroy_evas_display)(void **) = NULL;
int (*p_disp_create_evas_display)(void *, void **) = NULL;
int (*p_disp_set_evas_display_old_info)(void *, void *, int, int, int) = NULL;
int (*p_disp_set_evas_display_roi_area)(void *, int, int, int, int) = NULL;
if (!display)
return PLAYER_ERROR_INVALID_PARAMETER;
+#ifdef TIZEN_FEATURE_EVAS_RENDERER
+ /**
+ * To support repeating play and stop, Evas_handle should not be destroyed in player_unprepare.
+ * When the display type changes, Player need to destroy Evas_handle to set values of video output,
+ * Otherwise, the values is not set because of checking Evas_handle.
+ */
+ if (EVAS_HANDLE(pc)) {
+ LOGW("evas client already exists");
+ player_unset_media_packet_video_frame_decoded_cb(player);
+ PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_destroy_evas_display, "disp_destroy_evas_display");
+ if (p_disp_destroy_evas_display(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
+ LOGW("fail to unset evas client");
+ __player_unset_retrieve_buffer_cb(player);
+ /* need to set display information again to new handle */
+ EVAS_INFO(pc)->update_needed = TRUE;
+ }
+#endif
/* set evas_render or wayland */
if (conv_type == PLAYER_PRIVATE_DISPLAY_TYPE_OVERLAY) {
PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_wl_display, "disp_set_wl_display");
return PLAYER_ERROR_INVALID_OPERATION;
}
- if (EVAS_HANDLE(pc)) {
- LOGW("evas client already exists");
- player_unset_media_packet_video_frame_decoded_cb(player);
- PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_destroty_evas_display, "disp_destroty_evas_display");
- if (p_disp_destroty_evas_display(&EVAS_HANDLE(pc)) != MM_ERROR_NONE)
- LOGW("fail to unset evas client");
- __player_unset_retrieve_buffer_cb(player);
-
- /* need to set display information again to new handle */
- EVAS_INFO(pc)->update_needed = TRUE;
- }
PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_create_evas_display, "disp_create_evas_display");
ret = p_disp_create_evas_display(display, &EVAS_HANDLE(pc));
if (ret != MM_ERROR_NONE) return PLAYER_ERROR_INVALID_OPERATION;
/* before evas handle is created, user could set display information */
if (EVAS_INFO(pc)->update_needed) {
PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_evas_display_old_info, "disp_set_evas_display_old_info");
- ret = p_disp_set_evas_display_old_info(display, CALLBACK_INFO(pc), EVAS_INFO(pc)->mode, EVAS_INFO(pc)->rotation, EVAS_INFO(pc)->visible);
+ ret = p_disp_set_evas_display_old_info(display, EVAS_HANDLE(pc), EVAS_INFO(pc)->mode, EVAS_INFO(pc)->rotation, EVAS_INFO(pc)->visible);
if (ret != MM_ERROR_NONE) return PLAYER_ERROR_INVALID_OPERATION;
if (EVAS_INFO(pc)->mode == PLAYER_DISPLAY_MODE_DST_ROI) {
PLAYER_DISP_DLSYM(pc->dl_handle, p_disp_set_evas_display_roi_area, "disp_set_evas_display_roi_area");