annotate src/com/aurellem/capture/examples/Basic.java @ 73:877ae4b2993c tip

merge laptop changes.
author Robert McIntyre <rlm@mit.edu>
date Mon, 10 Mar 2014 18:58:08 -0400
parents afc437f637bd
children
rev   line source
rlm@14 1 package com.aurellem.capture.examples;
rlm@14 2
rlm@14 3 import java.io.File;
rlm@14 4 import java.io.IOException;
rlm@14 5
rlm@14 6 import jme3test.water.TestPostWater;
rlm@14 7
rlm@14 8 import com.aurellem.capture.Capture;
rlm@14 9 import com.aurellem.capture.IsoTimer;
rlm@14 10 import com.jme3.app.SimpleApplication;
rlm@14 11
rlm@14 12
rlm@14 13 /**
rlm@56 14 * Demonstrates how to use basic Audio/Video capture with a
rlm@56 15 * jMonkeyEngine application. You can use these techniques to make
rlm@56 16 * high quality cutscenes or demo videos, even on very slow laptops.
rlm@14 17 *
rlm@14 18 * @author Robert McIntyre
rlm@14 19 */
rlm@14 20
rlm@14 21 public class Basic {
rlm@14 22
rlm@56 23 public static void main(String[] ignore) throws IOException{
rlm@56 24 File video = File.createTempFile("JME-water-video", ".avi");
rlm@56 25 File audio = File.createTempFile("JME-water-audio", ".wav");
rlm@14 26
rlm@56 27 SimpleApplication app = new TestPostWater();
rlm@56 28 app.setTimer(new IsoTimer(60));
rlm@56 29 app.setShowSettings(false);
rlm@14 30
rlm@56 31 Capture.captureVideo(app, video);
rlm@56 32 Capture.captureAudio(app, audio);
rlm@14 33
rlm@56 34 app.start();
rlm@24 35
rlm@56 36 System.out.println(video.getCanonicalPath());
rlm@56 37 System.out.println(audio.getCanonicalPath());
rlm@56 38 }
rlm@14 39 }