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

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

Issue 1413983004: Reland of Adding the ability to create an RtpSender without a track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing merge issue. 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') | webrtc/base/helpers.h » ('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 1721 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
1743 channel_manager_->DestroyVideoChannel(video_channel_.release()); 1742 channel_manager_->DestroyVideoChannel(video_channel_.release());
1744 } 1743 }
1745 1744
1746 const cricket::ContentInfo* voice_info = 1745 const cricket::ContentInfo* voice_info =
1747 cricket::GetFirstAudioContent(desc); 1746 cricket::GetFirstAudioContent(desc);
1748 if ((!voice_info || voice_info->rejected) && voice_channel_) { 1747 if ((!voice_info || voice_info->rejected) && voice_channel_) {
1749 SignalVoiceChannelDestroyed(); 1748 SignalVoiceChannelDestroyed();
1750 const std::string content_name = voice_channel_->content_name();
1751 channel_manager_->DestroyVoiceChannel(voice_channel_.release()); 1749 channel_manager_->DestroyVoiceChannel(voice_channel_.release());
1752 } 1750 }
1753 1751
1754 const cricket::ContentInfo* data_info = 1752 const cricket::ContentInfo* data_info =
1755 cricket::GetFirstDataContent(desc); 1753 cricket::GetFirstDataContent(desc);
1756 if ((!data_info || data_info->rejected) && data_channel_) { 1754 if ((!data_info || data_info->rejected) && data_channel_) {
1757 SignalDataChannelDestroyed(); 1755 SignalDataChannelDestroyed();
1758 const std::string content_name = data_channel_->content_name();
1759 channel_manager_->DestroyDataChannel(data_channel_.release()); 1756 channel_manager_->DestroyDataChannel(data_channel_.release());
1760 } 1757 }
1761 } 1758 }
1762 1759
1763 // TODO(mallinath) - Add a correct error code if the channels are not created 1760 // TODO(mallinath) - Add a correct error code if the channels are not created
1764 // due to BUNDLE is enabled but rtcp-mux is disabled. 1761 // due to BUNDLE is enabled but rtcp-mux is disabled.
1765 bool WebRtcSession::CreateChannels(const SessionDescription* desc) { 1762 bool WebRtcSession::CreateChannels(const SessionDescription* desc) {
1766 // Creating the media channels and transport proxies. 1763 // Creating the media channels and transport proxies.
1767 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc); 1764 const cricket::ContentInfo* voice = cricket::GetFirstAudioContent(desc);
1768 if (voice && !voice->rejected && !voice_channel_) { 1765 if (voice && !voice->rejected && !voice_channel_) {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
2189 } 2186 }
2190 } 2187 }
2191 2188
2192 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel, 2189 void WebRtcSession::OnSentPacket_w(cricket::TransportChannel* channel,
2193 const rtc::SentPacket& sent_packet) { 2190 const rtc::SentPacket& sent_packet) {
2194 RTC_DCHECK(worker_thread()->IsCurrent()); 2191 RTC_DCHECK(worker_thread()->IsCurrent());
2195 media_controller_->call_w()->OnSentPacket(sent_packet); 2192 media_controller_->call_w()->OnSentPacket(sent_packet);
2196 } 2193 }
2197 2194
2198 } // namespace webrtc 2195 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/videotrack.cc ('k') | webrtc/base/helpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698