当前位置: 首页>>代码示例>>C#>>正文


C# BufferChunk.NextBufferChunk方法代码示例

本文整理汇总了C#中BufferChunk.NextBufferChunk方法的典型用法代码示例。如果您正苦于以下问题:C# BufferChunk.NextBufferChunk方法的具体用法?C# BufferChunk.NextBufferChunk怎么用?C# BufferChunk.NextBufferChunk使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BufferChunk的用法示例。


在下文中一共展示了BufferChunk.NextBufferChunk方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ReadDataFromBuffer

        /// <summary>
        /// Converts buffer into member data
        /// </summary>
        /// <param name="packet"></param>
        public override void ReadDataFromBuffer(BufferChunk buffer)
        {
            // Read SSRCs
            for(int i = 0; i < Header.ItemCount; i++)
            {
                ssrcs.Add(buffer.NextUInt32());
            }

            // Determine if there is a reason...
            // SSRCs are 32 bits each, Length is number of 32 bit words in packet data
            if(Header.Length > Header.ItemCount)
            {
                reason = (byte[])buffer.NextBufferChunk(buffer.NextByte());
            }
        }
开发者ID:tdhieu,项目名称:openvss,代码行数:19,代码来源:RtcpPacket.cs

示例2: RtcpPacket

 /// <summary>
 /// Constructor which creates a generic RtcpPacket from an existing buffer
 /// </summary>
 /// <param name="buffer"></param>
 public RtcpPacket(BufferChunk buffer)
 {
     header = new RtcpHeader(buffer.NextBufferChunk(RtcpHeader.SIZE));
     this.buffer = buffer.NextBufferChunk(Header.Length * 4);
 }
开发者ID:tdhieu,项目名称:openvss,代码行数:9,代码来源:RtcpPacket.cs

示例3: RemovePadding

 /// <summary>
 /// Removes padding to make sure buffer ends on a 32 bit boundary
 /// </summary>
 /// <param name="cbBuffer">Size of buffer in bytes</param>
 protected static void RemovePadding(BufferChunk buffer)
 {
     int padding = buffer.Length % 4;
         
     if(padding > 0)
     {
         buffer.NextBufferChunk(padding);
     }
 }
开发者ID:tdhieu,项目名称:openvss,代码行数:13,代码来源:RtcpPacket.cs

示例4: ReadPrivatePropertyFromBuffer

        private void ReadPrivatePropertyFromBuffer(BufferChunk buffer)
        {
            byte totalLength = buffer.NextByte();
            byte prefixLength = buffer.NextByte();
            int dataLength = totalLength - prefixLength - 1;

            // The cast to byte[] does a copy
            byte[] prefix = (byte[])buffer.NextBufferChunk(prefixLength);
            byte[] data = null;
            
            if(dataLength > 0)
            {
                // The cast to byte[] does a copy
                data = (byte[])buffer.NextBufferChunk(dataLength);
            }

            privs[prefix] = data;
        }
开发者ID:tdhieu,项目名称:openvss,代码行数:18,代码来源:RtcpData.cs

示例5: ReadPropertyFromBuffer

        private void ReadPropertyFromBuffer(int type, BufferChunk buffer)
        {
            int dataLength = buffer.NextByte();

            if(dataLength != 0)
            {
                data[type] = (byte[])buffer.NextBufferChunk(dataLength);
            }
            else // Clear value
            {
                data[type] = null;
            }
        }
开发者ID:tdhieu,项目名称:openvss,代码行数:13,代码来源:RtcpData.cs

示例6: ReadDataFromBuffer

 public void ReadDataFromBuffer(BufferChunk buffer)
 {
     SSRC = buffer.NextUInt32();
     FractionLost = buffer.NextByte();
     PacketsLost = ThreeBytesToInt(buffer.NextBufferChunk(3));
     ExtendedHighestSequence = buffer.NextUInt32();
     Jitter = buffer.NextUInt32();
     LastSenderReport = buffer.NextUInt32();
     DelaySinceLastSenderReport = buffer.NextUInt32();
 }
开发者ID:tdhieu,项目名称:openvss,代码行数:10,代码来源:RtcpData.cs


注:本文中的BufferChunk.NextBufferChunk方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。