//---------
        // methods
        //---------
        public OffsetDescription GetOffsetValues()
        {
            OffsetDescription allValues = new OffsetDescription();

            allValues.OffsetValue     = this.tbOffset.Text;
            allValues.OffsetSize      = this.comboSize.Text;
            allValues.OffsetByteOrder = this.comboByteOrder.Text;

            return(allValues);
        }
Пример #2
0
        protected int GetStandardPesHeaderSize(Stream readStream, long currentOffset)
        {
            byte checkBytes;
            var  od = new OffsetDescription();

            od.OffsetByteOrder = Constants.BigEndianByteOrder;
            od.OffsetSize      = "1";
            od.OffsetValue     = "8";

            checkBytes = (byte)ParseFile.GetVaryingByteValueAtRelativeOffset(readStream, od, currentOffset);

            return(checkBytes + 3);
        }
Пример #3
0
        protected override int GetAudioPacketHeaderSize(Stream readStream, long currentOffset)
        {
            byte checkBytes;
            OffsetDescription od = new OffsetDescription();

            od.OffsetByteOrder = Constants.BigEndianByteOrder;
            od.OffsetSize      = "1";
            od.OffsetValue     = "8";

            checkBytes = (byte)ParseFile.GetVaryingByteValueAtRelativeOffset(readStream, od, currentOffset);

            return(checkBytes + 7);
        }
Пример #4
0
        protected override int GetVideoPacketFooterSize(Stream readStream, long currentOffset)
        {
            UInt16            checkBytes;
            OffsetDescription od = new OffsetDescription();

            od.OffsetByteOrder = Constants.BigEndianByteOrder;
            od.OffsetSize      = "2";
            od.OffsetValue     = "0xA";

            checkBytes = (UInt16)ParseFile.GetVaryingByteValueAtRelativeOffset(readStream, od, currentOffset);

            return(checkBytes);
        }