本文整理了Java中us.ihmc.robotDataLogger.logger.YoVariableLoggerOptions
类的一些代码示例,展示了YoVariableLoggerOptions
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YoVariableLoggerOptions
类的具体详情如下:
包路径:us.ihmc.robotDataLogger.logger.YoVariableLoggerOptions
类名称:YoVariableLoggerOptions
暂无
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
String timestamp = dateFormat.format(calendar.getTime());
File tempDirectory = new File(options.getLogDirectory(), "." + timestamp + "_" + request.getName());
File finalDirectory = new File(options.getLogDirectory(), timestamp + "_" + request.getName());
if (finalDirectory.exists())
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public BlackmagicVideoDataLogger(File logPath, LogProperties logProperties, int decklinkID, YoVariableLoggerOptions options) throws IOException
{
super(logPath, logProperties, "Camera" + decklinkID);
decklink = decklinkID;
quality = options.getVideoQuality();
createCaptureInterface();
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public static void main(String[] args) throws JSAPException, IOException
{
YoVariableLoggerOptions options = YoVariableLoggerOptions.parse(args);
new YoVariableLoggerDispatcher(options);
}
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
public static YoVariableLoggerOptions parse(String[] args) throws JSAPException
{
SimpleJSAP jsap = new SimpleJSAP("YoVariabeLogger", "Logs YoVariables and video from a robot", new Parameter[] {
new Switch("disableVideo", 'n', "noVideo", "Disable video recording"),
new FlaggedOption("logDirectory", JSAP.STRING_PARSER, YoVariableLoggerOptions.defaultLogDirectory, JSAP.NOT_REQUIRED, 'd', "directory",
"Directory where to save log files"),
new FlaggedOption("videoQuality", JSAP.DOUBLE_PARSER, String.valueOf(YoVariableLoggerOptions.defaultVideoQuality), JSAP.NOT_REQUIRED, 'q',
"quality", "Video quality for MJPEG"),
new FlaggedOption("videoCodec", JSAP.STRING_PARSER, String.valueOf(defaultCodec), JSAP.NOT_REQUIRED, 'c', "codec", "Desired video codec. AV_CODEC_ID_H264 or AV_CODEC_ID_MJPEG"),
new FlaggedOption("crf", JSAP.INTEGER_PARSER, String.valueOf(defaultCRF), JSAP.NOT_REQUIRED, 'r', "crf", "CRF (Constant rate factor) for H264. 0-51, 0 is lossless. Sane values are 18 to 28."),
new Switch("flushAggressivelyToDisk", 's', "sync", "Aggressively flush data to disk. Reduces change of data loss but doesn't work on slow platters.") });
JSAPResult config = jsap.parse(args);
if (jsap.messagePrinted())
{
System.out.println(jsap.getUsage());
System.out.println(jsap.getHelp());
System.exit(-1);
}
YoVariableLoggerOptions options = new YoVariableLoggerOptions();
options.setLogDirectory(config.getString("logDirectory"));
options.setVideoQuality(config.getDouble("videoQuality"));
options.setDisableVideo(config.getBoolean("disableVideo"));
options.setVideoCodec(CodecID.valueOf(config.getString("videoCodec")));
options.setCrf(config.getInt("crf"));
options.setFlushAggressivelyToDisk(config.getBoolean("flushAggressivelyToDisk"));
return options;
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public static YoVariableLoggerOptions parse(String[] args) throws JSAPException
{
SimpleJSAP jsap = new SimpleJSAP("YoVariabeLogger", "Logs YoVariables and video from a robot", new Parameter[] {
new Switch("disableVideo", 'n', "noVideo", "Disable video recording"),
new FlaggedOption("logDirectory", JSAP.STRING_PARSER, YoVariableLoggerOptions.defaultLogDirectory, JSAP.NOT_REQUIRED, 'd', "directory",
"Directory where to save log files"),
new FlaggedOption("videoQuality", JSAP.DOUBLE_PARSER, String.valueOf(YoVariableLoggerOptions.defaultVideoQuality), JSAP.NOT_REQUIRED, 'q',
"quality", "Video quality"),
new Switch("flushAggressivelyToDisk", 's', "sync", "Aggressively flush data to disk. Reduces change of data loss but doesn't work on slow platters.") });
JSAPResult config = jsap.parse(args);
if (jsap.messagePrinted())
{
System.out.println(jsap.getUsage());
System.out.println(jsap.getHelp());
System.exit(-1);
}
YoVariableLoggerOptions options = new YoVariableLoggerOptions();
options.setLogDirectory(config.getString("logDirectory"));
options.setVideoQuality(config.getDouble("videoQuality"));
options.setDisableVideo(config.getBoolean("disableVideo"));
options.setFlushAggressivelyToDisk(config.getBoolean("flushAggressivelyToDisk"));
return options;
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
public YoVariableLoggerListener(File tempDirectory, File finalDirectory, String timestamp, AnnounceRequest request, YoVariableLoggerOptions options)
this.flushAggressivelyToDisk = options.isFlushAggressivelyToDisk();
this.tempDirectory = tempDirectory;
this.finalDirectory = finalDirectory;
logProperties.setTimestamp(timestamp);
if(!options.getDisableVideo())
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
switch(options.getVideoCodec())
capture.setOption("crf", String.valueOf(options.getCrf()));
capture.setOption("profile", "high");
capture.setOption("coder", "vlc");
case AV_CODEC_ID_MJPEG:
capture = new Capture(this, CodecID.AV_CODEC_ID_MJPEG);
capture.setMJPEGQuality(options.getVideoQuality());
break;
default: throw new RuntimeException();
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
if (!options.getDisableVideo())
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
public YoVariableLoggerListener(File tempDirectory, File finalDirectory, String timestamp, Announcement request, YoVariableLoggerOptions options)
this.flushAggressivelyToDisk = options.isFlushAggressivelyToDisk();
this.tempDirectory = tempDirectory;
this.finalDirectory = finalDirectory;
logProperties.setTimestamp(timestamp);
if(!options.getDisableVideo())
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
if (!options.getDisableVideo())
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
public static void main(String[] args) throws JSAPException, IOException
{
YoVariableLoggerOptions options = YoVariableLoggerOptions.parse(args);
new YoVariableLoggerDispatcher(options);
}
代码示例来源:origin: us.ihmc/ihmc-robot-data-logger
String timestamp = dateFormat.format(calendar.getTime());
File tempDirectory = new File(options.getLogDirectory(), "." + timestamp + "_" + request.getName());
File finalDirectory = new File(options.getLogDirectory(), timestamp + "_" + request.getName());
if (finalDirectory.exists())
内容来源于网络,如有侵权,请联系作者删除!