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

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

Issue 2589743002: Make OverheadObserver::OnOverheadChanged count RTP headers only (Closed)
Patch Set: Add explicit cast. Created 3 years, 11 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 virtual int32_t IncomingRtcpPacket(const uint8_t* incoming_packet, 108 virtual int32_t IncomingRtcpPacket(const uint8_t* incoming_packet,
109 size_t incoming_packet_length) = 0; 109 size_t incoming_packet_length) = 0;
110 110
111 virtual void SetRemoteSSRC(uint32_t ssrc) = 0; 111 virtual void SetRemoteSSRC(uint32_t ssrc) = 0;
112 112
113 // ************************************************************************** 113 // **************************************************************************
114 // Sender 114 // Sender
115 // ************************************************************************** 115 // **************************************************************************
116 116
117 // Sets MTU. 117 // TODO(nisse): Deprecated. Kept temporarily, as an alias for the
118 // |size| - Max transfer unit in bytes, default is 1500. 118 // new function which has slighly different semantics. Delete as
119 // Returns -1 on failure else 0. 119 // soon as known applications are updated.
120 virtual int32_t SetMaxTransferUnit(uint16_t size) = 0; 120 virtual int32_t SetMaxTransferUnit(uint16_t size) {
121 SetMaxRtpPacketSize(size);
122 return 0;
123 }
121 124
122 // Sets transport overhead. Default is IPv4 and UDP with no encryption. 125 // Sets the maximum size of an RTP packet, including RTP headers.
123 // |tcp| - true for TCP false UDP. 126 virtual void SetMaxRtpPacketSize(size_t size) = 0;
124 // |ipv6| - true for IP version 6 false for version 4.
125 // |authentication_overhead| - number of bytes to leave for an authentication
126 // header.
127 // Returns -1 on failure else 0
128 // TODO(michaelt): deprecate the function.
129 virtual int32_t SetTransportOverhead(bool tcp,
130 bool ipv6,
131 uint8_t authentication_overhead = 0) = 0;
132 127
133 // Sets transport overhead per packet. 128 // Returns max payload length.
134 virtual void SetTransportOverhead(int transport_overhead_per_packet) = 0;
135
136 // Returns max payload length, which is a combination of the configuration
137 // MaxTransferUnit and TransportOverhead.
138 // Does not account for RTP headers and FEC/ULP/RED overhead (when FEC is 129 // Does not account for RTP headers and FEC/ULP/RED overhead (when FEC is
139 // enabled). 130 // enabled).
140 virtual uint16_t MaxPayloadLength() const = 0; 131 virtual size_t MaxPayloadSize() const = 0;
141 132
142 // Returns max data payload length, which is a combination of the 133 // Returns max RTP packet size. Takes into account RTP headers and
143 // configuration MaxTransferUnit, headers and TransportOverhead. 134 // FEC/ULP/RED overhead (when FEC is enabled).
144 // Takes into account RTP headers and FEC/ULP/RED overhead (when FEC is 135 virtual size_t MaxRtpPacketSize() const = 0;
145 // enabled).
146 virtual uint16_t MaxDataPayloadLength() const = 0;
147 136
148 // Sets codec name and payload type. Returns -1 on failure else 0. 137 // Sets codec name and payload type. Returns -1 on failure else 0.
149 virtual int32_t RegisterSendPayload(const CodecInst& voice_codec) = 0; 138 virtual int32_t RegisterSendPayload(const CodecInst& voice_codec) = 0;
150 139
151 // Sets codec name and payload type. Return -1 on failure else 0. 140 // Sets codec name and payload type. Return -1 on failure else 0.
152 virtual int32_t RegisterSendPayload(const VideoCodec& video_codec) = 0; 141 virtual int32_t RegisterSendPayload(const VideoCodec& video_codec) = 0;
153 142
154 virtual void RegisterVideoSendPayload(int payload_type, 143 virtual void RegisterVideoSendPayload(int payload_type,
155 const char* payload_name) = 0; 144 const char* payload_name) = 0;
156 145
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0; 470 virtual int32_t SetKeyFrameRequestMethod(KeyFrameRequestMethod method) = 0;
482 471
483 // Sends a request for a keyframe. 472 // Sends a request for a keyframe.
484 // Returns -1 on failure else 0. 473 // Returns -1 on failure else 0.
485 virtual int32_t RequestKeyFrame() = 0; 474 virtual int32_t RequestKeyFrame() = 0;
486 }; 475 };
487 476
488 } // namespace webrtc 477 } // namespace webrtc
489 478
490 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_ 479 #endif // WEBRTC_MODULES_RTP_RTCP_INCLUDE_RTP_RTCP_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.cc ('k') | webrtc/modules/rtp_rtcp/mocks/mock_rtp_rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698