Example #1
0
        /// <summary>
        ///    Reads the contents of the current instance.
        /// </summary>
        /// <param name="propertiesStyle">
        ///    A <see cref="ReadStyle" /> value specifying at what level
        ///    of accuracy to read the media properties, or <see
        ///    cref="ReadStyle.None" /> to ignore the properties.
        /// </param>
        private void Read(ReadStyle propertiesStyle)
        {
            Mode = AccessMode.Read;
            try
            {
                HeaderObject header = new HeaderObject(this, 0);

                if (header.HasContentDescriptors)
                {
                    TagTypesOnDisk |= TagTypes.Asf;
                }

                asf_tag = new Asf.Tag(header);

                InvariantStartPosition = (long)header.OriginalSize;
                InvariantEndPosition   = Length;

                if (propertiesStyle != ReadStyle.None)
                {
                    properties = header.Properties;
                }
            }
            finally
            {
                Mode = AccessMode.Closed;
            }
        }
Example #2
0
        /// <summary>
        ///    Reads the contents of the current instance.
        /// </summary>
        /// <param name="propertiesStyle">
        ///    A <see cref="ReadStyle" /> value specifying at what level
        ///    of accuracy to read the media properties, or <see
        ///    cref="ReadStyle.None" /> to ignore the properties.
        /// </param>
        private void Read(ReadStyle propertiesStyle)
        {
            Mode = AccessMode.Read;
            try {
                HeaderObject header = new HeaderObject (this, 0);

                if (header.HasContentDescriptors)
                    TagTypesOnDisk |= TagTypes.Asf;

                asf_tag = new Asf.Tag (header);

                InvariantStartPosition = (long) header.OriginalSize;
                InvariantEndPosition = Length;

                if (propertiesStyle != ReadStyle.None)
                    properties = header.Properties;
            } finally {
                Mode = AccessMode.Closed;
            }
        }