added call by nickname

This commit is contained in:
ori agranat
2019-10-25 14:02:42 +03:00
parent 7b48c9f964
commit 666cf66a99
3 changed files with 9 additions and 0 deletions

View File

@@ -192,6 +192,10 @@ public class Camera {
public HashMap<Integer, Pipeline> getPipelines() {
return pipelines;
}
public List<String> getPipelinesNickname(){
var pipelines = getPipelines();
return pipelines.values().stream().map(pipeline -> pipeline.nickname).collect(Collectors.toList());
}
public CamVideoMode getVideoMode() {
return camVideoMode;

View File

@@ -45,6 +45,10 @@ public class CameraManager {
public static HashMap<String, Camera> getAllCamerasByName() {
return AllCamerasByName;
}
public static List<String> getAllCameraByNickname(){
var cameras = getAllCamerasByName();
return cameras.values().stream().map(Camera::getNickname).collect(Collectors.toList());
}
public static boolean initializeCameras() {
if (AllUsbCameraInfosByName.size() == 0) return false;

View File

@@ -65,6 +65,7 @@ public class ServerHandler {
}
case "changeCameraName": {
CameraManager.getCurrentCamera().setNickname((String) entry.getValue());
sendFullSettings();
break;
}
case "changePipelineName": {