Chromium Code Reviews| Index: webrtc/logging/rtc_event_log/rtc_event_log.cc |
| diff --git a/webrtc/logging/rtc_event_log/rtc_event_log.cc b/webrtc/logging/rtc_event_log/rtc_event_log.cc |
| index e661e679828dc401ede7bfbce978fd09ae040a7b..ec47e16d5c2f3c4787b017f21b806d871bce611c 100644 |
| --- a/webrtc/logging/rtc_event_log/rtc_event_log.cc |
| +++ b/webrtc/logging/rtc_event_log/rtc_event_log.cc |
| @@ -29,6 +29,8 @@ |
| #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/rtpfb.h" |
| #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sdes.h" |
| #include "webrtc/modules/rtp_rtcp/source/rtcp_packet/sender_report.h" |
| +#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h" |
| +#include "webrtc/modules/rtp_rtcp/source/rtp_packet_to_send.h" |
| #include "webrtc/rtc_base/atomicops.h" |
| #include "webrtc/rtc_base/checks.h" |
| #include "webrtc/rtc_base/constructormagic.h" |
| @@ -68,16 +70,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, |
| @@ -382,6 +395,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) { |
| @@ -419,6 +442,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()); |
|
eladalon
2017/09/05 11:57:01
nit: Would it be possible to change PacketDirectio
terelius
2017/09/07 12:53:55
The PacketDirection will be removed in a future CL
|
| +} |
| + |
| +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) { |