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

Side by Side Diff: webrtc/ortc/rtptransportshim.h

Issue 2675173003: Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc. (Closed)
Patch Set: Move ORTC files to different subdirectories 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_ORTC_RTPTRANSPORTSHIM_H_
12 #define WEBRTC_ORTC_RTPTRANSPORTSHIM_H_
13
14 #include <memory>
15 #include <vector>
16
17 #include "webrtc/api/ortc/rtptransportinterface.h"
18 #include "webrtc/api/rtcerror.h"
19 #include "webrtc/base/constructormagic.h"
20 #include "webrtc/media/base/streamparams.h"
21 #include "webrtc/ortc/rtptransportcontrollershim.h"
22 #include "webrtc/pc/channel.h"
23
24 namespace webrtc {
25
26 // Implementation of RtpTransportInterface to be used with RtpSenderShim,
27 // RtpReceiverShim, and RtpTransportControllerShimShim classes.
28 //
29 // TODO(deadbeef): When BaseChannel is split apart into separate
30 // "RtpTransport"/"RtpTransceiver"/"RtpSender"/"RtpReceiver" objects, this shim
31 // object can be removed.
32 class RtpTransportShim : public RtpTransportInterface {
33 public:
34 // |rtp| can't be null. |rtcp| can if RTCP muxing is used immediately (meaning
35 // |rtcp_parameters.mux| is also true).
36 static RTCErrorOr<std::unique_ptr<RtpTransportInterface>> CreateProxied(
37 const RtcpParameters& rtcp_parameters,
38 PacketTransportInterface* rtp,
39 PacketTransportInterface* rtcp,
40 RtpTransportControllerInterface* rtp_transport_controller);
41 ~RtpTransportShim() override;
42
43 // RtpTransportInterface implementation.
44 PacketTransportInterface* GetRtpPacketTransport() const override;
45 PacketTransportInterface* GetRtcpPacketTransport() const override;
46 RTCError SetRtcpParameters(const RtcpParameters& parameters) override;
47 RtcpParameters GetRtcpParameters() const override { return rtcp_parameters_; }
48
49 // Methods used internally by RtpSenderShim/RtpReceiverShim.
50 RtpTransportControllerShim* rtp_transport_controller() {
51 return rtp_transport_controller_;
52 }
53
54 protected:
55 RtpTransportShim* GetInternal() override { return this; }
56
57 private:
58 RtpTransportShim(const RtcpParameters& rtcp_parameters,
59 PacketTransportInterface* rtp,
60 PacketTransportInterface* rtcp,
61 RtpTransportControllerShim* rtp_transport_controller);
62
63 PacketTransportInterface* rtp_packet_transport_;
64 PacketTransportInterface* rtcp_packet_transport_;
65 RtpTransportControllerShim* rtp_transport_controller_;
66 RtcpParameters rtcp_parameters_;
67
68 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RtpTransportShim);
69 };
70 typedef RtpTransportShim RtpTransportInternal;
71
72 } // namespace webrtc
73
74 #endif // WEBRTC_ORTC_RTPTRANSPORTSHIM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698