Commit 7c6bd94a authored by Marian Dovgialo's avatar Marian Dovgialo

#44939 Fixing svarog to work with signal and video saving in obci

parent caf635ed
......@@ -39,7 +39,6 @@
private String peerId;
private String recommendedScenario;
private boolean hasVideoSaver;
/**
* This value holds information whether Svarog has connected to this experiment or not.
......@@ -207,13 +206,6 @@ public void setRecommendedScenario(String recommendedScenario) {
this.recommendedScenario = recommendedScenario;
}
public boolean getHasVideoSaver() {
return hasVideoSaver;
}
public void setHasVideoSaver(boolean hasVideoSaver) {
this.hasVideoSaver = hasVideoSaver;
}
@Override
public String toString() {
return getName();
......
......@@ -186,7 +186,7 @@ public void fillPanelFromModel(Object model) {
MonitorRecordingDescriptor monitorRecordingDescriptor = experimentDescriptor.getMonitorRecordingDescriptor();
getEnableTagRecordingPanel().setRecordingEnabled(monitorRecordingDescriptor.isTagsRecordingEnabled());
getEnableVideoRecordingPanel().setRecordingEnabled(monitorRecordingDescriptor.isVideoRecordingEnabled());
getEnableVideoRecordingPanel().setEnabled(experimentDescriptor.getHasVideoSaver());
getEnableVideoRecordingPanel().setEnabled(ObciServerCapabilities.getSharedInstance().hasVideoSaving());
getSelectSignalRecordingFilePanel().setFileName(monitorRecordingDescriptor.getSignalRecordingFilePath());
getSelectVideoRecordingFilePanel().setFileName(monitorRecordingDescriptor.getVideoRecordingFilePath());
}
......
......@@ -27,6 +27,7 @@
import org.signalml.app.video.components.VideoStreamSelectionCompactPanel;
import org.signalml.app.video.components.VideoStreamSelectionListener;
import org.signalml.app.worker.monitor.GetAvailableVideoWorker;
import org.signalml.app.worker.monitor.ObciServerCapabilities;
import org.signalml.app.worker.monitor.exceptions.OpenbciCommunicationException;
/**
......@@ -149,7 +150,7 @@ public void fillModelFromPanel(Object model) {
public void fillPanelFromModel(Object model) {
ExperimentDescriptor experimentDescriptor = (ExperimentDescriptor) model;
MonitorRecordingDescriptor monitorRecordingDescriptor = experimentDescriptor.getMonitorRecordingDescriptor();
setEnabled(experimentDescriptor.getHasVideoSaver() && monitorRecordingDescriptor.isVideoRecordingEnabled());
setEnabled(ObciServerCapabilities.getSharedInstance().hasVideoSaving() && monitorRecordingDescriptor.isVideoRecordingEnabled());
previewCheckBox.setSelected(monitorRecordingDescriptor.getDisplayVideoPreviewWhileSaving());
}
......
......@@ -137,8 +137,6 @@ protected void sendJoinExperimentRequest() throws OpenbciCommunicationException
StringTokenizer tokenizer = new StringTokenizer(mxAddr, ":");
multiplexerAddress = tokenizer.nextToken();
multiplexerPort = Integer.parseInt(tokenizer.nextToken());
boolean hasVideoSaver = response.getParams().containsKey("has_video_saver") && (Boolean) response.getParams().get("has_video_saver");
experimentDescriptor.setHasVideoSaver(hasVideoSaver);
}
protected void connectToMultiplexer() {
......
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 to comment