public MXFSystemItem(MXFReader reader, MXFKLV headerKLV) : base(headerKLV, "SystemItem (CP)", KeyType.SystemItem) { this.m_eType = MXFObjectType.SystemItem; if (this.Key[12] == 0x14) { this.Key.Name = "SystemItem (GC)"; } reader.Seek(this.DataOffset); // Seek to the start of the data // Parse system bitmap this.SystemBitmap = (SystemBitmap)reader.ReadByte(); // Parse Content package rate byte rate = reader.ReadByte(); int rateIndex = (rate & 0x1E) >> 1; int[] rates = new int[16] { 0, 24, 25, 30, 48, 50, 60, 72, 75, 90, 96, 100, 120, 0, 0, 0 }; int rateNonDrop = 1; if (rateIndex < 16) { rateNonDrop = rates[rateIndex]; } this.PackageRate = rateNonDrop; if ((rate & 0x01) == 0x01) // 1.001 divider active? { this.PackageRate = this.PackageRate / 1.001; } // Parse Content Package Type byte type = reader.ReadByte(); this.StreamStatus = (SystemStreamStatus)((type & 0xE0) >> 5); this.LowLatencyMode = ((type & 0x10) == 0x10); this.TransferMode = (SystemTransferMode)((type & 0x0C) >> 2); this.TimingMode = (SystemTimingMode)(type & 0x03); this.ChannelHandle = reader.ReadUInt16(); this.ContinuityCount = reader.ReadUInt16(); this.SMPTE = reader.ReadULKey(); // Always read even if zero MXFTimeStamp creationTimeStamp = reader.ReadBCDTimeCode(this.PackageRate); this.CreationDate = creationTimeStamp.ToString(); this.UserDate = reader.ReadBCDTimeCode(this.PackageRate); this.UserDateFullFrameNb = this.UserDate.GetString(true); }