[0.3.91] add considering the null eos packet 56/179356/1 accepted/tizen/unified/20180518.060558 submit/tizen/20180517.095904
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 17 May 2018 09:46:09 +0000 (18:46 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 17 May 2018 09:46:09 +0000 (18:46 +0900)
Change-Id: Ie174788fbf31c155e39ac61e3ac87a015ed359fa

include/player.h
packaging/capi-media-player.spec
src/player.c

index b90975f8778018ee1efa05fc0172cea3f5cd903f..ae768615f5cb7422823db0378259fcbb0dba87ad 100644 (file)
@@ -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
index 882c9aea3fed006dfd6752688af3644564f994c4..af700d741fe0a42e022bbd44acaf1dee0d37235e 100644 (file)
@@ -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
index f667b313cd794c2c41a60b8086537c6370d0b9ff..c3bf66cc4210d4cef55dfbf86d355ba3d77bafc6 100644 (file)
@@ -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;
                }