Ejemplo n.º 1
0
 private void FindFrame(byte[] data, ref VBRData vbrHeader)
 {
     byte[] buffer1 = new byte[4];
     Buffer.BlockCopy(data, 0, buffer1, 0, 4);
     int num1 = data.Length - 4;
     for (int num2 = 0; num2 < num1; num2++)
     {
         if (this.IsFrameHeader(buffer1))
         {
             this.DecodeHeader(buffer1);
             int num3 = num2 + this.GetFrameLength(this.m_Frame);
             if ((num3 < num1) && this.ValidFrameAt(num3, data))
             {
                 this.m_Frame.Found = true;
                 this.m_Frame.Position = num2;
                 this.m_Frame.Size = this.GetFrameLength(this.m_Frame);
                 this.m_Frame.Xing = this.IsXing(num2 + buffer1.Length, data);
                 vbrHeader = this.FindVBR(num2 + this.GetVBRFrameOffset(this.m_Frame), data);
                 return;
             }
         }
         buffer1[0] = buffer1[1];
         buffer1[1] = buffer1[2];
         buffer1[2] = buffer1[3];
         buffer1[3] = data[4 + num2];
     }
 }
Ejemplo n.º 2
0
        private void FindFrame(byte[] data, ref VBRData vbrHeader)
        {
            byte[] buffer1 = new byte[4];
            Buffer.BlockCopy(data, 0, buffer1, 0, 4);
            int num1 = data.Length - 4;

            for (int num2 = 0; num2 < num1; num2++)
            {
                if (this.IsFrameHeader(buffer1))
                {
                    this.DecodeHeader(buffer1);
                    int num3 = num2 + this.GetFrameLength(this.m_Frame);
                    if ((num3 < num1) && this.ValidFrameAt(num3, data))
                    {
                        this.m_Frame.Found    = true;
                        this.m_Frame.Position = num2;
                        this.m_Frame.Size     = this.GetFrameLength(this.m_Frame);
                        this.m_Frame.Xing     = this.IsXing(num2 + buffer1.Length, data);
                        vbrHeader             = this.FindVBR(num2 + this.GetVBRFrameOffset(this.m_Frame), data);
                        return;
                    }
                }
                buffer1[0] = buffer1[1];
                buffer1[1] = buffer1[2];
                buffer1[2] = buffer1[3];
                buffer1[3] = data[4 + num2];
            }
        }
Ejemplo n.º 3
0
        private VBRData GetFhGInfo(int index, byte[] data)
        {
            VBRData data1 = new VBRData();

            data1.Found  = true;
            data1.ID     = Encoding.ASCII.GetBytes(VBRHeaderID.FhG);
            data1.Scale  = data[index + 9];
            data1.Bytes  = (((data[index + 10] * 0x1000000) + (data[index + 11] * 0x10000)) + (data[index + 12] * 0x100)) + data[index + 13];
            data1.Frames = (((data[index + 14] * 0x1000000) + (data[index + 15] * 0x10000)) + (data[index + 0x10] * 0x100)) + data[index + 0x11];
            return(data1);
        }
Ejemplo n.º 4
0
 private VBRData GetFhGInfo(int index, byte[] data)
 {
     VBRData data1 = new VBRData();
     data1.Found = true;
     data1.ID = Encoding.ASCII.GetBytes(VBRHeaderID.FhG);
     data1.Scale = data[index + 9];
     data1.Bytes = (((data[index + 10] * 0x1000000) + (data[index + 11] * 0x10000)) + (data[index + 12] * 0x100)) + data[index + 13];
     data1.Frames = (((data[index + 14] * 0x1000000) + (data[index + 15] * 0x10000)) + (data[index + 0x10] * 0x100)) + data[index + 0x11];
     return data1;
 }