internal Video(Stream stream) { ElementReader reader = new ElementReader(stream); while (!reader.EOF) { eElement id = reader.readElementId(); switch (id) { case eElement.FlagInterlaced: flagInterlaced = (eFlagInterlaced)reader.readByte(0); break; case eElement.FieldOrder: fieldOrder = (eFieldOrder)reader.readByte(2); break; case eElement.AlphaMode: alphaMode = reader.readUlong(0); break; case eElement.PixelWidth: pixelWidth = reader.readUint(); break; case eElement.PixelHeight: pixelHeight = reader.readUint(); break; case eElement.PixelCropBottom: pixelCropBottom = reader.readUint(0); break; case eElement.PixelCropTop: pixelCropTop = reader.readUint(0); break; case eElement.PixelCropLeft: pixelCropLeft = reader.readUint(0); break; case eElement.PixelCropRight: pixelCropRight = reader.readUint(0); break; case eElement.DisplayWidth: displayWidth = reader.readUint(); break; case eElement.DisplayHeight: displayHeight = reader.readUint(); break; case eElement.DisplayUnit: displayUnit = (eDisplayUnit)reader.readByte(0); break; case eElement.AspectRatioType: aspectRatioType = (eAspectRatioType)reader.readByte(0); break; case eElement.ColourSpace: colourSpace = reader.readColorSpace(); break; case eElement.GammaValue: gammaValue = reader.readFloat(); break; case eElement.FrameRate: frameRate = reader.readFloat(); break; case eElement.Colour: colour = new Colour(stream); break; case eElement.Projection: projection = new Projection(stream); break; default: reader.skipElement(); break; } } }