From 7d5e81ea678b6cb451180bbc9836e4b0a55c0bea Mon Sep 17 00:00:00 2001 From: Eunhae Choi Date: Thu, 17 May 2018 18:46:09 +0900 Subject: [PATCH] [0.3.91] add considering the null eos packet Change-Id: Ie174788fbf31c155e39ac61e3ac87a015ed359fa --- include/player.h | 4 ++-- packaging/capi-media-player.spec | 2 +- src/player.c | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/player.h b/include/player.h index b90975f..ae76861 100644 --- a/include/player.h +++ b/include/player.h @@ -2461,9 +2461,9 @@ int player_360_is_enabled(player_h player, bool *enabled); * %http://tizen.org/feature/opengles.version.2_0\n * @param[in] player The handle to the media player * @param[in] yaw The angle value around vertical axis. Valid values are in - * range [-PI, PI]. + * range [-PI, PI]. Default value is 0. * @param[in] pitch The angle value around lateral axis. Valid values are in - * range [-PI/2, PI/2]. + * range [-PI/2, PI/2]. Default value is 0. * @return @c 0 on success, * otherwise a negative error value * @retval #PLAYER_ERROR_NONE Successful diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index 882c9ae..af700d7 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,6 +1,6 @@ Name: capi-media-player Summary: A Media Player API -Version: 0.3.90 +Version: 0.3.91 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/player.c b/src/player.c index f667b31..c3bf66c 100644 --- a/src/player.c +++ b/src/player.c @@ -1984,7 +1984,7 @@ int _player_get_valid_path(const char* uri, char* valid_path) file_path = g_filename_from_uri(valid_path, NULL, &err); if (!file_path || (err != NULL)) { - LOGE("Invalid URI '%s', err: %s", uri, + SECURE_LOGE("Invalid URI '%s', err: %s", uri, (err != NULL) ? err->message : "unknown error"); if (err) g_error_free(err); @@ -2005,7 +2005,7 @@ int _player_get_valid_path(const char* uri, char* valid_path) strncpy(valid_path, (file_path) ? (file_path) : (uri), MAX_URL_LEN-1); } else { /* need to use converted path. */ - LOGD("Converted path : %s -> %s", uri, valid_path); + SECURE_LOGD("Converted path : %s -> %s", uri, valid_path); } g_free(file_path); @@ -2028,7 +2028,7 @@ int player_set_uri(player_h player, const char *uri) if (_player_get_valid_path(uri, path) != PLAYER_ERROR_NONE) return PLAYER_ERROR_INVALID_PARAMETER; - LOGD("new path : %s", path); + SECURE_LOGD("new path : %s", path); player_msg_send1(api, pc, ret_buf, ret, STRING, path); pc->push_media_stream = FALSE; @@ -3936,6 +3936,7 @@ int player_push_media_stream(player_h player, media_packet_h packet) media_format_h format; bool is_video; bool is_audio; + bool is_eos; LOGD("ENTER"); @@ -3949,6 +3950,7 @@ int player_push_media_stream(player_h player, media_packet_h packet) media_packet_is_video(packet, &is_video); media_packet_is_audio(packet, &is_audio); + media_packet_is_end_of_stream(packet, &is_eos); if (is_video) media_format_get_video_info(format, &push_media.mimetype, &push_media.width, &push_media.height, NULL, NULL); else if (is_audio) @@ -3987,7 +3989,7 @@ int player_push_media_stream(player_h player, media_packet_h packet) #endif if (push_media.buf_type == PUSH_MEDIA_BUF_TYPE_RAW) { buf_size = (int)push_media.size; - if (muse_client_ipc_push_data(pc->cb_info->data_fd, buf, buf_size, push_media.pts) < 0) { + if ((muse_client_ipc_push_data(pc->cb_info->data_fd, buf, buf_size, push_media.pts) < 0) && (!is_eos)) { LOGE("failed to send data"); return PLAYER_ERROR_INVALID_OPERATION; } -- 2.7.4