int err = ::PLAYER_ERROR_NONE;
Tizen::Base::String strFileName;
std::unique_ptr<char[]> pInputFilePath;
-
SysAssertf(__hPlayer != null, "Not yet constructed! Construct() should be called before use");
err = player_get_state(__hPlayer, &__corePlayerCurState);
"[E_FILE_NOT_FOUND] mediaLocalPath's length is (%d).", mediaLocalPath.GetLength());
pInputFilePath.reset(_StringConverter::CopyToCharArrayN(mediaLocalPath));
-
SysTryCatch(NID_MEDIA, pInputFilePath.get() , r = E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. pInputFilePath is null");
SysLog(NID_MEDIA, "Input file path after conversion is [%s]", pInputFilePath.get());
{
result r = E_SUCCESS;
int err = ::PLAYER_ERROR_NONE;
-
SysAssertf(__hPlayer != null, "Not yet constructed! Construct() should be called before use");
if (__isOpenBuffer)
r = MapExceptionToResult(err);
SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] error has been occured. Failed to perform player_prepare_async operation with 0x%x", GetErrorMessage(r), err);
}
-
if (__isStreamingContent)
{
err = player_set_buffering_cb(__hPlayer, PlayerBufferingCallBack, (void*)this);
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);