本文整理汇总了Java中org.monte.screenrecorder.ScreenRecorder类的典型用法代码示例。如果您正苦于以下问题:Java ScreenRecorder类的具体用法?Java ScreenRecorder怎么用?Java ScreenRecorder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ScreenRecorder类属于org.monte.screenrecorder包,在下文中一共展示了ScreenRecorder类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: MonteScreenRecorder
import org.monte.screenrecorder.ScreenRecorder; //导入依赖的package包/类
public MonteScreenRecorder() {
GraphicsConfiguration gc = GraphicsEnvironment
.getLocalGraphicsEnvironment().getDefaultScreenDevice()
.getDefaultConfiguration();
this.files = new TreeSet<File>();
try {
this.screenRecorder = new ScreenRecorder(gc, new Format(
MediaTypeKey, MediaType.FILE, MimeTypeKey, FormatKeys.MIME_QUICKTIME),
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,
VideoFormatKeys.ENCODING_QUICKTIME_ANIMATION,
CompressorNameKey,
ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, DepthKey,
24, FrameRateKey, Rational.valueOf(15), QualityKey,
1.0f, KeyFrameIntervalKey, 15 * 60), new Format(
MediaTypeKey, MediaType.VIDEO, EncodingKey,
"black", FrameRateKey, Rational.valueOf(30)), null);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
开发者ID:bharathkumar-gopalan,项目名称:grid-video-recorder,代码行数:22,代码来源:MonteScreenRecorder.java
示例2: stop
import org.monte.screenrecorder.ScreenRecorder; //导入依赖的package包/类
public void stop() {
if (screenRecorder==null) {
return;
}
try {
if (screenRecorder.getState()!=null && screenRecorder.getState().equals(ScreenRecorder.State.RECORDING)) {
Findr.logDebug("[ScreenRecordr] stopping recorder");
screenRecorder.stop();
}
Findr.logDebug("[ScreenRecordr] stopped video recording. List of created files :");
for (File f : getVideoFiles()) {
Findr.logDebug("[ScreenRecordr] * " + f.getAbsolutePath());
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
开发者ID:pojosontheweb,项目名称:selenium-utils,代码行数:18,代码来源:ScreenRecordr.java
示例3: initScreen
import org.monte.screenrecorder.ScreenRecorder; //导入依赖的package包/类
/**
* initializes a graphic configurations
*/
public static void initScreen() {
// get the graphics configuration of the current screen
GraphicsConfiguration gc = GraphicsEnvironment
.getLocalGraphicsEnvironment()
.getDefaultScreenDevice()
.getDefaultConfiguration();
// set screen recorder configuration
try {
screenLogger = new ScreenRecorder(gc, null,
new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,
DepthKey, 24, FrameRateKey, Rational.valueOf(15),
QualityKey, 1.0f,
KeyFrameIntervalKey, 15 * 60),
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, "black",
FrameRateKey, Rational.valueOf(30)),
null, new File(pathToFile));
} catch (IOException ioe) {
ioe.printStackTrace();
} catch (AWTException awte) {
awte.printStackTrace();
}
}
开发者ID:atinfo,项目名称:at.info-knowledge-base,代码行数:29,代码来源:CaptureVideo.java
示例4: MonteVideoRecorderAdapter
import org.monte.screenrecorder.ScreenRecorder; //导入依赖的package包/类
/**
* @param outputFile - outputfolder for the video file, the filename will be set when
* the video is started.
* @param dim - Capturing area for the video
* @throws IOException
* - thrown if video file cannot be written to the output-file
* @throws AWTException
* - thrown if an error with the capturing area occurs
*/
public MonteVideoRecorderAdapter(File outputFile, Dimension dim)
throws IOException, AWTException {
super(GraphicsEnvironment.getLocalGraphicsEnvironment()
.getDefaultScreenDevice().getDefaultConfiguration(),
new Rectangle(dim),
// the file format
new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),
// the output format for screen capture
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,
ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, CompressorNameKey,
ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE, WidthKey, dim.width,
HeightKey, dim.height, DepthKey, DEFAULT_DEPTH_KEY_SCREEN_CAPTURE,
FrameRateKey, DEFAULT_FRAME_RATE_SCREEN_CAPTURE, QualityKey, 1.0f,
KeyFrameIntervalKey, DEFAULT_KEY_FRAME_INTERVAL_SCREEN_CAPTURE),
// the output format for mouse capture
new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey,
ScreenRecorder.ENCODING_WHITE_CURSOR, FrameRateKey,
DEFAULT_FRAME_RATE_MOUSE_CAPTURE),
// audio output format
null, outputFile
);
}
开发者ID:shell88,项目名称:bdd_videoannotator,代码行数:36,代码来源:MonteVideoRecorderAdapter.java
注:本文中的org.monte.screenrecorder.ScreenRecorder类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论