| 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 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1732 return true; | 1732 return true; |
| 1733 } | 1733 } |
| 1734 | 1734 |
| 1735 void WebRtcSession::RemoveUnusedChannels(const SessionDescription* desc) { | 1735 void WebRtcSession::RemoveUnusedChannels(const SessionDescription* desc) { |
| 1736 // Destroy video_channel_ first since it may have a pointer to the | 1736 // Destroy video_channel_ first since it may have a pointer to the |
| 1737 // voice_channel_. | 1737 // voice_channel_. |
| 1738 const cricket::ContentInfo* video_info = | 1738 const cricket::ContentInfo* video_info = |
| 1739 cricket::GetFirstVideoContent(desc); | 1739 cricket::GetFirstVideoContent(desc); |
| 1740 if ((!video_info || video_info->rejected) && video_channel_) { | 1740 if ((!video_info || video_info->rejected) && video_channel_) { |
| 1741 SignalVideoChannelDestroyed(); | 1741 SignalVideoChannelDestroyed(); |
| 1742 const std::string content_name = video_channel_->content_name(); |
| 1742 channel_manager_->DestroyVideoChannel(video_channel_.release()); | 1743 channel_manager_->DestroyVideoChannel(video_channel_.release()); |
| 1743 } | 1744 } |
| 1744 | 1745 |
| 1745 const cricket::ContentInfo* voice_info = | 1746 const cricket::ContentInfo* voice_info = |
| 1746 cricket::GetFirstAudioContent(desc); | 1747 cricket::GetFirstAudioContent(desc); |
| 1747 if ((!voice_info || voice_info->rejected) && voice_channel_) { | 1748 if ((!voice_info || voice_info->rejected) && voice_channel_) { |
| 1748 SignalVoiceChannelDestroyed(); | 1749 SignalVoiceChannelDestroyed(); |
| 1750 const std::string content_name = voice_channel_->content_name(); |
| 1749 channel_manager_->DestroyVoiceChannel(voice_channel_.release()); | 1751 channel_manager_->DestroyVoiceChannel(voice_channel_.release()); |
| 1750 } | 1752 } |
| 1751 | 1753 |
| 1752 const cricket::ContentInfo* data_info = | 1754 const cricket::ContentInfo* data_info = |
| 1753 cricket::GetFirstDataContent(desc); | 1755 cricket::GetFirstDataContent(desc); |
| 1754 if ((!data_info || data_info->rejected) && data_channel_) { | 1756 if ((!data_info || data_info->rejected) && data_channel_) { |
| 1755 SignalDataChannelDestroyed(); | 1757 SignalDataChannelDestroyed(); |
| 1758 const std::string content_name = data_channel_->content_name(); |
| 1756 channel_manager_->DestroyDataChannel(data_channel_.release()); | 1759 channel_manager_->DestroyDataChannel(data_channel_.release()); |
| 1757 } | 1760 } |
| 1758 } | 1761 } |
| 1759 | 1762 |
| 1760 // TODO(mallinath) - Add a correct error code if the channels are not created | 1763 // TODO(mallinath) - Add a correct error code if the channels are not created |
| 1761 // due to BUNDLE is enabled but rtcp-mux is disabled. | 1764 // due to BUNDLE is enabled but rtcp-mux is disabled. |
| 1762 bool WebRtcSession::CreateChannels(const SessionDescription* desc) { | 1765 bool WebRtcSession::CreateChannels(const SessionDescription* desc) { |
| 1763 // Creating the media channels and transport proxies. | 1766 // Creating the media channels and transport proxies. |
| 1764 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc); | 1767 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc); |
| 1765 if (voice && !voice->rejected && !voice_channel_) { | 1768 if (voice && !voice->rejected && !voice_channel_) { |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2186 } | 2189 } |
| 2187 } | 2190 } |
| 2188 | 2191 |
| 2189 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, | 2192 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, |
| 2190 const rtc::SentPacket& sent_packet) { | 2193 const rtc::SentPacket& sent_packet) { |
| 2191 RTC_DCHECK(worker_thread()->IsCurrent()); | 2194 RTC_DCHECK(worker_thread()->IsCurrent()); |
| 2192 media_controller_->call_w()->OnSentPacket(sent_packet); | 2195 media_controller_->call_w()->OnSentPacket(sent_packet); |
| 2193 } | 2196 } |
| 2194 | 2197 |
| 2195 } // namespace webrtc | 2198 } // namespace webrtc |
| OLD | NEW |