Mercurial > jmeCapture
changeset 71:2c50a0c99715
remove xuggle, since I will never use it.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 10 Mar 2014 18:54:35 -0400 |
parents | 302d5e9ad120 |
children | dd97f65f940c |
files | src/com/aurellem/capture/Capture.java src/com/aurellem/capture/video/XuggleVideoRecorder.java |
diffstat | 2 files changed, 47 insertions(+), 47 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/src/com/aurellem/capture/Capture.java Thu Jul 19 12:28:55 2012 -0500 1.2 +++ b/src/com/aurellem/capture/Capture.java Mon Mar 10 18:54:35 2014 -0400 1.3 @@ -9,7 +9,7 @@ 1.4 import com.aurellem.capture.video.AVIVideoRecorder; 1.5 import com.aurellem.capture.video.AbstractVideoRecorder; 1.6 import com.aurellem.capture.video.FileVideoRecorder; 1.7 -import com.aurellem.capture.video.XuggleVideoRecorder; 1.8 +//import com.aurellem.capture.video.XuggleVideoRecorder; 1.9 import com.jme3.app.Application; 1.10 import com.jme3.audio.AudioRenderer; 1.11 import com.jme3.renderer.ViewPort; 1.12 @@ -93,7 +93,7 @@ 1.13 else if (file.isDirectory()){ 1.14 videoRecorder = new FileVideoRecorder(file);} 1.15 else { 1.16 - videoRecorder = new XuggleVideoRecorder(file); 1.17 + //videoRecorder = new XuggleVideoRecorder(file); 1.18 } 1.19 1.20 Callable<Object> thunk = new Callable<Object>(){
2.1 --- a/src/com/aurellem/capture/video/XuggleVideoRecorder.java Thu Jul 19 12:28:55 2012 -0500 2.2 +++ b/src/com/aurellem/capture/video/XuggleVideoRecorder.java Mon Mar 10 18:54:35 2014 -0400 2.3 @@ -1,62 +1,62 @@ 2.4 -package com.aurellem.capture.video; 2.5 +// package com.aurellem.capture.video; 2.6 2.7 -import java.awt.image.BufferedImage; 2.8 -import java.io.File; 2.9 -import java.io.IOException; 2.10 -import java.util.concurrent.TimeUnit; 2.11 +// // import java.awt.image.BufferedImage; 2.12 +// // import java.io.File; 2.13 +// // import java.io.IOException; 2.14 +// // import java.util.concurrent.TimeUnit; 2.15 2.16 -import com.xuggle.mediatool.IMediaWriter; 2.17 -import com.xuggle.mediatool.ToolFactory; 2.18 -import com.xuggle.xuggler.IRational; 2.19 +// // import com.xuggle.mediatool.IMediaWriter; 2.20 +// // import com.xuggle.mediatool.ToolFactory; 2.21 +// // import com.xuggle.xuggler.IRational; 2.22 2.23 2.24 -/** 2.25 - * Handles writing video files using Xuggle. 2.26 - * 2.27 - * @author Robert McIntyre 2.28 - * 2.29 - */ 2.30 +// /** 2.31 +// * Handles writing video files using Xuggle. 2.32 +// * 2.33 +// * @author Robert McIntyre 2.34 +// * 2.35 +// */ 2.36 2.37 -public class XuggleVideoRecorder extends AbstractVideoRecorder{ 2.38 +// public class XuggleVideoRecorder extends AbstractVideoRecorder{ 2.39 2.40 2.41 - IMediaWriter writer; 2.42 - BufferedImage frame; 2.43 - int videoChannel = 0; 2.44 - long currentTimeStamp = 0; 2.45 - boolean videoReady = false; 2.46 +// // IMediaWriter writer; 2.47 +// // BufferedImage frame; 2.48 +// // int videoChannel = 0; 2.49 +// // long currentTimeStamp = 0; 2.50 +// // boolean videoReady = false; 2.51 2.52 2.53 - public XuggleVideoRecorder(File output) 2.54 - throws IOException {super(output);} 2.55 +// public XuggleVideoRecorder(File output) 2.56 +// throws IOException {super(output);} 2.57 2.58 - public void initVideo(){ 2.59 - this.frame = new BufferedImage( 2.60 - width, height, 2.61 - BufferedImage.TYPE_3BYTE_BGR); 2.62 - this.writer = ToolFactory.makeWriter(this.targetFileName); 2.63 - writer.addVideoStream(videoChannel, 2.64 - 0, IRational.make(fps), 2.65 - width, height); 2.66 - this.videoReady = true; 2.67 - } 2.68 +// // public void initVideo(){ 2.69 +// // this.frame = new BufferedImage( 2.70 +// // width, height, 2.71 +// // BufferedImage.TYPE_3BYTE_BGR); 2.72 +// // this.writer = ToolFactory.makeWriter(this.targetFileName); 2.73 +// // writer.addVideoStream(videoChannel, 2.74 +// // 0, IRational.make(fps), 2.75 +// // width, height); 2.76 +// // this.videoReady = true; 2.77 +// // } 2.78 2.79 - public void record(BufferedImage rawFrame) { 2.80 - if (!this.videoReady){initVideo();} 2.81 - // convert the Image into the form that Xuggle likes. 2.82 - this.frame.getGraphics().drawImage(rawFrame, 0, 0, null); 2.83 - writer.encodeVideo(videoChannel, 2.84 - frame, 2.85 - currentTimeStamp, TimeUnit.NANOSECONDS); 2.86 +// // public void record(BufferedImage rawFrame) { 2.87 +// // if (!this.videoReady){initVideo();} 2.88 +// // // convert the Image into the form that Xuggle likes. 2.89 +// // this.frame.getGraphics().drawImage(rawFrame, 0, 0, null); 2.90 +// // writer.encodeVideo(videoChannel, 2.91 +// // frame, 2.92 +// // currentTimeStamp, TimeUnit.NANOSECONDS); 2.93 2.94 - currentTimeStamp += (long) (1000000000.0 / fps); 2.95 - } 2.96 +// // currentTimeStamp += (long) (1000000000.0 / fps); 2.97 +// // } 2.98 2.99 - public void finish() { 2.100 - writer.close(); 2.101 - } 2.102 +// // public void finish() { 2.103 +// // writer.close(); 2.104 +// // } 2.105 2.106 2.107 -} 2.108 +// } 2.109 2.110