std::unique_ptr<char[]> pFileName (_StringConverter::CopyToCharArrayN(mediaLocalPath));
SysTryCatch(NID_MEDIA, pFileName.get() != null, r = E_INVALID_ARG, E_INVALID_ARG, "[%s] Propagating.", GetErrorMessage(E_INVALID_ARG));
- SysLog(NID_MEDIA, "File Path : %s\n, overwrite:%d", pFileName.get(), overwrite);
+ SysSecureLog(NID_MEDIA, "File Path : %s\n, overwrite:%d", pFileName.get(), overwrite);
r = _RecorderUtil::PrepareFile(mediaLocalPath, overwrite);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] audio recorder prepare file failed. mediaLocalPath:%s, overwirte:%d",
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] audio recorder prepare file failed. mediaLocalPath:%s, overwirte:%d",
GetErrorMessage(r), pFileName.get(), overwrite);
err = recorder_set_filename(__handle, pFileName.get());
r = ConvertResult(err);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] audio recorder set attribute failed. mediaLocalPath:%s", GetErrorMessage(r), pFileName.get());
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] audio recorder set attribute failed. mediaLocalPath:%s", GetErrorMessage(r), pFileName.get());
SetState(RECORDER_STATE_OPENED);
secTime = msTime > 1000 ? ((msTime+500) / 1000) : 1;
err = recorder_attr_set_time_limit(__handle, secTime);
r = ConvertResult(err);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] audio recorder set attribute failed. msTime:%ls", GetErrorMessage(r), msTime);
+ SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] audio recorder set attribute failed. msTime:%d", GetErrorMessage(r), msTime);
// For reload and Get the exact value
__maxTime = msTime;
result r = E_SUCCESS;
CameraState state = CAMERA_STATE_ERROR;
int err = MM_SUCCESS;
- SysLog(NID_MEDIA, "Enter. latitude:%f, longitude:%f, altitude:%f", latitude, longitude, altitude);
+ SysSecureLog(NID_MEDIA, "Enter. latitude:%f, longitude:%f, altitude:%f", latitude, longitude, altitude);
state = GetState();
SysTryReturn(NID_MEDIA, state == CAMERA_STATE_INITIALIZED || state == CAMERA_STATE_PREVIEW || state == CAMERA_STATE_CAPTURED
, E_INVALID_STATE, E_INVALID_STATE, "[E_INVALID_STATE] Camera is in an invalid state. This method is not working in this state. Current state is :%d", state);
- SysTryCatch(NID_MEDIA, -90.0 <= latitude && latitude <= 90.0 , r = E_OUT_OF_RANGE, r, "[E_OUT_OF_RANGE] This latitude(%f) is out of range.", latitude);
- SysTryCatch(NID_MEDIA, -180.0 <= longitude && longitude <= 180.0 , r = E_OUT_OF_RANGE, r, "[E_OUT_OF_RANGE] This longitude(%f) is out of range.", longitude);
+ SysSecureTryCatch(NID_MEDIA, -90.0 <= latitude && latitude <= 90.0 , r = E_OUT_OF_RANGE, r, "[E_OUT_OF_RANGE] This latitude(%f) is out of range.", latitude);
+ SysSecureTryCatch(NID_MEDIA, -180.0 <= longitude && longitude <= 180.0 , r = E_OUT_OF_RANGE, r, "[E_OUT_OF_RANGE] This longitude(%f) is out of range.", longitude);
if ( __isPoweredOn )
{
err = camera_attr_set_geotag(__handle, latitude, longitude, (double)altitude);
r = ConvertResult(err);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Propagating. latitude:%f, longitude:%f, altitude:%f", GetErrorMessage(r), latitude, longitude, altitude);
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] Propagating. latitude:%f, longitude:%f, altitude:%f", GetErrorMessage(r), latitude, longitude, altitude);
}
__exifLatitude = latitude;
__exifLongitude = longitude;
__pMap.reset(pMap.release());
- SysLog(NID_MEDIA, "Capability XML path:%ls", mediaCapabilityFilePath.GetPointer());
+ SysSecureLog(NID_MEDIA, "Capability XML path:%ls", mediaCapabilityFilePath.GetPointer());
r = File::GetAttributes( mediaCapabilityFilePath, attributes);
- SysTryReturn(NID_MEDIA, r == E_SUCCESS, r, r, "[%s] Propagating. File path is %ls", GetErrorMessage(r), mediaCapabilityFilePath.GetPointer());
+ SysSecureTryReturn(NID_MEDIA, r == E_SUCCESS, r, r, "[%s] Propagating. File path is %ls", GetErrorMessage(r), mediaCapabilityFilePath.GetPointer());
length = attributes.GetFileSize();
SysTryReturn(NID_MEDIA, length > 0, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] Propagating.");
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());
+ SysSecureLog(NID_MEDIA, "Input file path after conversion is [%s]", pInputFilePath.get());
__preState = __currentState;
__currentState = PLAYER_STATE_OPENING;
if (overwrite)
{
r = File::Remove(path);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] camcorder remove existing file failed. path:%ls", GetErrorMessage(r), path.GetPointer());
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] camcorder remove existing file failed. path:%ls", GetErrorMessage(r), path.GetPointer());
}
else
{
r = E_FILE_ALREADY_EXIST;
- SysLogException(NID_MEDIA, r, "[E_FILE_ALREADY_EXIST] The file already exists and overwrite is false. path:%ls", path.GetPointer());
+ SysSecureLogException(NID_MEDIA, r, "[E_FILE_ALREADY_EXIST] The file already exists and overwrite is false. path:%ls", path.GetPointer());
goto CATCH;
}
}
{
File file;
r = file.Construct(path, L"w");
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, r = E_RESOURCE_UNAVAILABLE, E_RESOURCE_UNAVAILABLE, "[E_RESOURCE_UNAVAILABLE] The file path is not available. path:%ls", path.GetPointer());
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, r = E_RESOURCE_UNAVAILABLE, E_RESOURCE_UNAVAILABLE, "[E_RESOURCE_UNAVAILABLE] The file path is not available. path:%ls", path.GetPointer());
r = File::Remove(path);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] camcorder remove temp file failed. path:%ls", GetErrorMessage(r), path.GetPointer());
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] camcorder remove temp file failed. path:%ls", GetErrorMessage(r), path.GetPointer());
}
return r;
SysTryReturn(NID_MEDIA, !filePath.IsEmpty(), E_FILE_NOT_FOUND, E_FILE_NOT_FOUND,
"[E_FILE_NOT_FOUND] path is empty");
- SysTryReturn(NID_MEDIA, Tizen::Io::File::IsFileExist(filePath), E_FILE_NOT_FOUND, E_FILE_NOT_FOUND,
+ SysSecureTryReturn(NID_MEDIA, Tizen::Io::File::IsFileExist(filePath), E_FILE_NOT_FOUND, E_FILE_NOT_FOUND,
"[E_FILE_NOT_FOUND] File is not Found: %ls",filePath.GetPointer());
SysTryReturn(NID_MEDIA, pixelFormat > MEDIA_PIXEL_FORMAT_NONE && pixelFormat < MEDIA_PIXEL_FORMAT_GRAY,
std::unique_ptr<char[]> pFileName (_StringConverter::CopyToCharArrayN(mediaLocalPath));
SysTryCatch(NID_MEDIA, pFileName.get() != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(mediaLocalPath) is used. File name is null.");
- SysLog(NID_MEDIA, "File Path : %s\n, overwrite:%d", pFileName.get(), overwrite);
+ SysSecureLog(NID_MEDIA, "File Path : %s\n, overwrite:%d", pFileName.get(), overwrite);
r = _RecorderUtil::PrepareFile(mediaLocalPath, overwrite);
- SysTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] camcorder prepare file failed. mediaLocalPath:%s, overwirte:%d",
+ SysSecureTryCatch(NID_MEDIA, r == E_SUCCESS, , r, "[%s] camcorder prepare file failed. mediaLocalPath:%s, overwirte:%d",
GetErrorMessage(r), pFileName.get(), overwrite);
err = recorder_set_filename(__handle, pFileName.get());
int err = MM_SUCCESS;
std::unique_ptr<char[]> pFileName (Tizen::Base::_StringConverter::CopyToCharArrayN(__filePath));
SysTryCatch(NID_MEDIA, pFileName.get() != null, r = E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(__filePath) is used. File name is null.");
- SysLog(NID_MEDIA, "File Path : %s\n", pFileName.get());
+ SysSecureLog(NID_MEDIA, "File Path : %s\n", pFileName.get());
err = recorder_set_filename(__handle, pFileName.get());
r = ConvertResult(err);