/* */ package quicktime.std.image;
/* */
/* */ import quicktime.QTException;
/* */ import quicktime.QTObject;
/* */ import quicktime.QTSession;
/* */ import quicktime.jdirect.QTNative;
/* */ import quicktime.qd.ColorTable;
/* */ import quicktime.qd.QDException;
/* */ import quicktime.qd.QDGraphics;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.std.StdQTException;
/* */ import quicktime.util.ByteEncodedImage;
/* */ import quicktime.util.EncodedImage;
/* */ import quicktime.util.IntEncodedImage;
/* */ import quicktime.util.RawEncodedImage;
/* */
/* */ public final class CSequence extends CDSequence
/* */ {
/* 28 */ private static boolean apriori = QTSession.apriori();
/* */
/* 143 */ private static final int[] savedPort = { 0 };
/* 144 */ private static final int[] savedDevice = { 0 };
/* */ private static ImageDescription csImageDescription;
/* */
/* */ public CSequence(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, CodecComponent paramCodecComponent, int paramInt2, int paramInt3, int paramInt4, int paramInt5)
/* */ throws QTException
/* */ {
/* 54 */ this(paramQDGraphics, paramQDRect, 0, paramInt1, paramCodecComponent, paramInt2, paramInt3, paramInt4, null, paramInt5);
/* */ }
/* */
/* */ public CSequence(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, CodecComponent paramCodecComponent, int paramInt3, int paramInt4, int paramInt5, ColorTable paramColorTable, int paramInt6)
/* */ throws QTException
/* */ {
/* 83 */ super(begin(paramQDGraphics, paramQDRect, paramInt1, paramInt2, paramCodecComponent, paramInt3, paramInt4, paramInt5, paramColorTable, paramInt6), paramQDGraphics);
/* 84 */ this.mImageDescription = csImageDescription;
/* 85 */ csImageDescription = null;
/* */ }
/* */
/* */ private static int begin(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt1, int paramInt2, CodecComponent paramCodecComponent, int paramInt3, int paramInt4, int paramInt5, ColorTable paramColorTable, int paramInt6)
/* */ throws QTException
/* */ {
/* 112 */ int i = 0;
/* 113 */ int[] arrayOfInt = { 0 };
/* */
/* 115 */ if ((paramQDGraphics == null) || (paramQDRect == null))
/* 116 */ throw new QTException(-50);
/* 117 */ synchronized (QTNative.globalsLock) {
/* 118 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 119 */ GetGWorld(savedPort, savedDevice);
/* 120 */ SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 121 */ csImageDescription = new ImageDescription(0);
/* 122 */ i = CompressSequenceBegin(arrayOfInt, QTObject.ID(paramQDGraphics.getPixMap()), 0, paramQDRect.getRect(), null, (short)paramInt1, paramInt2, QTObject.ID(paramCodecComponent), paramInt3, paramInt4, paramInt5, QTObject.ID(paramColorTable), (short)paramInt6, QTObject.ID(csImageDescription));
/* */
/* 136 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 137 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 139 */ StdQTException.checkError(i);
/* 140 */ return arrayOfInt[0];
/* */ }
/* */
/* */ private void setFlushProc(Object paramObject, int paramInt)
/* */ {
/* */ }
/* */
/* */ public CompressedFrameInfo compressFrame(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt, EncodedImage paramEncodedImage)
/* */ throws StdQTException, QDException
/* */ {
/* 183 */ if ((paramEncodedImage instanceof RawEncodedImage))
/* 184 */ return compressFrame(paramQDGraphics, paramQDRect, paramInt, (RawEncodedImage)paramEncodedImage);
/* 185 */ if ((paramEncodedImage instanceof IntEncodedImage))
/* 186 */ return compressFrame(paramQDGraphics, paramQDRect, paramInt, (IntEncodedImage)paramEncodedImage);
/* 187 */ if ((paramEncodedImage instanceof ByteEncodedImage)) {
/* 188 */ return compressFrame(paramQDGraphics, paramQDRect, paramInt, (ByteEncodedImage)paramEncodedImage);
/* */ }
/* 190 */ throw new StdQTException(-50);
/* */ }
/* */
/* */ public CompressedFrameInfo compressFrame(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt, IntEncodedImage paramIntEncodedImage)
/* */ throws StdQTException
/* */ {
/* 212 */ int[] arrayOfInt = new int[1];
/* 213 */ byte[] arrayOfByte = new byte[1];
/* */
/* 215 */ int i = 0;
/* 216 */ if ((paramQDGraphics == null) || (paramQDRect == null)) {
/* 217 */ throw new StdQTException(-50);
/* */ }
/* 219 */ synchronized (QTNative.globalsLock) {
/* 220 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 221 */ GetGWorld(savedPort, savedDevice);
/* 222 */ SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 223 */ i = CompressSequenceFrame(_ID(), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), (short)paramInt, paramIntEncodedImage.getInts(), arrayOfInt, arrayOfByte, 0);
/* */
/* 231 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 232 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 234 */ StdQTException.checkError(i);
/* */
/* 236 */ return new CompressedFrameInfo(arrayOfInt[0], arrayOfByte[0]);
/* */ }
/* */
/* */ public CompressedFrameInfo compressFrame(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt, ByteEncodedImage paramByteEncodedImage)
/* */ throws StdQTException
/* */ {
/* 258 */ int[] arrayOfInt = new int[1];
/* 259 */ byte[] arrayOfByte = new byte[1];
/* */
/* 261 */ int i = 0;
/* 262 */ if ((paramQDGraphics == null) || (paramQDRect == null)) {
/* 263 */ throw new StdQTException(-50);
/* */ }
/* 265 */ synchronized (QTNative.globalsLock) {
/* 266 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 267 */ GetGWorld(savedPort, savedDevice);
/* 268 */ SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 269 */ i = CompressSequenceFrame(_ID(), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), (short)paramInt, paramByteEncodedImage.getBytes(), arrayOfInt, arrayOfByte, 0);
/* */
/* 277 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 278 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 280 */ StdQTException.checkError(i);
/* */
/* 282 */ return new CompressedFrameInfo(arrayOfInt[0], arrayOfByte[0]);
/* */ }
/* */
/* */ public CompressedFrameInfo compressFrame(QDGraphics paramQDGraphics, QDRect paramQDRect, int paramInt, RawEncodedImage paramRawEncodedImage)
/* */ throws StdQTException
/* */ {
/* 304 */ int[] arrayOfInt = new int[1];
/* 305 */ byte[] arrayOfByte = new byte[1];
/* 306 */ int i = 0;
/* */
/* 308 */ if ((paramQDGraphics == null) || (paramQDRect == null)) {
/* 309 */ throw new StdQTException(-50);
/* */ }
/* 311 */ synchronized (QTNative.globalsLock) {
/* 312 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 313 */ GetGWorld(savedPort, savedDevice);
/* 314 */ SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 315 */ i = CompressSequenceFrame(_ID(), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect.getRect(), (short)paramInt, QTObject.ID(paramRawEncodedImage), arrayOfInt, arrayOfByte, 0);
/* */
/* 323 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 324 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 326 */ StdQTException.checkError(i);
/* */
/* 328 */ return new CompressedFrameInfo(arrayOfInt[0], arrayOfByte[0]);
/* */ }
/* */
/* */ public int getMaxCompressionSize(QDGraphics paramQDGraphics)
/* */ throws StdQTException
/* */ {
/* 341 */ int[] arrayOfInt = new int[1];
/* 342 */ int i = 0;
/* */
/* 344 */ if (paramQDGraphics == null)
/* 345 */ throw new StdQTException(-50);
/* 346 */ synchronized (QTNative.globalsLock) {
/* 347 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 348 */ GetGWorld(savedPort, savedDevice);
/* 349 */ SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 350 */ i = GetCSequenceMaxCompressionSize(_ID(), QTObject.ID(paramQDGraphics.getPixMap()), arrayOfInt);
/* */
/* 353 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 354 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 356 */ StdQTException.checkError(i);
/* 357 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public void setQuality(int paramInt1, int paramInt2)
/* */ throws StdQTException
/* */ {
/* 369 */ StdQTException.checkError(SetCSequenceQuality(_ID(), paramInt1, paramInt2));
/* */ }
/* */
/* */ public void setKeyFrameRate(int paramInt)
/* */ throws StdQTException
/* */ {
/* 382 */ StdQTException.checkError(SetCSequenceKeyFrameRate(_ID(), paramInt));
/* */ }
/* */
/* */ public int getKeyFrameRate()
/* */ throws StdQTException
/* */ {
/* 394 */ int[] arrayOfInt = new int[1];
/* 395 */ StdQTException.checkError(GetCSequenceKeyFrameRate(_ID(), arrayOfInt));
/* */
/* 397 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public void setFrameNumber(int paramInt)
/* */ throws StdQTException
/* */ {
/* 409 */ StdQTException.checkError(SetCSequenceFrameNumber(_ID(), paramInt));
/* */ }
/* */
/* */ public int getFrameNumber()
/* */ throws StdQTException
/* */ {
/* 421 */ int[] arrayOfInt = new int[1];
/* 422 */ StdQTException.checkError(GetCSequenceFrameNumber(_ID(), arrayOfInt));
/* 423 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public void setPrev(QDGraphics paramQDGraphics, QDRect paramQDRect)
/* */ throws StdQTException
/* */ {
/* 436 */ int i = 0;
/* 437 */ if (paramQDGraphics == null) {
/* 438 */ throw new StdQTException(-50);
/* */ }
/* 440 */ synchronized (QTNative.globalsLock) {
/* 441 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 442 */ GetGWorld(savedPort, savedDevice);
/* 443 */ SetGWorld(QTObject.ID(paramQDGraphics), 0);
/* 444 */ i = SetCSequencePrev(_ID(), QTObject.ID(paramQDGraphics.getPixMap()), paramQDRect != null ? paramQDRect.getRect() : null);
/* */
/* 447 */ if ((QTSession.isCurrentOS(1)) || (QTSession.isCurrentOS(4)))
/* 448 */ SetGWorld(savedPort[0], savedDevice[0]);
/* */ }
/* 450 */ StdQTException.checkError(i);
/* */ }
/* */
/* */ public QDGraphics prevBuffer()
/* */ throws StdQTException
/* */ {
/* 460 */ return QDGraphics.fromCSequence(this);
/* */ }
/* */
/* */ public void setDataRateParams(DataRateParams paramDataRateParams)
/* */ throws StdQTException
/* */ {
/* 473 */ StdQTException.checkError(SetCSequenceDataRateParams(_ID(), paramDataRateParams.getBytes()));
/* */ }
/* */
/* */ public DataRateParams getDataRateParams()
/* */ throws StdQTException
/* */ {
/* 486 */ DataRateParams localDataRateParams = new DataRateParams();
/* 487 */ StdQTException.checkError(GetCSequenceDataRateParams(_ID(), localDataRateParams.getBytes()));
/* */
/* 489 */ return localDataRateParams;
/* */ }
/* */
/* */ public void setPreferredPacketSize(int paramInt)
/* */ throws StdQTException
/* */ {
/* 500 */ StdQTException.checkError(SetCSequencePreferredPacketSize(_ID(), paramInt));
/* */ }
/* */
/* */ private static native short CompressSequenceBegin(int[] paramArrayOfInt, int paramInt1, int paramInt2, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, short paramShort1, int paramInt3, int paramInt4, int paramInt5, int paramInt6, int paramInt7, int paramInt8, short paramShort2, int paramInt9);
/* */
/* */ private static native short CompressSequenceFrame(int paramInt1, int paramInt2, byte[] paramArrayOfByte1, short paramShort, byte[] paramArrayOfByte2, int[] paramArrayOfInt, byte[] paramArrayOfByte3, int paramInt3);
/* */
/* */ private static native short CompressSequenceFrame(int paramInt1, int paramInt2, byte[] paramArrayOfByte1, short paramShort, int paramInt3, int[] paramArrayOfInt, byte[] paramArrayOfByte2, int paramInt4);
/* */
/* */ private static native short CompressSequenceFrame(int paramInt1, int paramInt2, byte[] paramArrayOfByte1, short paramShort, int[] paramArrayOfInt1, int[] paramArrayOfInt2, byte[] paramArrayOfByte2, int paramInt3);
/* */
/* */ private static native short GetCSequenceMaxCompressionSize(int paramInt1, int paramInt2, int[] paramArrayOfInt);
/* */
/* */ private static native short SetCSequenceQuality(int paramInt1, int paramInt2, int paramInt3);
/* */
/* */ private static native short SetCSequenceKeyFrameRate(int paramInt1, int paramInt2);
/* */
/* */ private static native short GetCSequenceKeyFrameRate(int paramInt, int[] paramArrayOfInt);
/* */
/* */ private static native short SetCSequenceFrameNumber(int paramInt1, int paramInt2);
/* */
/* */ private static native short GetCSequenceFrameNumber(int paramInt, int[] paramArrayOfInt);
/* */
/* */ private static native short SetCSequencePrev(int paramInt1, int paramInt2, byte[] paramArrayOfByte);
/* */
/* */ private static native short SetCSequenceDataRateParams(int paramInt, byte[] paramArrayOfByte);
/* */
/* */ private static native short GetCSequenceDataRateParams(int paramInt, byte[] paramArrayOfByte);
/* */
/* */ private static native short SetCSequencePreferredPacketSize(int paramInt1, int paramInt2);
/* */
/* */ private static native void SetGWorld(int paramInt1, int paramInt2);
/* */
/* */ private static native void GetGWorld(int[] paramArrayOfInt1, int[] paramArrayOfInt2);
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.std.image.CSequence
* JD-Core Version: 0.6.2
*/