OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 1563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1574 | 1574 |
1575 void WebRtcSession::RemoveUnusedChannelsAndTransports( | 1575 void WebRtcSession::RemoveUnusedChannelsAndTransports( |
1576 const SessionDescription* desc) { | 1576 const SessionDescription* desc) { |
1577 // Destroy video_channel_ first since it may have a pointer to the | 1577 // Destroy video_channel_ first since it may have a pointer to the |
1578 // voice_channel_. | 1578 // voice_channel_. |
1579 const cricket::ContentInfo* video_info = | 1579 const cricket::ContentInfo* video_info = |
1580 cricket::GetFirstVideoContent(desc); | 1580 cricket::GetFirstVideoContent(desc); |
1581 if ((!video_info || video_info->rejected) && video_channel_) { | 1581 if ((!video_info || video_info->rejected) && video_channel_) { |
1582 mediastream_signaling_->OnVideoChannelClose(); | 1582 mediastream_signaling_->OnVideoChannelClose(); |
1583 SignalVideoChannelDestroyed(); | 1583 SignalVideoChannelDestroyed(); |
1584 const std::string content_name = video_channel_->content_name(); | 1584 const std::string& content_name = video_channel_->content_name(); |
joachim
2015/07/16 08:21:47
This caused the failures on the try-bots. After th
| |
1585 channel_manager_->DestroyVideoChannel(video_channel_.release()); | 1585 channel_manager_->DestroyVideoChannel(video_channel_.release()); |
1586 DestroyTransportProxy(content_name); | 1586 DestroyTransportProxy(content_name); |
1587 } | 1587 } |
1588 | 1588 |
1589 const cricket::ContentInfo* voice_info = | 1589 const cricket::ContentInfo* voice_info = |
1590 cricket::GetFirstAudioContent(desc); | 1590 cricket::GetFirstAudioContent(desc); |
1591 if ((!voice_info || voice_info->rejected) && voice_channel_) { | 1591 if ((!voice_info || voice_info->rejected) && voice_channel_) { |
1592 mediastream_signaling_->OnAudioChannelClose(); | 1592 mediastream_signaling_->OnAudioChannelClose(); |
1593 SignalVoiceChannelDestroyed(); | 1593 SignalVoiceChannelDestroyed(); |
1594 const std::string content_name = voice_channel_->content_name(); | 1594 const std::string& content_name = voice_channel_->content_name(); |
1595 channel_manager_->DestroyVoiceChannel(voice_channel_.release(), | 1595 channel_manager_->DestroyVoiceChannel(voice_channel_.release(), |
1596 video_channel_.get()); | 1596 video_channel_.get()); |
1597 DestroyTransportProxy(content_name); | 1597 DestroyTransportProxy(content_name); |
1598 } | 1598 } |
1599 | 1599 |
1600 const cricket::ContentInfo* data_info = | 1600 const cricket::ContentInfo* data_info = |
1601 cricket::GetFirstDataContent(desc); | 1601 cricket::GetFirstDataContent(desc); |
1602 if ((!data_info || data_info->rejected) && data_channel_) { | 1602 if ((!data_info || data_info->rejected) && data_channel_) { |
1603 mediastream_signaling_->OnDataChannelClose(); | 1603 mediastream_signaling_->OnDataChannelClose(); |
1604 SignalDataChannelDestroyed(); | 1604 SignalDataChannelDestroyed(); |
1605 const std::string content_name = data_channel_->content_name(); | 1605 const std::string& content_name = data_channel_->content_name(); |
1606 channel_manager_->DestroyDataChannel(data_channel_.release()); | 1606 channel_manager_->DestroyDataChannel(data_channel_.release()); |
1607 DestroyTransportProxy(content_name); | 1607 DestroyTransportProxy(content_name); |
1608 } | 1608 } |
1609 } | 1609 } |
1610 | 1610 |
1611 // TODO(mallinath) - Add a correct error code if the channels are not creatued | 1611 // TODO(mallinath) - Add a correct error code if the channels are not creatued |
1612 // due to BUNDLE is enabled but rtcp-mux is disabled. | 1612 // due to BUNDLE is enabled but rtcp-mux is disabled. |
1613 bool WebRtcSession::CreateChannels(const SessionDescription* desc) { | 1613 bool WebRtcSession::CreateChannels(const SessionDescription* desc) { |
1614 // Creating the media channels and transport proxies. | 1614 // Creating the media channels and transport proxies. |
1615 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc); | 1615 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1960 | 1960 |
1961 if (!srtp_cipher.empty()) { | 1961 if (!srtp_cipher.empty()) { |
1962 metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher); | 1962 metrics_observer_->AddHistogramSample(srtp_name, srtp_cipher); |
1963 } | 1963 } |
1964 if (!ssl_cipher.empty()) { | 1964 if (!ssl_cipher.empty()) { |
1965 metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher); | 1965 metrics_observer_->AddHistogramSample(ssl_name, ssl_cipher); |
1966 } | 1966 } |
1967 } | 1967 } |
1968 | 1968 |
1969 } // namespace webrtc | 1969 } // namespace webrtc |
OLD | NEW |