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

Side by Side Diff: webrtc/pc/rtptransportinternal.h

Issue 2981013002: Introduce RtpTransportInternal and SrtpTransport. (Closed)
Patch Set: Created 3 years, 5 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_PC_RTPTRANSPORTINTERNAL_H_
12 #define WEBRTC_PC_RTPTRANSPORTINTERNAL_H_
13
14 #include "webrtc/api/ortc/rtptransportinterface.h"
15 #include "webrtc/rtc_base/sigslot.h"
16
17 namespace rtc {
18 class CopyOnWriteBuffer;
19 struct PacketOptions;
20 struct PacketTime;
21 } // namespace rtc
22
23 namespace webrtc {
24
25 class RtpTransportInternal : public RtpTransportInterface,
Taylor Brandstetter 2017/07/18 22:17:53 A brief comment summarizing this class would be ni
Zach Stein 2017/07/18 23:26:31 Done.
26 public sigslot::has_slots<> {
27 public:
28 virtual void SetRtcpMuxEnabled(bool enable) = 0;
29
30 // TODO(zstein): Remove PacketTransport setters. Clients should pass these
31 // in to constructors instead and construct a new RtpTransportInternal instead
32 // of updating them.
33
34 virtual rtc::PacketTransportInternal* rtp_packet_transport() const = 0;
35 virtual void SetRtpPacketTransport(rtc::PacketTransportInternal* rtp) = 0;
36
37 virtual rtc::PacketTransportInternal* rtcp_packet_transport() const = 0;
38 virtual void SetRtcpPacketTransport(rtc::PacketTransportInternal* rtcp) = 0;
39
40 // Called whenever a transport's ready-to-send state changes. The argument
41 // is true if all used transports are ready to send. This is more specific
42 // than just "writable"; it means the last send didn't return ENOTCONN.
43 sigslot::signal1<bool> SignalReadyToSend;
44
45 // TODO(zstein): Consider having two signals - RtpPacketReceived and
46 // RtcpPacketReceived.
47 // The first argument is true for RTCP packets and false for RTP packets.
48 sigslot::signal3<bool, rtc::CopyOnWriteBuffer*, const rtc::PacketTime&>
49 SignalPacketReceived;
50
51 virtual bool IsWritable(bool rtcp) const = 0;
52
53 virtual bool SendPacket(bool rtcp,
54 rtc::CopyOnWriteBuffer* packet,
55 const rtc::PacketOptions& options,
56 int flags) = 0;
57
58 virtual bool HandlesPayloadType(int payload_type) const = 0;
59
60 virtual void AddHandledPayloadType(int payload_type) = 0;
61 };
62
63 } // namespace webrtc
64
65 #endif // WEBRTC_PC_RTPTRANSPORTINTERNAL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698