Merge from master branch
authorJungYumin <y_m.jung@samsung.com>
Sat, 16 Mar 2013 05:04:28 +0000 (14:04 +0900)
committerJungYumin <y_m.jung@samsung.com>
Sat, 16 Mar 2013 05:25:46 +0000 (14:25 +0900)
Change-Id: I0ffab0b3f275af414ca98d5b9b1e17a2e23bccb0
Signed-off-by: JungYumin <y_m.jung@samsung.com>
inc/FMediaIPlayerEventListener.h
inc/FMediaPlayer.h
src/FMedia_PlayerImpl.cpp

index 453dd43..acd6c0e 100644 (file)
@@ -65,10 +65,10 @@ public:
        *       @param[in]       r                                                                      The cause of the error
        *       @exception       E_SUCCESS                                                      The method is successful.
        *       @exception       E_SYSTEM                                                       A system error has occurred.
-       *       @exception       E_INVALID_DATA                    The specified buffer contains invalid data.
        *       @exception       E_CONNECTION_FAILED                            The network connection has failed.
        *       @exception       E_FILE_NOT_FOUND                  The file cannot be found or accessed.
        *       @exception       E_UNSUPPORTED_FORMAT                           The given content format is not supported.
+       *       @exception       E_UNSUPPORTED_CODEC                                    The specified codec is not supported.
        *       @exception       E_OUT_OF_MEMORY                                        The memory is insufficient.
        *       @exception      E_RIGHT_EXPIRED                                 The right is expired.
        *       @exception      E_RIGHT_NO_LICENSE                              The right does not exist.
index 19b1f9d..fa5bdfa 100755 (executable)
@@ -351,6 +351,7 @@ public:
        * @exception    E_INVALID_STATE                 This instance is in an invalid state for this method.
        * @exception    E_SYSTEM                                                                A system error has occurred.
        * @exception    E_FILE_NOT_FOUND                        The specified file cannot be found or accessed.
+       * @exception    E_INVALID_DATA                          The specified file contains invalid data.
        * @exception    E_OUT_OF_MEMORY                 The memory is insufficient.
        * @exception    E_UNSUPPORTED_FORMAT                            The given content format is not supported.
        * @exception    E_RIGHT_EXPIRED                                 The right is expired.
@@ -402,6 +403,7 @@ public:
        * @exception    E_INVALID_STATE         This instance is in an invalid state for this method.
        * @exception    E_SYSTEM                                                                        A system error has occurred.
        * @exception    E_OBJ_NOT_FOUND                         The specified media buffer cannot be found.
+       * @exception    E_INVALID_DATA                                  The specified buffer contains invalid data.
        * @exception    E_OUT_OF_MEMORY                         The memory is insufficient.
        * @exception    E_UNSUPPORTED_FORMAT                            The given content format is not supported.
        * @exception    E_RIGHT_EXPIRED                                 The right is expired.
@@ -533,7 +535,7 @@ public:
        *                                                               This method returns E_INVALID_STATE, if this method is called again before
        *                                                                       IPlayerEventListener::OnPlayerSeekCompleted() is called.
        * @exception    E_OUT_OF_RANGE                          The specified time is out of range.
-       * @exception    E_OPERATION_FAILED      The operation is failed.
+       * @exception    E_INVALID_DATA                          The media data is inappropriate for seeking.
        * @exception    E_SYSTEM                                                                A system error has occurred.
        * @remarks              For video, this method delivers one video frame on the specified position through the video
        *                               event. Before calling this method, the %Player instance must be created with the Construct()
index 6b4003f..62185d3 100644 (file)
@@ -603,7 +603,6 @@ _PlayerImpl::OpenInputData(std::unique_ptr<char[]> pStrInputFilePath)
                r = MapExceptionToResult(err);
                SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "%s error has been occurred. Failed to perform player_set_display_mode operation with - 0x%x", GetErrorMessage(r), err);
        }
-
        if (__pVideoTextureImpl)
        {
                err = player_set_display_mode(__hPlayer, PLAYER_DISPLAY_MODE_FULL_SCREEN);
@@ -628,7 +627,6 @@ _PlayerImpl::OpenInputData(std::unique_ptr<char[]> pStrInputFilePath)
                r = MapExceptionToResult(err);
                SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] error has been occurred. Failed to perform player_set_x11_display_visible operation with - 0x%x", GetErrorMessage(r), err);
        }
-
        if (__isAsync == false)
        {
                // Sync call
@@ -657,7 +655,6 @@ _PlayerImpl::OpenInputData(std::unique_ptr<char[]> pStrInputFilePath)
                r = MapExceptionToResult(err);
                SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] error has been occurred. Failed to perform player_set_buffering_cb with - 0x%x",GetErrorMessage(r), err);
        }
-
        return r;
 CATCH:
        return r;
@@ -1458,7 +1455,8 @@ _PlayerImpl::MapExceptionToResult(int reason)
 
        //Seek operation failure
        case PLAYER_ERROR_SEEK_FAILED:
-       //fall through
+               return E_INVALID_DATA;
+               break;
        //Video capture failure
        case PLAYER_ERROR_VIDEO_CAPTURE_FAILED:
                return E_OPERATION_FAILED;
@@ -1772,11 +1770,18 @@ _PlayerImpl::HandlePlayerSeekCompleted(void)
                {
                        err = player_capture_video(__hPlayer, PlayerVideoCapturedCallBack, (void*)this);
                        r = MapExceptionToResult(err);
-                       SysTryReturn(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Failed to perform player_capture_video operation with 0x%x", GetErrorMessage(r), err);
+                       SysTryLog(NID_MEDIA, r == E_SUCCESS,"[%s] Failed to perform player_capture_video operation with 0x%x", GetErrorMessage(r), err);
                }
 
        }
-       SendEvent(_PLAYER_EVENT_SEEKTO, 0);
+       if (r == E_SUCCESS)
+       {
+               SendEvent(_PLAYER_EVENT_SEEKTO, r);
+       }
+       else
+       {
+               SendEvent(_PLAYER_EVENT_SEEKTO, E_SYSTEM);
+       }
 }
 
 void