Package quicktime.std.movies.media

Source Code of quicktime.std.movies.media.SampleDescription

/*     */ package quicktime.std.movies.media;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.std.qtcomponents.MovieImporter;
/*     */ import quicktime.util.EndianDescriptor;
/*     */ import quicktime.util.EndianFlipSpec;
/*     */ import quicktime.util.QTHandleRef;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public class SampleDescription extends QTHandleRef
/*     */   implements Cloneable
/*     */ {
/*     */   public static final int kNativeSize = 16;
/*     */   private static EndianDescriptor ed;
/*     */
/*     */   protected static EndianDescriptor makeED()
/*     */   {
/*  30 */     EndianDescriptor localEndianDescriptor = new EndianDescriptor(0);
/*     */
/*  32 */     EndianFlipSpec localEndianFlipSpec1 = new EndianFlipSpec(0, 4, 3);
/*  33 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec1);
/*     */
/*  35 */     EndianFlipSpec localEndianFlipSpec2 = new EndianFlipSpec(12, 2, 2);
/*  36 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec2);
/*  37 */     return localEndianDescriptor;
/*     */   }
/*     */
/*     */   public static EndianDescriptor getEndianDescriptor() {
/*  41 */     if (ed == null)
/*  42 */       ed = makeED();
/*  43 */     return ed;
/*     */   }
/*     */
/*     */   public static SampleDescription fromMovieImporter(MovieImporter paramMovieImporter)
/*     */     throws StdQTException
/*     */   {
/*  63 */     int[] arrayOfInt1 = new int[1];
/*  64 */     int[] arrayOfInt2 = new int[1];
/*  65 */     int i = MovieImportGetSampleDescription(QTObject.ID(paramMovieImporter), arrayOfInt1, arrayOfInt2);
/*  66 */     StdQTException.checkError(i);
/*  67 */     return new SampleDescription(arrayOfInt1[0], paramMovieImporter, false);
/*     */   }
/*     */
/*     */   public SampleDescription(int paramInt)
/*     */     throws QTException
/*     */   {
/*  74 */     this(16, true, paramInt);
/*     */   }
/*     */
/*     */   protected SampleDescription(int paramInt, Object paramObject, boolean paramBoolean)
/*     */   {
/*  82 */     super(paramInt, paramObject, paramBoolean);
/*     */   }
/*     */
/*     */   protected SampleDescription(int paramInt1, boolean paramBoolean, int paramInt2)
/*     */     throws QTException
/*     */   {
/*  92 */     super(paramInt1, true);
/*  93 */     setIntAt(0, paramInt1);
/*  94 */     setDataFormat(paramInt2);
/*     */   }
/*     */
/*     */   public int getSize()
/*     */   {
/* 102 */     return getIntAt(0);
/*     */   }
/*     */
/*     */   public void setSize(int paramInt)
/*     */     throws StdQTException
/*     */   {
/* 109 */     boolean bool = isLocked();
/* 110 */     unlock();
/* 111 */     SetHandleSize(_ID(), paramInt);
/* 112 */     StdQTException.checkError(MemError());
/* 113 */     setIntAt(0, paramInt);
/* 114 */     if (bool) lock();
/*     */   }
/*     */
/*     */   public int getDataFormat()
/*     */   {
/* 121 */     return getIntAt(4);
/*     */   }
/*     */
/*     */   public void setDataFormat(int paramInt)
/*     */   {
/* 127 */     setIntAt(4, paramInt);
/*     */   }
/*     */
/*     */   public int getDataRefIndex()
/*     */   {
/* 133 */     return getShortAt(14);
/*     */   }
/*     */
/*     */   public void setDataRefIndex(int paramInt)
/*     */   {
/* 139 */     setShortAt(14, (short)paramInt);
/*     */   }
/*     */   public Object clone() {
/* 142 */     return new SampleDescription(makeAndCopyHandle(), null, false);
/*     */   }
/*     */
/*     */   public String toString()
/*     */   {
/* 149 */     return getClass().getName() + "[format=" + QTUtils.fromOSType(getDataFormat()) + "]";
/*     */   }
/*     */
/*     */   private static native int MovieImportGetSampleDescription(int paramInt, int[] paramArrayOfInt1, int[] paramArrayOfInt2);
/*     */
/*     */   private static native void SetHandleSize(int paramInt1, int paramInt2);
/*     */
/*     */   private static native short MemError();
/*     */ }

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

Related Classes of quicktime.std.movies.media.SampleDescription

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.