| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 |
| 11 #include "webrtc/video/video_send_stream.h" | 11 #include "webrtc/video/video_send_stream.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <sstream> | 14 #include <sstream> |
| 15 #include <string> | 15 #include <string> |
| 16 #include <vector> | 16 #include <vector> |
| 17 | 17 |
| 18 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
| 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 19 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 20 #include "webrtc/modules/pacing/include/packet_router.h" |
| 20 #include "webrtc/system_wrappers/interface/logging.h" | 21 #include "webrtc/system_wrappers/interface/logging.h" |
| 21 #include "webrtc/system_wrappers/interface/trace_event.h" | 22 #include "webrtc/system_wrappers/interface/trace_event.h" |
| 22 #include "webrtc/video/video_capture_input.h" | 23 #include "webrtc/video/video_capture_input.h" |
| 23 #include "webrtc/video_engine/vie_channel.h" | 24 #include "webrtc/video_engine/vie_channel.h" |
| 24 #include "webrtc/video_engine/vie_channel_group.h" | 25 #include "webrtc/video_engine/vie_channel_group.h" |
| 25 #include "webrtc/video_engine/vie_defines.h" | 26 #include "webrtc/video_engine/vie_defines.h" |
| 26 #include "webrtc/video_engine/vie_encoder.h" | 27 #include "webrtc/video_engine/vie_encoder.h" |
| 27 #include "webrtc/video_send_stream.h" | 28 #include "webrtc/video_send_stream.h" |
| 28 | 29 |
| 29 namespace webrtc { | 30 namespace webrtc { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 int id = config_.rtp.extensions[i].id; | 131 int id = config_.rtp.extensions[i].id; |
| 131 // One-byte-extension local identifiers are in the range 1-14 inclusive. | 132 // One-byte-extension local identifiers are in the range 1-14 inclusive. |
| 132 DCHECK_GE(id, 1); | 133 DCHECK_GE(id, 1); |
| 133 DCHECK_LE(id, 14); | 134 DCHECK_LE(id, 14); |
| 134 if (extension == RtpExtension::kTOffset) { | 135 if (extension == RtpExtension::kTOffset) { |
| 135 CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id)); | 136 CHECK_EQ(0, vie_channel_->SetSendTimestampOffsetStatus(true, id)); |
| 136 } else if (extension == RtpExtension::kAbsSendTime) { | 137 } else if (extension == RtpExtension::kAbsSendTime) { |
| 137 CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id)); | 138 CHECK_EQ(0, vie_channel_->SetSendAbsoluteSendTimeStatus(true, id)); |
| 138 } else if (extension == RtpExtension::kVideoRotation) { | 139 } else if (extension == RtpExtension::kVideoRotation) { |
| 139 CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id)); | 140 CHECK_EQ(0, vie_channel_->SetSendVideoRotationStatus(true, id)); |
| 141 } else if (extension == RtpExtension::kTransportSequenceNumber) { |
| 142 CHECK_EQ(0, vie_channel_->SetSendTransportSequenceNumber(true, id)); |
| 140 } else { | 143 } else { |
| 141 RTC_NOTREACHED() << "Registering unsupported RTP extension."; | 144 RTC_NOTREACHED() << "Registering unsupported RTP extension."; |
| 142 } | 145 } |
| 143 } | 146 } |
| 144 | 147 |
| 145 // TODO(pbos): Consider configuring REMB in Call. | 148 // TODO(pbos): Consider configuring REMB in Call. |
| 146 channel_group_->SetChannelRembStatus(true, false, vie_channel_); | 149 channel_group_->SetChannelRembStatus(true, false, vie_channel_); |
| 147 | 150 |
| 148 // Enable NACK, FEC or both. | 151 // Enable NACK, FEC or both. |
| 149 const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; | 152 const bool enable_protection_nack = config_.rtp.nack.rtp_history_ms > 0; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 vie_channel_->IsSendingFecEnabled()); | 503 vie_channel_->IsSendingFecEnabled()); |
| 501 | 504 |
| 502 // Restart the media flow | 505 // Restart the media flow |
| 503 vie_encoder_->Restart(); | 506 vie_encoder_->Restart(); |
| 504 | 507 |
| 505 return true; | 508 return true; |
| 506 } | 509 } |
| 507 | 510 |
| 508 } // namespace internal | 511 } // namespace internal |
| 509 } // namespace webrtc | 512 } // namespace webrtc |
| OLD | NEW |