blob: d7676d98922a0b6ed90f87a3b64f51be5cf25981 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
pwestin@webrtc.orgf6bb77a2012-01-24 17:16:59 +00002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
niklase@google.com470e71d2011-07-07 08:21:25 +00003 *
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_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_H_
12#define WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_H_
13
perkj@webrtc.orgce5990c2012-01-11 13:00:08 +000014#include <vector>
15
turaj@webrtc.orgb7edd062013-03-12 22:27:27 +000016#include "webrtc/modules/interface/module.h"
17#include "webrtc/modules/rtp_rtcp/interface/rtp_rtcp_defines.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000018
19namespace webrtc {
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000020// Forward declarations.
21class PacedSender;
stefan@webrtc.org9354cc92012-06-07 08:10:14 +000022class RemoteBitrateEstimator;
23class RemoteBitrateObserver;
niklase@google.com470e71d2011-07-07 08:21:25 +000024class Transport;
25
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000026class RtpRtcp : public Module {
27 public:
28 struct Configuration {
phoglund@webrtc.orga22a9bd2013-01-14 10:01:55 +000029 Configuration();
30
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000031 /* id - Unique identifier of this RTP/RTCP module object
32 * audio - True for a audio version of the RTP/RTCP module
33 * object false will create a video version
34 * clock - The clock to use to read time. If NULL object
35 * will be using the system clock.
36 * incoming_data - Callback object that will receive the incoming
phoglund@webrtc.orga22a9bd2013-01-14 10:01:55 +000037 * data. May not be NULL; default callback will do
38 * nothing.
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000039 * incoming_messages - Callback object that will receive the incoming
phoglund@webrtc.orga22a9bd2013-01-14 10:01:55 +000040 * RTP messages. May not be NULL; default callback
41 * will do nothing.
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000042 * outgoing_transport - Transport object that will be called when packets
43 * are ready to be sent out on the network
44 * rtcp_feedback - Callback object that will receive the incoming
mflodman@webrtc.org7c894b72012-11-26 12:40:15 +000045 * RTCP messages.
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000046 * intra_frame_callback - Called when the receiver request a intra frame.
47 * bandwidth_callback - Called when we receive a changed estimate from
48 * the receiver of out stream.
phoglund@webrtc.orga22a9bd2013-01-14 10:01:55 +000049 * audio_messages - Telehone events. May not be NULL; default callback
50 * will do nothing.
stefan@webrtc.org9354cc92012-06-07 08:10:14 +000051 * remote_bitrate_estimator - Estimates the bandwidth available for a set of
52 * streams from the same client.
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000053 * paced_sender - Spread any bursts of packets into smaller
54 * bursts to minimize packet loss.
niklase@google.com470e71d2011-07-07 08:21:25 +000055 */
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000056 int32_t id;
57 bool audio;
stefan@webrtc.org20ed36d2013-01-17 14:01:20 +000058 Clock* clock;
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000059 RtpRtcp* default_module;
60 RtpData* incoming_data;
61 RtpFeedback* incoming_messages;
62 Transport* outgoing_transport;
63 RtcpFeedback* rtcp_feedback;
64 RtcpIntraFrameObserver* intra_frame_callback;
65 RtcpBandwidthObserver* bandwidth_callback;
mflodman@webrtc.org7c894b72012-11-26 12:40:15 +000066 RtcpRttObserver* rtt_observer;
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000067 RtpAudioFeedback* audio_messages;
stefan@webrtc.org9354cc92012-06-07 08:10:14 +000068 RemoteBitrateEstimator* remote_bitrate_estimator;
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +000069 PacedSender* paced_sender;
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000070 };
71 /*
72 * Create a RTP/RTCP module object using the system clock.
73 *
74 * configuration - Configuration of the RTP/RTCP module.
75 */
76 static RtpRtcp* CreateRtpRtcp(const RtpRtcp::Configuration& configuration);
niklase@google.com470e71d2011-07-07 08:21:25 +000077
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +000078 /**************************************************************************
79 *
80 * Receiver functions
81 *
82 ***************************************************************************/
niklase@google.com470e71d2011-07-07 08:21:25 +000083
84 /*
85 * configure a RTP packet timeout value
86 *
87 * RTPtimeoutMS - time in milliseconds after last received RTP packet
88 * RTCPtimeoutMS - time in milliseconds after last received RTCP packet
89 *
90 * return -1 on failure else 0
91 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +000092 virtual int32_t SetPacketTimeout(
93 const uint32_t RTPtimeoutMS,
94 const uint32_t RTCPtimeoutMS) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +000095
96 /*
97 * Set periodic dead or alive notification
98 *
99 * enable - turn periodic dead or alive notification on/off
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000100 * sampleTimeSeconds - sample interval in seconds for dead or alive
101 * notifications
niklase@google.com470e71d2011-07-07 08:21:25 +0000102 *
103 * return -1 on failure else 0
104 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000105 virtual int32_t SetPeriodicDeadOrAliveStatus(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000106 const bool enable,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000107 const uint8_t sampleTimeSeconds) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000108
109 /*
110 * Get periodic dead or alive notification status
111 *
112 * enable - periodic dead or alive notification on/off
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000113 * sampleTimeSeconds - sample interval in seconds for dead or alive
114 * notifications
niklase@google.com470e71d2011-07-07 08:21:25 +0000115 *
116 * return -1 on failure else 0
117 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000118 virtual int32_t PeriodicDeadOrAliveStatus(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000119 bool& enable,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000120 uint8_t& sampleTimeSeconds) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000121
122 /*
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000123 * set voice codec name and payload type
niklase@google.com470e71d2011-07-07 08:21:25 +0000124 *
125 * return -1 on failure else 0
126 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000127 virtual int32_t RegisterReceivePayload(
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000128 const CodecInst& voiceCodec) = 0;
129
130 /*
131 * set video codec name and payload type
132 *
133 * return -1 on failure else 0
134 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000135 virtual int32_t RegisterReceivePayload(
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000136 const VideoCodec& videoCodec) = 0;
137
138 /*
139 * get payload type for a voice codec
140 *
141 * return -1 on failure else 0
142 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000143 virtual int32_t ReceivePayloadType(
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000144 const CodecInst& voiceCodec,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000145 int8_t* plType) = 0;
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000146
147 /*
148 * get payload type for a video codec
149 *
150 * return -1 on failure else 0
151 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000152 virtual int32_t ReceivePayloadType(
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000153 const VideoCodec& videoCodec,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000154 int8_t* plType) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000155
156 /*
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000157 * Remove a registered payload type from list of accepted payloads
niklase@google.com470e71d2011-07-07 08:21:25 +0000158 *
159 * payloadType - payload type of codec
160 *
161 * return -1 on failure else 0
162 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000163 virtual int32_t DeRegisterReceivePayload(
164 const int8_t payloadType) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000165
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000166 /*
167 * (De)register RTP header extension type and id.
168 *
169 * return -1 on failure else 0
170 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000171 virtual int32_t RegisterReceiveRtpHeaderExtension(
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000172 const RTPExtensionType type,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000173 const uint8_t id) = 0;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000174
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000175 virtual int32_t DeregisterReceiveRtpHeaderExtension(
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000176 const RTPExtensionType type) = 0;
177
niklase@google.com470e71d2011-07-07 08:21:25 +0000178 /*
179 * Get last received remote timestamp
180 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000181 virtual uint32_t RemoteTimestamp() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000182
183 /*
stefan@webrtc.org7c3523c2012-09-11 07:00:42 +0000184 * Get the local time of the last received remote timestamp
185 */
186 virtual int64_t LocalTimeOfRemoteTimeStamp() const = 0;
187
188 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000189 * Get the current estimated remote timestamp
190 *
191 * timestamp - estimated timestamp
192 *
193 * return -1 on failure else 0
194 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000195 virtual int32_t EstimatedRemoteTimeStamp(
196 uint32_t& timestamp) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000197
198 /*
199 * Get incoming SSRC
200 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000201 virtual uint32_t RemoteSSRC() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000202
203 /*
204 * Get remote CSRC
205 *
206 * arrOfCSRC - array that will receive the CSRCs
207 *
208 * return -1 on failure else the number of valid entries in the list
209 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000210 virtual int32_t RemoteCSRCs(
211 uint32_t arrOfCSRC[kRtpCsrcSize]) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000212
213 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000214 * get the currently configured SSRC filter
215 *
216 * allowedSSRC - SSRC that will be allowed through
217 *
218 * return -1 on failure else 0
219 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000220 virtual int32_t SSRCFilter(uint32_t& allowedSSRC) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000221
222 /*
223 * set a SSRC to be used as a filter for incoming RTP streams
224 *
225 * allowedSSRC - SSRC that will be allowed through
226 *
227 * return -1 on failure else 0
228 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000229 virtual int32_t SetSSRCFilter(const bool enable,
230 const uint32_t allowedSSRC) = 0;
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000231
232 /*
233 * Turn on/off receiving RTX (RFC 4588) on a specific SSRC.
234 */
mflodman@webrtc.org9f5ebb52013-04-12 14:55:46 +0000235 virtual int32_t SetRTXReceiveStatus(bool enable, uint32_t SSRC) = 0;
236
237 // Sets the payload type to expected for received RTX packets. Note
238 // that this doesn't enable RTX, only the payload type is set.
239 virtual void SetRtxReceivePayloadType(int payload_type) = 0;
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000240
241 /*
242 * Get status of receiving RTX (RFC 4588) on a specific SSRC.
243 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000244 virtual int32_t RTXReceiveStatus(bool* enable,
mflodman@webrtc.org9f5ebb52013-04-12 14:55:46 +0000245 uint32_t* SSRC,
246 int* payloadType) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000247
248 /*
249 * called by the network module when we receive a packet
250 *
251 * incomingPacket - incoming packet buffer
252 * packetLength - length of incoming buffer
253 *
254 * return -1 on failure else 0
255 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000256 virtual int32_t IncomingPacket(const uint8_t* incomingPacket,
257 const uint16_t packetLength) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000258
niklase@google.com470e71d2011-07-07 08:21:25 +0000259 /**************************************************************************
260 *
261 * Sender
262 *
263 ***************************************************************************/
264
265 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000266 * set MTU
267 *
268 * size - Max transfer unit in bytes, default is 1500
269 *
270 * return -1 on failure else 0
271 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000272 virtual int32_t SetMaxTransferUnit(const uint16_t size) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000273
274 /*
275 * set transtport overhead
276 * default is IPv4 and UDP with no encryption
277 *
278 * TCP - true for TCP false UDP
279 * IPv6 - true for IP version 6 false for version 4
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000280 * authenticationOverhead - number of bytes to leave for an
281 * authentication header
niklase@google.com470e71d2011-07-07 08:21:25 +0000282 *
283 * return -1 on failure else 0
284 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000285 virtual int32_t SetTransportOverhead(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000286 const bool TCP,
287 const bool IPV6,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000288 const uint8_t authenticationOverhead = 0) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000289
290 /*
291 * Get max payload length
292 *
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000293 * A combination of the configuration MaxTransferUnit and
294 * TransportOverhead.
niklase@google.com470e71d2011-07-07 08:21:25 +0000295 * Does not account FEC/ULP/RED overhead if FEC is enabled.
296 * Does not account for RTP headers
297 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000298 virtual uint16_t MaxPayloadLength() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000299
300 /*
301 * Get max data payload length
302 *
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000303 * A combination of the configuration MaxTransferUnit, headers and
304 * TransportOverhead.
niklase@google.com470e71d2011-07-07 08:21:25 +0000305 * Takes into account FEC/ULP/RED overhead if FEC is enabled.
306 * Takes into account RTP headers
307 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000308 virtual uint16_t MaxDataPayloadLength() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000309
310 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000311 * set codec name and payload type
312 *
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000313 * return -1 on failure else 0
314 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000315 virtual int32_t RegisterSendPayload(
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000316 const CodecInst& voiceCodec) = 0;
317
318 /*
319 * set codec name and payload type
niklase@google.com470e71d2011-07-07 08:21:25 +0000320 *
321 * return -1 on failure else 0
322 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000323 virtual int32_t RegisterSendPayload(
pwestin@webrtc.org1da1ce02011-10-13 15:19:55 +0000324 const VideoCodec& videoCodec) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000325
326 /*
327 * Unregister a send payload
328 *
329 * payloadType - payload type of codec
330 *
331 * return -1 on failure else 0
332 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000333 virtual int32_t DeRegisterSendPayload(
334 const int8_t payloadType) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000335
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000336 /*
337 * (De)register RTP header extension type and id.
338 *
339 * return -1 on failure else 0
340 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000341 virtual int32_t RegisterSendRtpHeaderExtension(
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000342 const RTPExtensionType type,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000343 const uint8_t id) = 0;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000344
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000345 virtual int32_t DeregisterSendRtpHeaderExtension(
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000346 const RTPExtensionType type) = 0;
347
niklase@google.com470e71d2011-07-07 08:21:25 +0000348 /*
349 * get start timestamp
350 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000351 virtual uint32_t StartTimestamp() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000352
353 /*
354 * configure start timestamp, default is a random number
355 *
356 * timestamp - start timestamp
357 *
358 * return -1 on failure else 0
359 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000360 virtual int32_t SetStartTimestamp(
361 const uint32_t timestamp) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000362
363 /*
364 * Get SequenceNumber
365 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000366 virtual uint16_t SequenceNumber() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000367
368 /*
369 * Set SequenceNumber, default is a random number
370 *
371 * return -1 on failure else 0
372 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000373 virtual int32_t SetSequenceNumber(const uint16_t seq) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000374
375 /*
376 * Get SSRC
377 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000378 virtual uint32_t SSRC() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000379
380 /*
381 * configure SSRC, default is a random number
382 *
383 * return -1 on failure else 0
384 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000385 virtual int32_t SetSSRC(const uint32_t ssrc) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000386
387 /*
388 * Get CSRC
389 *
390 * arrOfCSRC - array of CSRCs
391 *
392 * return -1 on failure else number of valid entries in the array
393 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000394 virtual int32_t CSRCs(
395 uint32_t arrOfCSRC[kRtpCsrcSize]) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000396
397 /*
398 * Set CSRC
399 *
400 * arrOfCSRC - array of CSRCs
401 * arrLength - number of valid entries in the array
402 *
403 * return -1 on failure else 0
404 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000405 virtual int32_t SetCSRCs(
406 const uint32_t arrOfCSRC[kRtpCsrcSize],
407 const uint8_t arrLength) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000408
409 /*
410 * includes CSRCs in RTP header if enabled
411 *
412 * include CSRC - on/off
413 *
414 * default:on
415 *
416 * return -1 on failure else 0
417 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000418 virtual int32_t SetCSRCStatus(const bool include) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000419
420 /*
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000421 * Turn on/off sending RTX (RFC 4588) on a specific SSRC.
422 */
mflodman@webrtc.org9f5ebb52013-04-12 14:55:46 +0000423 virtual int32_t SetRTXSendStatus(RtxMode mode, bool set_ssrc,
424 uint32_t ssrc) = 0;
425
426 // Sets the payload type to use when sending RTX packets. Note that this
427 // doesn't enable RTX, only the payload type is set.
428 virtual void SetRtxSendPayloadType(int payload_type) = 0;
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000429
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000430 /*
431 * Get status of sending RTX (RFC 4588) on a specific SSRC.
432 */
mflodman@webrtc.org9f5ebb52013-04-12 14:55:46 +0000433 virtual int32_t RTXSendStatus(RtxMode* mode, uint32_t* ssrc,
434 int* payloadType) const = 0;
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000435
436 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000437 * sends kRtcpByeCode when going from true to false
438 *
439 * sending - on/off
440 *
441 * return -1 on failure else 0
442 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000443 virtual int32_t SetSendingStatus(const bool sending) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000444
445 /*
446 * get send status
447 */
448 virtual bool Sending() const = 0;
449
450 /*
451 * Starts/Stops media packets, on by default
452 *
453 * sending - on/off
454 *
455 * return -1 on failure else 0
456 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000457 virtual int32_t SetSendingMediaStatus(const bool sending) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000458
459 /*
460 * get send status
461 */
462 virtual bool SendingMedia() const = 0;
463
464 /*
465 * get sent bitrate in Kbit/s
466 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000467 virtual void BitrateSent(uint32_t* totalRate,
468 uint32_t* videoRate,
469 uint32_t* fecRate,
470 uint32_t* nackRate) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000471
472 /*
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000473 * Used by the codec module to deliver a video or audio frame for
474 * packetization.
niklase@google.com470e71d2011-07-07 08:21:25 +0000475 *
476 * frameType - type of frame to send
477 * payloadType - payload type of frame to send
478 * timestamp - timestamp of frame to send
479 * payloadData - payload buffer of frame to send
480 * payloadSize - size of payload buffer to send
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000481 * fragmentation - fragmentation offset data for fragmented frames such
482 * as layers or RED
niklase@google.com470e71d2011-07-07 08:21:25 +0000483 *
484 * return -1 on failure else 0
485 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000486 virtual int32_t SendOutgoingData(
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000487 const FrameType frameType,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000488 const int8_t payloadType,
489 const uint32_t timeStamp,
stefan@webrtc.orgddfdfed2012-07-03 13:21:22 +0000490 int64_t capture_time_ms,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000491 const uint8_t* payloadData,
492 const uint32_t payloadSize,
pwestin@webrtc.org8281e7d2012-01-10 14:09:18 +0000493 const RTPFragmentationHeader* fragmentation = NULL,
494 const RTPVideoHeader* rtpVideoHdr = NULL) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000495
pwestin@webrtc.org571a1c02012-11-13 21:12:39 +0000496 virtual void TimeToSendPacket(uint32_t ssrc, uint16_t sequence_number,
497 int64_t capture_time_ms) = 0;
498
niklase@google.com470e71d2011-07-07 08:21:25 +0000499 /**************************************************************************
500 *
501 * RTCP
502 *
503 ***************************************************************************/
504
505 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000506 * Get RTCP status
507 */
508 virtual RTCPMethod RTCP() const = 0;
509
510 /*
511 * configure RTCP status i.e on(compound or non- compound)/off
512 *
513 * method - RTCP method to use
514 *
515 * return -1 on failure else 0
516 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000517 virtual int32_t SetRTCPStatus(const RTCPMethod method) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000518
519 /*
520 * Set RTCP CName (i.e unique identifier)
521 *
522 * return -1 on failure else 0
523 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000524 virtual int32_t SetCNAME(const char cName[RTCP_CNAME_SIZE]) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000525
526 /*
527 * Get RTCP CName (i.e unique identifier)
528 *
529 * return -1 on failure else 0
530 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000531 virtual int32_t CNAME(char cName[RTCP_CNAME_SIZE]) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000532
533 /*
534 * Get remote CName
535 *
536 * return -1 on failure else 0
537 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000538 virtual int32_t RemoteCNAME(
539 const uint32_t remoteSSRC,
pwestin@webrtc.orgf6bb77a2012-01-24 17:16:59 +0000540 char cName[RTCP_CNAME_SIZE]) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000541
542 /*
543 * Get remote NTP
544 *
545 * return -1 on failure else 0
546 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000547 virtual int32_t RemoteNTP(
548 uint32_t *ReceivedNTPsecs,
549 uint32_t *ReceivedNTPfrac,
550 uint32_t *RTCPArrivalTimeSecs,
551 uint32_t *RTCPArrivalTimeFrac,
552 uint32_t *rtcp_timestamp) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000553
554 /*
555 * AddMixedCNAME
556 *
557 * return -1 on failure else 0
558 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000559 virtual int32_t AddMixedCNAME(
560 const uint32_t SSRC,
pwestin@webrtc.orgf6bb77a2012-01-24 17:16:59 +0000561 const char cName[RTCP_CNAME_SIZE]) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000562
563 /*
564 * RemoveMixedCNAME
565 *
566 * return -1 on failure else 0
567 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000568 virtual int32_t RemoveMixedCNAME(const uint32_t SSRC) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000569
570 /*
571 * Get RoundTripTime
572 *
573 * return -1 on failure else 0
574 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000575 virtual int32_t RTT(const uint32_t remoteSSRC,
576 uint16_t* RTT,
577 uint16_t* avgRTT,
578 uint16_t* minRTT,
579 uint16_t* maxRTT) const = 0 ;
niklase@google.com470e71d2011-07-07 08:21:25 +0000580
581 /*
582 * Reset RoundTripTime statistics
583 *
584 * return -1 on failure else 0
585 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000586 virtual int32_t ResetRTT(const uint32_t remoteSSRC)= 0 ;
niklase@google.com470e71d2011-07-07 08:21:25 +0000587
588 /*
mflodman@webrtc.org7c894b72012-11-26 12:40:15 +0000589 * Sets the estimated RTT, to be used for receive only modules without
590 * possibility of calculating its own RTT.
591 */
592 virtual void SetRtt(uint32_t rtt) = 0;
593
594 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000595 * Force a send of a RTCP packet
596 * normal SR and RR are triggered via the process function
597 *
598 * return -1 on failure else 0
599 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000600 virtual int32_t SendRTCP(
601 uint32_t rtcpPacketType = kRtcpReport) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000602
603 /*
604 * Good state of RTP receiver inform sender
605 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000606 virtual int32_t SendRTCPReferencePictureSelection(
607 const uint64_t pictureID) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000608
609 /*
610 * Send a RTCP Slice Loss Indication (SLI)
611 * 6 least significant bits of pictureID
612 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000613 virtual int32_t SendRTCPSliceLossIndication(
614 const uint8_t pictureID) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000615
616 /*
617 * Reset RTP statistics
618 *
619 * return -1 on failure else 0
620 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000621 virtual int32_t ResetStatisticsRTP() = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000622
623 /*
624 * statistics of our localy created statistics of the received RTP stream
625 *
626 * return -1 on failure else 0
627 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000628 virtual int32_t StatisticsRTP(
629 uint8_t* fraction_lost, // scale 0 to 255
630 uint32_t* cum_lost, // number of lost packets
631 uint32_t* ext_max, // highest sequence number received
632 uint32_t* jitter,
633 uint32_t* max_jitter = NULL) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000634
635 /*
636 * Reset RTP data counters for the receiving side
637 *
638 * return -1 on failure else 0
639 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000640 virtual int32_t ResetReceiveDataCountersRTP() = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000641
642 /*
643 * Reset RTP data counters for the sending side
644 *
645 * return -1 on failure else 0
646 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000647 virtual int32_t ResetSendDataCountersRTP() = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000648
649 /*
650 * statistics of the amount of data sent and received
651 *
652 * return -1 on failure else 0
653 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000654 virtual int32_t DataCountersRTP(
655 uint32_t* bytesSent,
656 uint32_t* packetsSent,
657 uint32_t* bytesReceived,
658 uint32_t* packetsReceived) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000659 /*
660 * Get received RTCP sender info
661 *
662 * return -1 on failure else 0
663 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000664 virtual int32_t RemoteRTCPStat(RTCPSenderInfo* senderInfo) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000665
666 /*
667 * Get received RTCP report block
668 *
669 * return -1 on failure else 0
670 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000671 virtual int32_t RemoteRTCPStat(
perkj@webrtc.orgce5990c2012-01-11 13:00:08 +0000672 std::vector<RTCPReportBlock>* receiveBlocks) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000673 /*
674 * Set received RTCP report block
675 *
676 * return -1 on failure else 0
677 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000678 virtual int32_t AddRTCPReportBlock(
679 const uint32_t SSRC,
perkj@webrtc.orgce5990c2012-01-11 13:00:08 +0000680 const RTCPReportBlock* receiveBlock) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000681
682 /*
683 * RemoveRTCPReportBlock
684 *
685 * return -1 on failure else 0
686 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000687 virtual int32_t RemoveRTCPReportBlock(const uint32_t SSRC) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000688
689 /*
690 * (APP) Application specific data
691 *
692 * return -1 on failure else 0
693 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000694 virtual int32_t SetRTCPApplicationSpecificData(
695 const uint8_t subType,
696 const uint32_t name,
697 const uint8_t* data,
698 const uint16_t length) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000699 /*
700 * (XR) VOIP metric
701 *
702 * return -1 on failure else 0
703 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000704 virtual int32_t SetRTCPVoIPMetrics(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000705 const RTCPVoIPMetric* VoIPMetric) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000706
707 /*
pwestin@webrtc.org741da942011-09-20 13:52:04 +0000708 * (REMB) Receiver Estimated Max Bitrate
709 */
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000710 virtual bool REMB() const = 0;
pwestin@webrtc.org741da942011-09-20 13:52:04 +0000711
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000712 virtual int32_t SetREMBStatus(const bool enable) = 0;
pwestin@webrtc.org741da942011-09-20 13:52:04 +0000713
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000714 virtual int32_t SetREMBData(const uint32_t bitrate,
715 const uint8_t numberOfSSRC,
716 const uint32_t* SSRC) = 0;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000717
718 /*
719 * (IJ) Extended jitter report.
720 */
721 virtual bool IJ() const = 0;
722
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000723 virtual int32_t SetIJStatus(const bool enable) = 0;
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000724
pwestin@webrtc.org741da942011-09-20 13:52:04 +0000725 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000726 * (TMMBR) Temporary Max Media Bit Rate
727 */
asapersson@webrtc.org5249cc82011-12-16 14:31:37 +0000728 virtual bool TMMBR() const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000729
730 /*
731 *
732 * return -1 on failure else 0
733 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000734 virtual int32_t SetTMMBRStatus(const bool enable) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000735
736 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000737 * (NACK)
738 */
739 virtual NACKMethod NACK() const = 0;
740
741 /*
742 * Turn negative acknowledgement requests on/off
stefan@webrtc.orgbecf9c82013-02-01 15:09:57 +0000743 * |max_reordering_threshold| should be set to how much a retransmitted
744 * packet can be expected to be reordered (in sequence numbers) compared to
745 * a packet which has not been retransmitted.
niklase@google.com470e71d2011-07-07 08:21:25 +0000746 *
747 * return -1 on failure else 0
748 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000749 virtual int32_t SetNACKStatus(const NACKMethod method,
750 int max_reordering_threshold) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000751
752 /*
stefan@webrtc.org6a4bef42011-12-22 12:52:41 +0000753 * TODO(holmer): Propagate this API to VideoEngine.
754 * Returns the currently configured selective retransmission settings.
755 */
756 virtual int SelectiveRetransmissions() const = 0;
757
758 /*
759 * TODO(holmer): Propagate this API to VideoEngine.
760 * Sets the selective retransmission settings, which will decide which
761 * packets will be retransmitted if NACKed. Settings are constructed by
762 * combining the constants in enum RetransmissionMode with bitwise OR.
763 * All packets are retransmitted if kRetransmitAllPackets is set, while no
764 * packets are retransmitted if kRetransmitOff is set.
765 * By default all packets except FEC packets are retransmitted. For VP8
766 * with temporal scalability only base layer packets are retransmitted.
767 *
768 * Returns -1 on failure, otherwise 0.
769 */
770 virtual int SetSelectiveRetransmissions(uint8_t settings) = 0;
771
772 /*
niklase@google.com470e71d2011-07-07 08:21:25 +0000773 * Send a Negative acknowledgement packet
774 *
775 * return -1 on failure else 0
776 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000777 virtual int32_t SendNACK(const uint16_t* nackList,
778 const uint16_t size) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000779
780 /*
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000781 * Store the sent packets, needed to answer to a Negative acknowledgement
782 * requests
niklase@google.com470e71d2011-07-07 08:21:25 +0000783 *
784 * return -1 on failure else 0
785 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000786 virtual int32_t SetStorePacketsStatus(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000787 const bool enable,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000788 const uint16_t numberToStore) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000789
790 /**************************************************************************
791 *
792 * Audio
793 *
794 ***************************************************************************/
795
796 /*
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000797 * set audio packet size, used to determine when it's time to send a DTMF
798 * packet in silence (CNG)
niklase@google.com470e71d2011-07-07 08:21:25 +0000799 *
800 * return -1 on failure else 0
801 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000802 virtual int32_t SetAudioPacketSize(
803 const uint16_t packetSizeSamples) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000804
805 /*
turaj@webrtc.orgb7edd062013-03-12 22:27:27 +0000806 * Forward DTMF to decoder for playout.
niklase@google.com470e71d2011-07-07 08:21:25 +0000807 *
808 * return -1 on failure else 0
809 */
turaj@webrtc.orgb7edd062013-03-12 22:27:27 +0000810 virtual int SetTelephoneEventForwardToDecoder(bool forwardToDecoder) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000811
812 /*
813 * Returns true if received DTMF events are forwarded to the decoder using
814 * the OnPlayTelephoneEvent callback.
815 */
816 virtual bool TelephoneEventForwardToDecoder() const = 0;
817
818 /*
819 * SendTelephoneEventActive
820 *
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000821 * return true if we currently send a telephone event and 100 ms after an
822 * event is sent used to prevent the telephone event tone to be recorded
823 * by the microphone and send inband just after the tone has ended.
niklase@google.com470e71d2011-07-07 08:21:25 +0000824 */
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000825 virtual bool SendTelephoneEventActive(
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000826 int8_t& telephoneEvent) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000827
828 /*
829 * Send a TelephoneEvent tone using RFC 2833 (4733)
830 *
831 * return -1 on failure else 0
832 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000833 virtual int32_t SendTelephoneEventOutband(
834 const uint8_t key,
835 const uint16_t time_ms,
836 const uint8_t level) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000837
838 /*
839 * Set payload type for Redundant Audio Data RFC 2198
840 *
841 * return -1 on failure else 0
842 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000843 virtual int32_t SetSendREDPayloadType(
844 const int8_t payloadType) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000845
846 /*
847 * Get payload type for Redundant Audio Data RFC 2198
848 *
849 * return -1 on failure else 0
850 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000851 virtual int32_t SendREDPayloadType(
852 int8_t& payloadType) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000853
854 /*
855 * Set status and ID for header-extension-for-audio-level-indication.
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000856 * See http://tools.ietf.org/html/rfc6464 for more details.
niklase@google.com470e71d2011-07-07 08:21:25 +0000857 *
858 * return -1 on failure else 0
859 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000860 virtual int32_t SetRTPAudioLevelIndicationStatus(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000861 const bool enable,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000862 const uint8_t ID) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000863
864 /*
865 * Get status and ID for header-extension-for-audio-level-indication.
866 *
867 * return -1 on failure else 0
868 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000869 virtual int32_t GetRTPAudioLevelIndicationStatus(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000870 bool& enable,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000871 uint8_t& ID) const = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000872
873 /*
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000874 * Store the audio level in dBov for header-extension-for-audio-level-
875 * indication.
niklase@google.com470e71d2011-07-07 08:21:25 +0000876 * This API shall be called before transmision of an RTP packet to ensure
877 * that the |level| part of the extended RTP header is updated.
878 *
879 * return -1 on failure else 0.
880 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000881 virtual int32_t SetAudioLevel(const uint8_t level_dBov) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000882
883 /**************************************************************************
884 *
885 * Video
886 *
887 ***************************************************************************/
888
889 /*
stefan@webrtc.org7da34592013-04-09 14:56:29 +0000890 * Set the estimated camera delay in MS
891 *
892 * return -1 on failure else 0
893 */
894 virtual int32_t SetCameraDelay(const int32_t delayMS) = 0;
895
896 /*
pwestin@webrtc.org49888ce2012-04-27 05:25:53 +0000897 * Set the target send bitrate
niklase@google.com470e71d2011-07-07 08:21:25 +0000898 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000899 virtual void SetTargetSendBitrate(const uint32_t bitrate) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000900
901 /*
902 * Turn on/off generic FEC
903 *
904 * return -1 on failure else 0
905 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000906 virtual int32_t SetGenericFECStatus(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000907 const bool enable,
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000908 const uint8_t payloadTypeRED,
909 const uint8_t payloadTypeFEC) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000910
911 /*
912 * Get generic FEC setting
913 *
914 * return -1 on failure else 0
915 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000916 virtual int32_t GenericFECStatus(bool& enable,
917 uint8_t& payloadTypeRED,
918 uint8_t& payloadTypeFEC) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000919
marpan@google.com80c5d7a2011-07-15 21:32:40 +0000920
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000921 virtual int32_t SetFecParameters(
stefan@webrtc.orge0d6fa42012-03-20 22:10:56 +0000922 const FecProtectionParams* delta_params,
923 const FecProtectionParams* key_params) = 0;
marpan@google.com80c5d7a2011-07-15 21:32:40 +0000924
niklase@google.com470e71d2011-07-07 08:21:25 +0000925 /*
926 * Set method for requestion a new key frame
927 *
928 * return -1 on failure else 0
929 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000930 virtual int32_t SetKeyFrameRequestMethod(
pwestin@webrtc.org2853dde2012-05-11 11:08:54 +0000931 const KeyFrameRequestMethod method) = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000932
933 /*
934 * send a request for a keyframe
935 *
936 * return -1 on failure else 0
937 */
pbos@webrtc.org2f446732013-04-08 11:08:41 +0000938 virtual int32_t RequestKeyFrame() = 0;
niklase@google.com470e71d2011-07-07 08:21:25 +0000939};
940} // namespace webrtc
941#endif // WEBRTC_MODULES_RTP_RTCP_INTERFACE_RTP_RTCP_H_