public void startLog() throws UnknownHostException, SocketException { if(currentLogger == null) { DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd_HHmmss"); Calendar calendar = Calendar.getInstance(); String timestamp = dateFormat.format(calendar.getTime()); LogSettings settings = (LogSettings) gui.getSelectedItem(); target = new File(System.getProperty("user.home") + "/robotLogs/", timestamp + "_" + settings.toString() + "_UILog"); target.mkdirs(); LogProperties logProperties = new LogProperties() { private static final long serialVersionUID = 1L; }; InetAddress listen = InetAddress.getByName(NetworkParameters.getHost(NetworkParameterKeys.logger)); InetSocketAddress address = new InetSocketAddress(settings.getVideoStream(), LogDataProtocolSettings.UI_DATA_PORT); currentLogger = new NetworkStreamVideoDataLogger(listen.getAddress(), target, logProperties, address); start.setEnabled(false); stop.setEnabled(true); } }
private void addCameras(LoggerConfigurationLoader config, LogSettings logSettings) { TByteArrayList cameras = config.getCameras(); for (int i = 0; i < cameras.size(); i++) { dataProducerParticipant.addCamera(CameraType.CAPTURE_CARD, "Camera-" + cameras.get(i), String.valueOf(cameras.get(i))); } if (logSettings.getVideoStream() != null) { dataProducerParticipant.addCamera(CameraType.NETWORK_STREAM, logSettings.getVideoStream(), logSettings.getVideoStream()); } }
public GUICaptureViewer() throws IOException { main = new JFrame(); main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); main.setLayout(new GridLayout(1, 1)); main.add(label); setFullScreen(); try { logo = ImageIO.read(getClass().getClassLoader().getResourceAsStream("ihmcRoboticsBlue.png")); ImageIcon icon = new ImageIcon(logo); label.setIcon(icon); } catch (IOException e) { throw new RuntimeException(e); } for (final LogSettings setting : LogSettings.values()) { if (setting.getVideoStream() != null) { new GUICaptureReceiver(LogParticipantSettings.domain, setting.getVideoStream(), new Handler()).start(); } } }
public GUICaptureViewer() { main = new JFrame(); main.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); main.setLayout(new GridLayout(1, 1)); main.add(label); setFullScreen(); try { logo = ImageIO.read(getClass().getClassLoader().getResourceAsStream("ihmcRoboticsBlue.png")); ImageIcon icon = new ImageIcon(logo); label.setIcon(icon); } catch (IOException e) { throw new RuntimeException(e); } for (final LogSettings setting : LogSettings.values()) { if (setting.getVideoStream() != null) { NetworkInterface iface = LogUtils.getMyInterface(NetworkParameters.getHost(NetworkParameterKeys.logger)); new GUICaptureReceiver(iface, setting.getVideoStream(), new Handler()).start(); } } }
if (logSetting.getVideoStream() != null)
if (logSetting.getVideoStream() != null)
announcement.setControlIP(controlAddress.getAddress().getAddress()); announcement.setControlPort((short) controlAddress.getPort()); if(logSettings.getVideoStream() != null) announcement.setVideoStream(logSettings.getVideoStream().getAddress()); announcement.setVideoPort(LogDataProtocolSettings.UI_ANNOUNCE_PORT);
canIHazRequest.setControlPort((short) controlAddress.getPort()); canIHazRequest.setDataIP(dataAddress.getAddress()); if(logSettings.getVideoStream() != null) canIHazRequest.setVideoStream(logSettings.getVideoStream().getAddress()); canIHazRequest.setVideoPort(LogDataProtocolSettings.UI_DATA_PORT);