/** * Constructs a new CameraRtpHeaderShutspeedvalueExtension with a received packet. * * @param array A buffer containing RTP header extension data for the new object. * @param start Start position of the array. * @param byteCount The number of bytes to hold from bytes. */ public CameraRtpHeaderShutspeedvalueExtension(byte[] array, int start, int byteCount) { // Parses a 'shutspeedvalue' parameters. CameraByteBuffer buffer = CameraByteBuffer.wrap(array, start, byteCount); mMaximumShutterSpeedNumerator = buffer.getUint16(); mMaximumShutterSpeedDenominator = buffer.getUint16(); mMinimumShutterSpeedNumerator = buffer.getUint16(); mMinimumShutterSpeedDenominator = buffer.getUint16(); int currentShutterSpeedNumerator = buffer.getUint16(); int currentShutterSpeedDenominator = buffer.getUint16(); // Detect the shutter speed mode. mShutterSpeedMode = ShutterSpeedMode.Normal; if (currentShutterSpeedNumerator == currentShutterSpeedDenominator) { // It's special value. switch (currentShutterSpeedNumerator) { case 0xfffe: mShutterSpeedMode = ShutterSpeedMode.LiveBulb; break; case 0xfffd: mShutterSpeedMode = ShutterSpeedMode.LiveTime; break; case 0xfffc: mShutterSpeedMode = ShutterSpeedMode.Bulb; break; } } mCurrentShutterSpeedNumerator = currentShutterSpeedNumerator; mCurrentShutterSpeedDenominator = currentShutterSpeedDenominator; }
/** * Constructs a new CameraRtpHeaderMaxtakenumExtension with a received packet. * * @param array A buffer containing RTP header extension data for the new object. * @param start Start position of the array. * @param byteCount The number of bytes to hold from bytes. */ public CameraRtpHeaderMaxtakenumExtension(byte[] array, int start, int byteCount) { // Parses a 'maxtakenum' parameters. CameraByteBuffer buffer = CameraByteBuffer.wrap(array, start, byteCount); mRemainingRecordableImages = buffer.getUint32(); }