• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ScreenRecorder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CompositeFlowExecutionKey类代码示例发布时间:2022-05-23
下一篇:
Java DefaultJmsListenerContainerFactoryConfigurer类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap