xref: /aosp_15_r20/external/webrtc/logging/rtc_event_log/events/rtc_event_rtp_packet_outgoing.cc (revision d9f758449e529ab9291ac668be2861e7a55c2422)
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_outgoing.h"
12 
13 #include "absl/memory/memory.h"
14 #include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
15 #include "rtc_base/checks.h"
16 
17 namespace webrtc {
18 
RtcEventRtpPacketOutgoing(const RtpPacketToSend & packet,int probe_cluster_id)19 RtcEventRtpPacketOutgoing::RtcEventRtpPacketOutgoing(
20     const RtpPacketToSend& packet,
21     int probe_cluster_id)
22     : packet_(packet), probe_cluster_id_(probe_cluster_id) {}
23 
RtcEventRtpPacketOutgoing(const RtcEventRtpPacketOutgoing & other)24 RtcEventRtpPacketOutgoing::RtcEventRtpPacketOutgoing(
25     const RtcEventRtpPacketOutgoing& other)
26     : RtcEvent(other.timestamp_us_),
27       packet_(other.packet_),
28       probe_cluster_id_(other.probe_cluster_id_) {}
29 
30 RtcEventRtpPacketOutgoing::~RtcEventRtpPacketOutgoing() = default;
31 
Copy() const32 std::unique_ptr<RtcEventRtpPacketOutgoing> RtcEventRtpPacketOutgoing::Copy()
33     const {
34   return absl::WrapUnique<RtcEventRtpPacketOutgoing>(
35       new RtcEventRtpPacketOutgoing(*this));
36 }
37 
38 }  // namespace webrtc
39