Ejemplo n.º 1
0
        public override int EncodeFrameData(int frameIndex, byte[] packetBytes, int startIndex)
        {
            int currentIndex = startIndex;

            // Handling empty list.
            if (BubbleFragments.Count == 0)
            {
                return(currentIndex);
            }

            BubbleFragment entry = BubbleFragments[frameIndex];

            currentIndex  = entry.EncodeFragmentData(packetBytes, currentIndex);
            currentIndex += 60; // No need to read the padding.
            return(currentIndex);
        }
Ejemplo n.º 2
0
        public override int EncodeFrameData(int frameIndex, byte[] packetBytes, int startIndex)
        {
            int currentIndex = startIndex;

            currentIndex = EncodeUtil.Encode(ref TargetBubbleId, packetBytes, currentIndex);

            currentIndex = SourceBubbleFragment.EncodeFragmentData(packetBytes, currentIndex);

            // Program Fragment
            currentIndex = EncodeUtil.Encode(ref ProgramName, packetBytes, currentIndex, 25);
            currentIndex = EncodeUtil.Encode(ref ProgramMajorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Encode(ref ProgramMinorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Encode(ref ProtocolMajorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Encode(ref ProtocolMinorVersion, packetBytes, currentIndex);
            currentIndex = EncodeUtil.Encode(ref ProtocolSourceRevision, packetBytes, currentIndex);

            //FramesEncoded++;
            return(currentIndex);
        }