diff 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 diff
     1.1 --- a/src/com/aurellem/capture/examples/Basic.java	Thu Oct 27 21:55:51 2011 -0700
     1.2 +++ b/src/com/aurellem/capture/examples/Basic.java	Fri Oct 28 06:52:46 2011 -0700
     1.3 @@ -25,44 +25,12 @@
     1.4  
     1.5  public class Basic {
     1.6  	
     1.7 -	public static void basicVideo() throws IOException{
     1.8 -		File video = File.createTempFile("HelloJME3", ".avi");
     1.9 -		System.out.println("Saving video to: " + video.getCanonicalPath());
    1.10 -		SimpleApplication app = new HelloJME3();
    1.11 -		app.setTimer(new IsoTimer(60));
    1.12 -		app.setShowSettings(false);
    1.13 +	public static void main(String[] ignore) throws IOException{
    1.14 +		File video = File.createTempFile("JME-water-video", ".avi");
    1.15 +		File audio = File.createTempFile("JME-water-audio", ".wav");
    1.16  		
    1.17 -		Capture.captureVideo(app, video);
    1.18 -		app.start();
    1.19 -	}
    1.20 -	
    1.21 -	public static void basicVideoGUI() throws IOException {
    1.22 -		File video = File.createTempFile("GUI", ".avi");
    1.23 -		System.out.println("Saving video to: " + video.getCanonicalPath());
    1.24 -		SimpleApplication app = new TestNiftyExamples();
    1.25 -		app.setTimer(new IsoTimer(60));
    1.26 -		app.setShowSettings(false);
    1.27 -		
    1.28 -		Capture.captureVideo(app, video);
    1.29 -		app.start();
    1.30 -	}
    1.31 -	
    1.32 -	public static void basicAudio() throws IOException{
    1.33 -		File audio = File.createTempFile("BasicAudio", ".wav");
    1.34 -		System.out.println("Saving audio to: " + audio.getCanonicalPath());
    1.35 -		SimpleApplication app = new HelloAudio();
    1.36 -		app.setTimer(new IsoTimer(60));
    1.37 -		app.setShowSettings(false);
    1.38 -		
    1.39 -		// you will not hear the audio while it is being captured.
    1.40 -		Capture.captureAudio(app, audio);
    1.41 -		
    1.42 -		app.start();
    1.43 -	}
    1.44 -	
    1.45 -	public static void basicAudioVideo() throws IOException{
    1.46 -		File video = new File("/home/r/tmp/basicVideo.avi");
    1.47 -		File audio = new File("/home/r/tmp/basicAudio.wav");
    1.48 +		System.out.println(video.getCanonicalPath());
    1.49 +		System.out.println(audio.getCanonicalPath());
    1.50  		
    1.51  		SimpleApplication app = new TestPostWater();
    1.52  		app.setTimer(new IsoTimer(60));
    1.53 @@ -73,12 +41,4 @@
    1.54  		
    1.55  		app.start();
    1.56  	}
    1.57 -	
    1.58 -	
    1.59 -	public static void main(String[] ignore) throws IOException{
    1.60 -		basicVideo();
    1.61 -		basicVideoGUI();
    1.62 -		basicAudio();
    1.63 -		basicAudioVideo();
    1.64 -	}
    1.65  }