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


C# BufferChunk.NextBufferChunkMax方法代码示例

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


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

示例1: Packetize

        /// <summary>
        /// Converts frame into packets
        /// 
        /// Note: This method does not currently take into account header extensions in the packet
        /// If we re-add support for optional headers, we would need to use the MaxPayloadSize
        /// property of each packet, and header extensions would have to be set before this method 
        /// is called. JVE 6/28/2004
        /// </summary>
        private void Packetize(BufferChunk frame)
        {
            // This assumes length member variable has been set already
            ApproximatePacketsInFrame();

            // We'll find out real number of packets as we build them
            packetsInFrame = 0;

            while(frame.Length > 0)
            {
                RtpPacket packet = GetNextPacket();

                // In the event that we re-add support for custom headers, add that data here
                // before making the call to packet.MaxPayloadSize - 9/23/2004 JVE

                // Copy the MaxPayload amount of data
                packet.Payload = frame.NextBufferChunkMax(packet.MaxPayloadSize);
            }

            WritePacketsInFrame();
        }
开发者ID:abhishek-kumar,项目名称:AIGA,代码行数:29,代码来源:RtpFrame.cs

示例2: Packetize

        /// <summary>
        /// Converts frame into packets
        /// 
        /// Note: This method does not currently take into account header extensions in the packet
        /// If we re-add support for optional headers, we would need to use the MaxPayloadSize
        /// property of each packet, and header extensions would have to be set before this method 
        /// is called. JVE 6/28/2004
        /// </summary>
        private void Packetize(BufferChunk frame)
        {
            RtpPacket packet;
            int offset = 0;
            // This assumes length member variable has been set already
            ApproximatePacketsInFrame();

            // We'll find out real number of packets as we build them
            packetsInFrame = 0;

            while(frame.Length > 0)
            {
                // packetsInFrame is increase in the GetNextPacket
                packet = GetNextPacket();

                // In the event that we re-add support for custom headers, add that data here 
                // before making the call to packet.MaxPayloadSize - 9/23/2004 JVE

                // jpeg                
                packet.JpgSpec = 0;
                packet.JpgOffset = offset;
                packet.JpgType = 1;
                packet.JpgQuality = payloadPara["Quality"].GetHashCode();
                packet.JpgWidth = payloadPara["Width"].GetHashCode();
                packet.JpgHeight = payloadPara["Height"].GetHashCode();

                // Copy the MaxPayload amount of data
                packet.Payload = frame.NextBufferChunkMax(packet.MaxPayloadSize);
                offset += packet.MaxPayloadSize;

                 // set marker frame
                if (frame.Length <= 0)
                    packet.Marker = true;
           }
        }
开发者ID:tdhieu,项目名称:openvss,代码行数:43,代码来源:RtpFrame.cs


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