public bool SendRaw(MsgHdr message, ref RTPClient client, bool isAudio, bool isData) { OutputBuffer.WriteByte((byte)'$'); if (isAudio) { OutputBuffer.WriteByte(isData ? client.audioDataChannel : client.audioRtcpChannel); } else { OutputBuffer.WriteByte(isData ? client.videoDataChannel : client.videoRtcpChannel); } OutputBuffer.Write((ushort)message.Buffers.Sum(x => x.Length)); foreach (var buffer in message.Buffers) { OutputBuffer.WriteBytes(buffer); } return(EnqueueForOutbound(OutputBuffer)); }
public bool SendRaw(MsgHdr message,ref RTPClient client,bool isAudio,bool isData) { OutputBuffer.WriteByte((byte) '$'); if (isAudio) { OutputBuffer.WriteByte(isData ? client.audioDataChannel : client.audioRtcpChannel); } else { OutputBuffer.WriteByte(isData ? client.videoDataChannel : client.videoRtcpChannel); } OutputBuffer.Write((ushort)message.Buffers.Sum(x=>x.Length)); foreach (var buffer in message.Buffers) { OutputBuffer.WriteBytes(buffer); } return EnqueueForOutbound(OutputBuffer); }