Remove the code for checking state in SetAudioStreamType()
authorEonseokLee <eonseok.lee@samsung.com>
Fri, 22 Mar 2013 07:55:26 +0000 (16:55 +0900)
committerEonseokLee <eonseok.lee@samsung.com>
Fri, 22 Mar 2013 08:04:11 +0000 (17:04 +0900)
Change-Id: I19d2190a128d8eb1e525699c7a3e04d5880cfb4e
Signed-off-by: EonseokLee <eonseok.lee@samsung.com>
inc/FMediaPlayer.h
src/FMedia_PlayerImpl.cpp

index ddba4ca..0c48942 100755 (executable)
@@ -723,7 +723,8 @@ public:
        * @exception    E_SUCCESS                                       The method is successful.
        * @exception    E_INVALID_ARG                           The specified input parameter is invalid.
        * @exception    E_INVALID_STATE                                 This instance is in an invalid state for this method.
-       * @remarks      This method works only for the @c PLAYER_STATE_INITIALIZED or @c PLAYER_STATE_CLOSED states of the %Player instance.
+       * @remarks      This method works for the @c PLAYER_STATE_INITIALIZED or @c PLAYER_STATE_CLOSED states of the %Player instance.
+       *                                                                        In other states of %Player instance, this method returns @c E_SUCCESS, but the audio stream type is not changed properly.
        */
        result SetAudioStreamType(AudioStreamType type);
 
index b64c590..4936bbf 100644 (file)
@@ -2178,11 +2178,6 @@ _PlayerImpl::SetAudioStreamType(AudioStreamType type)
 
        SysAssertf(__hPlayer !=  null, "Not yet constructed! Construct() should be called before use");
 
-       ret = player_get_state(__hPlayer, &__corePlayerCurState);
-       r = MapExceptionToResult(ret);
-       SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Failed to perform player_get_state operation with 0x%x ", GetErrorMessage(r), ret);
-       SysTryCatch(NID_MEDIA, __corePlayerCurState == ::PLAYER_STATE_IDLE, r = E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Player state is in an invalid state. Current core state is %d", __corePlayerCurState);
-
        ret = player_set_sound_type(__hPlayer, _AudioManagerConvert::ConvertAudioStreamType2SoundType(type));
        r = MapExceptionToResult(ret);
        SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Failed to perform player_set_sound_type operation with 0x%x", GetErrorMessage(r), ret);