view src/com/aurellem/capture/examples/Basic.java @ 15:be5ac56826be

created part of the advanced documentation
author Robert McIntyre <rlm@mit.edu>
date Fri, 28 Oct 2011 06:52:46 -0700
parents e299cd89074d
children c7a07eefaeea
line wrap: on
line source
1 package com.aurellem.capture.examples;
3 import java.io.File;
4 import java.io.IOException;
6 import jme3test.helloworld.HelloAudio;
7 import jme3test.helloworld.HelloJME3;
8 import jme3test.niftygui.TestNiftyExamples;
9 import jme3test.water.TestPostWater;
11 import com.aurellem.capture.Capture;
12 import com.aurellem.capture.IsoTimer;
13 import com.jme3.app.SimpleApplication;
16 /**
17 *
18 * Demonstrates how to use basic Audio/Video capture with a jMonkeyEngine
19 * application. You can use these techniques to make high quality cutscenes
20 * or demo videos, even on very slow laptops.
21 *
22 * @author Robert McIntyre
23 *
24 */
26 public class Basic {
28 public static void main(String[] ignore) throws IOException{
29 File video = File.createTempFile("JME-water-video", ".avi");
30 File audio = File.createTempFile("JME-water-audio", ".wav");
32 System.out.println(video.getCanonicalPath());
33 System.out.println(audio.getCanonicalPath());
35 SimpleApplication app = new TestPostWater();
36 app.setTimer(new IsoTimer(60));
37 app.setShowSettings(false);
39 Capture.captureVideo(app, video);
40 Capture.captureAudio(app, audio);
42 app.start();
43 }
44 }