Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Side by Side Diff: talk/app/webrtc/webrtcsession.cc

Issue 1426443007: Revert of Adding the ability to create an RtpSender without a track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « talk/app/webrtc/videotrack.cc ('k') | talk/libjingle_tests.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 return true; 1740 return true;
1741 } 1741 }
1742 1742
1743 void WebRtcSession::RemoveUnusedChannels(const SessionDescription* desc) { 1743 void WebRtcSession::RemoveUnusedChannels(const SessionDescription* desc) {
1744 // Destroy video_channel_ first since it may have a pointer to the 1744 // Destroy video_channel_ first since it may have a pointer to the
1745 // voice_channel_. 1745 // voice_channel_.
1746 const cricket::ContentInfo* video_info = 1746 const cricket::ContentInfo* video_info =
1747 cricket::GetFirstVideoContent(desc); 1747 cricket::GetFirstVideoContent(desc);
1748 if ((!video_info || video_info->rejected) && video_channel_) { 1748 if ((!video_info || video_info->rejected) && video_channel_) {
1749 SignalVideoChannelDestroyed(); 1749 SignalVideoChannelDestroyed();
1750 const std::string content_name = video_channel_->content_name();
1750 channel_manager_->DestroyVideoChannel(video_channel_.release()); 1751 channel_manager_->DestroyVideoChannel(video_channel_.release());
1751 } 1752 }
1752 1753
1753 const cricket::ContentInfo* voice_info = 1754 const cricket::ContentInfo* voice_info =
1754 cricket::GetFirstAudioContent(desc); 1755 cricket::GetFirstAudioContent(desc);
1755 if ((!voice_info || voice_info->rejected) && voice_channel_) { 1756 if ((!voice_info || voice_info->rejected) && voice_channel_) {
1756 SignalVoiceChannelDestroyed(); 1757 SignalVoiceChannelDestroyed();
1758 const std::string content_name = voice_channel_->content_name();
1757 channel_manager_->DestroyVoiceChannel(voice_channel_.release()); 1759 channel_manager_->DestroyVoiceChannel(voice_channel_.release());
1758 } 1760 }
1759 1761
1760 const cricket::ContentInfo* data_info = 1762 const cricket::ContentInfo* data_info =
1761 cricket::GetFirstDataContent(desc); 1763 cricket::GetFirstDataContent(desc);
1762 if ((!data_info || data_info->rejected) && data_channel_) { 1764 if ((!data_info || data_info->rejected) && data_channel_) {
1763 SignalDataChannelDestroyed(); 1765 SignalDataChannelDestroyed();
1766 const std::string content_name = data_channel_->content_name();
1764 channel_manager_->DestroyDataChannel(data_channel_.release()); 1767 channel_manager_->DestroyDataChannel(data_channel_.release());
1765 } 1768 }
1766 } 1769 }
1767 1770
1768 // TODO(mallinath) - Add a correct error code if the channels are not created 1771 // TODO(mallinath) - Add a correct error code if the channels are not created
1769 // due to BUNDLE is enabled but rtcp-mux is disabled. 1772 // due to BUNDLE is enabled but rtcp-mux is disabled.
1770 bool WebRtcSession::CreateChannels(const SessionDescription* desc) { 1773 bool WebRtcSession::CreateChannels(const SessionDescription* desc) {
1771 // Creating the media channels and transport proxies. 1774 // Creating the media channels and transport proxies.
1772 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc); 1775 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc);
1773 if (voice && !voice->rejected && !voice_channel_) { 1776 if (voice && !voice->rejected && !voice_channel_) {
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
2192 } 2195 }
2193 } 2196 }
2194 2197
2195 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2198 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2196 const rtc::SentPacket& sent_packet) { 2199 const rtc::SentPacket& sent_packet) {
2197 RTC_DCHECK(worker_thread()->IsCurrent()); 2200 RTC_DCHECK(worker_thread()->IsCurrent());
2198 media_controller_->call_w()->OnSentPacket(sent_packet); 2201 media_controller_->call_w()->OnSentPacket(sent_packet);
2199 } 2202 }
2200 2203
2201 } // namespace webrtc 2204 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/videotrack.cc ('k') | talk/libjingle_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698