/* */ package quicktime.streaming;
/* */
/* */ import quicktime.QTException;
/* */ import quicktime.QTObject;
/* */ import quicktime.QTSession;
/* */ import quicktime.std.comp.Component;
/* */ import quicktime.std.comp.ComponentDescription;
/* */ import quicktime.std.comp.ComponentIdentifier;
/* */ import quicktime.util.QTPointer;
/* */
/* */ public class Sourcer extends Component
/* */ {
/* */ Sourcer(int paramInt)
/* */ throws QTException
/* */ {
/* 38 */ super(paramInt);
/* 39 */ initialize(null);
/* */ }
/* */
/* */ public Sourcer(ComponentIdentifier paramComponentIdentifier)
/* */ throws QTException
/* */ {
/* 47 */ super(paramComponentIdentifier);
/* 48 */ initialize(null);
/* */ }
/* */
/* */ public Sourcer(int paramInt1, int paramInt2, int paramInt3)
/* */ throws QTException
/* */ {
/* 58 */ super(allocate(paramInt1, paramInt2, paramInt3));
/* 59 */ initialize(null);
/* */ }
/* */
/* */ public Sourcer(int paramInt1, int paramInt2, int paramInt3, SourcerInitParams paramSourcerInitParams)
/* */ throws QTException
/* */ {
/* 70 */ super(allocate(paramInt1, paramInt2, paramInt3));
/* 71 */ initialize(paramSourcerInitParams);
/* */ }
/* */
/* */ private static int allocate(int paramInt1, int paramInt2, int paramInt3) throws QTException {
/* 75 */ ComponentDescription localComponentDescription = new ComponentDescription(paramInt1);
/* 76 */ localComponentDescription.setSubType(paramInt2);
/* 77 */ localComponentDescription.setManufacturer(paramInt3);
/* 78 */ ComponentIdentifier localComponentIdentifier = ComponentIdentifier.find(localComponentDescription);
/* 79 */ return QTObject.ID(localComponentIdentifier);
/* */ }
/* */
/* */ protected void initialize(SourcerInitParams paramSourcerInitParams) throws QTException {
/* 83 */ if (paramSourcerInitParams == null) {
/* 84 */ QTException.checkError(QTSSourcerInitialize(_ID(), 0));
/* */ }
/* */ else
/* 87 */ QTException.checkError(QTSSourcerInitialize(_ID(), QTObject.ID(paramSourcerInitParams)));
/* */ }
/* */
/* */ public void setInfo(int paramInt, QTPointer paramQTPointer)
/* */ throws QTException
/* */ {
/* 102 */ QTException.checkError(QTSSourcerSetInfo(_ID(), paramInt, QTObject.ID(paramQTPointer)));
/* */ }
/* */
/* */ public QTPointer getInfo(int paramInt)
/* */ throws QTException
/* */ {
/* 117 */ byte[] arrayOfByte = { 0 };
/* 118 */ QTException.checkError(QTSSourcerGetInfo(_ID(), paramInt, arrayOfByte));
/* */
/* 120 */ return new QTPointer(arrayOfByte);
/* */ }
/* */
/* */ public void setCallbackParams(SourcerCallbackParams paramSourcerCallbackParams)
/* */ throws QTException
/* */ {
/* 130 */ QTException.checkError(QTSSourcerSetInfo(_ID(), 1935893104, QTObject.ID(paramSourcerCallbackParams)));
/* */ }
/* */
/* */ public SourcerCallbackParams getCallbackParams()
/* */ throws QTException
/* */ {
/* 140 */ byte[] arrayOfByte = { 0 };
/* 141 */ QTException.checkError(QTSSourcerGetInfo(_ID(), 1935893104, arrayOfByte));
/* */
/* 144 */ return new SourcerCallbackParams(arrayOfByte);
/* */ }
/* */
/* */ public void setLoopParams(SourcerLoopParams paramSourcerLoopParams)
/* */ throws QTException
/* */ {
/* 153 */ QTException.checkError(QTSSourcerSetInfo(_ID(), 1819242352, QTObject.ID(paramSourcerLoopParams)));
/* */ }
/* */
/* */ public SourcerLoopParams getLoopParams()
/* */ throws QTException
/* */ {
/* 163 */ byte[] arrayOfByte = { 0 };
/* 164 */ QTException.checkError(QTSSourcerGetInfo(_ID(), 1819242352, arrayOfByte));
/* */
/* 167 */ return new SourcerLoopParams(arrayOfByte);
/* */ }
/* */
/* */ public void setSourcerTrackParams(SourcerTrackParams paramSourcerTrackParams)
/* */ throws QTException
/* */ {
/* 176 */ QTException.checkError(QTSSourcerSetInfo(_ID(), 1953653099, QTObject.ID(paramSourcerTrackParams)));
/* */ }
/* */
/* */ public SourcerTrackParams getSourcerTrackParams()
/* */ throws QTException
/* */ {
/* 186 */ byte[] arrayOfByte = { 0 };
/* 187 */ QTException.checkError(QTSSourcerGetInfo(_ID(), 1953653099, arrayOfByte));
/* */
/* 190 */ return new SourcerTrackParams(arrayOfByte);
/* */ }
/* */
/* */ public int idle(long paramLong, int paramInt)
/* */ throws QTException
/* */ {
/* 200 */ int[] arrayOfInt = { 0 };
/* 201 */ QTException.checkError(QTSSourcerIdle(_ID(), paramLong, paramInt, arrayOfInt));
/* */
/* 203 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public void setEnable(boolean paramBoolean)
/* */ throws QTException
/* */ {
/* 212 */ setEnable(paramBoolean, 0);
/* */ }
/* */
/* */ public void setEnable(boolean paramBoolean, int paramInt)
/* */ throws QTException
/* */ {
/* 222 */ QTException.checkError(QTSSourcerSetEnable(_ID(), (byte)(paramBoolean == true ? 1 : 0), paramInt));
/* */ }
/* */
/* */ public boolean isEnable()
/* */ throws QTException
/* */ {
/* 232 */ return isEnable(0);
/* */ }
/* */
/* */ public boolean isEnable(int paramInt)
/* */ throws QTException
/* */ {
/* 242 */ byte[] arrayOfByte = { 0 };
/* 243 */ QTException.checkError(QTSSourcerGetEnable(_ID(), arrayOfByte, paramInt));
/* */
/* 245 */ return arrayOfByte[0] != 0;
/* */ }
/* */
/* */ public void setTimeScale(int paramInt)
/* */ throws QTException
/* */ {
/* 254 */ QTException.checkError(QTSSourcerSetTimeScale(_ID(), paramInt));
/* */ }
/* */
/* */ public int getTimeScale()
/* */ throws QTException
/* */ {
/* 264 */ int[] arrayOfInt = { 0 };
/* 265 */ QTException.checkError(QTSSourcerGetTimeScale(_ID(), arrayOfInt));
/* */
/* 267 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public static native int QTSSourcerInitialize(int paramInt1, int paramInt2);
/* */
/* */ public static native int QTSSourcerSetInfo(int paramInt1, int paramInt2, int paramInt3);
/* */
/* */ public static native int QTSSourcerGetInfo(int paramInt1, int paramInt2, byte[] paramArrayOfByte);
/* */
/* */ public static native int QTSSourcerIdle(int paramInt1, long paramLong, int paramInt2, int[] paramArrayOfInt);
/* */
/* */ public static native int QTSSourcerSetEnable(int paramInt1, byte paramByte, int paramInt2);
/* */
/* */ public static native int QTSSourcerGetEnable(int paramInt1, byte[] paramArrayOfByte, int paramInt2);
/* */
/* */ public static native int QTSSourcerSetTimeScale(int paramInt1, int paramInt2);
/* */
/* */ public static native int QTSSourcerGetTimeScale(int paramInt, int[] paramArrayOfInt);
/* */
/* */ static
/* */ {
/* 29 */ if (QTSession.hasSecurityRestrictions()) {
/* 30 */ throw new SecurityException("Only able to broadcast with security settings when class is signed");
/* */ }
/* 32 */ if (QTSession.isCurrentOS(2))
/* 33 */ throw new RuntimeException("The broadcaster API is not supported on windows");
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.streaming.Sourcer
* JD-Core Version: 0.6.2
*/