/// <summary> /// Default constructor. /// </summary> /// <param name="stream">RTP stream.</param> /// <exception cref="ArgumentNullException">Is raised when <b>stream</b> is null reference.</exception> public RTP_ReceiveStreamEventArgs(RTP_ReceiveStream stream) { if (stream == null) { throw new ArgumentNullException("stream"); } m_pStream = stream; }
/// <summary> /// Is called when RTP session receives new RTP packet. /// </summary> /// <param name="packet">RTP packet.</param> /// <param name="size">Packet size in bytes.</param> /// <exception cref="ArgumentNullException">Is raised when <b>packet</b> is null reference.</exception> internal void OnRtpPacketReceived(RTP_Packet packet, int size) { if (packet == null) { throw new ArgumentNullException("packet"); } SetLastRtpPacket(DateTime.Now); // Passive source and first RTP packet. if (m_pStream == null) { m_pStream = new RTP_ReceiveStream(this.Session, this, packet.SeqNo); SetState(RTP_SourceState.Active); } m_pStream.Process(packet, size); }