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

Side by Side Diff: webrtc/call/rtp_stream_receiver_controller.h

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Return DELIVERY_UNKNOWN_SSRC, not DELIVERY_PACKET_ERROR, when receive_rtp_config_ lookup fails. Created 3 years, 6 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
(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 #ifndef WEBRTC_CALL_RTP_STREAM_RECEIVER_CONTROLLER_H_
11 #define WEBRTC_CALL_RTP_STREAM_RECEIVER_CONTROLLER_H_
12
13 #include <memory>
the sun 2017/06/16 13:37:39 Not needed (unique_ptr should be included in rtp_s
nisse-webrtc 2017/06/16 14:33:26 I agree, but presubmit doesn't... If I delete that
14
15 #include "webrtc/base/array_view.h"
the sun 2017/06/16 13:37:39 Not needed
nisse-webrtc 2017/06/16 14:33:26 Done.
16 #include "webrtc/base/criticalsection.h"
17
the sun 2017/06/16 13:37:39 dd
nisse-webrtc 2017/06/16 14:33:26 I'm not following you.
the sun 2017/06/16 15:00:13 Sorry, vim-speak for delete a line. It's the only
nisse-webrtc 2017/06/19 07:21:01 Done. I would have understood C-k (short for M-x k
18 #include "webrtc/call/rtp_demuxer.h"
19 #include "webrtc/call/rtp_stream_receiver_controller_interface.h"
20
21 namespace webrtc {
22
23 class ReceiveSideCongestionController;
the sun 2017/06/16 13:37:39 not used
nisse-webrtc 2017/06/16 14:33:26 Done.
24 class RtpPacketReceived;
25
26 // This class represents the RTP receive parsing and demuxing, for a
27 // single RTP session.
28 // TODO(nisse): Add RTCP processing, we should aim to terminate RTCP
29 // and not leave any RTCP processing to individual receive streams.
30 // TODO(nisse): Extract per-packet processing, including parsing and
31 // demuxing, into a separate class.
32 class RtpStreamReceiverController
33 : public RtpStreamReceiverControllerInterface {
34 public:
35 // Implements RtpStreamReceiverControllerInterface.
36 std::unique_ptr<RtpStreamReceiverInterface> CreateReceiver(
37 uint32_t ssrc,
38 RtpPacketSinkInterface* sink) override;
39
40 // Thread-safe wrappers for the corresponding RtpDemuxer methods.
41 void AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink) override;
42 size_t RemoveSink(const RtpPacketSinkInterface* sink) override;
43
44 // TODO(nisse): Not yet responsible for parsing.
45 bool OnRtpPacket(const RtpPacketReceived& packet);
46
47 private:
48 class Receiver : public RtpStreamReceiverInterface {
the sun 2017/06/16 13:37:39 Is there any reason to not put this in an anonymou
nisse-webrtc 2017/06/16 14:33:26 I think it's tied to this class in such a way that
the sun 2017/06/16 15:00:13 Ah, didn't see that. Good call.
49 public:
50 Receiver(RtpStreamReceiverController* controller,
51 uint32_t ssrc,
52 RtpPacketSinkInterface* sink);
53
54 ~Receiver() override;
55
56 private:
57 RtpStreamReceiverController* const controller_;
58 RtpPacketSinkInterface* const sink_;
59 };
60
61 rtc::CriticalSection lock_;
62 RtpDemuxer demuxer_ GUARDED_BY(&lock_);
63 };
64
65 } // namespace webrtc
66
67 #endif // WEBRTC_CALL_RTP_STREAM_RECEIVER_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698