blob: f3a0f39bf82d5c54198c4a91c58b8c861d51bf78 [file] [log] [blame]
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +02001/*
2 * Copyright (c) 2020 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 MODULES_RTP_RTCP_SOURCE_RTP_RTCP_INTERFACE_H_
12#define MODULES_RTP_RTCP_SOURCE_RTP_RTCP_INTERFACE_H_
13
14#include <memory>
15#include <string>
16#include <vector>
17
Ali Tofighd14e8892022-05-13 11:42:16 +020018#include "absl/strings/string_view.h"
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020019#include "absl/types/optional.h"
Jonas Orelande62c2f22022-03-29 11:04:48 +020020#include "api/field_trials_view.h"
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020021#include "api/frame_transformer_interface.h"
22#include "api/scoped_refptr.h"
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020023#include "api/video/video_bitrate_allocation.h"
24#include "modules/rtp_rtcp/include/receive_statistics.h"
25#include "modules/rtp_rtcp/include/report_block_data.h"
26#include "modules/rtp_rtcp/include/rtp_packet_sender.h"
27#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
28#include "modules/rtp_rtcp/source/rtp_packet_to_send.h"
29#include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
30#include "modules/rtp_rtcp/source/video_fec_generator.h"
Alessio Bazzicabc1c93d2021-03-12 17:45:26 +010031#include "system_wrappers/include/ntp_time.h"
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020032
33namespace webrtc {
34
35// Forward declarations.
36class FrameEncryptorInterface;
37class RateLimiter;
38class RemoteBitrateEstimator;
39class RtcEventLog;
40class RTPSender;
41class Transport;
42class VideoBitrateAllocationObserver;
43
44class RtpRtcpInterface : public RtcpFeedbackSenderInterface {
45 public:
46 struct Configuration {
47 Configuration() = default;
48 Configuration(Configuration&& rhs) = default;
49
Byoungchan Lee604fd2f2022-01-21 09:49:39 +090050 Configuration(const Configuration&) = delete;
51 Configuration& operator=(const Configuration&) = delete;
52
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020053 // True for a audio version of the RTP/RTCP module object false will create
54 // a video version.
55 bool audio = false;
56 bool receiver_only = false;
57
58 // The clock to use to read time. If nullptr then system clock will be used.
59 Clock* clock = nullptr;
60
61 ReceiveStatisticsProvider* receive_statistics = nullptr;
62
63 // Transport object that will be called when packets are ready to be sent
64 // out on the network.
65 Transport* outgoing_transport = nullptr;
66
67 // Called when the receiver requests an intra frame.
68 RtcpIntraFrameObserver* intra_frame_callback = nullptr;
69
70 // Called when the receiver sends a loss notification.
71 RtcpLossNotificationObserver* rtcp_loss_notification_observer = nullptr;
72
73 // Called when we receive a changed estimate from the receiver of out
74 // stream.
75 RtcpBandwidthObserver* bandwidth_callback = nullptr;
76
77 NetworkStateEstimateObserver* network_state_estimate_observer = nullptr;
78 TransportFeedbackObserver* transport_feedback_callback = nullptr;
79 VideoBitrateAllocationObserver* bitrate_allocation_observer = nullptr;
80 RtcpRttStats* rtt_stats = nullptr;
81 RtcpPacketTypeCounterObserver* rtcp_packet_type_counter_observer = nullptr;
82 // Called on receipt of RTCP report block from remote side.
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020083 // TODO(bugs.webrtc.org/10679): Consider whether we want to use
84 // only getters or only callbacks. If we decide on getters, the
85 // ReportBlockDataObserver should also be removed in favor of
86 // GetLatestReportBlockData().
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +020087 RtcpCnameCallback* rtcp_cname_callback = nullptr;
88 ReportBlockDataObserver* report_block_data_observer = nullptr;
89
90 // Estimates the bandwidth available for a set of streams from the same
91 // client.
92 RemoteBitrateEstimator* remote_bitrate_estimator = nullptr;
93
94 // Spread any bursts of packets into smaller bursts to minimize packet loss.
95 RtpPacketSender* paced_sender = nullptr;
96
97 // Generates FEC packets.
98 // TODO(sprang): Wire up to RtpSenderEgress.
99 VideoFecGenerator* fec_generator = nullptr;
100
101 BitrateStatisticsObserver* send_bitrate_observer = nullptr;
102 SendSideDelayObserver* send_side_delay_observer = nullptr;
103 RtcEventLog* event_log = nullptr;
104 SendPacketObserver* send_packet_observer = nullptr;
105 RateLimiter* retransmission_rate_limiter = nullptr;
106 StreamDataCountersCallback* rtp_stats_callback = nullptr;
107
108 int rtcp_report_interval_ms = 0;
109
110 // Update network2 instead of pacer_exit field of video timing extension.
111 bool populate_network2_timestamp = false;
112
113 rtc::scoped_refptr<FrameTransformerInterface> frame_transformer;
114
115 // E2EE Custom Video Frame Encryption
116 FrameEncryptorInterface* frame_encryptor = nullptr;
117 // Require all outgoing frames to be encrypted with a FrameEncryptor.
118 bool require_frame_encryption = false;
119
120 // Corresponds to extmap-allow-mixed in SDP negotiation.
121 bool extmap_allow_mixed = false;
122
123 // If true, the RTP sender will always annotate outgoing packets with
124 // MID and RID header extensions, if provided and negotiated.
125 // If false, the RTP sender will stop sending MID and RID header extensions,
126 // when it knows that the receiver is ready to demux based on SSRC. This is
127 // done by RTCP RR acking.
128 bool always_send_mid_and_rid = false;
129
Artem Titov913cfa72021-07-28 23:57:33 +0200130 // If set, field trials are read from `field_trials`, otherwise
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200131 // defaults to webrtc::FieldTrialBasedConfig.
Jonas Orelande62c2f22022-03-29 11:04:48 +0200132 const FieldTrialsView* field_trials = nullptr;
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200133
134 // SSRCs for media and retransmission, respectively.
Artem Titov913cfa72021-07-28 23:57:33 +0200135 // FlexFec SSRC is fetched from `flexfec_sender`.
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200136 uint32_t local_media_ssrc = 0;
137 absl::optional<uint32_t> rtx_send_ssrc;
138
139 bool need_rtp_packet_infos = false;
140
141 // If true, the RTP packet history will select RTX packets based on
142 // heuristics such as send time, retransmission count etc, in order to
143 // make padding potentially more useful.
144 // If false, the last packet will always be picked. This may reduce CPU
145 // overhead.
146 bool enable_rtx_padding_prioritization = true;
147
Niels Möllerbe810cb2020-12-02 14:25:03 +0100148 // Estimate RTT as non-sender as described in
149 // https://tools.ietf.org/html/rfc3611#section-4.4 and #section-4.5
150 bool non_sender_rtt_measurement = false;
Niels Mölleraf785d92022-05-31 10:45:41 +0200151
152 // If non-empty, sets the value for sending in the RID (and Repaired) RTP
153 // header extension. RIDs are used to identify an RTP stream if SSRCs are
154 // not negotiated. If the RID and Repaired RID extensions are not
155 // registered, the RID will not be sent.
156 std::string rid;
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200157 };
158
Alessio Bazzicabc1c93d2021-03-12 17:45:26 +0100159 // Stats for RTCP sender reports (SR) for a specific SSRC.
160 // Refer to https://tools.ietf.org/html/rfc3550#section-6.4.1.
161 struct SenderReportStats {
Ivo Creusen2562cf02021-09-03 14:51:22 +0000162 // Arrival NTP timestamp for the last received RTCP SR.
Alessio Bazzicabc1c93d2021-03-12 17:45:26 +0100163 NtpTime last_arrival_timestamp;
164 // Received (a.k.a., remote) NTP timestamp for the last received RTCP SR.
165 NtpTime last_remote_timestamp;
166 // Total number of RTP data packets transmitted by the sender since starting
167 // transmission up until the time this SR packet was generated. The count
168 // should be reset if the sender changes its SSRC identifier.
169 uint32_t packets_sent;
170 // Total number of payload octets (i.e., not including header or padding)
171 // transmitted in RTP data packets by the sender since starting transmission
172 // up until the time this SR packet was generated. The count should be reset
173 // if the sender changes its SSRC identifier.
174 uint64_t bytes_sent;
175 // Total number of RTCP SR blocks received.
176 // https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-reportssent.
177 uint64_t reports_count;
178 };
Ivo Creusen2562cf02021-09-03 14:51:22 +0000179 // Stats about the non-sender SSRC, based on RTCP extended reports (XR).
180 // Refer to https://datatracker.ietf.org/doc/html/rfc3611#section-2.
181 struct NonSenderRttStats {
182 // https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
183 absl::optional<TimeDelta> round_trip_time;
184 // https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
185 TimeDelta total_round_trip_time = TimeDelta::Zero();
186 // https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
187 int round_trip_time_measurements = 0;
188 };
Alessio Bazzicabc1c93d2021-03-12 17:45:26 +0100189
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200190 // **************************************************************************
191 // Receiver functions
192 // **************************************************************************
193
194 virtual void IncomingRtcpPacket(const uint8_t* incoming_packet,
195 size_t incoming_packet_length) = 0;
196
197 virtual void SetRemoteSSRC(uint32_t ssrc) = 0;
198
Tommi08be9ba2021-06-15 23:01:57 +0200199 // Called when the local ssrc changes (post initialization) for receive
200 // streams to match with send. Called on the packet receive thread/tq.
201 virtual void SetLocalSsrc(uint32_t ssrc) = 0;
202
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200203 // **************************************************************************
204 // Sender
205 // **************************************************************************
206
207 // Sets the maximum size of an RTP packet, including RTP headers.
208 virtual void SetMaxRtpPacketSize(size_t size) = 0;
209
210 // Returns max RTP packet size. Takes into account RTP headers and
211 // FEC/ULP/RED overhead (when FEC is enabled).
212 virtual size_t MaxRtpPacketSize() const = 0;
213
214 virtual void RegisterSendPayloadFrequency(int payload_type,
215 int payload_frequency) = 0;
216
217 // Unregisters a send payload.
Artem Titov913cfa72021-07-28 23:57:33 +0200218 // `payload_type` - payload type of codec
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200219 // Returns -1 on failure else 0.
220 virtual int32_t DeRegisterSendPayload(int8_t payload_type) = 0;
221
222 virtual void SetExtmapAllowMixed(bool extmap_allow_mixed) = 0;
223
224 // Register extension by uri, triggers CHECK on falure.
225 virtual void RegisterRtpHeaderExtension(absl::string_view uri, int id) = 0;
226
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200227 virtual void DeregisterSendRtpHeaderExtension(absl::string_view uri) = 0;
228
229 // Returns true if RTP module is send media, and any of the extensions
230 // required for bandwidth estimation is registered.
231 virtual bool SupportsPadding() const = 0;
232 // Same as SupportsPadding(), but additionally requires that
233 // SetRtxSendStatus() has been called with the kRtxRedundantPayloads option
234 // enabled.
235 virtual bool SupportsRtxPayloadPadding() const = 0;
236
237 // Returns start timestamp.
238 virtual uint32_t StartTimestamp() const = 0;
239
240 // Sets start timestamp. Start timestamp is set to a random value if this
241 // function is never called.
242 virtual void SetStartTimestamp(uint32_t timestamp) = 0;
243
244 // Returns SequenceNumber.
245 virtual uint16_t SequenceNumber() const = 0;
246
247 // Sets SequenceNumber, default is a random number.
248 virtual void SetSequenceNumber(uint16_t seq) = 0;
249
250 virtual void SetRtpState(const RtpState& rtp_state) = 0;
251 virtual void SetRtxState(const RtpState& rtp_state) = 0;
252 virtual RtpState GetRtpState() const = 0;
253 virtual RtpState GetRtxState() const = 0;
254
Ivo Creusen8c40d512021-07-13 12:53:22 +0000255 // This can be used to enable/disable receive-side RTT.
256 virtual void SetNonSenderRttMeasurement(bool enabled) = 0;
257
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200258 // Returns SSRC.
259 virtual uint32_t SSRC() const = 0;
260
261 // Sets the value for sending in the RID (and Repaired) RTP header extension.
262 // RIDs are used to identify an RTP stream if SSRCs are not negotiated.
263 // If the RID and Repaired RID extensions are not registered, the RID will
264 // not be sent.
Niels Mölleraf785d92022-05-31 10:45:41 +0200265 [[deprecated("Use the rid member of config struct instead'")]] virtual void
266 SetRid(absl::string_view rid) = 0;
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200267
268 // Sets the value for sending in the MID RTP header extension.
269 // The MID RTP header extension should be registered for this to do anything.
270 // Once set, this value can not be changed or removed.
Ali Tofighd14e8892022-05-13 11:42:16 +0200271 virtual void SetMid(absl::string_view mid) = 0;
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200272
273 // Sets CSRC.
Artem Titov913cfa72021-07-28 23:57:33 +0200274 // `csrcs` - vector of CSRCs
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200275 virtual void SetCsrcs(const std::vector<uint32_t>& csrcs) = 0;
276
277 // Turns on/off sending RTX (RFC 4588). The modes can be set as a combination
278 // of values of the enumerator RtxMode.
279 virtual void SetRtxSendStatus(int modes) = 0;
280
281 // Returns status of sending RTX (RFC 4588). The returned value can be
282 // a combination of values of the enumerator RtxMode.
283 virtual int RtxSendStatus() const = 0;
284
285 // Returns the SSRC used for RTX if set, otherwise a nullopt.
286 virtual absl::optional<uint32_t> RtxSsrc() const = 0;
287
288 // Sets the payload type to use when sending RTX packets. Note that this
289 // doesn't enable RTX, only the payload type is set.
290 virtual void SetRtxSendPayloadType(int payload_type,
291 int associated_payload_type) = 0;
292
293 // Returns the FlexFEC SSRC, if there is one.
294 virtual absl::optional<uint32_t> FlexfecSsrc() const = 0;
295
296 // Sets sending status. Sends kRtcpByeCode when going from true to false.
297 // Returns -1 on failure else 0.
298 virtual int32_t SetSendingStatus(bool sending) = 0;
299
300 // Returns current sending status.
301 virtual bool Sending() const = 0;
302
303 // Starts/Stops media packets. On by default.
304 virtual void SetSendingMediaStatus(bool sending) = 0;
305
306 // Returns current media sending status.
307 virtual bool SendingMedia() const = 0;
308
309 // Returns whether audio is configured (i.e. Configuration::audio = true).
310 virtual bool IsAudioConfigured() const = 0;
311
312 // Indicate that the packets sent by this module should be counted towards the
313 // bitrate estimate since the stream participates in the bitrate allocation.
314 virtual void SetAsPartOfAllocation(bool part_of_allocation) = 0;
315
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200316 // Returns bitrate sent (post-pacing) per packet type.
317 virtual RtpSendRates GetSendRates() const = 0;
318
319 virtual RTPSender* RtpSender() = 0;
320 virtual const RTPSender* RtpSender() const = 0;
321
322 // Record that a frame is about to be sent. Returns true on success, and false
323 // if the module isn't ready to send.
324 virtual bool OnSendingRtpFrame(uint32_t timestamp,
325 int64_t capture_time_ms,
326 int payload_type,
327 bool force_sender_report) = 0;
328
329 // Try to send the provided packet. Returns true iff packet matches any of
330 // the SSRCs for this module (media/rtx/fec etc) and was forwarded to the
331 // transport.
332 virtual bool TrySendPacket(RtpPacketToSend* packet,
333 const PacedPacketInfo& pacing_info) = 0;
334
Erik Språng1d50cb62020-07-02 17:41:32 +0200335 // Update the FEC protection parameters to use for delta- and key-frames.
336 // Only used when deferred FEC is active.
337 virtual void SetFecProtectionParams(
338 const FecProtectionParams& delta_params,
339 const FecProtectionParams& key_params) = 0;
340
341 // If deferred FEC generation is enabled, this method should be called after
342 // calling TrySendPacket(). Any generated FEC packets will be removed and
343 // returned from the FEC generator.
344 virtual std::vector<std::unique_ptr<RtpPacketToSend>> FetchFecPackets() = 0;
345
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200346 virtual void OnPacketsAcknowledged(
347 rtc::ArrayView<const uint16_t> sequence_numbers) = 0;
348
349 virtual std::vector<std::unique_ptr<RtpPacketToSend>> GeneratePadding(
350 size_t target_size_bytes) = 0;
351
352 virtual std::vector<RtpSequenceNumberMap::Info> GetSentRtpPacketInfos(
353 rtc::ArrayView<const uint16_t> sequence_numbers) const = 0;
354
355 // Returns an expected per packet overhead representing the main RTP header,
356 // any CSRCs, and the registered header extensions that are expected on all
357 // packets (i.e. disregarding things like abs capture time which is only
358 // populated on a subset of packets, but counting MID/RID type extensions
359 // when we expect to send them).
360 virtual size_t ExpectedPerPacketOverhead() const = 0;
361
Erik Språngb6bbdeb2021-08-13 16:12:41 +0200362 // Access to packet state (e.g. sequence numbering) must only be access by
363 // one thread at a time. It may be only one thread, or a construction thread
364 // that calls SetRtpState() - handing over to a pacer thread that calls
365 // TrySendPacket() - and at teardown ownership is handed to a destruciton
366 // thread that calls GetRtpState().
367 // This method is used to signal that "ownership" of the rtp state is being
368 // transferred to another thread.
369 virtual void OnPacketSendingThreadSwitched() = 0;
370
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200371 // **************************************************************************
372 // RTCP
373 // **************************************************************************
374
375 // Returns RTCP status.
376 virtual RtcpMode RTCP() const = 0;
377
378 // Sets RTCP status i.e on(compound or non-compound)/off.
Artem Titov913cfa72021-07-28 23:57:33 +0200379 // `method` - RTCP method to use.
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200380 virtual void SetRTCPStatus(RtcpMode method) = 0;
381
382 // Sets RTCP CName (i.e unique identifier).
383 // Returns -1 on failure else 0.
Ali Tofighd14e8892022-05-13 11:42:16 +0200384 virtual int32_t SetCNAME(absl::string_view cname) = 0;
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200385
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200386 // Returns remote NTP.
387 // Returns -1 on failure else 0.
388 virtual int32_t RemoteNTP(uint32_t* received_ntp_secs,
389 uint32_t* received_ntp_frac,
390 uint32_t* rtcp_arrival_time_secs,
391 uint32_t* rtcp_arrival_time_frac,
392 uint32_t* rtcp_timestamp) const = 0;
393
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200394 // Returns current RTT (round-trip time) estimate.
395 // Returns -1 on failure else 0.
396 virtual int32_t RTT(uint32_t remote_ssrc,
397 int64_t* rtt,
398 int64_t* avg_rtt,
399 int64_t* min_rtt,
400 int64_t* max_rtt) const = 0;
401
402 // Returns the estimated RTT, with fallback to a default value.
403 virtual int64_t ExpectedRetransmissionTimeMs() const = 0;
404
405 // Forces a send of a RTCP packet. Periodic SR and RR are triggered via the
406 // process function.
407 // Returns -1 on failure else 0.
408 virtual int32_t SendRTCP(RTCPPacketType rtcp_packet_type) = 0;
409
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200410 // Returns send statistics for the RTP and RTX stream.
411 virtual void GetSendStreamDataCounters(
412 StreamDataCounters* rtp_counters,
413 StreamDataCounters* rtx_counters) const = 0;
414
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200415 // A snapshot of Report Blocks with additional data of interest to statistics.
416 // Within this list, the sender-source SSRC pair is unique and per-pair the
417 // ReportBlockData represents the latest Report Block that was received for
418 // that pair.
419 virtual std::vector<ReportBlockData> GetLatestReportBlockData() const = 0;
Alessio Bazzicabc1c93d2021-03-12 17:45:26 +0100420 // Returns stats based on the received RTCP SRs.
421 virtual absl::optional<SenderReportStats> GetSenderReportStats() const = 0;
Ivo Creusen2562cf02021-09-03 14:51:22 +0000422 // Returns non-sender RTT stats, based on DLRR.
423 virtual absl::optional<NonSenderRttStats> GetNonSenderRttStats() const = 0;
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200424
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200425 // (REMB) Receiver Estimated Max Bitrate.
426 // Schedules sending REMB on next and following sender/receiver reports.
427 void SetRemb(int64_t bitrate_bps, std::vector<uint32_t> ssrcs) override = 0;
428 // Stops sending REMB on next and following sender/receiver reports.
429 void UnsetRemb() override = 0;
430
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200431 // (NACK)
432
433 // Sends a Negative acknowledgement packet.
434 // Returns -1 on failure else 0.
435 // TODO(philipel): Deprecate this and start using SendNack instead, mostly
436 // because we want a function that actually send NACK for the specified
437 // packets.
438 virtual int32_t SendNACK(const uint16_t* nack_list, uint16_t size) = 0;
439
440 // Sends NACK for the packets specified.
441 // Note: This assumes the caller keeps track of timing and doesn't rely on
442 // the RTP module to do this.
443 virtual void SendNack(const std::vector<uint16_t>& sequence_numbers) = 0;
444
445 // Store the sent packets, needed to answer to a Negative acknowledgment
446 // requests.
447 virtual void SetStorePacketsStatus(bool enable, uint16_t numberToStore) = 0;
448
Tomas Gunnarssonf25761d2020-06-03 22:55:33 +0200449 virtual void SetVideoBitrateAllocation(
450 const VideoBitrateAllocation& bitrate) = 0;
451
452 // **************************************************************************
453 // Video
454 // **************************************************************************
455
456 // Requests new key frame.
457 // using PLI, https://tools.ietf.org/html/rfc4585#section-6.3.1.1
458 void SendPictureLossIndication() { SendRTCP(kRtcpPli); }
459 // using FIR, https://tools.ietf.org/html/rfc5104#section-4.3.1.2
460 void SendFullIntraRequest() { SendRTCP(kRtcpFir); }
461
462 // Sends a LossNotification RTCP message.
463 // Returns -1 on failure else 0.
464 virtual int32_t SendLossNotification(uint16_t last_decoded_seq_num,
465 uint16_t last_received_seq_num,
466 bool decodability_flag,
467 bool buffering_allowed) = 0;
468};
469
470} // namespace webrtc
471
472#endif // MODULES_RTP_RTCP_SOURCE_RTP_RTCP_INTERFACE_H_