annotate src/com/aurellem/capture/examples/Basic.java @ 29:9f58273090df

added AudioFormat to AudioSendRenderer
author Robert McIntyre <rlm@mit.edu>
date Sun, 30 Oct 2011 10:06:38 -0700
parents 5f616cc420dd
children 7184bc09a92e 3dc1f15e1e13
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@14 14 *
rlm@14 15 * Demonstrates how to use basic Audio/Video capture with a jMonkeyEngine
rlm@14 16 * application. You can use these techniques to make high quality cutscenes
rlm@14 17 * or demo videos, even on very slow laptops.
rlm@14 18 *
rlm@14 19 * @author Robert McIntyre
rlm@14 20 *
rlm@14 21 */
rlm@14 22
rlm@14 23 public class Basic {
rlm@14 24
rlm@15 25 public static void main(String[] ignore) throws IOException{
rlm@15 26 File video = File.createTempFile("JME-water-video", ".avi");
rlm@15 27 File audio = File.createTempFile("JME-water-audio", ".wav");
rlm@14 28
rlm@14 29 SimpleApplication app = new TestPostWater();
rlm@14 30 app.setTimer(new IsoTimer(60));
rlm@14 31 app.setShowSettings(false);
rlm@14 32
rlm@14 33 Capture.captureVideo(app, video);
rlm@14 34 Capture.captureAudio(app, audio);
rlm@14 35
rlm@14 36 app.start();
rlm@24 37
rlm@24 38 System.out.println(video.getCanonicalPath());
rlm@24 39 System.out.println(audio.getCanonicalPath());
rlm@14 40 }
rlm@14 41 }