public override void decode(MP4InputStream inStream) { base.decode(inStream); int len = (version == 1) ? 8 : 4; creationTime = inStream.readBytes(len); modificationTime = inStream.readBytes(len); timeScale = inStream.readBytes(4); duration = BoxUtils.detectUndetermined(inStream.readBytes(len)); rate = inStream.readFixedPoint(16, 16); volume = inStream.readFixedPoint(8, 8); inStream.skipBytes(10); //reserved for (int i = 0; i < 9; i++) { if (i < 6) { matrix[i] = inStream.readFixedPoint(16, 16); } else { matrix[i] = inStream.readFixedPoint(2, 30); } } inStream.skipBytes(24); //reserved nextTrackID = inStream.readBytes(4); }
public override void decode(MP4InputStream inStream) { base.decode(inStream); inStream.skipBytes(2); //pre-defined: 0 inStream.skipBytes(2); //reserved // 3x32 pre_defined inStream.skipBytes(4); //pre-defined: 0 inStream.skipBytes(4); //pre-defined: 0 inStream.skipBytes(4); //pre-defined: 0 width = (int)inStream.readBytes(2); height = (int)inStream.readBytes(2); horizontalResolution = inStream.readFixedPoint(16, 16); verticalResolution = inStream.readFixedPoint(16, 16); inStream.skipBytes(4); //reserved frameCount = (int)inStream.readBytes(2); int len = inStream.read(); compressorName = inStream.readString(len); inStream.skipBytes(31 - len); depth = (int)inStream.readBytes(2); inStream.skipBytes(2); //pre-defined: -1 readChildren(inStream); }
public override void decode(MP4InputStream inStream) { base.decode(inStream); balance = inStream.readFixedPoint(8, 8); inStream.skipBytes(2); //reserved }
public override void decode(MP4InputStream inStream) { if (getLeft(inStream) < 8) { inStream.skipBytes(getLeft(inStream)); return; } base.decode(inStream); inStream.skipBytes(8); //reserved channelCount = (int)inStream.readBytes(2); sampleSize = (int)inStream.readBytes(2); inStream.skipBytes(2); //pre-defined: 0 inStream.skipBytes(2); //reserved sampleRate = (int)inStream.readBytes(2); inStream.skipBytes(2); //not used by samplerate if (channelCount == 6) { inStream.skipBytes(16); } readChildren(inStream); }
public override void decode(MP4InputStream inStream) { base.decode(inStream); enabled = (flags & 1) == 1; inMovie = (flags & 2) == 2; inPreview = (flags & 4) == 4; int len = (version == 1) ? 8 : 4; creationTime = inStream.readBytes(len); modificationTime = inStream.readBytes(len); trackID = (int)inStream.readBytes(4); inStream.skipBytes(4); //reserved duration = BoxUtils.detectUndetermined(inStream.readBytes(len)); inStream.skipBytes(8); //reserved layer = (int)inStream.readBytes(2); alternateGroup = (int)inStream.readBytes(2); volume = inStream.readFixedPoint(8, 8); inStream.skipBytes(2); //reserved for (int i = 0; i < 9; i++) { if (i < 6) { matrix[i] = inStream.readFixedPoint(16, 16); } else { matrix[i] = inStream.readFixedPoint(2, 30); } } width = inStream.readFixedPoint(16, 16); height = inStream.readFixedPoint(16, 16); }
public override void decode(MP4InputStream inStream) { base.decode(inStream); bool compact = type == BoxType.COMPACT_SAMPLE_SIZE_BOX; int sampleSize; if (compact) { inStream.skipBytes(3); sampleSize = inStream.read(); } else { sampleSize = (int)inStream.readBytes(4); } int sampleCount = (int)inStream.readBytes(4); sampleSizes = new long[sampleCount]; if (compact) { // compact: sampleSize can be 4, 8 or 16 bits if (sampleSize == 4) { for (int i = 0; i < sampleCount; i += 2) { int x = inStream.read(); sampleSizes[i] = (x >> 4) & 0xF; sampleSizes[i + 1] = x & 0xF; } } else { readSizes(inStream, sampleSize / 8); } } else if (sampleSize == 0) { readSizes(inStream, 4); } else { for (int i = 0; i < sampleSizes.Length; i++) { sampleSizes[i] = sampleSize; } } }
public override void decode(MP4InputStream inStream) { base.decode(inStream); int len = (version == 1) ? 8 : 4; creationTime = inStream.readBytes(len); modificationTime = inStream.readBytes(len); timeScale = inStream.readBytes(4); duration = BoxUtils.detectUndetermined(inStream.readBytes(len)); language = BoxUtils.getLanguageCode(inStream.readBytes(2)); inStream.skipBytes(2); //pre-defined: 0 }
public override void decode(MP4InputStream inStream) { inStream.skipBytes(6); // reserved dataReferenceIndex = inStream.readBytes(2); }