From: Jinkun Jang Date: Fri, 15 Mar 2013 16:12:02 +0000 (+0900) Subject: merge with master X-Git-Tag: 2.1b_release~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d59b09a5004f2524914d0983a9fed81c9a14bae9;p=platform%2Fcore%2Fapi%2Fplayer.git merge with master --- diff --git a/LICENSE b/LICENSE.APLv2 similarity index 98% rename from LICENSE rename to LICENSE.APLv2 index bbe9d02..9c13a9b 100644 --- a/LICENSE +++ b/LICENSE.APLv2 @@ -202,5 +202,3 @@ Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. See the License for the specific language governing permissions and limitations under the License. - - diff --git a/include/player.h b/include/player.h index 419a746..51b7635 100644 --- a/include/player.h +++ b/include/player.h @@ -72,7 +72,10 @@ typedef enum PLAYER_ERROR_INVALID_URI = PLAYER_ERROR_CLASS | 0x04 , /**< Invalid URI */ PLAYER_ERROR_SOUND_POLICY = PLAYER_ERROR_CLASS | 0x05 , /**< Sound policy error */ PLAYER_ERROR_CONNECTION_FAILED = PLAYER_ERROR_CLASS | 0x06, /**< Streaming connection failed */ - PLAYER_ERROR_VIDEO_CAPTURE_FAILED = PLAYER_ERROR_CLASS | 0x07 /**< Video capture failure */ + PLAYER_ERROR_VIDEO_CAPTURE_FAILED = PLAYER_ERROR_CLASS | 0x07, /**< Video capture failure */ + PLAYER_ERROR_DRM_EXPIRED = PLAYER_ERROR_CLASS | 0x08, /**< Expired license */ + PLAYER_ERROR_DRM_NO_LICENSE = PLAYER_ERROR_CLASS | 0x09, /**< No license */ + PLAYER_ERROR_DRM_FUTURE_USE = PLAYER_ERROR_CLASS | 0x0a /**< License for future use */ } player_error_e; /** @@ -112,7 +115,8 @@ typedef enum /** * @brief Enumerations of audio latency mode */ -typedef enum{ +typedef enum +{ AUDIO_LATENCY_MODE_LOW = 0, /**< Low audio latency mode*/ AUDIO_LATENCY_MODE_MID, /**< Middle audio latency mode*/ AUDIO_LATENCY_MODE_HIGH, /**< High audio latency mode*/ diff --git a/packaging/capi-media-player.spec b/packaging/capi-media-player.spec index de5f55e..b183c94 100644 --- a/packaging/capi-media-player.spec +++ b/packaging/capi-media-player.spec @@ -1,7 +1,7 @@ Name: capi-media-player Summary: A Media Player library in Tizen Native API Version: 0.1.0 -Release: 51 +Release: 52 Group: TO_BE/FILLED_IN License: TO BE FILLED IN Source0: %{name}-%{version}.tar.gz @@ -38,7 +38,7 @@ make %{?jobs:-j%jobs} %install rm -rf %{buildroot} mkdir -p %{buildroot}/usr/share/license -cp LICENSE %{buildroot}/usr/share/license/%{name} +cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name} %make_install %post -p /sbin/ldconfig diff --git a/src/player.c b/src/player.c index 9d270af..cbf2def 100644 --- a/src/player.c +++ b/src/player.c @@ -157,6 +157,19 @@ static int __convert_error_code(int code, char* func_name) ret = PLAYER_ERROR_SOUND_POLICY; msg = "PLAYER_ERROR_SOUND_POLICY"; break; + case MM_ERROR_PLAYER_DRM_EXPIRED: + ret = PLAYER_ERROR_DRM_EXPIRED; + msg = "PLAYER_ERROR_DRM_EXPIRED"; + break; + case MM_ERROR_PLAYER_DRM_NOT_AUTHORIZED: + case MM_ERROR_PLAYER_DRM_NO_LICENSE: + ret = PLAYER_ERROR_DRM_NO_LICENSE; + msg = "PLAYER_ERROR_DRM_NO_LICENSE"; + break; + case MM_ERROR_PLAYER_DRM_FUTURE_USE: + ret = PLAYER_ERROR_DRM_FUTURE_USE; + msg = "PLAYER_ERROR_DRM_FUTURE_USE"; + break; } LOGE("[%s] %s(0x%08x) : core fw error(0x%x)",func_name,msg, ret, code); return ret; @@ -195,6 +208,7 @@ static player_interrupted_code_e __convert_interrupted_code(int code) ret = PLAYER_INTERRUPTED_BY_RESOURCE_CONFLICT; break; } + LOGE("[%s] incoming(0x%08x) => ret(%d)",__FUNCTION__,code, ret); return ret; } @@ -238,7 +252,7 @@ static int __msg_callback(int message, void *param, void *user_data) { player_s * handle = (player_s*)user_data; MMMessageParamType *msg = (MMMessageParamType*)param; - LOGI("[%s] Start : Got message type : 0x%x" ,__FUNCTION__, message); + LOGE("[%s] Start : Got message type : 0x%x" ,__FUNCTION__, message); player_error_e err_code = PLAYER_ERROR_NONE; switch(message) { @@ -340,10 +354,6 @@ static int __msg_callback(int message, void *param, void *user_data) LOGE("[%s] PLAYER_ERROR_NOT_SUPPORTED_FILE (0x%08x) : FILE_NOT_FOUND" ,__FUNCTION__, PLAYER_ERROR_NOT_SUPPORTED_FILE); err_code = PLAYER_ERROR_NOT_SUPPORTED_FILE; break; - case MM_MESSAGE_DRM_NOT_AUTHORIZED: //0x111 - LOGE("[%s] PLAYER_ERROR_NOT_SUPPORTED_FILE (0x%08x) : DRM_NOT_AUTHORIZED" ,__FUNCTION__, PLAYER_ERROR_NOT_SUPPORTED_FILE); - err_code = PLAYER_ERROR_NOT_SUPPORTED_FILE; - break; case MM_MESSAGE_SEEK_COMPLETED: //0x114 if (handle->display_type != ((int)MM_DISPLAY_SURFACE_NULL) && handle->state == PLAYER_STATE_READY) { @@ -371,7 +381,6 @@ static int __msg_callback(int message, void *param, void *user_data) case MM_MESSAGE_CONNECTED: //0x101 case MM_MESSAGE_BLUETOOTH_ON: //0x106 case MM_MESSAGE_BLUETOOTH_OFF: //0x107 - case MM_MESSAGE_RESUMED_BY_REW: //0x108 case MM_MESSAGE_RTP_SENDER_REPORT: //0x10a case MM_MESSAGE_RTP_RECEIVER_REPORT: //0x10b case MM_MESSAGE_RTP_SESSION_STATUS: //0x10c @@ -639,10 +648,10 @@ int player_prepare (player_h player) else { ret = mm_player_set_attribute(handle->mm_handle, NULL,"display_visible" , 0, (char*)NULL); - if(ret != MM_ERROR_NONE) - { - LOGW("[%s] Failed to set display visible (0x%x)" ,__FUNCTION__, ret); - } + if(ret != MM_ERROR_NONE) + { + LOGW("[%s] Failed to set display display visible '0' (0x%x)" ,__FUNCTION__, ret); + } } ret = mm_player_realize(handle->mm_handle); @@ -1868,9 +1877,14 @@ int player_audio_effect_set_equalizer_all_bands(player_h player, int *band_level player_s * handle = (player_s *) player; int ret = mm_player_audio_effect_custom_set_level_eq_from_list(handle->mm_handle, band_levels, length); if(ret != MM_ERROR_NONE) + { return __convert_error_code(ret,(char*)__FUNCTION__); + } else - return PLAYER_ERROR_NONE; + { + ret = mm_player_audio_effect_custom_apply(handle->mm_handle); + return (ret==MM_ERROR_NONE)?PLAYER_ERROR_NONE:__convert_error_code(ret,(char*)__FUNCTION__); + } } int player_audio_effect_set_equalizer_band_level(player_h player, int index, int level) @@ -1969,7 +1983,7 @@ int player_set_subtitle_path(player_h player,const char* path) player_s * handle = (player_s *) player; PLAYER_STATE_CHECK(handle,PLAYER_STATE_IDLE); - int ret = mm_player_set_attribute(handle->mm_handle, NULL,"subtitle_uri" , path, strlen(path),"subtitle_silent", 0, (char*)NULL); + int ret = mm_player_set_attribute(handle->mm_handle, NULL,"subtitle_uri" , path, strlen(path), (char*)NULL); if(ret != MM_ERROR_NONE) { return __convert_error_code(ret,(char*)__FUNCTION__); diff --git a/test/player_test.c b/test/player_test.c index 218d045..b093a5c 100644 --- a/test/player_test.c +++ b/test/player_test.c @@ -385,7 +385,7 @@ static void get_stream_info() g_print(" ==> [Player_Test] PLAYER_CONTENT_INFO_GENRE: [%s ] \n",value); player_get_content_info(g_player, PLAYER_CONTENT_INFO_TITLE, &value); g_print(" ==> [Player_Test] PLAYER_CONTENT_INFO_TITLE: [%s ] \n",value); - void *album; + void *album; int size; player_get_album_art(g_player, &album, &size); g_print(" ==> [Player_Test] Album art : [ data : 0x%x, size : %d ]\n",album, size);