Mercurial > jmeCapture
diff src/com/aurellem/capture/Capture.java @ 11:8a6b1684f536
refactored.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 27 Oct 2011 02:27:02 -0700 |
parents | 4c5fc53778c1 |
children | d10f4d4ff15a |
line wrap: on
line diff
1.1 --- a/src/com/aurellem/capture/Capture.java Wed Oct 26 09:38:27 2011 -0700 1.2 +++ b/src/com/aurellem/capture/Capture.java Thu Oct 27 02:27:02 2011 -0700 1.3 @@ -13,6 +13,9 @@ 1.4 1.5 public static void SimpleCaptureVideo(Application app, File file) throws IOException{ 1.6 app.getViewPort().setClearFlags(true, true, true); 1.7 + // this prevents pixels from staying in the render buffer between frames 1.8 + // and messing the video up. It's not a problem since Black is the default, and this 1.9 + // can be overridden by user code. 1.10 app.getViewPort().setBackgroundColor(ColorRGBA.Black); 1.11 1.12 // The XuggleVideoRecorder is better than the AVIVideoRecorder in every way 1.13 @@ -24,14 +27,9 @@ 1.14 1.15 if (file.getCanonicalPath().endsWith(".avi")){ 1.16 videoRecorder = new AVIVideoRecorder(file);} 1.17 - else { videoRecorder = new XuggleVideoRecorder(file); } 1.18 + else { videoRecorder = new XuggleVideoRecorder(file);} 1.19 1.20 app.getStateManager().attach(videoRecorder); 1.21 app.getViewPort().addFinalProcessor(videoRecorder); 1.22 - } 1.23 - 1.24 - 1.25 - 1.26 - 1.27 - 1.28 + } 1.29 }