Mercurial > jmeCapture
changeset 73:877ae4b2993c tip
merge laptop changes.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 10 Mar 2014 18:58:08 -0400 |
parents | dd97f65f940c (diff) a67aef438383 (current diff) |
children | |
files | |
diffstat | 3 files changed, 51 insertions(+), 51 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/build.xml Wed May 29 17:31:16 2013 -0400 1.2 +++ b/build.xml Mon Mar 10 18:58:08 2014 -0400 1.3 @@ -21,8 +21,8 @@ 1.4 <pathelement path="${lib}/logback-classic.jar"/> 1.5 <pathelement path="${lib}/logback-core.jar"/> 1.6 <pathelement path="${lib}/slf4j-api.jar"/> 1.7 + <pathelement path="${lib}/xuggle-xuggler.jar"/> 1.8 --> 1.9 - <pathelement path="${lib}/xuggle-xuggler.jar"/> 1.10 <pathelement path="${lib}/tritonus_aos-0.3.6.jar"/> 1.11 <pathelement path="${lib}/tritonus_share-0.3.6.jar"/> 1.12 </path>
2.1 --- a/src/com/aurellem/capture/Capture.java Wed May 29 17:31:16 2013 -0400 2.2 +++ b/src/com/aurellem/capture/Capture.java Mon Mar 10 18:58:08 2014 -0400 2.3 @@ -9,7 +9,7 @@ 2.4 import com.aurellem.capture.video.AVIVideoRecorder; 2.5 import com.aurellem.capture.video.AbstractVideoRecorder; 2.6 import com.aurellem.capture.video.FileVideoRecorder; 2.7 -import com.aurellem.capture.video.XuggleVideoRecorder; 2.8 +//import com.aurellem.capture.video.XuggleVideoRecorder; 2.9 import com.jme3.app.Application; 2.10 import com.jme3.audio.AudioRenderer; 2.11 import com.jme3.renderer.ViewPort; 2.12 @@ -90,11 +90,11 @@ 2.13 2.14 if (file.getCanonicalPath().endsWith(".avi")){ 2.15 videoRecorder = new AVIVideoRecorder(file);} 2.16 - else if (file.isDirectory()){ 2.17 + else { 2.18 videoRecorder = new FileVideoRecorder(file);} 2.19 - else { 2.20 - videoRecorder = new XuggleVideoRecorder(file); 2.21 - } 2.22 + //else { 2.23 + //videoRecorder = new XuggleVideoRecorder(file); 2.24 + //} 2.25 2.26 Callable<Object> thunk = new Callable<Object>(){ 2.27 public Object call(){
3.1 --- a/src/com/aurellem/capture/video/XuggleVideoRecorder.java Wed May 29 17:31:16 2013 -0400 3.2 +++ b/src/com/aurellem/capture/video/XuggleVideoRecorder.java Mon Mar 10 18:58:08 2014 -0400 3.3 @@ -1,62 +1,62 @@ 3.4 -package com.aurellem.capture.video; 3.5 +// package com.aurellem.capture.video; 3.6 3.7 -import java.awt.image.BufferedImage; 3.8 -import java.io.File; 3.9 -import java.io.IOException; 3.10 -import java.util.concurrent.TimeUnit; 3.11 +// // import java.awt.image.BufferedImage; 3.12 +// // import java.io.File; 3.13 +// // import java.io.IOException; 3.14 +// // import java.util.concurrent.TimeUnit; 3.15 3.16 -import com.xuggle.mediatool.IMediaWriter; 3.17 -import com.xuggle.mediatool.ToolFactory; 3.18 -import com.xuggle.xuggler.IRational; 3.19 +// // import com.xuggle.mediatool.IMediaWriter; 3.20 +// // import com.xuggle.mediatool.ToolFactory; 3.21 +// // import com.xuggle.xuggler.IRational; 3.22 3.23 3.24 -/** 3.25 - * Handles writing video files using Xuggle. 3.26 - * 3.27 - * @author Robert McIntyre 3.28 - * 3.29 - */ 3.30 +// /** 3.31 +// * Handles writing video files using Xuggle. 3.32 +// * 3.33 +// * @author Robert McIntyre 3.34 +// * 3.35 +// */ 3.36 3.37 -public class XuggleVideoRecorder extends AbstractVideoRecorder{ 3.38 +// public class XuggleVideoRecorder extends AbstractVideoRecorder{ 3.39 3.40 3.41 - IMediaWriter writer; 3.42 - BufferedImage frame; 3.43 - int videoChannel = 0; 3.44 - long currentTimeStamp = 0; 3.45 - boolean videoReady = false; 3.46 +// // IMediaWriter writer; 3.47 +// // BufferedImage frame; 3.48 +// // int videoChannel = 0; 3.49 +// // long currentTimeStamp = 0; 3.50 +// // boolean videoReady = false; 3.51 3.52 3.53 - public XuggleVideoRecorder(File output) 3.54 - throws IOException {super(output);} 3.55 +// public XuggleVideoRecorder(File output) 3.56 +// throws IOException {super(output);} 3.57 3.58 - public void initVideo(){ 3.59 - this.frame = new BufferedImage( 3.60 - width, height, 3.61 - BufferedImage.TYPE_3BYTE_BGR); 3.62 - this.writer = ToolFactory.makeWriter(this.targetFileName); 3.63 - writer.addVideoStream(videoChannel, 3.64 - 0, IRational.make(fps), 3.65 - width, height); 3.66 - this.videoReady = true; 3.67 - } 3.68 +// // public void initVideo(){ 3.69 +// // this.frame = new BufferedImage( 3.70 +// // width, height, 3.71 +// // BufferedImage.TYPE_3BYTE_BGR); 3.72 +// // this.writer = ToolFactory.makeWriter(this.targetFileName); 3.73 +// // writer.addVideoStream(videoChannel, 3.74 +// // 0, IRational.make(fps), 3.75 +// // width, height); 3.76 +// // this.videoReady = true; 3.77 +// // } 3.78 3.79 - public void record(BufferedImage rawFrame) { 3.80 - if (!this.videoReady){initVideo();} 3.81 - // convert the Image into the form that Xuggle likes. 3.82 - this.frame.getGraphics().drawImage(rawFrame, 0, 0, null); 3.83 - writer.encodeVideo(videoChannel, 3.84 - frame, 3.85 - currentTimeStamp, TimeUnit.NANOSECONDS); 3.86 +// // public void record(BufferedImage rawFrame) { 3.87 +// // if (!this.videoReady){initVideo();} 3.88 +// // // convert the Image into the form that Xuggle likes. 3.89 +// // this.frame.getGraphics().drawImage(rawFrame, 0, 0, null); 3.90 +// // writer.encodeVideo(videoChannel, 3.91 +// // frame, 3.92 +// // currentTimeStamp, TimeUnit.NANOSECONDS); 3.93 3.94 - currentTimeStamp += (long) (1000000000.0 / fps); 3.95 - } 3.96 +// // currentTimeStamp += (long) (1000000000.0 / fps); 3.97 +// // } 3.98 3.99 - public void finish() { 3.100 - writer.close(); 3.101 - } 3.102 +// // public void finish() { 3.103 +// // writer.close(); 3.104 +// // } 3.105 3.106 3.107 -} 3.108 +// } 3.109 3.110