#ifdef TIZEN_FEATURE_EVAS_RENDERER
#include <mm_evas_renderer.h>
#endif
+#include <dlfcn.h>
#define INVALID_DEFAULT_VALUE -1
#define MAX_S_PATH_LEN 32
+#define PLAYER_VIDEO_SUPPORT_CHECK() \
+do { \
+ void *handle; \
+ handle = dlopen("libmmfevasrenderer.so.01", RTLD_LAZY); \
+ if (!handle) \
+ return PLAYER_ERROR_INVALID_OPERATION; \
+ else \
+ dlclose(handle); \
+} while (0)
+
typedef enum {
TIZEN_PROFILE_UNKNOWN = 0,
TIZEN_PROFILE_MOBILE = 0x1,
g_mutex_lock(&cb_info->seek_cb_mutex);
if (cb_info->user_cb[ev] && cb_info->seek_cb_state == PLAYER_SEEK_CB_STATE_NONE) {
#ifdef TIZEN_FEATURE_EVAS_RENDERER
- if (cb_info->evas_info && cb_info->evas_info->handle && cb_info->evas_info->visible != EVAS_VISIBLE_FALSE) {
- int ret = mm_evas_renderer_set_visible(cb_info->evas_info->handle, true);
- if (ret != MM_ERROR_NONE)
- LOGW("failed to set visible at evas 0x%x", ret);
- else
- cb_info->evas_info->visible = EVAS_VISIBLE_TRUE;
+
+ if (cb_info->evas_info && cb_info->evas_info->support_video) {
+ if (cb_info->evas_info->handle && cb_info->evas_info->visible != EVAS_VISIBLE_FALSE) {
+ int ret = mm_evas_renderer_set_visible(cb_info->evas_info->handle, true);
+ if (ret != MM_ERROR_NONE)
+ LOGW("failed to set visible at evas 0x%x", ret);
+ else
+ cb_info->evas_info->visible = EVAS_VISIBLE_TRUE;
+ }
}
#endif
LOGD("call seek cb");
#endif
pc->cb_info->bufmgr = tbm_bufmgr_init(-1);
pc->push_media_stream = FALSE;
+ pc->support_video = FALSE;
+ EVAS_INFO(pc)->support_video = FALSE;
g_free(ret_buf);
return ret;
player_msg_send(api, pc, ret_buf, ret);
#ifdef TIZEN_FEATURE_EVAS_RENDERER
- if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc)) {
- player_unset_media_packet_video_frame_decoded_cb(player);
- if (mm_evas_renderer_destroy(&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);
+ if (CALLBACK_INFO(pc) && EVAS_INFO(pc)->support_video) {
+ if (EVAS_HANDLE(pc)) {
+ player_unset_media_packet_video_frame_decoded_cb(player);
+ if (mm_evas_renderer_destroy(&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);
+ }
}
#endif
LOGD("ENTER");
#ifdef TIZEN_FEATURE_EVAS_RENDERER
- if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc) && EVAS_INFO(pc)->visible == EVAS_VISIBLE_NONE) {
- ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), true);
- if (ret != MM_ERROR_NONE) {
- LOGE("mm_evas_renderer_set_visible err 0x%x", ret);
- return PLAYER_ERROR_INVALID_OPERATION;
+ if (CALLBACK_INFO(pc) && EVAS_INFO(pc)->support_video) {
+ if (EVAS_HANDLE(pc) && EVAS_INFO(pc)->visible == EVAS_VISIBLE_NONE) {
+ ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), true);
+ if (ret != MM_ERROR_NONE) {
+ LOGE("mm_evas_renderer_set_visible err 0x%x", ret);
+ return PLAYER_ERROR_INVALID_OPERATION;
+ }
+ /* avoid setting true at all times, when player is resumed */
+ EVAS_INFO(pc)->visible = EVAS_VISIBLE_TRUE;
}
- /* avoid setting true at all times, when player is resumed */
- EVAS_INFO(pc)->visible = EVAS_VISIBLE_TRUE;
}
#endif
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (ret != PLAYER_ERROR_INVALID_STATE) {
- if (CALLBACK_INFO(pc) && EVAS_HANDLE(pc) && (EVAS_INFO(pc)->visible == EVAS_VISIBLE_TRUE)) {
- ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), false);
- if (ret != MM_ERROR_NONE) {
- LOGE("mm_evas_renderer_set_visible err 0x%x", ret);
- return PLAYER_ERROR_INVALID_OPERATION;
+ if (CALLBACK_INFO(pc) && EVAS_INFO(pc)->support_video) {
+ if (EVAS_HANDLE(pc) && (EVAS_INFO(pc)->visible == EVAS_VISIBLE_TRUE)) {
+ ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), false);
+ if (ret != MM_ERROR_NONE) {
+ LOGE("mm_evas_renderer_set_visible err 0x%x", ret);
+ return PLAYER_ERROR_INVALID_OPERATION;
+ }
+ /* do not update EVAS_INFO(pc)->visible to set visible true if start again */
}
- /* do not update EVAS_INFO(pc)->visible to set visible true if start again */
}
}
#endif
int player_set_display(player_h player, player_display_type_e type, player_display_h display)
{
PLAYER_INSTANCE_CHECK(player);
+ PLAYER_VIDEO_SUPPORT_CHECK();
int ret = PLAYER_ERROR_NONE;
muse_player_api_e api = MUSE_PLAYER_API_SET_DISPLAY;
player_cli_s *pc = (player_cli_s *) player;
Evas *e;
player_private_display_type_e conv_type;
player_state_e state = PLAYER_STATE_NONE;
+ pc->support_video = TRUE;
/* init */
wl_win.wl_window_x = 0;
LOGW("fail to set decoded callback");
if (__player_set_retrieve_buffer_cb(player, __retrieve_buffer_cb, pc))
LOGW("fail to set __retrieve_buffer_cb");
+
+ EVAS_INFO(pc)->support_video = TRUE;
}
#endif
else
char *ret_buf = NULL;
LOGD("ENTER");
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_geometry(EVAS_HANDLE(pc), mode);
int mode = -1;
LOGD("ENTER");
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_get_geometry(EVAS_HANDLE(pc), &mode);
char *wl_win_msg = (char *)&wl_win;
LOGD("ENTER");
-
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_roi_area(EVAS_HANDLE(pc), x, y, width, height);
char *ret_buf = NULL;
LOGD("ENTER");
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_rotation(EVAS_HANDLE(pc), rotation);
int rotation = -1;
LOGD("ENTER");
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_get_rotation(EVAS_HANDLE(pc), &rotation);
char *ret_buf = NULL;
LOGD("ENTER");
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_set_visible(EVAS_HANDLE(pc), visible);
bool visible = 0;
#endif
LOGD("ENTER");
+ if (!pc->support_video) return PLAYER_ERROR_INVALID_OPERATION;
#ifdef TIZEN_FEATURE_EVAS_RENDERER
if (EVAS_HANDLE(pc)) {
ret = mm_evas_renderer_get_visible(EVAS_HANDLE(pc), &visible);