Index: webrtc/call/rtc_event_log_proxy.cc |
diff --git a/webrtc/call/rtc_event_log_proxy.cc b/webrtc/call/rtc_event_log_proxy.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b49847cfa83789638d36f7c535cc5b2536efd88d |
--- /dev/null |
+++ b/webrtc/call/rtc_event_log_proxy.cc |
@@ -0,0 +1,47 @@ |
+/* |
+ * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
+ * |
+ * Use of this source code is governed by a BSD-style license |
+ * that can be found in the LICENSE file in the root of the source |
+ * tree. An additional intellectual property rights grant can be found |
+ * in the file PATENTS. All contributing project authors may |
+ * be found in the AUTHORS file in the root of the source tree. |
+ */ |
+ |
+#include "webrtc/call/rtc_event_log_proxy.h" |
+ |
+namespace webrtc { |
+ |
+void RtcEventLogProxy::SetEventLog(RtcEventLog* event_log) { |
+ rtc::CritScope lock(&crit_); |
+ event_log_ = event_log; |
+} |
+ |
+void RtcEventLogProxy::LogRtpHeader(PacketDirection direction, |
+ MediaType media_type, |
+ const uint8_t* header, |
+ size_t packet_length) { |
+ rtc::CritScope lock(&crit_); |
+ if (event_log_) { |
stefan-webrtc
2016/03/11 10:11:53
Can we DCHECK on this instead so that we know that
ivoc
2016/03/16 17:00:32
Good idea.
|
+ event_log_->LogRtpHeader(direction, media_type, header, packet_length); |
+ } |
+} |
+ |
+void RtcEventLogProxy::LogRtcpPacket(PacketDirection direction, |
+ MediaType media_type, |
+ const uint8_t* packet, |
+ size_t length) { |
+ rtc::CritScope lock(&crit_); |
+ if (event_log_) { |
+ event_log_->LogRtcpPacket(direction, media_type, packet, length); |
+ } |
+} |
+ |
+void RtcEventLogProxy::LogAudioPlayout(uint32_t ssrc) { |
+ rtc::CritScope lock(&crit_); |
+ if (event_log_) { |
+ event_log_->LogAudioPlayout(ssrc); |
+ } |
+} |
+ |
+} // namespace webrtc |