Package quicktime.std.movies.media

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

/*     */ package quicktime.std.movies.media;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.QTSession;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.std.music.MusicData;
/*     */ import quicktime.util.EndianDescriptor;
/*     */ import quicktime.util.EndianFlipSpec;
/*     */
/*     */ public final class MusicDescription extends SampleDescription
/*     */ {
/*  27 */   private static boolean apriori = QTSession.apriori();
/*     */   private static final int kNativeSize = 20;
/*     */   private static EndianDescriptor ed;
/*     */
/*     */   protected static EndianDescriptor makeED()
/*     */   {
/*  35 */     EndianDescriptor localEndianDescriptor = SampleDescription.makeED();
/*     */
/*  37 */     EndianFlipSpec localEndianFlipSpec = new EndianFlipSpec(16, 4, 1);
/*  38 */     localEndianDescriptor.addFlipSpec(localEndianFlipSpec);
/*  39 */     return localEndianDescriptor;
/*     */   }
/*     */
/*     */   public static EndianDescriptor getEndianDescriptor()
/*     */   {
/*  47 */     if (ed == null)
/*  48 */       ed = makeED();
/*  49 */     return ed;
/*     */   }
/*     */
/*     */   public MusicDescription()
/*     */     throws QTException
/*     */   {
/*  67 */     super(20, true, 1836413801);
/*     */   }
/*     */
/*     */   private MusicDescription(int paramInt) {
/*  71 */     super(paramInt, null, false);
/*     */   }
/*     */
/*     */   public Object clone()
/*     */   {
/*  76 */     return new MusicDescription(makeAndCopyHandle());
/*     */   }
/*     */
/*     */   public void setMusicFlags(int paramInt)
/*     */   {
/*  82 */     setIntAt(16, paramInt);
/*     */   }
/*     */
/*     */   public int getMusicFlags()
/*     */   {
/*  88 */     return getIntAt(16);
/*     */   }
/*     */
/*     */   public MusicData getTuneHeader()
/*     */     throws QTException
/*     */   {
/*  95 */     if (getSize() == 20) return null;
/*     */
/*  97 */     int i = getSize() - 20;
/*  98 */     MusicData localMusicData = new MusicData(i);
/*  99 */     localMusicData.lock();
/* 100 */     int j = getIntFromPointer(QTObject.ID(localMusicData), 0);
/* 101 */     BlockMove(lockAndDeref(20), j, i);
/* 102 */     if (!isLocked()) unlock();
/* 103 */     localMusicData.unlock();
/* 104 */     return localMusicData;
/*     */   }
/*     */
/*     */   public void setTuneHeader(MusicData paramMusicData)
/*     */     throws StdQTException
/*     */   {
/* 113 */     int i = paramMusicData.getSize();
/* 114 */     setSize(20 + i);
/* 115 */     paramMusicData.lock();
/* 116 */     int j = getIntFromPointer(QTObject.ID(paramMusicData), 0);
/* 117 */     BlockMove(j, lockAndDeref(20), i);
/* 118 */     if (!isLocked()) unlock();
/* 119 */     paramMusicData.unlock();
/*     */   }
/*     */
/*     */   private static native void BlockMove(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native int getIntFromPointer(int paramInt1, int paramInt2);
/*     */ }

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

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

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.