| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 565 |
| 566 auto probe_result = event->mutable_probe_result(); | 566 auto probe_result = event->mutable_probe_result(); |
| 567 probe_result->set_id(id); | 567 probe_result->set_id(id); |
| 568 probe_result->set_result(result); | 568 probe_result->set_result(result); |
| 569 if (result == rtclog::BweProbeResult::SUCCESS) | 569 if (result == rtclog::BweProbeResult::SUCCESS) |
| 570 probe_result->set_bitrate_bps(bitrate_bps); | 570 probe_result->set_bitrate_bps(bitrate_bps); |
| 571 StoreEvent(&event); | 571 StoreEvent(&event); |
| 572 } | 572 } |
| 573 | 573 |
| 574 void RtcEventLogImpl::StoreEvent(std::unique_ptr<rtclog::Event>* event) { | 574 void RtcEventLogImpl::StoreEvent(std::unique_ptr<rtclog::Event>* event) { |
| 575 RTC_DCHECK(event != nullptr); |
| 576 RTC_DCHECK(event->get() != nullptr); |
| 575 if (!event_queue_.Insert(event)) { | 577 if (!event_queue_.Insert(event)) { |
| 576 LOG(LS_ERROR) << "WebRTC event log queue full. Dropping event."; | 578 LOG(LS_ERROR) << "WebRTC event log queue full. Dropping event."; |
| 577 } | 579 } |
| 578 helper_thread_.SignalNewEvent(); | 580 helper_thread_.SignalNewEvent(); |
| 579 } | 581 } |
| 580 | 582 |
| 581 bool RtcEventLog::ParseRtcEventLog(const std::string& file_name, | 583 bool RtcEventLog::ParseRtcEventLog(const std::string& file_name, |
| 582 rtclog::EventStream* result) { | 584 rtclog::EventStream* result) { |
| 583 char tmp_buffer[1024]; | 585 char tmp_buffer[1024]; |
| 584 int bytes_read = 0; | 586 int bytes_read = 0; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 612 #else | 614 #else |
| 613 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 615 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |
| 614 #endif // ENABLE_RTC_EVENT_LOG | 616 #endif // ENABLE_RTC_EVENT_LOG |
| 615 } | 617 } |
| 616 | 618 |
| 617 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { | 619 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { |
| 618 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); | 620 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); |
| 619 } | 621 } |
| 620 | 622 |
| 621 } // namespace webrtc | 623 } // namespace webrtc |
| OLD | NEW |