/// <summary>
        /// Overridden method to process local tags
        /// </summary>
        /// <param name="localTag"></param>
        protected override bool ParseLocalTag(MXFReader reader, MXFLocalTag localTag)
        {
            switch (localTag.Tag)
            {
            case 0x0102: this.GenerationUID = reader.ReadKey(); return(true);

            case 0x0101: this.ObjectClass = reader.ReadKey(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Esempio n. 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 0x3006: this.LinkedTrackId = reader.ReadD(); return(true);

            case 0x3001: this.SampleRate = reader.ReadRational(); return(true);

            case 0x3002: this.ContainerDuration = reader.ReadL(); return(true);

            case 0x3004: this.EssenceContainer = reader.ReadKey(); return(true);

            case 0x3005: this.Codec = 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 0x3D0A: this.BlockAlign = reader.ReadW(); return(true);

            case 0x3D0B: this.SequenceOffset = reader.ReadB(); return(true);

            case 0x3D09: this.AveragesBytesPerSecond = reader.ReadD(); return(true);

            case 0x3D32: this.ChannelAssignment = reader.ReadKey(); return(true);

            case 0x3D29: this.PeakEnvelopeVersion = reader.ReadD(); return(true);

            case 0x3D2A: this.PeakEnvelopeFormat = reader.ReadD(); return(true);

            case 0x3D2B: this.PointsPerPeakValue = reader.ReadD(); return(true);

            case 0x3D2C: this.PeakEnvelopeBlockSize = reader.ReadD(); return(true);

            case 0x3D2D: this.PeakChannels = reader.ReadD(); return(true);

            case 0x3D2E: this.PeakFrames = reader.ReadD(); return(true);

            case 0x3D2F: this.PeakOfPeaksPosition = reader.ReadL(); return(true);

            case 0x3D30: this.PeakEnvelopeTimestamp = reader.ReadTimestamp(); return(true);

            case 0x3D31:
                this.PeakEnvelopeData = new byte[localTag.Size];
                reader.Read(this.PeakEnvelopeData, 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 0x3E01: this.DataEssenceCoding = 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 0x0201: this.DataDefinition = reader.ReadKey(); return(true);

            case 0x0202: this.Duration = reader.ReadL(); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="reader"></param>
        private void Initialize(MXFReader reader)
        {
            // Make sure we read at the data position
            reader.Seek(this.DataOffset);

            // Read all local tags
            long klvEnd = this.DataOffset + this.Length;

            while (reader.Position + 4 < klvEnd)
            {
                MXFLocalTag tag  = new MXFLocalTag(reader);
                long        next = tag.DataOffset + tag.Size;

                if (tag.Tag == 0x3C0A)
                {
                    // Generic instance UID
                    this.InstanceUID = reader.ReadKey();
                }
                else
                {
                    if (tag.Tag > 0x7FFF)
                    {
                        // Find the tag in the primerpack's keys
                        if (this.Partition != null && this.Partition.PrimerKeys != null)
                        {
                            if (this.Partition.PrimerKeys.ContainsKey(tag.Tag))
                            {
                                MXFEntryPrimer entry = this.Partition.PrimerKeys[tag.Tag];
                                tag.Name = entry.AliasUID.Key.Name;
                            }
                        }
                    }

                    // Allow derived classes to handle the data
                    if (!ParseLocalTag(reader, tag))
                    {
                        // Not processed, use default
                        tag.Parse(reader);

                        // Add to the collection
                        AddChild(tag);
                    }
                }

                reader.Seek(next);
            }

            // Allow derived classes to do some final work
            PostInitialize();
        }
Esempio n. 7
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 0x3C09: this.ThisGenerationUID = reader.ReadKey(); return(true);

            case 0x3C01: this.CompanyName = reader.ReadS(localTag.Size); return(true);

            case 0x3C02: this.ProductName = reader.ReadS(localTag.Size); return(true);

            case 0x3C03: this.ProductVersion = reader.ReadVersion(); return(true);

            case 0x3C04: this.ProductVersionString = reader.ReadS(localTag.Size); return(true);

            case 0x3C05: this.ProductUID = reader.ReadKey(); return(true);

            case 0x3C06: this.ModificationDate = reader.ReadTimestamp(); return(true);

            case 0x3C07: this.ToolkitVersion = reader.ReadVersion(); return(true);

            case 0x3C08: this.Platform = reader.ReadS(localTag.Size); return(true);
            }
            return(base.ParseLocalTag(reader, localTag));
        }
Esempio n. 8
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));
        }
Esempio n. 9
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 0x3215: this.SignalStandard = reader.ReadB(); return(true);

            case 0x320C: this.FrameLayout = reader.ReadB(); return(true);

            case 0x3203: this.StoredWidth = reader.ReadD(); return(true);

            case 0x3202: this.StoredHeight = reader.ReadD(); return(true);

            case 0x3216: this.StoredF2Offset = (Int32)reader.ReadD(); return(true);

            case 0x3205: this.SampledWidth = reader.ReadD(); return(true);

            case 0x3204: this.SampledHeight = reader.ReadD(); return(true);

            case 0x3206: this.SampledXOffset = (Int32)reader.ReadD(); return(true);

            case 0x3207: this.SampledYOffset = (Int32)reader.ReadD(); return(true);

            case 0x3208: this.DisplayHeight = reader.ReadD(); return(true);

            case 0x3209: this.DisplayWidth = reader.ReadD(); return(true);

            case 0x320A: this.DisplayXOffset = (Int32)reader.ReadD(); return(true);

            case 0x320B: this.DisplayYOffset = (Int32)reader.ReadD(); return(true);

            case 0x3217: this.DisplayF2Offset = (Int32)reader.ReadD(); return(true);

            case 0x320E: this.AspectRatio = reader.ReadRational(); return(true);

            case 0x3218: this.ActiveFormatDescriptor = reader.ReadB(); return(true);

            case 0x320D:
                this.VideoLineMap    = new Int32[4];
                this.VideoLineMap[0] = (Int32)reader.ReadD();
                this.VideoLineMap[1] = (Int32)reader.ReadD();
                this.VideoLineMap[2] = (Int32)reader.ReadD();
                this.VideoLineMap[3] = (Int32)reader.ReadD();
                return(true);

            case 0x320F: this.AlphaTransparency = reader.ReadB(); return(true);

            case 0x3210: this.TransferCharacteristics = reader.ReadKey(); return(true);

            case 0x3211: this.ImageAlignmentOffset = reader.ReadD(); return(true);

            case 0x3213: this.ImageStartOffset = reader.ReadD(); return(true);

            case 0x3214: this.ImageEndOffset = reader.ReadD(); return(true);

            case 0x3212: this.FieldDominance = reader.ReadB(); return(true);

            case 0x3201: this.PictureEssenceCoding = reader.ReadKey(); return(true);

            case 0x321A: this.CodingEquations = reader.ReadKey(); return(true);

            case 0x3219: this.ColorPrimaries = reader.ReadKey(); return(true);
            }

            //PropertyDescriptor prop = TypeDescriptor.GetProperties(typeof(MXFGenericPictureEssenceDescriptor))["StoredWidth"];
            //DescriptionAttribute attr = prop.Attributes[typeof(DescriptionAttribute)] as DescriptionAttribute;
            //FieldInfo fi = attr.GetType().GetField("description", BindingFlags.NonPublic | BindingFlags.Instance);
            //if (fi != null)
            //	fi.SetValue(attr, "DIT IS GELUKT!!!");

            return(base.ParseLocalTag(reader, localTag));
        }