Package quicktime.std.sg

Source Code of quicktime.std.sg.SGOutput

/*     */ package quicktime.std.sg;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.std.movies.media.DataRef;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public final class SGOutput extends QTObject
/*     */ {
/*  36 */   private static boolean apriori = QTSession.apriori();
/*     */   private SequenceGrabber owner;
/*     */
/*     */   public SGOutput(SequenceGrabber paramSequenceGrabber, DataRef paramDataRef, int paramInt)
/*     */     throws StdQTException
/*     */   {
/*  52 */     super(allocate(paramSequenceGrabber, QTObject.ID(paramDataRef), paramDataRef.getType(), paramInt), paramSequenceGrabber);
/*  53 */     setOwner(paramSequenceGrabber);
/*     */   }
/*     */
/*     */   SGOutput(SequenceGrabber paramSequenceGrabber, int paramInt1, int paramInt2, int paramInt3) throws StdQTException {
/*  57 */     super(allocate(paramSequenceGrabber, paramInt1, paramInt2, paramInt3), paramSequenceGrabber);
/*  58 */     setOwner(paramSequenceGrabber);
/*     */   }
/*     */
/*     */   SGOutput(int paramInt, SequenceGrabber paramSequenceGrabber) throws StdQTException {
/*  62 */     super(paramInt, paramSequenceGrabber);
/*  63 */     setOwner(paramSequenceGrabber);
/*     */   }
/*     */
/*     */   private static int allocate(SequenceGrabber paramSequenceGrabber, int paramInt1, int paramInt2, int paramInt3) throws StdQTException {
/*  67 */     int[] arrayOfInt = { 0 };
/*  68 */     int i = SGNewOutput(QTObject.ID(paramSequenceGrabber), paramInt1, paramInt2, paramInt3, arrayOfInt);
/*  69 */     StdQTException.checkError(i);
/*  70 */     return arrayOfInt[0];
/*     */   }
/*     */
/*     */   private void setOwner(SequenceGrabber paramSequenceGrabber)
/*     */     throws StdQTException
/*     */   {
/*  78 */     if (paramSequenceGrabber == null) throw new StdQTException(-50);
/*  79 */     this.owner = paramSequenceGrabber;
/*     */   }
/*     */
/*     */   public void disposeQTObject()
/*     */     throws QTException
/*     */   {
/*  88 */     if (!this.owner.isValid())
/*  89 */       return;
/*  90 */     int i = SGDisposeOutput(QTObject.ID(this.owner), _ID());
/*  91 */     StdQTException.checkError(i);
/*  92 */     super.disposeQTObject();
/*     */   }
/*     */
/*     */   public void setMaximumOffset(long paramLong)
/*     */     throws StdQTException
/*     */   {
/* 100 */     byte[] arrayOfByte = new byte[8];
/* 101 */     setLongInArray(arrayOfByte, 0, paramLong);
/* 102 */     int i = SGSetOutputMaximumOffset(QTObject.ID(this.owner), _ID(), arrayOfByte);
/* 103 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public long getMaximumOffset()
/*     */     throws StdQTException
/*     */   {
/* 111 */     byte[] arrayOfByte = new byte[8];
/*     */
/* 113 */     int i = SGGetOutputMaximumOffset(QTObject.ID(this.owner), _ID(), arrayOfByte);
/* 114 */     StdQTException.checkError(i);
/*     */
/* 116 */     return getLongFromArray(arrayOfByte, 0);
/*     */   }
/*     */
/*     */   public void setOutputFlags(int paramInt)
/*     */     throws StdQTException
/*     */   {
/* 124 */     int i = SGSetOutputFlags(QTObject.ID(this.owner), _ID(), paramInt);
/* 125 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void setChannel(SGChannel paramSGChannel)
/*     */     throws StdQTException
/*     */   {
/* 134 */     int i = SGSetChannelOutput(QTObject.ID(this.owner), QTObject.ID(paramSGChannel), _ID());
/* 135 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public long getDataStorageSpaceRemaining()
/*     */     throws StdQTException
/*     */   {
/* 143 */     int[] arrayOfInt = { 0 };
/* 144 */     int i = SGGetDataOutputStorageSpaceRemaining(QTObject.ID(this.owner), _ID(), arrayOfInt);
/* 145 */     StdQTException.checkError(i);
/* 146 */     return QTUtils.UInt2Long(arrayOfInt[0]);
/*     */   }
/*     */
/*     */   public SGOutput getNextOutput()
/*     */     throws StdQTException
/*     */   {
/* 154 */     int[] arrayOfInt = { 0 };
/*     */
/* 156 */     int i = SGGetOutputNextOutput(QTObject.ID(this.owner), _ID(), arrayOfInt);
/* 157 */     StdQTException.checkError(i);
/* 158 */     return new SGOutput(arrayOfInt[0], this.owner);
/*     */   }
/*     */
/*     */   public void setNextOutput(SGOutput paramSGOutput)
/*     */     throws StdQTException
/*     */   {
/* 166 */     int i = SGSetOutputNextOutput(QTObject.ID(this.owner), _ID(), QTObject.ID(paramSGOutput));
/* 167 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public DataRef getDataReference()
/*     */     throws StdQTException
/*     */   {
/* 176 */     return DataRef.fromSGOutput(this.owner, this);
/*     */   }
/*     */
/*     */   private static native int SGNewOutput(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int[] paramArrayOfInt);
/*     */
/*     */   private static native int SGDisposeOutput(int paramInt1, int paramInt2);
/*     */
/*     */   private static native int SGSetOutputMaximumOffset(int paramInt1, int paramInt2, byte[] paramArrayOfByte);
/*     */
/*     */   private static native int SGGetOutputMaximumOffset(int paramInt1, int paramInt2, byte[] paramArrayOfByte);
/*     */
/*     */   private static native int SGSetOutputFlags(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native int SGSetChannelOutput(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native int SGGetDataOutputStorageSpaceRemaining(int paramInt1, int paramInt2, int[] paramArrayOfInt);
/*     */
/*     */   private static native int SGGetOutputNextOutput(int paramInt1, int paramInt2, int[] paramArrayOfInt);
/*     */
/*     */   private static native int SGSetOutputNextOutput(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native void setLongInArray(byte[] paramArrayOfByte, int paramInt, long paramLong);
/*     */
/*     */   private static native long getLongFromArray(byte[] paramArrayOfByte, int paramInt);
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.std.sg.SGOutput
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.std.sg.SGOutput

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.