Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2016 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 "webrtc/call/rtc_event_log_proxy.h" | |
| 12 | |
| 13 namespace webrtc { | |
| 14 | |
| 15 void RtcEventLogProxy::SetEventLog(RtcEventLog* event_log) { | |
| 16 rtc::CritScope lock(&crit_); | |
| 17 event_log_ = event_log; | |
| 18 } | |
| 19 | |
| 20 void RtcEventLogProxy::LogRtpHeader(PacketDirection direction, | |
| 21 MediaType media_type, | |
| 22 const uint8_t* header, | |
| 23 size_t packet_length) { | |
| 24 rtc::CritScope lock(&crit_); | |
| 25 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.
| |
| 26 event_log_->LogRtpHeader(direction, media_type, header, packet_length); | |
| 27 } | |
| 28 } | |
| 29 | |
| 30 void RtcEventLogProxy::LogRtcpPacket(PacketDirection direction, | |
| 31 MediaType media_type, | |
| 32 const uint8_t* packet, | |
| 33 size_t length) { | |
| 34 rtc::CritScope lock(&crit_); | |
| 35 if (event_log_) { | |
| 36 event_log_->LogRtcpPacket(direction, media_type, packet, length); | |
| 37 } | |
| 38 } | |
| 39 | |
| 40 void RtcEventLogProxy::LogAudioPlayout(uint32_t ssrc) { | |
| 41 rtc::CritScope lock(&crit_); | |
| 42 if (event_log_) { | |
| 43 event_log_->LogAudioPlayout(ssrc); | |
| 44 } | |
| 45 } | |
| 46 | |
| 47 } // namespace webrtc | |
| OLD | NEW |