SIPSorcery.Net.RTPFrame.MakeSinglePacketFrame C# (CSharp) Method

MakeSinglePacketFrame() public static method

Audio frames are generally contained within a single RTP packet. This method is a shortcut to construct a frame from a single RTP packet.
public static MakeSinglePacketFrame ( RTPPacket rtpPacket ) : RTPFrame
rtpPacket RTPPacket
return RTPFrame
        public static RTPFrame MakeSinglePacketFrame(RTPPacket rtpPacket)
        {
            RTPFrame frame = new RTPFrame();
            frame.AddRTPPacket(rtpPacket);
            frame.Timestamp = rtpPacket.Header.Timestamp;

            return frame;
        }