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

Side by Side Diff: webrtc/api/ortc/rtptransportinterface.h

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: Adding OrtcFactory unit tests. Created 3 years, 10 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 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 #ifndef WEBRTC_API_ORTC_RTPTRANSPORTINTERFACE_H_
12 #define WEBRTC_API_ORTC_RTPTRANSPORTINTERFACE_H_
13
14 #include <string>
15
16 #include "webrtc/api/ortc/packettransportinterface.h"
17 #include "webrtc/api/rtcerror.h"
18 #include "webrtc/base/optional.h"
19
20 namespace webrtc {
21
22 class RtpTransportAdapter;
23
24 struct RtcpParameters {
25 // The SSRC to be used in the "SSRC of packet sender" field.
26 // If not set, one will be chosen by the implementation.
27 // TODO(deadbeef): Not implemented.
28 rtc::Optional<uint32_t> ssrc;
29
30 // RTCP CNAME; if empty, one will be chosen by the implementation.
31 std::string cname;
32
33 // Send reduced-size RTCP?
34 bool reduced_size = false;
35
36 // Send RTCP multiplexed on the RTP transport?
37 bool mux = true;
38 };
39
40 // Base class for different types of RTP transports that can be created by an
41 // OrtcFactory. Used by RtpSender/RtpReceivers.
42 class RtpTransportInterface {
43 public:
44 virtual ~RtpTransportInterface() {}
45
46 // Returns packet transport that's used to send RTP packets.
47 virtual PacketTransportInterface* GetRtpPacketTransport() const = 0;
48
49 // Returns separate packet transport that's used to send RTCP packets.
50 // If RTCP multiplexing is being used, returns nullptr.
51 virtual PacketTransportInterface* GetRtcpPacketTransport() const = 0;
52
53 // Set/get RTCP params. Changing "mux" from "true" to "false" is not allowed.
54 virtual RTCError SetRtcpParameters(const RtcpParameters& parameters) = 0;
55 virtual RtcpParameters GetRtcpParameters() const = 0;
56
57 protected:
58 // Only for internal use.
59 // Returns a pointer to the internal (non-public) interface.
60 virtual RtpTransportAdapter* GetInternal() = 0;
61
62 // Classes that can use this internal interface.
63 friend class OrtcFactory;
64 friend class OrtcRtpSenderAdapter;
65 friend class OrtcRtpReceiverAdapter;
66 friend class RtpTransportControllerAdapter;
67 friend class RtpTransportAdapter;
68 };
69
70 } // namespace webrtc
71
72 #endif // WEBRTC_API_ORTC_RTPTRANSPORTINTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698