From: Younghwan Ahn Date: Mon, 14 Jan 2013 14:11:36 +0000 (+0900) Subject: add new drm error type X-Git-Tag: submit/tizen_2.1/20130424.232047~6^2~14^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1bf58f0f2024024f398d47c6d27848935d73b46f;p=platform%2Fcore%2Fmultimedia%2Flibmm-player.git add new drm error type Change-Id: Ibfd4f8ff8c4d5fa1262a70117f961c82aa5c6a6e --- diff --git a/src/mm_player_priv.c b/src/mm_player_priv.c index c7926bc..c583c8d 100755 --- a/src/mm_player_priv.c +++ b/src/mm_player_priv.c @@ -9109,9 +9109,12 @@ __mmplayer_handle_gst_error ( mm_player_t* player, GstMessage * message, GError* /* post error to application */ if ( ! player->posted_msg ) { - if (msg_param.code == MM_MESSAGE_DRM_NOT_AUTHORIZED) + if (msg_param.code == MM_MESSAGE_DRM_NOT_AUTHORIZED || + msg_param.code == MM_MESSAGE_DRM_NO_LICENSE || + msg_param.code == MM_MESSAGE_DRM_FUTURE_USE || + msg_param.code == MM_MESSAGE_DRM_EXPIRED ) { - MMPLAYER_POST_MSG( player, MM_MESSAGE_DRM_NOT_AUTHORIZED, NULL ); + MMPLAYER_POST_MSG( player, msg_param.code, NULL ); } else { @@ -9604,7 +9607,21 @@ __gst_transform_gsterror( mm_player_t* player, GstMessage * message, GError* err case GST_STREAM_ERROR_DECRYPT: case GST_STREAM_ERROR_DECRYPT_NOKEY: { - debug_error("decryption error, %s failed reason : %s\n", src_element_name, error->message); + debug_error("decryption error, [%s] failed, reason : [%s]\n", src_element_name, error->message); + + if ( strstr(error->message, "rights expired") ) + { + return MM_MESSAGE_DRM_EXPIRED; + } + else if ( strstr(error->message, "no rights") ) + { + return MM_MESSAGE_DRM_NO_LICENSE; + } + else if ( strstr(error->message, "has future rights") ) + { + return MM_MESSAGE_DRM_FUTURE_USE; + } + return MM_MESSAGE_DRM_NOT_AUTHORIZED; } break;