Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2004 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 params->codecs = desc->codecs(); | 134 params->codecs = desc->codecs(); |
| 135 } | 135 } |
| 136 // TODO(pthatcher): See if we really need | 136 // TODO(pthatcher): See if we really need |
| 137 // rtp_header_extensions_set() and remove it if we don't. | 137 // rtp_header_extensions_set() and remove it if we don't. |
| 138 if (desc->rtp_header_extensions_set()) { | 138 if (desc->rtp_header_extensions_set()) { |
| 139 params->extensions = desc->rtp_header_extensions(); | 139 params->extensions = desc->rtp_header_extensions(); |
| 140 } | 140 } |
| 141 params->rtcp.reduced_size = desc->rtcp_reduced_size(); | 141 params->rtcp.reduced_size = desc->rtcp_reduced_size(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 template <class Codec, class Options> | 144 template <class Codec> |
| 145 void RtpSendParametersFromMediaDescription( | 145 void RtpSendParametersFromMediaDescription( |
| 146 const MediaContentDescriptionImpl<Codec>* desc, | 146 const MediaContentDescriptionImpl<Codec>* desc, |
| 147 RtpSendParameters<Codec, Options>* send_params) { | 147 RtpSendParameters<Codec>* send_params) { |
| 148 RtpParametersFromMediaDescription(desc, send_params); | 148 RtpParametersFromMediaDescription(desc, send_params); |
| 149 send_params->max_bandwidth_bps = desc->bandwidth(); | 149 send_params->max_bandwidth_bps = desc->bandwidth(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 BaseChannel::BaseChannel(rtc::Thread* thread, | 152 BaseChannel::BaseChannel(rtc::Thread* thread, |
| 153 MediaChannel* media_channel, | 153 MediaChannel* media_channel, |
| 154 TransportController* transport_controller, | 154 TransportController* transport_controller, |
| 155 const std::string& content_name, | 155 const std::string& content_name, |
| 156 bool rtcp) | 156 bool rtcp) |
| 157 : worker_thread_(thread), | 157 : worker_thread_(thread), |
| (...skipping 1633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1791 } | 1791 } |
| 1792 | 1792 |
| 1793 | 1793 |
| 1794 if (!SetRtpTransportParameters_w(content, action, CS_REMOTE, error_desc)) { | 1794 if (!SetRtpTransportParameters_w(content, action, CS_REMOTE, error_desc)) { |
| 1795 return false; | 1795 return false; |
| 1796 } | 1796 } |
| 1797 | 1797 |
| 1798 VideoSendParameters send_params = last_send_params_; | 1798 VideoSendParameters send_params = last_send_params_; |
| 1799 RtpSendParametersFromMediaDescription(video, &send_params); | 1799 RtpSendParametersFromMediaDescription(video, &send_params); |
| 1800 if (video->conference_mode()) { | 1800 if (video->conference_mode()) { |
| 1801 #if 0 | |
| 1802 // TODO(nisse): Need advice on how to pass this. If | |
| 1803 // conference_mode is per stream, we'd need the ssrc. | |
|
pthatcher1
2016/02/12 20:45:38
Conference mode is not per-ssrc.
| |
| 1801 send_params.options.conference_mode = rtc::Optional<bool>(true); | 1804 send_params.options.conference_mode = rtc::Optional<bool>(true); |
| 1805 #endif | |
| 1802 } | 1806 } |
| 1803 if (!media_channel()->SetSendParameters(send_params)) { | 1807 if (!media_channel()->SetSendParameters(send_params)) { |
| 1804 SafeSetError("Failed to set remote video description send parameters.", | 1808 SafeSetError("Failed to set remote video description send parameters.", |
| 1805 error_desc); | 1809 error_desc); |
| 1806 return false; | 1810 return false; |
| 1807 } | 1811 } |
| 1808 last_send_params_ = send_params; | 1812 last_send_params_ = send_params; |
| 1809 | 1813 |
| 1810 // TODO(pthatcher): Move remote streams into VideoRecvParameters, | 1814 // TODO(pthatcher): Move remote streams into VideoRecvParameters, |
| 1811 // and only give it to the media channel once we have a local | 1815 // and only give it to the media channel once we have a local |
| (...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2248 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); | 2252 return (data_channel_type_ == DCT_RTP) && BaseChannel::ShouldSetupDtlsSrtp(); |
| 2249 } | 2253 } |
| 2250 | 2254 |
| 2251 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { | 2255 void DataChannel::OnStreamClosedRemotely(uint32_t sid) { |
| 2252 rtc::TypedMessageData<uint32_t>* message = | 2256 rtc::TypedMessageData<uint32_t>* message = |
| 2253 new rtc::TypedMessageData<uint32_t>(sid); | 2257 new rtc::TypedMessageData<uint32_t>(sid); |
| 2254 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); | 2258 signaling_thread()->Post(this, MSG_STREAMCLOSEDREMOTELY, message); |
| 2255 } | 2259 } |
| 2256 | 2260 |
| 2257 } // namespace cricket | 2261 } // namespace cricket |
| OLD | NEW |