/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3D03: this.AudioSamplingRate = reader.ReadRational(); return(true); case 0x3D02: this.Locked = reader.ReadBool(); return(true); case 0x3D04: this.AudioRefLevel = reader.ReadSignedByte(); return(true); case 0x3D05: this.ElectroSpatialFormulation = (MXFElectroSpatialFormulation)reader.ReadByte(); return(true); case 0x3D07: this.ChannelCount = reader.ReadUInt32(); return(true); case 0x3D01: this.QuantizationBits = reader.ReadUInt32(); return(true); case 0x3D0C: this.DialNorm = reader.ReadSignedByte(); return(true); case 0x3D06: this.SoundEssenceCoding = reader.ReadULKey(); return(true); case var _ when localTag.Key == refImageEditRate_Key: this.ReferenceImageEditRate = reader.ReadRational(); return(true); case var _ when localTag.Key == refAudioAlignmentLevel: this.ReferenceAudioAlignmentLevel = reader.ReadByte(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
public MXFANCPacket(MXFReader reader) : base(reader) { this.LineNumber = reader.ReadUInt16(); this.WrappingType = (MXFANCWrappingType)reader.ReadByte(); this.PayloadSamplingCoding = (MXFANCPayloadCoding)reader.ReadByte(); this.PayloadSampleCount = reader.ReadUInt16(); this.Length = this.PayloadSampleCount; if (this.PayloadSamplingCoding == MXFANCPayloadCoding.Coding_10_bit_luma_samples || this.PayloadSamplingCoding == MXFANCPayloadCoding.Coding_10_bit_color_difference_samples || this.PayloadSamplingCoding == MXFANCPayloadCoding.Coding_10_bit_luma_and_color_difference_samples) { this.Length = 4 * (this.PayloadSampleCount / 3); // 3 samples are stored in 4 bytes } // Skip 8 bytes (seems to be data but cannot find any meaning in the spec!) UInt32 unknownData1 = reader.ReadUInt32(); UInt32 unknownData2 = reader.ReadUInt32(); // Length Alignment this.Length = 4 * ((this.Length + 3) / 4); if (this.Length > 3) { // Read the DID this.DID = reader.ReadByte(); this.SDID = reader.ReadByte(); this.Size = reader.ReadByte(); UInt16 combinedID = (UInt16)((((UInt16)this.DID) << 8) | this.SDID); if (m_DIDDescription.ContainsKey(combinedID)) { this.ContentDescription = m_DIDDescription[combinedID]; } else { this.ContentDescription = "<unknown content>"; } switch (combinedID) { case 0x6101: // CDP this.AddChild(new MXFCDPPacket(reader)); break; case 0x4105: // AFD break; case 0x4302: // OP47 break; default: // Read the real payload without the did/sdid/size this.Payload = reader.ReadArray(reader.ReadByte, (int)(this.Length - 3)); break; } } }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x0E01: this.RelativeScope = reader.ReadUInt32(); return(true); case 0x0E02: this.RelativeTrack = reader.ReadUInt32(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x4801: this.TrackID = reader.ReadUInt32(); return(true); case 0x4802: this.TrackName = reader.ReadUTF16String(localTag.Size); return(true); case 0x4803: this.AddChild(reader.ReadReference <MXFSegment>("Segment")); return(true); case 0x4804: this.TrackNumber = reader.ReadUInt32(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
public MXFEntryIndex(UInt64 index, MXFReader reader, byte?sliceCount, byte?posTableCount, UInt32 length) : base(reader) { this.m_eType = MXFObjectType.Index; this.Length = length; this.Index = index; this.TemporalOffset = reader.ReadSignedByte(); this.KeyFrameOffset = reader.ReadSignedByte(); this.Flags = new IndexEntryFlags(reader.ReadByte()); this.StreamOffset = reader.ReadUInt64(); if (sliceCount.HasValue && sliceCount.Value > 0) { this.SliceOffsets = new UInt32[sliceCount.Value]; for (int n = 0; n < sliceCount; n++) { this.SliceOffsets[n] = reader.ReadUInt32(); } } if (posTableCount.HasValue && posTableCount.Value > 0) { this.PosTable = new MXFRational[posTableCount.Value]; for (int n = 0; n < posTableCount; n++) { this.PosTable[n] = reader.ReadRational(); } } }
/// <summary> /// Parse this tag /// </summary> /// <param name="reader"></param> public void Parse(MXFReader reader) { if (this.Size == 1) { this.Value = reader.ReadByte(); } else if (this.Size == 2) { this.Value = reader.ReadUInt16(); } else if (this.Size == 4) { this.Value = reader.ReadUInt32(); } else if (this.Size == 8) { this.Value = reader.ReadUInt64(); } else { byte[] data = new byte[this.Size]; for (int n = 0; n < this.Size; n++) { data[n] = reader.ReadByte(); } this.Value = data; } }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { if (localTag.Key != null) { switch (localTag.Key) { case var _ when localTag.Key == bitRate_Key: this.BitRate = reader.ReadUInt32(); return(true); case var _ when localTag.Key == identicalGOPIndicator_Key: this.IdenticalGOPIndicator = reader.ReadBool(); return(true); case var _ when localTag.Key == maxGOPSize_Key: this.MaximumGOPSize = reader.ReadUInt16(); return(true); case var _ when localTag.Key == maxBPictureCount_Key: this.MaximumBPictureCount = reader.ReadUInt16(); return(true); case var _ when localTag.Key == constantBPictureFlag_Key: this.ConstantBPictureFlag = reader.ReadBool(); return(true); case var _ when localTag.Key == codedContentScanningKind_Key: this.CodedContentScanningKind = (MXFCodedContentScanning)reader.ReadByte(); return(true); case var _ when localTag.Key == profileAndLevel_Key: this.ProfileAndLevel = reader.ReadByte(); return(true); case var _ when localTag.Key == singleSequenceFlag_Key: this.SingleSequenceFlag = reader.ReadBool(); return(true); case var _ when localTag.Key == closedGOP_Key: this.ClosedGOPIndicator = reader.ReadBool(); return(true); case var _ when localTag.Key == lowDelay_Key: this.LowDelayIndicator = reader.ReadBool(); return(true); } } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3B02: this.LastModificationDate = reader.ReadTimestamp(); return(true); case 0x3B05: this.Version = reader.ReadVersion(); return(true); case 0x3B07: this.ObjectModelVersion = reader.ReadUInt32(); return(true); case 0x3B03: this.AddChild(reader.ReadReference <MXFContentStorage>("ContentStorage")); return(true); case 0x3B08: this.AddChild(reader.ReadReference <MXFGenericPackage>("PrimaryPackage")); return(true); case 0x3B09: this.OperationalPattern = reader.ReadULKey(); return(true); case 0x3B06: this.AddChild(reader.ReadReferenceSet <MXFIdentification>("Identifications", "Identification")); return(true); case 0x3B0A: this.AddChild(reader.ReadAUIDSet("EssenceContainers", "EssenceContainer")); return(true); // TODO review how the metadataschemes are read (especially if there are no schemes present) case 0x3B0B: this.AddChild(reader.ReadAUIDSet("Descriptive Metadata Schemes", "DM scheme")); return(true); case var _ when localTag.Key == isRIPPresent_Key: this.IsRIPPresent = reader.ReadBool(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
public MXFEntryRIP(MXFReader reader) : base(reader) { this.m_eType = MXFObjectType.RIP; this.BodySID = reader.ReadUInt32(); this.PartitionOffset = reader.ReadUInt64(); this.Length = 12; // Fixed length }
public MXFPartition(MXFReader reader, MXFKLV headerKLV) : base(headerKLV, "Partition", KeyType.Partition) { this.m_eType = MXFObjectType.Partition; this.IsLoaded = false; // Determine the partition type switch (this.Key[13]) { case 2: this.PartitionType = PartitionType.Header; break; case 3: this.PartitionType = PartitionType.Body; break; case 4: this.PartitionType = PartitionType.Footer; break; default: this.PartitionType = PartitionType.Unknown; Log(MXFLogType.Error, "unknown partition type"); break; } this.Closed = (this.PartitionType == PartitionType.Footer) || (this.Key[14] & 0x01) == 0x00; this.Complete = (this.Key[14] > 2); // Make sure we read at the data position reader.Seek(this.DataOffset); this.MajorVersion = reader.ReadUInt16(); this.MinorVersion = reader.ReadUInt16(); this.KagSize = reader.ReadUInt32(); this.ThisPartition = reader.ReadUInt64(); this.PreviousPartition = reader.ReadUInt64(); this.FooterPartition = reader.ReadUInt64(); this.HeaderByteCount = reader.ReadUInt64(); this.IndexByteCount = reader.ReadUInt64(); this.IndexSID = reader.ReadUInt32(); this.BodyOffset = reader.ReadUInt64(); this.BodySID = reader.ReadUInt32(); this.OP = reader.ReadULKey(); MXFObject essenceContainers = reader.ReadAUIDSet("Essence Containers", "Essence Container"); this.AddChild(essenceContainers); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x8113: this.CameraSettingFileURI = reader.ReadUTF8String(localTag.Size); return(true); case 0x8114: this.CameraAttributes = reader.ReadUTF8String(localTag.Size); return(true); case 0x3210: this.TransferCharacteristic = reader.ReadULKey(); return(true); case 0x8106: this.CaptureFrameRate = reader.ReadRational(); return(true); case 0x8100: this.AutoExposureMode = reader.ReadULKey(); return(true); case 0x8101: this.AutoFocusSensingAreaSetting = (MXFAutoFocusSensingAreaSetting)reader.ReadByte(); return(true); case 0x8102: this.ColorCorrectionFilterWheelSetting = (MXFColorCorrectionFilterWheelSetting)reader.ReadByte(); return(true); case 0x8103: this.NeutralDensityFilterWheelSetting = reader.ReadUInt16(); return(true); case 0x8104: this.ImageSensorDimensionEffectiveWidth = reader.ReadUInt16(); return(true); case 0x8105: this.ImageSensorDimensionEffectiveHeight = reader.ReadUInt16(); return(true); case 0x8107: this.ImageSensorReadoutMode = (MXFImageSensorReadoutMode)reader.ReadByte(); return(true); case 0x8108: this.ShutterSpeedAngle = reader.ReadUInt32(); return(true); case 0x8109: this.ShutterSpeedTime = reader.ReadRational(); return(true); case 0x810a: this.CameraMasterGainAdjustment = (short)reader.ReadUInt16(); return(true); case 0x810b: this.ISOSensitivity = reader.ReadUInt16(); return(true); case 0x810c: this.ElectricalExtenderMagnification = reader.ReadUInt16(); return(true); case 0x8115: this.ExposureIndexOfPhotoMeter = reader.ReadUInt16(); return(true); case 0x8118: this.ColorMatrix = reader.ReadArray(reader.ReadRational, localTag.Size); return(true); case 0x810d: this.AutoWhiteBalanceMode = (MXFAutoWhiteBalanceMode)reader.ReadByte(); return(true); case 0x810e: this.WhiteBalance = reader.ReadUInt16(); return(true); case 0x810f: this.CameraMasterBlackLevel = (short)reader.ReadUInt16(); return(true); case 0x8110: this.CameraKneePoint = reader.ReadUInt16(); return(true); case 0x8111: this.CameraKneeSlope = reader.ReadUInt16(); return(true); case 0x8112: this.CameraLuminanceDynamicRange = reader.ReadUInt16(); return(true); case 0x8116: this.GammaForCDL = reader.ReadByte(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3301: this.ComponentDepth = reader.ReadUInt32(); return(true); case 0x3302: this.HorizontalSubsampling = reader.ReadUInt32(); return(true); case 0x3308: this.VerticalSubsampling = reader.ReadUInt32(); return(true); case 0x3303: this.ColorSiting = (MXFColorSiting)reader.ReadByte(); return(true); case 0x330B: this.ReversedByteOrder = reader.ReadBool(); return(true); case 0x3307: this.PaddingBits = (Int16)reader.ReadUInt16(); return(true); case 0x3309: this.AlphaSampleDepth = reader.ReadUInt32(); return(true); case 0x3304: this.BlackRefLevel = reader.ReadUInt32(); return(true); case 0x3305: this.WhiteRefLevel = reader.ReadUInt32(); return(true); case 0x3306: this.ColorRange = reader.ReadUInt32(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3D0A: this.BlockAlign = reader.ReadUInt16(); return(true); case 0x3D0B: this.SequenceOffset = reader.ReadByte(); return(true); case 0x3D09: this.AverageBytesPerSecond = reader.ReadUInt32(); return(true); case 0x3D32: this.ChannelAssignment = reader.ReadULKey(); return(true); case 0x3D29: this.PeakEnvelopeVersion = reader.ReadUInt32(); return(true); case 0x3D2A: this.PeakEnvelopeFormat = reader.ReadUInt32(); return(true); case 0x3D2B: this.PointsPerPeakValue = reader.ReadUInt32(); return(true); case 0x3D2C: this.PeakEnvelopeBlockSize = reader.ReadUInt32(); return(true); case 0x3D2D: this.PeakChannels = reader.ReadUInt32(); return(true); case 0x3D2E: this.PeakFrames = reader.ReadUInt32(); return(true); case 0x3D2F: this.PeakOfPeaksPosition = reader.ReadUInt64(); return(true); case 0x3D30: this.PeakEnvelopeTimestamp = reader.ReadTimestamp(); return(true); case 0x3D31: this.PeakEnvelopeData = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); } return(base.ParseLocalTag(reader, localTag)); }
public MXFEntryDelta(MXFReader reader, UInt32 length) : base(reader) { this.m_eType = MXFObjectType.Index; this.Length = length; this.PosTableIndex = reader.ReadSignedByte(); this.Slice = reader.ReadByte(); this.ElementDelta = reader.ReadUInt32(); }
/// <summary> /// Read partition tag list /// </summary> /// <param name="reader"></param> /// <param name="categoryName"></param> /// <returns></returns> protected UInt32 ReadTagList(MXFReader reader, string categoryName) { UInt32 nofItems = reader.ReadUInt32(); UInt32 objectSize = reader.ReadUInt32(); // useless size of objects, always 16 according to specs MXFObject keylist = new MXFNamedObject(categoryName, reader.Position); if (nofItems > 0 && nofItems < UInt32.MaxValue) { m_PrimerKeys = new Dictionary <UInt16, MXFEntryPrimer>(); for (int n = 0; n < nofItems; n++) { MXFEntryPrimer entry = new MXFEntryPrimer(reader); m_PrimerKeys.Add(entry.LocalTag, entry); // Add to our own internal list keylist.AddChild(entry); // And add the entry as one of our children } } this.AddChild(keylist); return(nofItems); }
protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { // TODO: this is a risky operation reading the array like this case 0x0018: ElementCount = reader.ReadUInt32(); return(true); case 0x0017: this.AddChild(reader.ReadReference <MXFTypeDefinition>("FixedArrayElementType")); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3406: this.ComponentMaxRef = reader.ReadUInt32(); return(true); case 0x3407: this.ComponentMinRef = reader.ReadUInt32(); return(true); case 0x3408: this.AlphaMaxRef = reader.ReadUInt32(); return(true); case 0x3409: this.AlphaMinRef = reader.ReadUInt32(); return(true); case 0x3405: this.ScanningDirection = (MXFScanningDirectionType)reader.ReadByte(); return(true); case 0x3401: this.PixelLayout = reader.ReadRGBALayout(); return(true); case 0x3403: this.Palette = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case 0x3404: this.PaletteLayout = reader.ReadRGBALayout(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x1101: this.SourcePackageID = reader.ReadUMIDKey(); return(true); case 0x1102: this.SourceTrackId = reader.ReadUInt32(); return(true); case 0x1103: this.ChannelIDs = reader.ReadArray(reader.ReadUInt32, localTag.Size); return(true); case 0x1104: this.MonoSourceTrackIDs = reader.ReadArray(reader.ReadUInt32, localTag.Size); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x0D03: this.PulldownDirection = (MXFPulldownDirection?)reader.ReadByte(); return(true); case 0x0D02: this.PulldownKind = (MXFPulldownKind?)reader.ReadByte(); return(true); case 0x0D04: this.PhaseFrame = reader.ReadUInt32(); return(true); case 0x0D01: this.AddChild(reader.ReadReference <MXFSegment>("InputSegment")); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x2701: this.LinkedPackageID = reader.ReadUMIDKey(); return(true); case 0x3F06: this.IndexSID = reader.ReadUInt32(); return(true); case 0x3F07: this.EssenceSID = reader.ReadUInt32(); return(true); case 0x2702: this.EssenceStream = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case 0x2B01: this.SampleIndex = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case var _ when localTag.Key == precedingIndexTable_Key: this.PrecedingIndexTable = reader.ReadBool(); return(true); case var _ when localTag.Key == followingIndexTable_Key: this.FollowingIndexTable = reader.ReadBool(); return(true); case var _ when localTag.Key == isSparse_Key: this.IsSparse = reader.ReadBool(); return(true); case var _ when localTag.Key == singularPartitionUsage_Key: this.SingularPartitionUsage = reader.ReadBool(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3006: this.LinkedTrackId = reader.ReadUInt32(); return(true); case 0x3001: this.SampleRate = reader.ReadRational(); return(true); case 0x3002: this.ContainerDuration = reader.ReadUInt64(); return(true); case 0x3004: this.EssenceContainer = reader.ReadULKey(); return(true); case 0x3005: this.Codec = reader.ReadULKey(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { if (localTag.Key != null) { switch (localTag.Key) { case var _ when localTag.Key == rsiz: this.Rsiz = reader.ReadUInt16(); return(true); case var _ when localTag.Key == xsiz: this.Xsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == ysiz: this.Ysiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == xOsiz: this.XOsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == yOsiz: this.YOsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == xTsiz: this.XTsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == yTsiz: this.YTsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == xTOsiz: this.XTOsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == yTOsiz: this.YTOsiz = reader.ReadUInt32(); return(true); case var _ when localTag.Key == csiz: this.Csiz = reader.ReadUInt16(); return(true); case var _ when localTag.Key == pictureComponentSizing: this.PictureComponentSizing = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case var _ when localTag.Key == codingStyleDefault: this.CodingStyleDefault = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case var _ when localTag.Key == quantizationDefault: this.QuantizationDefault = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case var _ when localTag.Key == j2CLayout: this.J2CLayout = reader.ReadRGBALayout(); return(true); } } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { // TODO replace generic MXFObject with class OperationDefinition once implemented case 0x0B01: this.AddChild(reader.ReadReference <MXFObject>("Operation")); return(true); case 0x0B04: this.BypassOverride = reader.ReadUInt32(); return(true); case 0x0B05: this.AddChild(reader.ReadReference <MXFSourceReference>("Rendering")); return(true); case 0x0B02: this.AddChild(reader.ReadReferenceSet <MXFSegment>("InputSegments", "InputSegment")); return(true); case 0x0B03: this.AddChild(reader.ReadReferenceSet <MXFParameter>("Parameters", "Parameter")); return(true); } return(base.ParseLocalTag(reader, localTag)); }
private (byte Tag, UInt32 Size) GetTag(MXFReader reader) { byte tag = reader.ReadByte(); UInt32 size = 0; if (nofSizeSize == 2) { size = reader.ReadUInt16(); } else { size = reader.ReadUInt32(); } return(tag, size); }
/// <summary> /// Try to locate the RIP /// </summary> private bool ReadRIP(MXFKLVFactory klvFactory) { if (this.RIP == null) { // Read the last 4 bytes of the file m_reader.Seek(this.Filesize - 4); uint ripSize = m_reader.ReadUInt32(); if (ripSize < this.Filesize && ripSize >= 4) // At least 4 bytes { m_reader.Seek(this.Filesize - ripSize); MXFKLV klv = klvFactory.CreateObject(m_reader, null); if (klv.Key.Type == KeyType.RIP) { // Yes, RIP found this.AddChild(klv); this.RIP = klv as MXFRIP; return(true); } } } return(false); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case 0x3215: this.SignalStandard = (MXFSignalStandard)reader.ReadByte(); return(true); case 0x320C: this.FrameLayout = (MXFFrameLayout)reader.ReadByte(); return(true); case 0x3203: this.StoredWidth = reader.ReadUInt32(); return(true); case 0x3202: this.StoredHeight = reader.ReadUInt32(); return(true); case 0x3216: this.StoredF2Offset = reader.ReadInt32(); return(true); case 0x3205: this.SampledWidth = reader.ReadUInt32(); return(true); case 0x3204: this.SampledHeight = reader.ReadUInt32(); return(true); case 0x3206: this.SampledXOffset = reader.ReadInt32(); return(true); case 0x3207: this.SampledYOffset = reader.ReadInt32(); return(true); case 0x3208: this.DisplayHeight = reader.ReadUInt32(); return(true); case 0x3209: this.DisplayWidth = reader.ReadUInt32(); return(true); case 0x320A: this.DisplayXOffset = reader.ReadInt32(); return(true); case 0x320B: this.DisplayYOffset = reader.ReadInt32(); return(true); case 0x3217: this.DisplayF2Offset = reader.ReadInt32(); return(true); case 0x320E: this.ImageAspectRatio = reader.ReadRational(); return(true); case 0x3218: this.ActiveFormatDescriptor = reader.ReadByte(); return(true); case 0x320D: this.VideoLineMap = reader.ReadArray(reader.ReadInt32, 4); return(true); case 0x320F: this.AlphaTransparency = (MXFAlphaTransparencyType)reader.ReadByte(); return(true); case 0x3210: this.TransferCharacteristic = reader.ReadULKey(); return(true); case 0x3211: this.ImageAlignmentFactor = reader.ReadUInt32(); return(true); case 0x3213: this.ImageStartOffset = reader.ReadUInt32(); return(true); case 0x3214: this.ImageEndOffset = reader.ReadUInt32(); return(true); case 0x3212: this.FieldDominance = (MXFFieldNumber)reader.ReadByte(); return(true); case 0x3201: this.PictureCompression = reader.ReadULKey(); return(true); case 0x321A: this.CodingEquations = reader.ReadULKey(); return(true); case 0x3219: this.ColorPrimaries = reader.ReadULKey(); return(true); case var _ when localTag.Key == altCenterCuts_Key: this.AddChild(reader.ReadAUIDSet("AlternativeCenterCuts", "AlternativeCenterCut")); return(true); case var _ when localTag.Key == activeHeight_Key: this.ActiveHeight = reader.ReadUInt32(); return(true); case var _ when localTag.Key == activeWidth_Key: this.ActiveHeight = reader.ReadUInt32(); return(true); case var _ when localTag.Key == activeXOffset_Key: this.ActiveHeight = reader.ReadUInt32(); return(true); case var _ when localTag.Key == activeYOffset_Key: this.ActiveHeight = reader.ReadUInt32(); return(true); case var _ when localTag.Key == displayPrimaries_Key: this.MasteringDisplayPrimaries = reader.ReadArray(reader.ReadColorPrimary, 3); return(true); case var _ when localTag.Key == displayWhitePointChromaticity_Key: this.MasteringDisplayWhitePointChromaticity = reader.ReadColorPrimary(); return(true); case var _ when localTag.Key == displayMaxLuminance_Key: this.MasteringDisplayMaximumLuminance = reader.ReadUInt32(); return(true); case var _ when localTag.Key == displayMinLuminance_Key: this.MasteringDisplayMinimumLuminance = reader.ReadUInt32(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { if (localTag.Key != null) { switch (localTag.Key) { case var _ when localTag.Key == genericStreamID_Key: this.GenericStreamID = reader.ReadUInt32(); return(true); } } return(base.ParseLocalTag(reader, localTag)); }
protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { switch (localTag.Tag) { case var _ when localTag.Key == audioBitRate_Key: this.MPEGAudioBitRate = reader.ReadUInt32(); return(true); case var _ when localTag.Key == channelAssignment_Key: this.MPEGAudioChannelAssignment = reader.ReadULKey(); return(true); } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { if (localTag.Key != null) { switch (localTag.Key) { case var _ when localTag.Key == constantBPictureFlag_Key: this.AVCConstantBPictureFlag = reader.ReadBool(); return(true); case var _ when localTag.Key == codedContentKind_Key: this.AVCCodedContentKind = (MXFAVCContentScanning)reader.ReadByte(); return(true); case var _ when localTag.Key == closedGOPIndicator_Key: this.AVCClosedGOPIndicator = reader.ReadBool(); return(true); case var _ when localTag.Key == identicalGOPIndicator_Key: this.AVCIdenticalGOPIndicator = reader.ReadBool(); return(true); case var _ when localTag.Key == maximumGOPSize_Key: this.AVCMaximumGOPSize = reader.ReadUInt16(); return(true); case var _ when localTag.Key == maximumBPictureCount_Key: this.AVCMaximumBPictureCount = reader.ReadUInt16(); return(true); case var _ when localTag.Key == profile_Key: this.AVCProfile = reader.ReadByte(); return(true); case var _ when localTag.Key == maximumBitRate_Key: this.AVCMaximumBitRate = reader.ReadUInt32(); return(true); case var _ when localTag.Key == profileConstraint_Key: this.AVCProfileConstraint = reader.ReadByte(); return(true); case var _ when localTag.Key == level_Key: this.AVCLevel = reader.ReadByte(); return(true); case var _ when localTag.Key == decodingDelay_Key: this.AVCDecodingDelay = reader.ReadByte(); return(true); case var _ when localTag.Key == maximumRefFrames_Key: this.AVCMaximumRefFrames = reader.ReadByte(); return(true); case var _ when localTag.Key == sequenceParameterSetFlag_Key: this.AVCSequenceParameterSetFlag = reader.ReadByte(); return(true); case var _ when localTag.Key == pictureParameterSetFlag_Key: this.AVCPictureParameterSetFlag = reader.ReadByte(); return(true); case var _ when localTag.Key == averageBitRate_Key: this.AVCAverageBitRate = reader.ReadByte(); return(true); } } return(base.ParseLocalTag(reader, localTag)); }
/// <summary> /// Overridden method to process local tags /// </summary> /// <param name="localTag"></param> protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag) { if (localTag.Key != null) { switch (localTag.Key) { case var _ when localTag.Key == initMetadata_Key: this.VC1InitializationMetadata = reader.ReadArray(reader.ReadByte, localTag.Size); return(true); case var _ when localTag.Key == singleSequence_Key: this.VC1SingleSequence = reader.ReadBool(); return(true); case var _ when localTag.Key == codedContent_Key: this.VC1CodedContentType = (MXFCodedContentScanning)reader.ReadByte(); return(true); case var _ when localTag.Key == identicalGOP_Key: this.VC1IdenticalGOP = reader.ReadBool(); return(true); case var _ when localTag.Key == maxGOP_Key: this.VC1MaxGOP = reader.ReadUInt16(); return(true); case var _ when localTag.Key == pictureCount_Key: this.VC1BPictureCount = reader.ReadUInt16(); return(true); case var _ when localTag.Key == avgBitRate_Key: this.VC1AverageBitRate = reader.ReadUInt32(); return(true); case var _ when localTag.Key == maxBitRate_Key: this.VC1MaximumBitRate = reader.ReadUInt32(); return(true); case var _ when localTag.Key == profile_Key: this.VC1Profile = reader.ReadByte(); return(true); case var _ when localTag.Key == level_Key: this.VC1Level = reader.ReadByte(); return(true); } } return(base.ParseLocalTag(reader, localTag)); }