OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void DumpNetworkMetrics(const Controller::NetworkMetrics& metrics, | 56 void DumpNetworkMetrics(const Controller::NetworkMetrics& metrics, |
57 int64_t timestamp) override; | 57 int64_t timestamp) override; |
58 | 58 |
59 private: | 59 private: |
60 std::unique_ptr<FileWrapper> dump_file_; | 60 std::unique_ptr<FileWrapper> dump_file_; |
61 }; | 61 }; |
62 | 62 |
63 DebugDumpWriterImpl::DebugDumpWriterImpl(FILE* file_handle) | 63 DebugDumpWriterImpl::DebugDumpWriterImpl(FILE* file_handle) |
64 : dump_file_(FileWrapper::Create()) { | 64 : dump_file_(FileWrapper::Create()) { |
65 #ifndef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP | 65 #ifndef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP |
66 RTC_DCHECK(false); | 66 RTC_NOTREACHED(); |
67 #endif | 67 #endif |
68 dump_file_->OpenFromFileHandle(file_handle); | 68 dump_file_->OpenFromFileHandle(file_handle); |
69 RTC_CHECK(dump_file_->is_open()); | 69 RTC_CHECK(dump_file_->is_open()); |
70 } | 70 } |
71 | 71 |
72 void DebugDumpWriterImpl::DumpNetworkMetrics( | 72 void DebugDumpWriterImpl::DumpNetworkMetrics( |
73 const Controller::NetworkMetrics& metrics, | 73 const Controller::NetworkMetrics& metrics, |
74 int64_t timestamp) { | 74 int64_t timestamp) { |
75 #ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP | 75 #ifdef WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP |
76 Event event; | 76 Event event; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 DumpEventToFile(event, dump_file_.get()); | 130 DumpEventToFile(event, dump_file_.get()); |
131 #endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP | 131 #endif // WEBRTC_AUDIO_NETWORK_ADAPTOR_DEBUG_DUMP |
132 } | 132 } |
133 | 133 |
134 std::unique_ptr<DebugDumpWriter> DebugDumpWriter::Create(FILE* file_handle) { | 134 std::unique_ptr<DebugDumpWriter> DebugDumpWriter::Create(FILE* file_handle) { |
135 return std::unique_ptr<DebugDumpWriter>(new DebugDumpWriterImpl(file_handle)); | 135 return std::unique_ptr<DebugDumpWriter>(new DebugDumpWriterImpl(file_handle)); |
136 } | 136 } |
137 | 137 |
138 } // namespace webrtc | 138 } // namespace webrtc |
OLD | NEW |