OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 } | 462 } |
463 if (payload_type_ == payload_type) { | 463 if (payload_type_ == payload_type) { |
464 if (!audio_configured_) { | 464 if (!audio_configured_) { |
465 *video_type = video_->VideoCodecType(); | 465 *video_type = video_->VideoCodecType(); |
466 } | 466 } |
467 return 0; | 467 return 0; |
468 } | 468 } |
469 std::map<int8_t, RtpUtility::Payload*>::iterator it = | 469 std::map<int8_t, RtpUtility::Payload*>::iterator it = |
470 payload_type_map_.find(payload_type); | 470 payload_type_map_.find(payload_type); |
471 if (it == payload_type_map_.end()) { | 471 if (it == payload_type_map_.end()) { |
472 LOG(LS_WARNING) << "Payload type " << payload_type << " not registered."; | 472 LOG(LS_WARNING) << "Payload type " << static_cast<int>(payload_type) |
| 473 << " not registered."; |
473 return -1; | 474 return -1; |
474 } | 475 } |
475 SetSendPayloadType(payload_type); | 476 SetSendPayloadType(payload_type); |
476 RtpUtility::Payload* payload = it->second; | 477 RtpUtility::Payload* payload = it->second; |
477 assert(payload); | 478 assert(payload); |
478 if (!payload->audio && !audio_configured_) { | 479 if (!payload->audio && !audio_configured_) { |
479 video_->SetVideoCodecType(payload->typeSpecific.Video.videoCodecType); | 480 video_->SetVideoCodecType(payload->typeSpecific.Video.videoCodecType); |
480 *video_type = payload->typeSpecific.Video.videoCodecType; | 481 *video_type = payload->typeSpecific.Video.videoCodecType; |
481 video_->SetMaxConfiguredBitrateVideo(payload->typeSpecific.Video.maxRate); | 482 video_->SetMaxConfiguredBitrateVideo(payload->typeSpecific.Video.maxRate); |
482 } | 483 } |
(...skipping 22 matching lines...) Expand all Loading... |
505 { | 506 { |
506 // Drop this packet if we're not sending media packets. | 507 // Drop this packet if we're not sending media packets. |
507 CriticalSectionScoped cs(send_critsect_.get()); | 508 CriticalSectionScoped cs(send_critsect_.get()); |
508 ssrc = ssrc_; | 509 ssrc = ssrc_; |
509 if (!sending_media_) { | 510 if (!sending_media_) { |
510 return 0; | 511 return 0; |
511 } | 512 } |
512 } | 513 } |
513 RtpVideoCodecTypes video_type = kRtpVideoGeneric; | 514 RtpVideoCodecTypes video_type = kRtpVideoGeneric; |
514 if (CheckPayloadType(payload_type, &video_type) != 0) { | 515 if (CheckPayloadType(payload_type, &video_type) != 0) { |
515 LOG(LS_ERROR) << "Don't send data with unknown payload type."; | 516 LOG(LS_ERROR) << "Don't send data with unknown payload type: " |
| 517 << static_cast<int>(payload_type) << "."; |
516 return -1; | 518 return -1; |
517 } | 519 } |
518 | 520 |
519 int32_t ret_val; | 521 int32_t ret_val; |
520 if (audio_configured_) { | 522 if (audio_configured_) { |
521 TRACE_EVENT_ASYNC_STEP1("webrtc", "Audio", capture_timestamp, | 523 TRACE_EVENT_ASYNC_STEP1("webrtc", "Audio", capture_timestamp, |
522 "Send", "type", FrameTypeToString(frame_type)); | 524 "Send", "type", FrameTypeToString(frame_type)); |
523 assert(frame_type == kAudioFrameSpeech || frame_type == kAudioFrameCN || | 525 assert(frame_type == kAudioFrameSpeech || frame_type == kAudioFrameCN || |
524 frame_type == kEmptyFrame); | 526 frame_type == kEmptyFrame); |
525 | 527 |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1903 CriticalSectionScoped lock(send_critsect_.get()); | 1905 CriticalSectionScoped lock(send_critsect_.get()); |
1904 | 1906 |
1905 RtpState state; | 1907 RtpState state; |
1906 state.sequence_number = sequence_number_rtx_; | 1908 state.sequence_number = sequence_number_rtx_; |
1907 state.start_timestamp = start_timestamp_; | 1909 state.start_timestamp = start_timestamp_; |
1908 | 1910 |
1909 return state; | 1911 return state; |
1910 } | 1912 } |
1911 | 1913 |
1912 } // namespace webrtc | 1914 } // namespace webrtc |
OLD | NEW |