break;
case MM_MESSAGE_SEEK_COMPLETED: /* 0x114 */
if (handle->display_type != PLAYER_DISPLAY_TYPE_NONE && handle->state == PLAYER_STATE_READY) {
- if (handle->is_display_visible)
- mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", 1, (char *)NULL);
+ if (handle->is_display_visible) {
+ int ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", 1, (char *)NULL);
+ if (ret != MM_ERROR_NONE)
+ LOGW("[%s] Failed to set display_visible '1' (0x%x)", __FUNCTION__, ret);
+ }
}
if (handle->user_cb[MUSE_PLAYER_EVENT_TYPE_SEEK]) {
__ADD_MESSAGE(handle, PLAYER_MESSAGE_SEEK_DONE);
player_s *handle = (player_s *)player;
int ret;
if (handle->state == PLAYER_STATE_READY || handle->state == PLAYER_STATE_PAUSED) {
- if (handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY && handle->is_display_visible)
+ if (handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY && handle->is_display_visible) {
ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", 1, (char *)NULL);
-
+ if (ret != MM_ERROR_NONE)
+ LOGW("[%s] Failed to set display_visible '1' (0x%x)", __FUNCTION__, ret);
+ }
if (handle->is_stopped) {
if (handle->is_progressive_download) {
LOGE("[%s] PLAYER_ERROR_INVALID_OPERATION(0x%08x)", __FUNCTION__, PLAYER_ERROR_INVALID_OPERATION);
if (handle->state == PLAYER_STATE_PLAYING || handle->state == PLAYER_STATE_PAUSED) {
if (handle->display_type == PLAYER_DISPLAY_TYPE_OVERLAY) {
ret = mm_player_set_attribute(handle->mm_handle, NULL, "display_visible", 0, (char *)NULL);
- if (ret != MM_ERROR_NONE) {
+ if (ret != MM_ERROR_NONE)
LOGW("[%s] Failed to set display_visible '0' (0x%x)", __FUNCTION__, ret);
- }
}
ret = mm_player_stop(handle->mm_handle);
#define player_send_msg_with_no_return(fd, msg) \
do { \
int __len__ = 0; \
- if (fd != MM_ERROR_INVALID_ARGUMENT) { \
+ if ((fd != MM_ERROR_INVALID_ARGUMENT) && muse_core_fd_is_valid(fd)) { \
__len__ = muse_core_msg_send(fd, msg); \
if (__len__ <= 0) \
LOGE("sending message failed"); \
#define player_send_msg(fd, msg, ret) \
do { \
int __len__ = 0; \
- if (fd != MM_ERROR_INVALID_ARGUMENT) { \
+ if ((fd != MM_ERROR_INVALID_ARGUMENT) && muse_core_fd_is_valid(fd)) { \
__len__ = muse_core_msg_send(fd, msg); \
if (__len__ <= 0) { \
LOGE("sending message failed"); \
#define player_send_msg_with_fd(fd, tfd, msg) \
do { \
int __len__ = 0; \
- if (fd != MM_ERROR_INVALID_ARGUMENT) { \
+ if ((fd != MM_ERROR_INVALID_ARGUMENT) && muse_core_fd_is_valid(fd)) { \
__len__ = muse_core_msg_send_fd(fd, tfd, msg); \
if (__len__ <= 0) \
LOGE("sending message failed"); \