Package quicktime.std.movies.media

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

/*     */ package quicktime.std.movies.media;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.util.EndianDescriptor;
/*     */ import quicktime.util.EndianFlipSpec;
/*     */ import quicktime.util.QTHandle;
/*     */ import quicktime.util.QTHandleRef;
/*     */ import quicktime.util.QTUtils;
/*     */
/*     */ public final class SoundDescription extends SampleDescription
/*     */ {
/*  26 */   private static boolean apriori = QTSession.apriori();
/*     */   public static final int kNativeSize = 36;
/*     */   private static EndianDescriptor ed;
/*     */
/*     */   protected static EndianDescriptor makeED()
/*     */   {
/*  35 */     EndianDescriptor localEndianDescriptor = SampleDescription.makeED();
/*     */
/*  37 */     EndianFlipSpec localEndianFlipSpec1 = new EndianFlipSpec(16, 2, 2);
/*  38 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec1);
/*     */
/*  40 */     EndianFlipSpec localEndianFlipSpec2 = new EndianFlipSpec(20, 4, 1);
/*  41 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec2);
/*     */
/*  43 */     EndianFlipSpec localEndianFlipSpec3 = new EndianFlipSpec(20, 2, 4);
/*  44 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec3);
/*     */
/*  46 */     EndianFlipSpec localEndianFlipSpec4 = new EndianFlipSpec(32, 4, 1);
/*  47 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec4);
/*     */
/*  49 */     return localEndianDescriptor;
/*     */   }
/*     */
/*     */   public static EndianDescriptor getEndianDescriptor()
/*     */   {
/*  57 */     if (ed == null)
/*  58 */       ed = makeED();
/*  59 */     return ed;
/*     */   }
/*     */
/*     */   public SoundDescription(int paramInt)
/*     */     throws QTException
/*     */   {
/*  85 */     super(36, true, paramInt);
/*     */   }
/*     */
/*     */   private SoundDescription(int paramInt, Object paramObject) {
/*  89 */     super(paramInt, null, false);
/*     */   }
/*     */
/*     */   public Object clone()
/*     */   {
/*  94 */     return new SoundDescription(makeAndCopyHandle(), null);
/*     */   }
/*     */
/*     */   public void setVersion(int paramInt)
/*     */   {
/* 100 */     setShortAt(16, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getVersion()
/*     */   {
/* 106 */     return getShortAt(16);
/*     */   }
/*     */
/*     */   public void setRevLevel(int paramInt)
/*     */   {
/* 112 */     setShortAt(18, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getRevLevel()
/*     */   {
/* 118 */     return getShortAt(18);
/*     */   }
/*     */
/*     */   public void setVendor(int paramInt)
/*     */   {
/* 124 */     setIntAt(20, paramInt);
/*     */   }
/*     */
/*     */   public int getVendor()
/*     */   {
/* 130 */     return getIntAt(20);
/*     */   }
/*     */
/*     */   public void setNumberOfChannels(int paramInt)
/*     */   {
/* 136 */     setNumChannels(paramInt);
/*     */   }
/*     */
/*     */   public int getNumberOfChannels()
/*     */   {
/* 142 */     return getNumChannels();
/*     */   }
/*     */
/*     */   public void setNumChannels(int paramInt)
/*     */   {
/* 148 */     setShortAt(24, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getNumChannels()
/*     */   {
/* 154 */     return getShortAt(24);
/*     */   }
/*     */
/*     */   public void setSampleSize(int paramInt)
/*     */   {
/* 160 */     setShortAt(26, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getSampleSize()
/*     */   {
/* 166 */     return getShortAt(26);
/*     */   }
/*     */
/*     */   public void setCompressionID(int paramInt)
/*     */   {
/* 172 */     setShortAt(28, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getCompressionID()
/*     */   {
/* 178 */     return getShortAt(28);
/*     */   }
/*     */
/*     */   public void setPacketSize(int paramInt)
/*     */   {
/* 184 */     setShortAt(30, (short)paramInt);
/*     */   }
/*     */
/*     */   public int getPacketSize()
/*     */   {
/* 190 */     return getShortAt(30);
/*     */   }
/*     */
/*     */   public void setSampleRate(float paramFloat)
/*     */   {
/* 196 */     setIntAt(32, QTUtils.X2UFix(paramFloat));
/*     */   }
/*     */
/*     */   public float getSampleRate()
/*     */   {
/* 202 */     return QTUtils.UFix2X(getIntAt(32));
/*     */   }
/*     */
/*     */   public int getSampleRateRounded()
/*     */   {
/* 208 */     return (int)(QTUtils.Fix2X(getIntAt(32)) + 0.5D);
/*     */   }
/*     */
/*     */   public String toString()
/*     */   {
/* 215 */     return getClass().getName() + "[format=" + QTUtils.fromOSType(getDataFormat()) + ",numChannels=" + getNumberOfChannels() + ",sampleSize=" + getSampleSize() + ",sampleRate=" + getSampleRate() + "]";
/*     */   }
/*     */
/*     */   public void addExtension(QTHandleRef paramQTHandleRef, int paramInt)
/*     */     throws QTException
/*     */   {
/* 230 */     int i = AddSoundDescriptionExtension(_ID(), QTObject.ID(paramQTHandleRef), paramInt);
/* 231 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void removeExtension(int paramInt)
/*     */     throws QTException
/*     */   {
/* 240 */     int i = RemoveSoundDescriptionExtension(_ID(), paramInt);
/* 241 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public QTHandle getExtension(int paramInt)
/*     */     throws QTException
/*     */   {
/* 251 */     return QTHandle.fromSoundDescription(this, paramInt);
/*     */   }
/*     */
/*     */   private static native short AddSoundDescriptionExtension(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native short RemoveSoundDescriptionExtension(int paramInt1, int paramInt2);
/*     */ }

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

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

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.