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 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 } | 943 } |
944 | 944 |
945 bool WebRtcSession::PushdownMediaDescription( | 945 bool WebRtcSession::PushdownMediaDescription( |
946 cricket::ContentAction action, | 946 cricket::ContentAction action, |
947 cricket::ContentSource source, | 947 cricket::ContentSource source, |
948 std::string* err) { | 948 std::string* err) { |
949 auto set_content = [this, action, source, err](cricket::BaseChannel* ch) { | 949 auto set_content = [this, action, source, err](cricket::BaseChannel* ch) { |
950 if (!ch) { | 950 if (!ch) { |
951 return true; | 951 return true; |
952 } else if (source == cricket::CS_LOCAL) { | 952 } else if (source == cricket::CS_LOCAL) { |
| 953 const SessionDescription* local_desc = local_description()->description(); |
| 954 const ContentInfo* content_info = GetFirstDataContent(local_desc); |
| 955 RTC_DCHECK(IsVideoContent(content_info)); |
| 956 const cricket::VideoContentDescription* content_desc = |
| 957 static_cast<const cricket::VideoContentDescription*>( |
| 958 content_info->description); |
| 959 if (content_desc->rtp_header_extensions_set()) |
| 960 media_controller_->SetVideoReceiveRtpHeaderExtensions( |
| 961 content_desc->rtp_header_extensions()); |
| 962 |
953 return ch->PushdownLocalDescription(local_description()->description(), | 963 return ch->PushdownLocalDescription(local_description()->description(), |
954 action, err); | 964 action, err); |
955 } else { | 965 } else { |
956 return ch->PushdownRemoteDescription(remote_description()->description(), | 966 return ch->PushdownRemoteDescription(remote_description()->description(), |
957 action, err); | 967 action, err); |
958 } | 968 } |
959 }; | 969 }; |
960 | 970 |
961 bool ret = (set_content(voice_channel()) && set_content(video_channel()) && | 971 bool ret = (set_content(voice_channel()) && set_content(video_channel()) && |
962 set_content(rtp_data_channel())); | 972 set_content(rtp_data_channel())); |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 (rtp_data_channel_->rtcp_dtls_transport() != nullptr); | 2394 (rtp_data_channel_->rtcp_dtls_transport() != nullptr); |
2385 channel_manager_->DestroyRtpDataChannel(rtp_data_channel_.release()); | 2395 channel_manager_->DestroyRtpDataChannel(rtp_data_channel_.release()); |
2386 transport_controller_->DestroyDtlsTransport( | 2396 transport_controller_->DestroyDtlsTransport( |
2387 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTP); | 2397 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTP); |
2388 if (need_to_delete_rtcp) { | 2398 if (need_to_delete_rtcp) { |
2389 transport_controller_->DestroyDtlsTransport( | 2399 transport_controller_->DestroyDtlsTransport( |
2390 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTCP); | 2400 transport_name, cricket::ICE_CANDIDATE_COMPONENT_RTCP); |
2391 } | 2401 } |
2392 } | 2402 } |
2393 } // namespace webrtc | 2403 } // namespace webrtc |
OLD | NEW |