Package quicktime.app.image

Source Code of quicktime.app.image.CSequenceToMemory

/*     */ package quicktime.app.image;
/*     */
/*     */ import java.util.Vector;
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTRuntimeException;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.qd.ColorTable;
/*     */ import quicktime.qd.QDGraphics;
/*     */ import quicktime.qd.QDRect;
/*     */ import quicktime.std.image.CSequence;
/*     */ import quicktime.std.image.CodecComponent;
/*     */ import quicktime.std.image.CompressedFrameInfo;
/*     */ import quicktime.std.image.ImageDescription;
/*     */ import quicktime.util.RawEncodedImage;
/*     */
/*     */ /** @deprecated */
/*     */ public class CSequenceToMemory
/*     */ {
/*     */   private Vector frames;
/*     */   private CSequence seq;
/*     */
/*     */   /** @deprecated */
/*     */   public CSequenceToMemory(int paramInt)
/*     */   {
/*  51 */     this.frames = new Vector(paramInt);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public CSequenceToMemory(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, CodecComponent paramCodecComponent, int paramInt3, int paramInt4, int paramInt5, ColorTable paramColorTable, int paramInt6)
/*     */     throws QTException
/*     */   {
/*  79 */     this.seq = new CSequence(paramQDGraphics, paramQDRect, paramInt1, paramInt2, paramCodecComponent, paramInt3, paramInt4, paramInt5, paramColorTable, paramInt6);
/*     */
/*  81 */     this.frames = new Vector(16);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   Vector getFrames()
/*     */   {
/*  91 */     return this.frames;
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public void begin(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, CodecComponent paramCodecComponent, int paramInt3, int paramInt4, int paramInt5, ColorTable paramColorTable, int paramInt6)
/*     */     throws QTException
/*     */   {
/* 118 */     if (this.frames != null) this.frames.removeAllElements();
/*     */
/* 120 */     this.seq = new CSequence(paramQDGraphics, paramQDRect, paramInt1, paramInt2, paramCodecComponent, paramInt3, paramInt4, paramInt5, paramColorTable, paramInt6);
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public int compressFrame(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt)
/*     */     throws QTException
/*     */   {
/* 149 */     RawEncodedImage localRawEncodedImage = new RawEncodedImage(this.seq.getMaxCompressionSize(paramQDGraphics), true);
/*     */
/* 151 */     CompressedFrameInfo localCompressedFrameInfo = this.seq.compressFrame(paramQDGraphics, paramQDRect, paramInt, localRawEncodedImage);
/*     */
/* 153 */     localRawEncodedImage.setSize(localCompressedFrameInfo.getDataSize());
/*     */     try
/*     */     {
/* 160 */       int i = this.seq.getFrameNumber() - 1;
/*     */
/* 162 */       if (i < this.frames.size()) {
/* 163 */         this.frames.setElementAt(localRawEncodedImage, i);
/*     */       }
/* 165 */       else if (i > this.frames.size()) {
/* 166 */         this.frames.setSize(i);
/* 167 */         this.frames.setElementAt(localRawEncodedImage, i);
/*     */       }
/*     */       else {
/* 170 */         this.frames.addElement(localRawEncodedImage);
/*     */       }
/*     */     } catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
/* 173 */       throw new QTException(getClass().getName() + ": Unable to grow internal Vector object.");
/*     */     }
/*     */
/* 176 */     return localCompressedFrameInfo.getSimilarity();
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public ImageDescription getDescription()
/*     */     throws QTException
/*     */   {
/* 185 */     return this.seq.getDescription();
/*     */   }
/*     */
/*     */   /** @deprecated */
/*     */   public CSequence getSequence()
/*     */   {
/* 193 */     return this.seq;
/*     */   }
/*     */
/*     */   static
/*     */   {
/*  37 */     if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/*  38 */       throw new QTRuntimeException("Unsupported on Mac OS X and Java 1.4 and higher.");
/*     */   }
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.app.image.CSequenceToMemory
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.app.image.CSequenceToMemory

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.