OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
3 * | |
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 | |
6 * tree. An additional intellectual property rights grant can be found | |
7 * in the file PATENTS. All contributing project authors may | |
8 * be found in the AUTHORS file in the root of the source tree. | |
9 */ | |
10 | |
11 #include "webrtc/call/rtp_transport_controller_receive.h" | |
12 #include "webrtc/base/ptr_util.h" | |
13 | |
14 namespace webrtc { | |
15 | |
16 RtpTransportControllerReceive::Receiver::Receiver(RtpDemuxer* demuxer, | |
17 uint32_t ssrc, | |
18 RtpPacketSinkInterface* sink) | |
19 : demuxer_(demuxer), sink_(sink) { | |
20 demuxer_->AddSink(ssrc, sink_); | |
21 } | |
22 | |
23 RtpTransportControllerReceive::Receiver::~Receiver() { | |
24 demuxer_->RemoveSink(sink_); | |
pthatcher1
2017/05/17 23:24:53
So a Receiver is a thing that adds and removes its
nisse-webrtc
2017/05/18 08:45:43
Correct, it doesn't yet have any other responsibil
pthatcher1
2017/05/24 03:57:38
Can you explain this in a comment in the code?
An
| |
25 } | |
26 | |
27 std::unique_ptr<RtpTransportReceiver> | |
28 RtpTransportControllerReceive::CreateReceiver(uint32_t ssrc, | |
29 RtpPacketSinkInterface* sink) { | |
30 return rtc::MakeUnique<Receiver>(&demuxer_, ssrc, sink); | |
danilchap
2017/05/19 15:37:43
returning pointer to non-thread-safe &demux is an
nisse-webrtc
2017/05/22 07:09:37
Note that the demuxer pointer is only passed to th
nisse-webrtc
2017/05/22 12:41:13
Done now.
| |
31 } | |
32 | |
33 bool RtpTransportControllerReceive::OnRtpPacket(RtpPacketReceived& packet) { | |
34 return demuxer_.OnRtpPacket(packet); | |
35 } | |
36 | |
37 } // namespace webrtc | |
OLD | NEW |