Commit a6323d71 by Adi Amir

complete latest image

parent 61b50af3
Showing with 11 additions and 12 deletions
......@@ -120,18 +120,18 @@ public class GEManager {
}
String fileData = httpFileDataResp.getContent();
// step 3: get the view direction for this camera (e.g: {{metadataurl}}/assets/CAMERA-STG-HYP1066-CAM-R)
httpRequest = buildGetCameraDetailsRequest(camId);
SimpleHttpResponse httpCameraDetailsResp = httpClient.processRequest(httpRequest);
if (httpCameraDetailsResp.getStatusCode() != 200) {
logHttpError("getLatestMediaFile/getCameraDetails", httpCameraDetailsResp);
return errorHttpResponse(httpFileDataResp);
}
contentObj = objMapper.readTree(httpCameraDetailsResp.getContent());
String viewDir = contentObj.at("/properties/VIEW").asText();
// // step 3: get the view direction for this camera (e.g: {{metadataurl}}/assets/CAMERA-STG-HYP1066-CAM-R)
// httpRequest = buildGetCameraDetailsRequest(camId);
// SimpleHttpResponse httpCameraDetailsResp = httpClient.processRequest(httpRequest);
// if (httpCameraDetailsResp.getStatusCode() != 200) {
// logHttpError("getLatestMediaFile/getCameraDetails", httpCameraDetailsResp);
// return errorHttpResponse(httpFileDataResp);
// }
// contentObj = objMapper.readTree(httpCameraDetailsResp.getContent());
// String viewDir = contentObj.at("/properties/VIEW").asText();
// build the final response
brr = buildLatestMediaFileResp(httpFileDataResp.getContent(), url, viewDir);
brr = buildLatestMediaFileResp(fileData, url);
} catch (Exception e) {
String err = "getLatestMediaFile() failed with exception. camId=" + camId + " e=" + e.toString();
......@@ -157,7 +157,7 @@ public class GEManager {
return request;
}
private BaseRestResponse buildLatestMediaFileResp(String fileData, String url, String viewDir) {
private BaseRestResponse buildLatestMediaFileResp(String fileData, String url) {
BaseRestResponse brr = new BaseRestResponse(true,null);
try {
......@@ -177,7 +177,6 @@ public class GEManager {
dataObj.put("timestamp", Long.valueOf(urlParts[1]));
dataObj.put("mediaType", urlParts[2]);
dataObj.put("fileName", urlParts[3]);
dataObj.put("viewDir", viewDir);
dataObj.put("fileData", fileData);
brr.objectNode = dataObj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment