Package quicktime.std.movies

Source Code of quicktime.std.movies.MoviesDispatcher$AFStringHandle$AFTimeRecord

/*     */ package quicktime.std.movies;
/*     */
/*     */ import java.security.AccessController;
/*     */ import java.security.PrivilegedAction;
/*     */ import quicktime.QTCallbackManagement;
/*     */ import quicktime.qd.QDPoint;
/*     */ import quicktime.qd.QDRect;
/*     */ import quicktime.std.clocks.TimeRecord;
/*     */ import quicktime.util.QTUtils;
/*     */ import quicktime.util.StringHandle;
/*     */
/*     */ final class MoviesDispatcher
/*     */ {
/*     */   private String methodName;
/*     */   private String methodSig;
/*     */   private int procInfo;
/*     */   private boolean dontDoIdle;
/*     */   private Movie mov;
/*     */   private MovieController movCont;
/*     */   private MovieProgress mp;
/*     */   private MoviePrePreroll mppr;
/*     */   private MovieDrawingComplete mdc;
/*     */   private ActionFilter filter;
/*     */   private ExecutingWiredAction wa;
/*     */
/*     */   MoviesDispatcher(Movie paramMovie, MovieProgress paramMovieProgress)
/*     */   {
/*  24 */     this.methodName = "movieProgress";
/*  25 */     this.methodSig = "(ISSII)S";
/*  26 */     this.procInfo = 64224;
/*  27 */     this.mp = paramMovieProgress;
/*  28 */     this.mov = paramMovie;
/*     */   }
/*     */
/*     */   MoviesDispatcher(Movie paramMovie, MoviePrePreroll paramMoviePrePreroll) {
/*  32 */     this.methodName = "moviePrePrerollCompleteProc";
/*  33 */     this.methodSig = "(ISI)V";
/*  34 */     this.procInfo = 3776;
/*  35 */     this.mov = paramMovie;
/*  36 */     this.mppr = paramMoviePrePreroll;
/*     */   }
/*     */
/*     */   MoviesDispatcher(Movie paramMovie, MovieDrawingComplete paramMovieDrawingComplete) {
/*  40 */     this.methodName = "movieDrawingCompleteProc";
/*  41 */     this.methodSig = "(II)S";
/*  42 */     this.procInfo = 992;
/*  43 */     this.mov = paramMovie;
/*  44 */     this.mdc = paramMovieDrawingComplete;
/*     */   }
/*     */
/*     */   MoviesDispatcher(MovieController paramMovieController, ActionFilter paramActionFilter, boolean paramBoolean) {
/*  48 */     this.methodName = "mcFilterProc";
/*  49 */     this.methodSig = "(ISII)I";
/*  50 */     this.procInfo = 16080;
/*  51 */     this.movCont = paramMovieController;
/*  52 */     this.filter = paramActionFilter;
/*  53 */     this.dontDoIdle = (!paramBoolean);
/*     */   }
/*     */
/*     */   MoviesDispatcher(Movie paramMovie, ExecutingWiredAction paramExecutingWiredAction) {
/*  57 */     this.methodName = "executeWiredActions";
/*  58 */     this.methodSig = "(IIII)S";
/*  59 */     this.procInfo = 16352;
/*  60 */     this.mov = paramMovie;
/*  61 */     this.wa = paramExecutingWiredAction;
/*     */   }
/*     */
/*     */   private short movieProgress(int paramInt1, short paramShort1, short paramShort2, int paramInt2, int paramInt3)
/*     */   {
/*  87 */     int i = this.mp.execute(this.mov, paramShort1, paramShort2, QTUtils.Fix2X(paramInt2));
/*  88 */     if (i != 0)
/*  89 */       return (short)i;
/*  90 */     return 0;
/*     */   }
/*     */
/*     */   private void moviePrePrerollCompleteProc(int paramInt1, short paramShort, int paramInt2)
/*     */   {
/*  95 */     this.mppr.execute(this.mov, paramShort);
/*     */   }
/*     */
/*     */   private short movieDrawingCompleteProc(int paramInt1, int paramInt2)
/*     */   {
/* 100 */     return (short)this.mdc.execute(this.mov);
/*     */   }
/*     */
/*     */   public short executeWiredActions(int paramInt1, int paramInt2, int paramInt3, int paramInt4) {
/* 104 */     short s = this.wa.execute(this.mov, paramInt3, new AtomContainer(paramInt4, this, false));
/*     */
/* 106 */     return s;
/*     */   }
/*     */
/*     */   private int mcFilterProc(int paramInt1, short paramShort, int paramInt2, int paramInt3) {
/* 110 */     if ((paramShort == 1) && (this.dontDoIdle)) return 0;
/*     */
/* 112 */     boolean bool1 = false;
/*     */     Object localObject;
/*     */     AFStringHandle localAFStringHandle1;
/*     */     int[] arrayOfInt;
/*     */     int j;
/*     */     int i;
/* 113 */     switch (paramShort) {
/*     */     case 1:
/*     */     case 2:
/*     */     case 3:
/*     */     case 4:
/*     */     case 26:
/*     */     case 50:
/*     */     case 58:
/*     */     case 61:
/*     */     case 77:
/*     */     case 86:
/* 124 */       bool1 = this.filter.execute(this.movCont, paramShort);
/* 125 */       break;
/*     */     case 8:
/*     */     case 55:
/*     */     case 83:
/*     */     case 84:
/* 130 */       bool1 = this.filter.execute(this.movCont, paramShort, QTUtils.Fix2X(paramInt2));
/* 131 */       break;
/*     */     case 14:
/*     */     case 82:
/* 134 */       bool1 = this.filter.execute(this.movCont, paramShort, QTUtils.ShortFix2X((short)paramInt2));
/* 135 */       break;
/*     */     case 15:
/* 137 */       if (paramInt2 != 0)
/*     */       {
/* 139 */         localObject = new float[] { QTUtils.ShortFix2X(getShortFromPointer(paramInt2, 0)) };
/* 140 */         bool1 = this.filter.execute(this.movCont, paramShort, (float[])localObject);
/* 141 */         if (bool1)
/* 142 */           setShortInPointer(paramInt2, 0, QTUtils.X2ShortFix(localObject[0]));
/*     */       }
/* 144 */       break;
/*     */     case 42:
/* 146 */       if (paramInt2 != 0)
/*     */       {
/* 148 */         localObject = new float[] { QTUtils.Fix2X(getIntFromPointer(paramInt2, 0)) };
/* 149 */         bool1 = this.filter.execute(this.movCont, paramShort, (float[])localObject);
/* 150 */         if (bool1)
/* 151 */           setIntInPointer(paramInt2, 0, QTUtils.X2Fix(localObject[0]));
/*     */       }
/* 153 */       break;
/*     */     case 21:
/*     */     case 23:
/*     */     case 32:
/*     */     case 34:
/*     */     case 36:
/*     */     case 40:
/*     */     case 48:
/*     */     case 52:
/*     */     case 57:
/* 163 */       bool1 = this.filter.execute(this.movCont, paramShort, paramInt2 != 0);
/* 164 */       break;
/*     */     case 22:
/*     */     case 24:
/*     */     case 33:
/*     */     case 35:
/*     */     case 37:
/*     */     case 41:
/*     */     case 43:
/*     */     case 44:
/*     */     case 51:
/*     */     case 56:
/*     */     case 92:
/* 177 */       if (paramInt2 != 0)
/*     */       {
/* 179 */         localObject = new boolean[] { getByteFromPointer(paramInt2, 0) != 0 ? 1 : 0 };
/* 180 */         bool1 = this.filter.execute(this.movCont, paramShort, (boolean[])localObject);
/* 181 */         if (bool1)
/* 182 */           setByteInPointer(paramInt2, 0, (byte)(localObject[0] != 0 ? 1 : 0));
/*     */       }
/* 184 */       break;
/*     */     case 25:
/*     */     case 49:
/* 187 */       if (paramInt2 != 0)
/*     */       {
/* 189 */         localObject = new QDRect();
/* 190 */         copyPointerToArray(paramInt2, 0, ((QDRect)localObject).getRect(), 0, ((QDRect)localObject).getRect().length);
/* 191 */         bool1 = this.filter.execute(this.movCont, (QDRect)localObject);
/*     */       }
/* 193 */       break;
/*     */     case 18:
/*     */     case 38:
/*     */     case 85:
/* 197 */       bool1 = this.filter.execute(this.movCont, paramShort, paramInt2);
/* 198 */       break;
/*     */     case 39:
/*     */     case 91:
/* 201 */       if (paramInt2 != 0)
/*     */       {
/* 203 */         localObject = new int[] { getIntFromPointer(paramInt2, 0) };
/* 204 */         bool1 = this.filter.execute(this.movCont, paramShort, (int[])localObject);
/* 205 */         if (bool1) {
/* 206 */           setIntInPointer(paramInt2, 0, localObject[0]);
/*     */         }
/*     */       }
/* 209 */       break;
/*     */     case 12:
/*     */     case 29:
/*     */     case 30:
/*     */     case 53:
/*     */     case 54:
/* 215 */       if (paramInt2 != 0)
/*     */       {
/* 217 */         bool1 = this.filter.execute(this.movCont, paramShort, new AFTimeRecord(paramInt2, this));
/* 218 */       }break;
/*     */     case 63:
/*     */     case 64:
/* 221 */       if (paramInt2 != 0)
/*     */       {
/* 223 */         bool1 = this.filter.execute(this.movCont, paramShort, new ResolvedQTEventSpec(paramInt2, this));
/* 224 */       }break;
/*     */     case 59:
/*     */     case 76:
/* 227 */       if (paramInt2 != 0)
/*     */       {
/* 229 */         boolean bool2 = false;
/* 230 */         localAFStringHandle1 = new AFStringHandle(paramInt2, this, bool2, null);
/* 231 */         bool1 = this.filter.execute(this.movCont, paramShort, localAFStringHandle1);
/*     */       }
/* 233 */       break;
/*     */     case 68:
/* 235 */       if (paramInt2 != 0)
/*     */       {
/* 237 */         arrayOfInt = new int[] { 0 };
/* 238 */         PtrToHand(paramInt2, arrayOfInt, getByteFromPointer(paramInt2, 0) + 1);
/* 239 */         localAFStringHandle1 = new AFStringHandle(arrayOfInt[0], null, true, null);
/* 240 */         bool1 = this.filter.execute(this.movCont, paramShort, localAFStringHandle1);
/*     */       }
/* 242 */       break;
/*     */     case 69:
/* 244 */       if (paramInt2 != 0)
/*     */       {
/* 246 */         arrayOfInt = new int[] { 0 };
/* 247 */         j = 0;
/* 248 */         int k = getIntFromPointer(paramInt2, 4);
/*     */
/* 250 */         if (k != 0)
/*     */         {
/* 252 */           while (getByteFromPointer(k, j++) != 0);
/* 254 */           PtrToHand(k, arrayOfInt, j);
/* 255 */           AFStringHandle localAFStringHandle2 = new AFStringHandle(arrayOfInt[0], null, false, null);
/* 256 */           bool1 = this.filter.execute(this.movCont, paramShort, getIntFromPointer(paramInt2, 0), localAFStringHandle2);
/*     */         }
/*     */       }
/* 258 */       break;
/*     */     case 67:
/* 261 */       bool1 = this.filter.execute(this.movCont, paramShort, new QDPoint(paramInt2 & 0xFFFF, paramInt2 >>> 16));
/* 262 */       break;
/*     */     case 72:
/* 264 */       if (paramInt2 != 0)
/*     */       {
/* 266 */         i = getIntFromPointer(paramInt2, 4);
/* 267 */         bool1 = this.filter.execute(this.movCont, paramShort, new AtomContainer(getIntFromPointer(paramInt2, 0), this, false), i == 0 ? null : new Atom(i));
/*     */       }
/* 269 */       break;
/*     */     case 70:
/* 271 */       if (paramInt2 != 0)
/*     */       {
/* 273 */         bool1 = this.filter.execute(this.movCont, paramShort, new QTGetExternalMovieRecord(paramInt2, this));
/*     */       }
/* 275 */       break;
/*     */     case 71:
/* 277 */       if (paramInt2 != 0)
/*     */       {
/* 279 */         i = getIntFromPointer(paramInt2, 0);
/* 280 */         j = getByteFromPointer(i, 0);
/*     */
/* 282 */         byte[] arrayOfByte = new byte[j];
/* 283 */         copyPointerToArray(i, 1, arrayOfByte, 0, j);
/* 284 */         bool1 = this.filter.execute(this.movCont, paramShort, new AFTimeRecord(paramInt2 + 4, this), new String(arrayOfByte)); } break;
/*     */     case 5:
/*     */     case 6:
/*     */     case 7:
/*     */     case 9:
/*     */     case 10:
/*     */     case 11:
/*     */     case 13:
/*     */     case 16:
/*     */     case 17:
/*     */     case 19:
/*     */     case 20:
/*     */     case 27:
/*     */     case 28:
/*     */     case 31:
/*     */     case 45:
/*     */     case 46:
/*     */     case 47:
/*     */     case 60:
/*     */     case 62:
/*     */     case 65:
/*     */     case 66:
/*     */     case 73:
/*     */     case 74:
/*     */     case 75:
/*     */     case 78:
/*     */     case 79:
/*     */     case 80:
/*     */     case 81:
/*     */     case 87:
/*     */     case 88:
/*     */     case 89:
/* 288 */     case 90: } return bool1 ? 1 : 0;
/*     */   }
/*     */
/*     */   int ID()
/*     */   {
/* 293 */     MoviesDispatcher localMoviesDispatcher = this;
/* 294 */     AccessController.doPrivileged(new PrivilegedAction() { private final Object val$target;
/*     */
/* 296 */       public Object run() { QTCallbackManagement.registerForCallback(this.val$target, MoviesDispatcher.this.methodName, MoviesDispatcher.this.methodSig);
/* 297 */         return null;
/*     */       }
/*     */     });
/* 300 */     return hashCode();
/*     */   }
/*     */
/*     */   void cleanupMethodClosure() {
/* 304 */     MoviesDispatcher localMoviesDispatcher = this;
/* 305 */     AccessController.doPrivileged(new PrivilegedAction() { private final Object val$target;
/*     */
/* 307 */       public Object run() { QTCallbackManagement.unregisterForCallback(this.val$target);
/* 308 */         return null; }  } ); }
/*     */   private static native short getShortFromPointer(int paramInt1, int paramInt2);
/*     */
/*     */   private static native void setShortInPointer(int paramInt1, int paramInt2, short paramShort);
/*     */
/*     */   private static native void setIntInPointer(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native int getIntFromPointer(int paramInt1, int paramInt2);
/*     */
/*     */   private static native byte getByteFromPointer(int paramInt1, int paramInt2);
/*     */
/*     */   private static native void setByteInPointer(int paramInt1, int paramInt2, byte paramByte);
/*     */
/*     */   private static native void copyPointerToArray(int paramInt1, int paramInt2, byte[] paramArrayOfByte, int paramInt3, int paramInt4);
/*     */
/*     */   private static native short PtrToHand(int paramInt1, int[] paramArrayOfInt, int paramInt2);
/*     */
/* 322 */   static class AFStringHandle extends StringHandle { private AFStringHandle(int paramInt, Object paramObject, boolean paramBoolean) { super(paramObject, paramBoolean ? 2 : 1); }
/*     */
/*     */
/*     */     AFStringHandle(int paramInt, Object paramObject, boolean paramBoolean, MoviesDispatcher.1 param1)
/*     */     {
/* 320 */       this(paramInt, paramObject, paramBoolean);
/*     */     }
/*     */   }
/*     */
/*     */   static class AFTimeRecord extends TimeRecord
/*     */   {
/*     */     AFTimeRecord(int paramInt, Object paramObject)
/*     */     {
/* 316 */       super(paramObject);
/*     */     }
/*     */   }
/*     */ }

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

Related Classes of quicktime.std.movies.MoviesDispatcher$AFStringHandle$AFTimeRecord

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.