| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 425 } | 425 } |
| 426 static_cast<RECEIVER*>(receiver->internal())->SetChannel(channel); | 426 static_cast<RECEIVER*>(receiver->internal())->SetChannel(channel); |
| 427 } | 427 } |
| 428 } | 428 } |
| 429 } | 429 } |
| 430 | 430 |
| 431 } // namespace | 431 } // namespace |
| 432 | 432 |
| 433 namespace webrtc { | 433 namespace webrtc { |
| 434 | 434 |
| 435 static const char* const kRtcErrorNames[] = { |
| 436 "NONE", |
| 437 "UNSUPPORTED_PARAMETER", |
| 438 "INVALID_PARAMETER", |
| 439 "INVALID_RANGE", |
| 440 "SYNTAX_ERROR", |
| 441 "INVALID_STATE", |
| 442 "INVALID_MODIFICATION", |
| 443 "NETWORK_ERROR", |
| 444 "INTERNAL_ERROR", |
| 445 }; |
| 446 |
| 447 std::ostream& operator<<(std::ostream& stream, RtcError error) { |
| 448 int index = static_cast<int>(error); |
| 449 RTC_CHECK(index < static_cast<int>(sizeof(kRtcErrorNames) / |
| 450 sizeof(kRtcErrorNames[0]))); |
| 451 return stream << kRtcErrorNames[index]; |
| 452 } |
| 453 |
| 435 // Generate a RTCP CNAME when a PeerConnection is created. | 454 // Generate a RTCP CNAME when a PeerConnection is created. |
| 436 std::string GenerateRtcpCname() { | 455 std::string GenerateRtcpCname() { |
| 437 std::string cname; | 456 std::string cname; |
| 438 if (!rtc::CreateRandomString(kRtcpCnameLength, &cname)) { | 457 if (!rtc::CreateRandomString(kRtcpCnameLength, &cname)) { |
| 439 LOG(LS_ERROR) << "Failed to generate CNAME."; | 458 LOG(LS_ERROR) << "Failed to generate CNAME."; |
| 440 RTC_DCHECK(false); | 459 RTC_DCHECK(false); |
| 441 } | 460 } |
| 442 return cname; | 461 return cname; |
| 443 } | 462 } |
| 444 | 463 |
| (...skipping 1922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 | 2386 |
| 2368 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2387 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
| 2369 int64_t max_size_bytes) { | 2388 int64_t max_size_bytes) { |
| 2370 return event_log_->StartLogging(file, max_size_bytes); | 2389 return event_log_->StartLogging(file, max_size_bytes); |
| 2371 } | 2390 } |
| 2372 | 2391 |
| 2373 void PeerConnection::StopRtcEventLog_w() { | 2392 void PeerConnection::StopRtcEventLog_w() { |
| 2374 event_log_->StopLogging(); | 2393 event_log_->StopLogging(); |
| 2375 } | 2394 } |
| 2376 } // namespace webrtc | 2395 } // namespace webrtc |
| OLD | NEW |