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

Side by Side Diff: ortc/ortcrtpreceiveradapter.cc

Issue 3007973002: Mark template class RefCountedObject as final.
Patch Set: Rebased. Created 3 years, 3 months 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
OLDNEW
1 /* 1 /*
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2017 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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 if (last_applied_parameters_.encodings[0].ssrc) { 144 if (last_applied_parameters_.encodings[0].ssrc) {
145 ssrc = *last_applied_parameters_.encodings[0].ssrc; 145 ssrc = *last_applied_parameters_.encodings[0].ssrc;
146 } 146 }
147 if (internal_receiver_ && ssrc == internal_receiver_->ssrc()) { 147 if (internal_receiver_ && ssrc == internal_receiver_->ssrc()) {
148 // SSRC not changing; nothing to do. 148 // SSRC not changing; nothing to do.
149 return; 149 return;
150 } 150 }
151 internal_receiver_ = nullptr; 151 internal_receiver_ = nullptr;
152 switch (kind_) { 152 switch (kind_) {
153 case cricket::MEDIA_TYPE_AUDIO: 153 case cricket::MEDIA_TYPE_AUDIO:
154 internal_receiver_ = 154 internal_receiver_ = new rtc::RefCountedObject<AudioRtpReceiver>(
155 new AudioRtpReceiver(rtc::CreateRandomUuid(), ssrc, 155 rtc::CreateRandomUuid(), ssrc,
156 rtp_transport_controller_->voice_channel()); 156 rtp_transport_controller_->voice_channel());
157 break; 157 break;
158 case cricket::MEDIA_TYPE_VIDEO: 158 case cricket::MEDIA_TYPE_VIDEO:
159 internal_receiver_ = new VideoRtpReceiver( 159 internal_receiver_ = new rtc::RefCountedObject<VideoRtpReceiver>(
160 rtc::CreateRandomUuid(), rtp_transport_controller_->worker_thread(), 160 rtc::CreateRandomUuid(), rtp_transport_controller_->worker_thread(),
161 ssrc, rtp_transport_controller_->video_channel()); 161 ssrc, rtp_transport_controller_->video_channel());
162 break; 162 break;
163 case cricket::MEDIA_TYPE_DATA: 163 case cricket::MEDIA_TYPE_DATA:
164 RTC_NOTREACHED(); 164 RTC_NOTREACHED();
165 } 165 }
166 } 166 }
167 167
168 } // namespace webrtc 168 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698