1 /* 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 * 4 * Use of this source code is governed by a BSD-style license 5 * that can be found in the LICENSE file in the root of the source 6 * tree. An additional intellectual property rights grant can be found 7 * in the file PATENTS. All contributing project authors may 8 * be found in the AUTHORS file in the root of the source tree. 9 */ 10 11 #include "logging/rtc_event_log/events/rtc_event_rtp_packet_incoming.h" 12 13 #include "absl/memory/memory.h" 14 #include "modules/rtp_rtcp/source/rtp_packet_received.h" 15 #include "rtc_base/checks.h" 16 17 namespace webrtc { 18 RtcEventRtpPacketIncoming(const RtpPacketReceived & packet)19RtcEventRtpPacketIncoming::RtcEventRtpPacketIncoming( 20 const RtpPacketReceived& packet) 21 : packet_(packet) {} 22 RtcEventRtpPacketIncoming(const RtcEventRtpPacketIncoming & other)23RtcEventRtpPacketIncoming::RtcEventRtpPacketIncoming( 24 const RtcEventRtpPacketIncoming& other) 25 : RtcEvent(other.timestamp_us_), packet_(other.packet_) {} 26 27 RtcEventRtpPacketIncoming::~RtcEventRtpPacketIncoming() = default; 28 Copy() const29std::unique_ptr<RtcEventRtpPacketIncoming> RtcEventRtpPacketIncoming::Copy() 30 const { 31 return absl::WrapUnique<RtcEventRtpPacketIncoming>( 32 new RtcEventRtpPacketIncoming(*this)); 33 } 34 35 } // namespace webrtc 36