Beispiel #1
0
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x000c: IsOptional = reader.ReadBool(); return(true);

            case 0x000b: PropertyType = reader.ReadULKey(); return(true);

            case 0x000d: LocalIdentification = reader.ReadUInt16(); return(true);

            case 0x000e: IsUniqueIdentifier = reader.ReadBool(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Beispiel #2
0
        /// <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));
        }
Beispiel #3
0
        /// <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));
        }
Beispiel #4
0
        /// <summary>
        /// Overridden method to process local tags
        /// </summary>
        /// <param name="localTag"></param>
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x3301: this.ComponentDepth = reader.ReadD(); return(true);

            case 0x3302: this.HorizontalSubsampling = reader.ReadD(); return(true);

            case 0x3308: this.VerticalSubsampling = reader.ReadD(); return(true);

            case 0x3303: this.ColorSiting = reader.ReadB(); return(true);

            case 0x330B: this.ReversedByteOrder = reader.ReadBool(); return(true);

            case 0x3307: this.PaddingBits = (Int16)reader.ReadW(); return(true);

            case 0x3309: this.AlphaSampleDepth = reader.ReadD(); return(true);

            case 0x3304: this.BlackRefLevel = reader.ReadD(); return(true);

            case 0x3305: this.WhiteRefLevel = reader.ReadD(); return(true);

            case 0x3306: this.ColorRange = reader.ReadD(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Beispiel #5
0
        /// <summary>
        /// Overridden method to process local tags
        /// </summary>
        /// <param name="localTag"></param>
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x8007: this.LensAttributes = reader.ReadUTF8String(localTag.Size); return(true);

            case 0x8000: this.IrisFNumber = reader.ReadUInt16(); return(true);

            case 0x8001: this.FocusPositionFromImagePlane = reader.ReadUInt16();  return(true);

            case 0x8002: this.FocusPositionFromFrontLensVertex = reader.ReadUInt16(); return(true);

            case 0x8003: this.MacroSetting = reader.ReadBool(); return(true);

            case 0x8004: this.LensZoom35mmStillCameraEquivalent = reader.ReadUInt16(); return(true);

            case 0x8005: this.LensZoomActualFocalLength = reader.ReadUInt16(); return(true);

            case 0x8006: this.OpticalExtenderMagnification = reader.ReadUInt16(); return(true);

            case 0x8008: this.IrisTNumber = reader.ReadUInt16(); return(true);

            case 0x8009: this.IrisRingPosition = reader.ReadUInt16(); return(true);

            case 0x800a: this.FocusRingPosition = reader.ReadUInt16(); return(true);

            case 0x800b: this.ZoomRingPosition = reader.ReadUInt16(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Beispiel #6
0
 /// <summary>
 /// Overridden method to process local tags
 /// </summary>
 /// <param name="localTag"></param>
 protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
 {
     switch (localTag.Tag)
     {
     case 0x0801: this.ActiveState = 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 0x1701: this.IncludeSync = reader.ReadBool(); return(true);
            }

            return(base.ParseLocalTag(reader, localTag));
        }
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x000F: Size = reader.ReadByte(); return(true);

            case 0x0010: IsSigned = reader.ReadBool(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            if (localTag.Key != null)
            {
                switch (localTag.Tag)
                {
                case 0x3706: this.TIFFSummary = reader.ReadArray(reader.ReadByte, localTag.Size); return(true);

                case 0x3703: this.LeadingLines = reader.ReadInt32(); return(true);

                case 0x3704: this.TrailingLines = reader.ReadInt32(); return(true);

                case 0x3701: this.IsUniform = reader.ReadBool(); return(true);

                case 0x3705: this.JPEGTableID = reader.ReadInt32(); return(true);

                case 0x3702: this.IsContiguous = reader.ReadBool(); return(true);
                }
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Beispiel #10
0
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x0008:
                this.AddChild(reader.ReadReference <MXFClassDefinition>("ParentClass")); return(true);

            case 0x0009:
                this.AddChild(reader.ReadReferenceSet <MXFPropertyDefinition>("Properties", "Property")); return(true);

            case 0x000a: IsConcrete = reader.ReadBool(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Beispiel #11
0
        /// <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.ReadsB(); return(true);

            case 0x3D05: this.ElectroSpatialFormulation = reader.ReadB(); return(true);

            case 0x3D07: this.ChannelCount = reader.ReadD(); return(true);

            case 0x3D01: this.QuantizationBits = reader.ReadD(); return(true);

            case 0x3D0C: this.DialNorm = reader.ReadsB(); return(true);

            case 0x3D06: this.SoundEssenceCoding = reader.ReadKey(); 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)
        {
            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));
        }
Beispiel #14
0
        /// <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));
        }
Beispiel #16
0
        /// <summary>
        /// Overridden method to process local tags
        /// </summary>
        /// <param name="localTag"></param>
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x3F05: this.EditUnitByteCount = reader.ReadUInt32(); return(true);

            case 0x3F06: this.IndexSID = reader.ReadUInt32(); return(true);

            case 0x3F07: this.BodySID = reader.ReadUInt32(); return(true);

            case 0x3F08: this.SliceCount = reader.ReadByte(); return(true);

            case 0x3F0C: this.IndexStartPosition = reader.ReadUInt64(); return(true);

            case 0x3F0D: this.IndexDuration = reader.ReadUInt64(); return(true);

            case 0x3F0E: this.PosTableCount = reader.ReadByte(); return(true);

            case 0x3F0F: this.ExtStartOffset = reader.ReadUInt64(); return(true);

            case 0x3F10: this.VBEByteCount = reader.ReadUInt64(); return(true);

            case 0x3F11: this.SingleIndexLocation = reader.ReadBool(); return(true);

            case 0x3F12: this.SingleEssenceLocation = reader.ReadBool(); return(true);

            case 0x3F13: this.ForwardIndexDirection = reader.ReadBool(); return(true);

            case 0x3F0B: this.IndexEditRate = reader.ReadRational(); return(true);

            case 0x3F0A:                      // Index entry array
            {
                UInt32 NbIndexEntries = reader.ReadUInt32();
                UInt32 entryLength    = reader.ReadUInt32();
                if (NbIndexEntries > 0)
                {
                    this.IndexEntries = new List <MXFEntryIndex>();
                    MXFObject indexCollection = new MXFNamedObject("IndexEntries", reader.Position, MXFObjectType.Index);

                    for (UInt64 i = 0; i < NbIndexEntries; i++)
                    {
                        long next = reader.Position + entryLength;

                        MXFEntryIndex newEntry = new MXFEntryIndex((ulong)this.IndexStartPosition + i, reader, this.SliceCount, this.PosTableCount, entryLength);
                        this.IndexEntries.Add(newEntry);                                         // Also add this entry to the local list

                        // And to the child collection
                        indexCollection.AddChild(newEntry);

                        reader.Seek(next);
                    }
                    this.AddChild(indexCollection);
                }
            }
                return(true);

            case 0x3F09:                      // Delta entry array
            {
                UInt32 NbDeltaEntries = reader.ReadUInt32();
                UInt32 entryLength    = reader.ReadUInt32();
                if (NbDeltaEntries > 0)
                {
                    MXFObject deltaCollection = new MXFNamedObject("DeltaEntries", reader.Position, MXFObjectType.Index);
                    for (int i = 0; i < NbDeltaEntries; i++)
                    {
                        long next = reader.Position + entryLength;
                        deltaCollection.AddChild(new MXFEntryDelta(reader, entryLength));
                        reader.Seek(next);
                    }
                    this.AddChild(deltaCollection);
                }
            }
                return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }