/* */ package quicktime.streaming;
/* */
/* */ import java.security.AccessController;
/* */ import java.security.PrivilegedAction;
/* */ import quicktime.QTException;
/* */ import quicktime.QTObject;
/* */ import quicktime.qd.GDevice;
/* */ import quicktime.qd.QDColor;
/* */ import quicktime.qd.QDDimension;
/* */ import quicktime.qd.QDGraphics;
/* */ import quicktime.qd.Region;
/* */ import quicktime.std.image.Matrix;
/* */ import quicktime.util.QTPointer;
/* */ import quicktime.util.QTPointerRef;
/* */ import quicktime.util.QTUtils;
/* */
/* */ public class MediaParams extends QTPointerRef
/* */ {
/* */ public static final int kNativeSize = 80;
/* 112 */ private QTPointer bands = null;
/* 113 */ private QDGraphics g = null;
/* 114 */ private GDevice gd = null;
/* 115 */ private Region rgn = null;
/* */
/* */ public MediaParams()
/* */ throws QTException
/* */ {
/* 62 */ super(80, true);
/* */
/* 64 */ GDevice localGDevice = (GDevice)AccessController.doPrivileged(new PrivilegedAction() {
/* */ public Object run() {
/* 66 */ return GDevice.getMain();
/* */ }
/* */ });
/* 70 */ setMatrix(new Matrix());
/* 71 */ setGDHandle(localGDevice);
/* 72 */ setGraphicsMode(64);
/* 73 */ setOpColor(QDColor.black);
/* 74 */ setLeftVolume(256);
/* 75 */ setRightVolume(256);
/* 76 */ setLevelMeteringEnabled(false);
/* */ }
/* */
/* */ public MediaParams(QDDimension paramQDDimension, QDGraphics paramQDGraphics)
/* */ throws QTException
/* */ {
/* 85 */ this();
/* 86 */ setWidth(paramQDDimension.getWidth());
/* 87 */ setHeight(paramQDDimension.getHeight());
/* 88 */ setGWorld(paramQDGraphics);
/* */ }
/* */
/* */ public MediaParams(QDDimension paramQDDimension, Matrix paramMatrix, QDGraphics paramQDGraphics, int paramInt1, int paramInt2, int paramInt3, int paramInt4)
/* */ throws QTException
/* */ {
/* 103 */ this(paramQDDimension, paramQDGraphics);
/* 104 */ setMatrix(paramMatrix);
/* 105 */ setLeftVolume(paramInt1);
/* 106 */ setRightVolume(paramInt2);
/* 107 */ setBassLevel(paramInt3);
/* 108 */ setTrebleLevel(paramInt4);
/* */ }
/* */
/* */ public void setWidth(float paramFloat)
/* */ {
/* 123 */ setIntAt(0, QTUtils.X2Fix(paramFloat));
/* */ }
/* */
/* */ public float getWidth()
/* */ {
/* 131 */ return QTUtils.Fix2X(getIntAt(0));
/* */ }
/* */
/* */ public void setHeight(float paramFloat)
/* */ {
/* 139 */ setIntAt(4, QTUtils.X2Fix(paramFloat));
/* */ }
/* */
/* */ public float getHeight()
/* */ {
/* 146 */ return QTUtils.Fix2X(getIntAt(4));
/* */ }
/* */
/* */ public void setMatrix(Matrix paramMatrix)
/* */ {
/* 154 */ setBytesAt(8, 36, paramMatrix.getBytes(), 0);
/* */ }
/* */
/* */ public Matrix getMatrix()
/* */ {
/* 161 */ Matrix localMatrix = new Matrix();
/* 162 */ getBytesAt(8, 36, localMatrix.getBytes(), 0);
/* 163 */ return localMatrix;
/* */ }
/* */
/* */ public void setGWorld(QDGraphics paramQDGraphics)
/* */ {
/* 171 */ this.g = paramQDGraphics;
/* 172 */ setIntAt(44, QTObject.ID(paramQDGraphics));
/* */ }
/* */
/* */ public QDGraphics getGWorld()
/* */ {
/* 179 */ return this.g;
/* */ }
/* */
/* */ public void setGDHandle(GDevice paramGDevice)
/* */ {
/* 187 */ this.gd = paramGDevice;
/* 188 */ setIntAt(48, QTObject.ID(paramGDevice));
/* */ }
/* */
/* */ public GDevice getGDHandle()
/* */ {
/* 195 */ return this.gd;
/* */ }
/* */
/* */ public void setClip(Region paramRegion)
/* */ {
/* 203 */ this.rgn = paramRegion;
/* 204 */ setIntAt(52, QTObject.ID(paramRegion));
/* */ }
/* */
/* */ public Region getClip()
/* */ {
/* 211 */ return this.rgn;
/* */ }
/* */
/* */ public void setGraphicsMode(int paramInt)
/* */ {
/* 219 */ setShortAt(56, (short)paramInt);
/* */ }
/* */
/* */ public int getGraphicsMode()
/* */ {
/* 226 */ return getShortAt(56);
/* */ }
/* */
/* */ public void setOpColor(QDColor paramQDColor)
/* */ {
/* 234 */ setBytesAt(58, 6, paramQDColor.getBytes(), 0);
/* */ }
/* */
/* */ public QDColor getOpColor()
/* */ {
/* 241 */ QDColor localQDColor = new QDColor();
/* 242 */ getBytesAt(58, 6, localQDColor.getBytes(), 0);
/* 243 */ return localQDColor;
/* */ }
/* */
/* */ public void setLeftVolume(int paramInt)
/* */ {
/* 251 */ setShortAt(64, (short)paramInt);
/* */ }
/* */
/* */ public int getLeftVolume()
/* */ {
/* 258 */ return getShortAt(64);
/* */ }
/* */
/* */ public void setRightVolume(int paramInt)
/* */ {
/* 266 */ setShortAt(66, (short)paramInt);
/* */ }
/* */
/* */ public int getRightVolume()
/* */ {
/* 273 */ return getShortAt(66);
/* */ }
/* */
/* */ public void setVolumes(int paramInt1, int paramInt2)
/* */ {
/* 282 */ setLeftVolume(paramInt1);
/* 283 */ setRightVolume(paramInt2);
/* */ }
/* */
/* */ public void setBassLevel(int paramInt)
/* */ {
/* 291 */ setShortAt(68, (short)paramInt);
/* */ }
/* */
/* */ public int getBassLevel()
/* */ {
/* 298 */ return getShortAt(68);
/* */ }
/* */
/* */ public void setTrebleLevel(int paramInt)
/* */ {
/* 306 */ setShortAt(70, (short)paramInt);
/* */ }
/* */
/* */ public int getTrebleLevel()
/* */ {
/* 313 */ return getShortAt(70);
/* */ }
/* */
/* */ public void setFrequencyBands(QTPointer paramQTPointer)
/* */ throws QTException
/* */ {
/* 321 */ setShortAt(72, (short)paramQTPointer.getSize());
/* 322 */ this.bands = paramQTPointer;
/* 323 */ setIntAt(74, QTObject.ID(this.bands));
/* */ }
/* */
/* */ public int getFrequencyBandsCount()
/* */ {
/* 330 */ return getShortAt(72);
/* */ }
/* */
/* */ public byte[] getFrequencyBands()
/* */ {
/* 338 */ if (this.bands != null)
/* 339 */ return this.bands.getBytes();
/* 340 */ return null;
/* */ }
/* */
/* */ public void setLevelMeteringEnabled(boolean paramBoolean)
/* */ {
/* 348 */ setByteAt(78, (byte)(paramBoolean ? 1 : 0));
/* */ }
/* */
/* */ public boolean isLevelMeteringEnabled()
/* */ {
/* 355 */ return getByteAt(78) == 1;
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 363 */ return getClass().getName() + "[width=" + getWidth() + ",height=" + getHeight() + ",matrix=" + getMatrix() + ",\n" + "gWorld=" + getGWorld() + ",gdHandle=" + getGDHandle() + ",clip=" + getClip() + ",graphicsMode=" + getGraphicsMode() + ",opColor=" + getOpColor() + ",\n" + "leftVolume=" + getLeftVolume() + ",rightVolume=" + getRightVolume() + ",bassLevel=" + getBassLevel() + ",trebleLevel=" + getTrebleLevel() + ",frequencyBandsCount=" + getFrequencyBandsCount() + ",frequencyBands=" + getFrequencyBands() + ",levelMeteringEnabled=" + isLevelMeteringEnabled() + "]";
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.streaming.MediaParams
* JD-Core Version: 0.6.2
*/