* @since_tizen 2.3
*/
typedef enum {
- PLAYER_DISPLAY_TYPE_OVERLAY = 0, /**< Overlay surface display */
- PLAYER_DISPLAY_TYPE_EVAS, /**< Evas image object surface display */
- PLAYER_DISPLAY_TYPE_NONE, /**< This disposes off buffers */
+ PLAYER_DISPLAY_TYPE_OVERLAY = 0, /**< Overlay surface display */
+ PLAYER_DISPLAY_TYPE_EVAS, /**< Evas image object surface display */
+ PLAYER_DISPLAY_TYPE_NONE, /**< This disposes off buffers */
+ PLAYER_DISPLAY_TYPE_OVERLAY_EXT, /**< Added to match mm_display_type_e */
+ PLAYER_DISPLAY_TYPE_OVERLAY_SYNC_UI /**< For sync between UI and video */
} player_display_type_e;
/**
* @param[in] player The handle to the media player
* @param[in] type The display type
* @param[in] wl_surface_id Wayland surface global id
+ * @param[in] exported_shell_handle Exported shell handle
* @return @c 0 on success,
* otherwise a negative error value
* @retval #PLAYER_ERROR_NONE Successful
* @pre The player state must be one of these: #PLAYER_STATE_IDLE, #PLAYER_STATE_READY, #PLAYER_STATE_PLAYING, or #PLAYER_STATE_PAUSED.
* @see legacy_player_set_display_rotation
*/
-int legacy_player_set_display(legacy_player_h player, player_display_type_e type, int wl_surface_id);
+int legacy_player_set_display(legacy_player_h player, player_display_type_e type, int wl_surface_id, const char *exported_shell_handle);
int legacy_player_release_video_stream_bo(legacy_player_h player, void *bo);
switch (type) {
case PLAYER_DISPLAY_TYPE_OVERLAY:
return MM_DISPLAY_SURFACE_OVERLAY;
+ case PLAYER_DISPLAY_TYPE_OVERLAY_SYNC_UI:
+ return MM_DISPLAY_SURFACE_OVERLAY_SYNC_UI;
case PLAYER_DISPLAY_TYPE_EVAS: /* fall through */
- case PLAYER_DISPLAY_TYPE_NONE: /* fall through */
+ case PLAYER_DISPLAY_TYPE_NONE: /* fall through */
default:
return MM_DISPLAY_SURFACE_NULL;
}
return PLAYER_ERROR_NONE;
}
-int legacy_player_set_display(legacy_player_h player, player_display_type_e type, int wl_surface_id)
+int legacy_player_set_display(legacy_player_h player, player_display_type_e type, int wl_surface_id, const char *exported_shell_handle)
{
legacy_player_t *handle = (legacy_player_t *)player;
int ret = MM_ERROR_NONE;
- static const char * display_str[] = {"OVERLAY", "EVAS", "NONE"};
+ static const char * display_str[] = {"OVERLAY", "EVAS", "NONE", "EXT", "OVERLAY_SYNC_UI"};
MMDisplaySurfaceType surface_type = __lplayer_convert_display_type(type);
PLAYER_INSTANCE_CHECK(player);
- PLAYER_RANGE_ARG_CHECK(type, PLAYER_DISPLAY_TYPE_OVERLAY, PLAYER_DISPLAY_TYPE_NONE);
+ PLAYER_RANGE_ARG_CHECK(type, PLAYER_DISPLAY_TYPE_OVERLAY, PLAYER_DISPLAY_TYPE_OVERLAY_SYNC_UI);
if (!_lplayer_state_validate(handle, PLAYER_STATE_IDLE)) {
LOGE("PLAYER_ERROR_INVALID_STATE : current state - %d", handle->state);
ret = mm_player_set_attribute(handle->mm_handle, NULL,
"display_surface_type", surface_type,
"display_overlay", wl_surface_id, NULL);
+ } else if (type == PLAYER_DISPLAY_TYPE_OVERLAY_SYNC_UI) {
+ if (exported_shell_handle == NULL) {
+ LOGE("exported shell handle is NULL");
+ return PLAYER_ERROR_INVALID_PARAMETER;
+ }
+ ret = mm_player_set_attribute(handle->mm_handle, NULL,
+ "display_surface_type", surface_type,
+ "exported_shell_handle", exported_shell_handle, strlen(exported_shell_handle), NULL);
}
} else {
ret = mm_player_change_videosink(handle->mm_handle, surface_type, wl_surface_id);
muse_player = (muse_player_handle_t *)muse_server_ipc_get_handle(module);
player_msg_get_array(wl_win_msg, muse_server_module_get_msg(module));
- ret = legacy_player_set_display(muse_player->player_handle, wl_win.type, wl_win.surface_id);
+ ret = legacy_player_set_display(muse_player->player_handle,
+ wl_win.type, wl_win.surface_id, wl_win.exported_shell_handle);
PLAYER_RETURN_MSG(api, ret, module);
return ret;