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

Side by Side Diff: webrtc/modules/rtp_rtcp/include/rtp_rtcp.h

Issue 2589743002: Make OverheadObserver::OnOverheadChanged count RTP headers only (Closed)
Patch Set: Address easy nits. Created 3 years, 12 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
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 virtual int32_t IncomingRtcpPacket(const uint8_t* incoming_packet, 109 virtual int32_t IncomingRtcpPacket(const uint8_t* incoming_packet,
110 size_t incoming_packet_length) = 0; 110 size_t incoming_packet_length) = 0;
111 111
112 virtual void SetRemoteSSRC(uint32_t ssrc) = 0; 112 virtual void SetRemoteSSRC(uint32_t ssrc) = 0;
113 113
114 // ************************************************************************** 114 // **************************************************************************
115 // Sender 115 // Sender
116 // ************************************************************************** 116 // **************************************************************************
117 117
118 // Sets MTU. 118 // TODO(nisse): Use int or size_t?
the sun 2016/12/21 10:33:02 size_t looks like the right call.
119 // |size| - Max transfer unit in bytes, default is 1500. 119 // Sets the maximum size of an RTP packet, including RTP headers.
120 // Returns -1 on failure else 0. 120 virtual void SetMaxRtpPacketSize(size_t size) = 0;
121 virtual int32_t SetMaxTransferUnit(uint16_t size) = 0;
122 121
123 // Sets transport overhead. Default is IPv4 and UDP with no encryption. 122 // Returns max payload length.
124 // |tcp| - true for TCP false UDP.
125 // |ipv6| - true for IP version 6 false for version 4.
126 // |authentication_overhead| - number of bytes to leave for an authentication
127 // header.
128 // Returns -1 on failure else 0
129 // TODO(michaelt): deprecate the function.
130 virtual int32_t SetTransportOverhead(bool tcp,
131 bool ipv6,
132 uint8_t authentication_overhead = 0) = 0;
133
134 // Sets transport overhead per packet.
135 virtual void SetTransportOverhead(int transport_overhead_per_packet) = 0;
136
137 // Returns max payload length, which is a combination of the configuration
138 // MaxTransferUnit and TransportOverhead.
139 // Does not account for RTP headers and FEC/ULP/RED overhead (when FEC is 123 // Does not account for RTP headers and FEC/ULP/RED overhead (when FEC is
140 // enabled). 124 // enabled).
141 virtual uint16_t MaxPayloadLength() const = 0; 125 virtual size_t MaxPayloadSize() const = 0;
142 126
143 // Returns max data payload length, which is a combination of the 127 // Returns max data payload length, which is a combination of the
144 // configuration MaxTransferUnit, headers and TransportOverhead. 128 // configuration MaxTransferUnit, headers and TransportOverhead.
michaelt 2016/12/20 14:11:42 nit: You removed this function. Right ?
nisse-webrtc 2017/01/09 16:02:24 Rephrased comment.
145 // Takes into account RTP headers and FEC/ULP/RED overhead (when FEC is 129 // Takes into account RTP headers and FEC/ULP/RED overhead (when FEC is
146 // enabled). 130 // enabled).
147 virtual uint16_t MaxDataPayloadLength() const = 0; 131 virtual size_t MaxRtpPacketSize() const = 0;
148 132
149 // Sets codec name and payload type. Returns -1 on failure else 0. 133 // Sets codec name and payload type. Returns -1 on failure else 0.
150 virtual int32_t RegisterSendPayload(const CodecInst& voice_codec) = 0; 134 virtual int32_t RegisterSendPayload(const CodecInst& voice_codec) = 0;
151 135
152 // Sets codec name and payload type. Return -1 on failure else 0. 136 // Sets codec name and payload type. Return -1 on failure else 0.
153 virtual int32_t RegisterSendPayload(const VideoCodec& video_codec) = 0; 137 virtual int32_t RegisterSendPayload(const VideoCodec& video_codec) = 0;
154 138
155 virtual void RegisterVideoSendPayload(int payload_type, 139 virtual void RegisterVideoSendPayload(int payload_type,
156 const char* payload_name) = 0; 140 const char* payload_name) = 0;
157 141
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; 466 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0;
483 467
484 // Sends a request for a keyframe. 468 // Sends a request for a keyframe.
485 // Returns -1 on failure else 0. 469 // Returns -1 on failure else 0.
486 virtual int32_t RequestKeyFrame() = 0; 470 virtual int32_t RequestKeyFrame() = 0;
487 }; 471 };
488 472
489 } // namespace webrtc 473 } // namespace webrtc
490 474
491 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ 475 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698