OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 // |receiver_| as the RtpPacketSinkInterface for this stream. | 151 // |receiver_| as the RtpPacketSinkInterface for this stream. |
152 // TODO(nisse): Passing |this| from the constructor to the RtpDemuxer, before | 152 // TODO(nisse): Passing |this| from the constructor to the RtpDemuxer, before |
153 // the object is fully initialized, is risky. But it works in this case | 153 // the object is fully initialized, is risky. But it works in this case |
154 // because locking in our caller, Call::CreateFlexfecReceiveStream, ensures | 154 // because locking in our caller, Call::CreateFlexfecReceiveStream, ensures |
155 // that the demuxer doesn't call OnRtpPacket before this object is fully | 155 // that the demuxer doesn't call OnRtpPacket before this object is fully |
156 // constructed. Registering |receiver_| instead of |this| would solve this | 156 // constructed. Registering |receiver_| instead of |this| would solve this |
157 // problem too. | 157 // problem too. |
158 rtp_stream_receiver_ = | 158 rtp_stream_receiver_ = |
159 receiver_controller->CreateReceiver(config_.remote_ssrc, this); | 159 receiver_controller->CreateReceiver(config_.remote_ssrc, this); |
160 for (uint32_t ssrc : config.protected_media_ssrcs) | 160 for (uint32_t ssrc : config.protected_media_ssrcs) |
161 // TODO(eladalon): Make sure FlexFec no longer requires this, then rebase | |
eladalon
2017/07/06 16:44:32
The CL that remove this has been put up for review
| |
162 // this CL on top of that. | |
161 receiver_controller->AddSink(ssrc, this); | 163 receiver_controller->AddSink(ssrc, this); |
162 } | 164 } |
163 | 165 |
164 FlexfecReceiveStreamImpl::~FlexfecReceiveStreamImpl() { | 166 FlexfecReceiveStreamImpl::~FlexfecReceiveStreamImpl() { |
165 LOG(LS_INFO) << "~FlexfecReceiveStreamImpl: " << config_.ToString(); | 167 LOG(LS_INFO) << "~FlexfecReceiveStreamImpl: " << config_.ToString(); |
166 Stop(); | 168 Stop(); |
167 process_thread_->DeRegisterModule(rtp_rtcp_.get()); | 169 process_thread_->DeRegisterModule(rtp_rtcp_.get()); |
168 } | 170 } |
169 | 171 |
170 void FlexfecReceiveStreamImpl::OnRtpPacket(const RtpPacketReceived& packet) { | 172 void FlexfecReceiveStreamImpl::OnRtpPacket(const RtpPacketReceived& packet) { |
(...skipping 29 matching lines...) Expand all Loading... | |
200 started_ = false; | 202 started_ = false; |
201 } | 203 } |
202 | 204 |
203 // TODO(brandtr): Implement this member function when we have designed the | 205 // TODO(brandtr): Implement this member function when we have designed the |
204 // stats for FlexFEC. | 206 // stats for FlexFEC. |
205 FlexfecReceiveStreamImpl::Stats FlexfecReceiveStreamImpl::GetStats() const { | 207 FlexfecReceiveStreamImpl::Stats FlexfecReceiveStreamImpl::GetStats() const { |
206 return FlexfecReceiveStream::Stats(); | 208 return FlexfecReceiveStream::Stats(); |
207 } | 209 } |
208 | 210 |
209 } // namespace webrtc | 211 } // namespace webrtc |
OLD | NEW |