Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(761)

Unified Diff: logging/rtc_event_log/rtc_event_log.cc

Issue 2997973002: Split LogRtpHeader and LogRtcpPacket into separate versions for incoming and outgoing packets.
Patch Set: Split VerifyRtpEvent into one incoming and one outgoing version. Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logging/rtc_event_log/rtc_event_log.h ('k') | logging/rtc_event_log/rtc_event_log_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logging/rtc_event_log/rtc_event_log.cc
diff --git a/logging/rtc_event_log/rtc_event_log.cc b/logging/rtc_event_log/rtc_event_log.cc
index c6d67f21e13552d9e9ee9a10ef9512ab9d5da8a9..5cb398da9f6a0240e29c1b8d45b83e4766a6e3bb 100644
--- a/logging/rtc_event_log/rtc_event_log.cc
+++ b/logging/rtc_event_log/rtc_event_log.cc
@@ -33,6 +33,8 @@
#include "modules/rtp_rtcp/source/rtcp_packet/rtpfb.h"
#include "modules/rtp_rtcp/source/rtcp_packet/sdes.h"
#include "modules/rtp_rtcp/source/rtcp_packet/sender_report.h"
+#include "modules/rtp_rtcp/source/rtp_packet_received.h"
+#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
#include "rtc_base/checks.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/event.h"
@@ -112,16 +114,27 @@ class RtcEventLogImpl final : public RtcEventLog {
void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override;
void LogAudioReceiveStreamConfig(const rtclog::StreamConfig& config) override;
void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override;
+ // TODO(terelius): This can be removed as soon as the interface has been
+ // updated.
void LogRtpHeader(PacketDirection direction,
const uint8_t* header,
size_t packet_length) override;
+ // TODO(terelius): This can be made private, non-virtual as soon as the
+ // interface has been updated.
void LogRtpHeader(PacketDirection direction,
const uint8_t* header,
size_t packet_length,
int probe_cluster_id) override;
+ void LogIncomingRtpHeader(const RtpPacketReceived& packet) override;
+ void LogOutgoingRtpHeader(const RtpPacketToSend& packet,
+ int probe_cluster_id) override;
+ // TODO(terelius): This can be made private, non-virtual as soon as the
+ // interface has been updated.
void LogRtcpPacket(PacketDirection direction,
const uint8_t* packet,
size_t length) override;
+ void LogIncomingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override;
+ void LogOutgoingRtcpPacket(rtc::ArrayView<const uint8_t> packet) override;
void LogAudioPlayout(uint32_t ssrc) override;
void LogLossBasedBweUpdate(int32_t bitrate_bps,
uint8_t fraction_loss,
@@ -418,6 +431,16 @@ void RtcEventLogImpl::LogAudioSendStreamConfig(
StoreEvent(std::move(event));
}
+void RtcEventLogImpl::LogIncomingRtpHeader(const RtpPacketReceived& packet) {
+ LogRtpHeader(kIncomingPacket, packet.data(), packet.size(),
+ PacedPacketInfo::kNotAProbe);
+}
+
+void RtcEventLogImpl::LogOutgoingRtpHeader(const RtpPacketToSend& packet,
+ int probe_cluster_id) {
+ LogRtpHeader(kOutgoingPacket, packet.data(), packet.size(), probe_cluster_id);
+}
+
void RtcEventLogImpl::LogRtpHeader(PacketDirection direction,
const uint8_t* header,
size_t packet_length) {
@@ -455,6 +478,16 @@ void RtcEventLogImpl::LogRtpHeader(PacketDirection direction,
StoreEvent(std::move(rtp_event));
}
+void RtcEventLogImpl::LogIncomingRtcpPacket(
+ rtc::ArrayView<const uint8_t> packet) {
+ LogRtcpPacket(kIncomingPacket, packet.data(), packet.size());
+}
+
+void RtcEventLogImpl::LogOutgoingRtcpPacket(
+ rtc::ArrayView<const uint8_t> packet) {
+ LogRtcpPacket(kOutgoingPacket, packet.data(), packet.size());
+}
+
void RtcEventLogImpl::LogRtcpPacket(PacketDirection direction,
const uint8_t* packet,
size_t length) {
« no previous file with comments | « logging/rtc_event_log/rtc_event_log.h ('k') | logging/rtc_event_log/rtc_event_log_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698