Mercurial > jmeCapture
diff src/com/aurellem/capture/video/XuggleVideoRecorder.java @ 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 |
line wrap: on
line diff
1.1 --- a/src/com/aurellem/capture/video/XuggleVideoRecorder.java Thu Jul 19 12:28:55 2012 -0500 1.2 +++ b/src/com/aurellem/capture/video/XuggleVideoRecorder.java Mon Mar 10 18:54:35 2014 -0400 1.3 @@ -1,62 +1,62 @@ 1.4 -package com.aurellem.capture.video; 1.5 +// package com.aurellem.capture.video; 1.6 1.7 -import java.awt.image.BufferedImage; 1.8 -import java.io.File; 1.9 -import java.io.IOException; 1.10 -import java.util.concurrent.TimeUnit; 1.11 +// // import java.awt.image.BufferedImage; 1.12 +// // import java.io.File; 1.13 +// // import java.io.IOException; 1.14 +// // import java.util.concurrent.TimeUnit; 1.15 1.16 -import com.xuggle.mediatool.IMediaWriter; 1.17 -import com.xuggle.mediatool.ToolFactory; 1.18 -import com.xuggle.xuggler.IRational; 1.19 +// // import com.xuggle.mediatool.IMediaWriter; 1.20 +// // import com.xuggle.mediatool.ToolFactory; 1.21 +// // import com.xuggle.xuggler.IRational; 1.22 1.23 1.24 -/** 1.25 - * Handles writing video files using Xuggle. 1.26 - * 1.27 - * @author Robert McIntyre 1.28 - * 1.29 - */ 1.30 +// /** 1.31 +// * Handles writing video files using Xuggle. 1.32 +// * 1.33 +// * @author Robert McIntyre 1.34 +// * 1.35 +// */ 1.36 1.37 -public class XuggleVideoRecorder extends AbstractVideoRecorder{ 1.38 +// public class XuggleVideoRecorder extends AbstractVideoRecorder{ 1.39 1.40 1.41 - IMediaWriter writer; 1.42 - BufferedImage frame; 1.43 - int videoChannel = 0; 1.44 - long currentTimeStamp = 0; 1.45 - boolean videoReady = false; 1.46 +// // IMediaWriter writer; 1.47 +// // BufferedImage frame; 1.48 +// // int videoChannel = 0; 1.49 +// // long currentTimeStamp = 0; 1.50 +// // boolean videoReady = false; 1.51 1.52 1.53 - public XuggleVideoRecorder(File output) 1.54 - throws IOException {super(output);} 1.55 +// public XuggleVideoRecorder(File output) 1.56 +// throws IOException {super(output);} 1.57 1.58 - public void initVideo(){ 1.59 - this.frame = new BufferedImage( 1.60 - width, height, 1.61 - BufferedImage.TYPE_3BYTE_BGR); 1.62 - this.writer = ToolFactory.makeWriter(this.targetFileName); 1.63 - writer.addVideoStream(videoChannel, 1.64 - 0, IRational.make(fps), 1.65 - width, height); 1.66 - this.videoReady = true; 1.67 - } 1.68 +// // public void initVideo(){ 1.69 +// // this.frame = new BufferedImage( 1.70 +// // width, height, 1.71 +// // BufferedImage.TYPE_3BYTE_BGR); 1.72 +// // this.writer = ToolFactory.makeWriter(this.targetFileName); 1.73 +// // writer.addVideoStream(videoChannel, 1.74 +// // 0, IRational.make(fps), 1.75 +// // width, height); 1.76 +// // this.videoReady = true; 1.77 +// // } 1.78 1.79 - public void record(BufferedImage rawFrame) { 1.80 - if (!this.videoReady){initVideo();} 1.81 - // convert the Image into the form that Xuggle likes. 1.82 - this.frame.getGraphics().drawImage(rawFrame, 0, 0, null); 1.83 - writer.encodeVideo(videoChannel, 1.84 - frame, 1.85 - currentTimeStamp, TimeUnit.NANOSECONDS); 1.86 +// // public void record(BufferedImage rawFrame) { 1.87 +// // if (!this.videoReady){initVideo();} 1.88 +// // // convert the Image into the form that Xuggle likes. 1.89 +// // this.frame.getGraphics().drawImage(rawFrame, 0, 0, null); 1.90 +// // writer.encodeVideo(videoChannel, 1.91 +// // frame, 1.92 +// // currentTimeStamp, TimeUnit.NANOSECONDS); 1.93 1.94 - currentTimeStamp += (long) (1000000000.0 / fps); 1.95 - } 1.96 +// // currentTimeStamp += (long) (1000000000.0 / fps); 1.97 +// // } 1.98 1.99 - public void finish() { 1.100 - writer.close(); 1.101 - } 1.102 +// // public void finish() { 1.103 +// // writer.close(); 1.104 +// // } 1.105 1.106 1.107 -} 1.108 +// } 1.109 1.110