Fix the TC bug for AMR codec
authorEonseokLee <eonseok.lee@samsung.com>
Fri, 24 May 2013 08:08:39 +0000 (17:08 +0900)
committerEonseokLee <eonseok.lee@samsung.com>
Fri, 24 May 2013 08:08:39 +0000 (17:08 +0900)
Change-Id: Ia07305c0d97e3e6c366a61aa879322e1b38937ae
Signed-off-by: EonseokLee <eonseok.lee@samsung.com>
src/FMedia_PlayerImpl.cpp
src/inc/FMedia_PlayerImpl.h

index 2c4f93b..ea8f9a4 100644 (file)
@@ -1001,7 +1001,7 @@ CATCH:
 }
 
 result
-_PlayerImpl::SeekTo(long msTime, bool useKeyFrame)
+_PlayerImpl::SeekTo(long msTime, bool accurate)
 {
        result r = E_SUCCESS;
        int ret = ::PLAYER_ERROR_NONE;
@@ -1018,7 +1018,7 @@ _PlayerImpl::SeekTo(long msTime, bool useKeyFrame)
 
        SysTryReturn(NID_MEDIA, msTime >= 0, r = E_OUT_OF_RANGE, E_OUT_OF_RANGE, "[E_OUT_OF_RANGE] The msTime is not greater than 0");
 
-       ret = player_seek(__hPlayer, (int)msTime, useKeyFrame, PlayerSeekCompletedCallBack, (void *)this);
+       ret = player_seek(__hPlayer, (int)msTime, accurate, PlayerSeekCompletedCallBack, (void *)this);
        r = MapExceptionToResult(ret);
        SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Failed to perform player_seek operation with [0x%x]", GetErrorMessage(r), ret);
        return r;
@@ -1973,6 +1973,14 @@ _PlayerImpl::ConvertAudioCodec(char *pAudioCodec)
        {
                return CODEC_AMR_NB;
        }
+       if (!String::Compare(String(pAudioCodec), String("AMR")))
+       {
+               return CODEC_AMR_NB;
+       }
+       if (!String::Compare(String(pAudioCodec), String("AMR audio")))
+       {
+               return CODEC_AMR_NB;
+       }
        if (!String::Compare(String(pAudioCodec), String("WMA")))
        {
                return CODEC_WMA;
index 49bc7bd..50251b2 100644 (file)
@@ -97,7 +97,7 @@ public:
        bool IsLooping(void)const;
        long GetDuration(void);
        result SeekTo(long msTime);
-       result SeekTo(long msTime, bool useKeyFrame);
+       result SeekTo(long msTime, bool accurate);
        result SetVolume(int volume);
        result SetMute(bool mute);
        result SetLooping(bool looping);