else if (tag == EXIF_TAG_GPS_LATITUDE && !isLatitude)
{
String tempLatitude(buf);
- String delim(L",");
+ int firstComma = 0;
+ int lastComma = 0;
+ r = tempLatitude.IndexOf(',', 0, firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLatitude.SetCharAt('/', firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+
+ r = tempLatitude.LastIndexOf(',', tempLatitude.GetLength() - 1, lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLatitude.SetCharAt('/', lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+
+ String delim(L"/");
StringTokenizer strTok(tempLatitude, delim);
String token[3] = {L"", };
strTok.GetNextToken(token[count++]);
}
- double ddVal = _LocalizedNumParser::ToDouble(token[0], "C"); // degree value
+ double ddVal = _LocalizedNumParser::ToDouble(token[0], ""); // degree value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double mmVal = _LocalizedNumParser::ToDouble(token[1], "C"); // minutes value
+ double mmVal = _LocalizedNumParser::ToDouble(token[1], ""); // minutes value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double ssVal = _LocalizedNumParser::ToDouble(token[2], "C"); // seconds value
+ double ssVal = _LocalizedNumParser::ToDouble(token[2], ""); // seconds value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
else if (tag == EXIF_TAG_GPS_LONGITUDE && !isLongitude)
{
String tempLongitude(buf);
- String delim(L",");
+ int firstComma = 0;
+ int lastComma = 0;
+
+ r = tempLongitude.IndexOf(',', 0, firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLongitude.SetCharAt('/', firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+
+ r = tempLongitude.LastIndexOf(',', tempLongitude.GetLength() - 1, lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLongitude.SetCharAt('/', lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+ String delim(L"/");
StringTokenizer strTok(tempLongitude, delim);
String token[3] = {L"", };
strTok.GetNextToken(token[count++]);
}
- double ddVal = _LocalizedNumParser::ToDouble(token[0], "C"); // degree value
+ double ddVal = _LocalizedNumParser::ToDouble(token[0], ""); // degree value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double mmVal = _LocalizedNumParser::ToDouble(token[1], "C"); // minutes value
+ double mmVal = _LocalizedNumParser::ToDouble(token[1], ""); // minutes value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double ssVal = _LocalizedNumParser::ToDouble(token[2], "C"); // seconds value
+ double ssVal = _LocalizedNumParser::ToDouble(token[2], ""); // seconds value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
else if (tag == EXIF_TAG_GPS_LATITUDE && !isLatitude)
{
String tempLatitude(buf);
- String delim(L",");
+ int firstComma = 0;
+ int lastComma = 0;
+ r = tempLatitude.IndexOf(',', 0, firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLatitude.SetCharAt('/', firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+
+ r = tempLatitude.LastIndexOf(',', tempLatitude.GetLength() - 1, lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLatitude.SetCharAt('/', lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+
+ String delim(L"/");
StringTokenizer strTok(tempLatitude, delim);
String token[3] = {L"", };
strTok.GetNextToken(token[count++]);
}
- double ddVal = _LocalizedNumParser::ToDouble(token[0], "C"); // degree value
+ double ddVal = _LocalizedNumParser::ToDouble(token[0], ""); // degree value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double mmVal = _LocalizedNumParser::ToDouble(token[1], "C"); // minutes value
+ double mmVal = _LocalizedNumParser::ToDouble(token[1], ""); // minutes value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double ssVal = _LocalizedNumParser::ToDouble(token[2], "C"); // seconds value
+ double ssVal = _LocalizedNumParser::ToDouble(token[2], ""); // seconds value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
else if (tag == EXIF_TAG_GPS_LONGITUDE && !isLongitude)
{
String tempLongitude(buf);
- String delim(L",");
+ int firstComma = 0;
+ int lastComma = 0;
+
+ r = tempLongitude.IndexOf(',', 0, firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLongitude.SetCharAt('/', firstComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+
+ r = tempLongitude.LastIndexOf(',', tempLongitude.GetLength() - 1, lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform IndexOf operation.", GetErrorMessage(r));
+
+ r = tempLongitude.SetCharAt('/', lastComma);
+ SysTryReturn(NID_CNT, !IsFailed(r), null, E_INVALID_ARG, "[%s] Failed to perform SetCharAt operation.", GetErrorMessage(r));
+ String delim(L"/");
StringTokenizer strTok(tempLongitude, delim);
String token[3] = {L"", };
strTok.GetNextToken(token[count++]);
}
- double ddVal = _LocalizedNumParser::ToDouble(token[0], "C"); // degree value
+ double ddVal = _LocalizedNumParser::ToDouble(token[0], ""); // degree value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double mmVal = _LocalizedNumParser::ToDouble(token[1], "C"); // minutes value
+ double mmVal = _LocalizedNumParser::ToDouble(token[1], ""); // minutes value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
- double ssVal = _LocalizedNumParser::ToDouble(token[2], "C"); // seconds value
+ double ssVal = _LocalizedNumParser::ToDouble(token[2], ""); // seconds value
r = GetLastResult();
SysTryReturn(NID_CNT, !IsFailed(r), null, r, "[E_INVALID_ARG] Failed to perform ToDouble operation.");
}
else
{
+ // The return value is CONTENT_TYPE_VIDEO because CreaetContent have to success, even if the content is invalid.
r = ErrorMapToRetVal(retVal);
- SysTryReturn(NID_CNT, retVal == METADATA_EXTRACTOR_ERROR_NONE, contentType, r,
+ SysTryReturn(NID_CNT, retVal == METADATA_EXTRACTOR_ERROR_NONE, CONTENT_TYPE_VIDEO, r,
"[%s] metadata_extractor_get_metadata failed.", GetErrorMessage(r));
}
}
else
{
+ // The return value is CONTENT_TYPE_VIDEO because CreaetContent have to success, even if the content is invalid.
r = ErrorMapToRetVal(retVal);
- SysTryReturn(NID_CNT, retVal == METADATA_EXTRACTOR_ERROR_NONE, contentType, r,
+ SysTryReturn(NID_CNT, retVal == METADATA_EXTRACTOR_ERROR_NONE, CONTENT_TYPE_VIDEO, r,
"[%s] metadata_extractor_get_metadata failed.", GetErrorMessage(r));
}