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

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

Issue 2886993005: Introduce RtpStreamReceiver and RtpStreamReceiverControllerInterface. (Closed)
Patch Set: Fix FlexFEC. Created 3 years, 7 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_TRANSPORT_CONTROLLER_RECEIVE_H_
11 #define WEBRTC_CALL_RTP_TRANSPORT_CONTROLLER_RECEIVE_H_
12
13 #include <memory>
14
15 #include "webrtc/base/array_view.h"
16 #include "webrtc/base/criticalsection.h"
17
18 #include "webrtc/call/rtp_demuxer.h"
19 #include "webrtc/call/rtp_transport_controller_receive_interface.h"
20
21 namespace webrtc {
22
23 class ReceiveSideCongestionController;
24 class RtpPacketReceived;
25
26 // This class represents the RTP receive parsing and demuxing, for a
danilchap 2017/05/23 12:53:09 What benefits this class has over RtpDemuxer? only
27 // single RTP session. It isn't thread aware, leaving responsibility
28 // of multithreading issues to the user of this class.
29 // TODO(nisse): Add RTCP processing, we should aim to terminate RTCP
30 // and not leave any RTCP processing to individual receive streams.
31 // TODO(nisse): Extract packet processing, including parsing and
32 // demuxing, into a separate RtpSessionReceiver classes.
33 class RtpTransportControllerReceive
34 : public RtpTransportControllerReceiveInterface {
35 public:
36 // Implements RtpTransportControllerReceiveInterface.
37 std::unique_ptr<RtpTransportReceiver> CreateReceiver(
38 uint32_t ssrc,
39 RtpPacketSinkInterface* sink) override;
40
41 // Thread-safe wrappers for the corresponding RtpDemuxer methods.
42 void AddSink(uint32_t ssrc, RtpPacketSinkInterface* sink) override;
43 size_t RemoveSink(const RtpPacketSinkInterface* sink) override;
44
45 // TODO(nisse): Not yet responsible for parsing.
46 bool OnRtpPacket(const RtpPacketReceived& packet);
47
48 private:
49 class Receiver : public RtpTransportReceiver {
50 public:
51 Receiver(RtpTransportControllerReceive* transport,
52 uint32_t ssrc, RtpPacketSinkInterface* sink);
53
54 ~Receiver();
55
56 private:
57 RtpTransportControllerReceive *transport_;
58 RtpPacketSinkInterface* sink_;
59 };
60
61 rtc::CriticalSection lock_;
62 RtpDemuxer demuxer_ GUARDED_BY(&lock_);
63 };
64
65 } // namespace webrtc
66
67 #endif // WEBRTC_CALL_RTP_TRANSPORT_CONTROLLER_RECEIVE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698