aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 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 | |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 11 | #ifndef CALL_VIDEO_RECEIVE_STREAM_H_ |
| 12 | #define CALL_VIDEO_RECEIVE_STREAM_H_ |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 13 | |
| 14 | #include <limits> |
| 15 | #include <map> |
Mirta Dvornicic | fe68daa | 2019-05-23 11:21:12 | [diff] [blame] | 16 | #include <set> |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 17 | #include <string> |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 18 | #include <utility> |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 19 | #include <vector> |
| 20 | |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 21 | #include "api/call/transport.h" |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 22 | #include "api/crypto/crypto_options.h" |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 23 | #include "api/rtp_headers.h" |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 24 | #include "api/rtp_parameters.h" |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 25 | #include "api/video/recordable_encoded_frame.h" |
Patrik Höglund | 3e11343 | 2017-12-15 13:40:10 | [diff] [blame] | 26 | #include "api/video/video_content_type.h" |
Niels Möller | a837030 | 2019-09-02 13:16:49 | [diff] [blame] | 27 | #include "api/video/video_frame.h" |
Niels Möller | c6ce9c5 | 2018-05-11 09:15:30 | [diff] [blame] | 28 | #include "api/video/video_sink_interface.h" |
Yves Gerey | 665174f | 2018-06-19 13:03:05 | [diff] [blame] | 29 | #include "api/video/video_timing.h" |
Niels Möller | cb7e1d2 | 2018-09-11 13:56:04 | [diff] [blame] | 30 | #include "api/video_codecs/sdp_video_format.h" |
Tommi | 1c1f540 | 2021-06-14 08:54:20 | [diff] [blame] | 31 | #include "call/receive_stream.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 32 | #include "call/rtp_config.h" |
Niels Möller | a8327d4 | 2020-08-25 08:28:50 | [diff] [blame] | 33 | #include "common_video/frame_counts.h" |
Niels Möller | 53382cb | 2018-11-27 13:05:08 | [diff] [blame] | 34 | #include "modules/rtp_rtcp/include/rtcp_statistics.h" |
Patrik Höglund | 3e11343 | 2017-12-15 13:40:10 | [diff] [blame] | 35 | #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 36 | |
| 37 | namespace webrtc { |
| 38 | |
| 39 | class RtpPacketSinkInterface; |
Niels Möller | cbcbc22 | 2018-09-28 07:07:24 | [diff] [blame] | 40 | class VideoDecoderFactory; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 41 | |
Tommi | f6f4543 | 2022-05-20 13:21:20 | [diff] [blame] | 42 | class VideoReceiveStreamInterface : public MediaReceiveStreamInterface { |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 43 | public: |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 44 | // Class for handling moving in/out recording state. |
| 45 | struct RecordingState { |
| 46 | RecordingState() = default; |
| 47 | explicit RecordingState( |
| 48 | std::function<void(const RecordableEncodedFrame&)> callback) |
| 49 | : callback(std::move(callback)) {} |
| 50 | |
Tommi | f6f4543 | 2022-05-20 13:21:20 | [diff] [blame] | 51 | // Callback stored from the VideoReceiveStreamInterface. The |
| 52 | // VideoReceiveStreamInterface client should not interpret the attribute. |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 53 | std::function<void(const RecordableEncodedFrame&)> callback; |
Tommi | f6f4543 | 2022-05-20 13:21:20 | [diff] [blame] | 54 | // Memento of when a keyframe request was last sent. The |
| 55 | // VideoReceiveStreamInterface client should not interpret the attribute. |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 56 | absl::optional<int64_t> last_keyframe_request_ms; |
| 57 | }; |
| 58 | |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 59 | // TODO(mflodman) Move all these settings to VideoDecoder and move the |
| 60 | // declaration to common_types.h. |
| 61 | struct Decoder { |
Tommi | b42ced4 | 2021-07-01 10:21:21 | [diff] [blame] | 62 | Decoder(SdpVideoFormat video_format, int payload_type); |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 63 | Decoder(); |
| 64 | Decoder(const Decoder&); |
| 65 | ~Decoder(); |
Tommi | b42ced4 | 2021-07-01 10:21:21 | [diff] [blame] | 66 | |
| 67 | bool operator==(const Decoder& other) const; |
| 68 | |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 69 | std::string ToString() const; |
| 70 | |
Niels Möller | cb7e1d2 | 2018-09-11 13:56:04 | [diff] [blame] | 71 | SdpVideoFormat video_format; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 72 | |
| 73 | // Received RTP packets with this payload type will be sent to this decoder |
| 74 | // instance. |
| 75 | int payload_type = 0; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 76 | }; |
| 77 | |
| 78 | struct Stats { |
| 79 | Stats(); |
| 80 | ~Stats(); |
| 81 | std::string ToString(int64_t time_ms) const; |
| 82 | |
| 83 | int network_frame_rate = 0; |
| 84 | int decode_frame_rate = 0; |
| 85 | int render_frame_rate = 0; |
| 86 | uint32_t frames_rendered = 0; |
| 87 | |
| 88 | // Decoder stats. |
| 89 | std::string decoder_implementation_name = "unknown"; |
| 90 | FrameCounts frame_counts; |
| 91 | int decode_ms = 0; |
| 92 | int max_decode_ms = 0; |
| 93 | int current_delay_ms = 0; |
| 94 | int target_delay_ms = 0; |
| 95 | int jitter_buffer_ms = 0; |
Guido Urdaneta | 6737841 | 2019-05-28 15:38:08 | [diff] [blame] | 96 | // https://w3c.github.io/webrtc-stats/#dom-rtcvideoreceiverstats-jitterbufferdelay |
| 97 | double jitter_buffer_delay_seconds = 0; |
| 98 | // https://w3c.github.io/webrtc-stats/#dom-rtcvideoreceiverstats-jitterbufferemittedcount |
| 99 | uint64_t jitter_buffer_emitted_count = 0; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 100 | int min_playout_delay_ms = 0; |
| 101 | int render_delay_ms = 10; |
ilnik | a79cc28 | 2017-08-23 12:24:10 | [diff] [blame] | 102 | int64_t interframe_delay_max_ms = -1; |
Johannes Kron | 0c141c5 | 2019-08-26 13:04:43 | [diff] [blame] | 103 | // Frames dropped due to decoding failures or if the system is too slow. |
| 104 | // https://www.w3.org/TR/webrtc-stats/#dom-rtcvideoreceiverstats-framesdropped |
| 105 | uint32_t frames_dropped = 0; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 106 | uint32_t frames_decoded = 0; |
Johannes Kron | bfd343b | 2019-07-01 08:07:50 | [diff] [blame] | 107 | // https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totaldecodetime |
Philipp Hancke | a204ad2 | 2022-07-08 16:43:25 | [diff] [blame] | 108 | TimeDelta total_decode_time = TimeDelta::Zero(); |
Philipp Hancke | a16a6a6 | 2022-04-25 10:21:30 | [diff] [blame] | 109 | // https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalprocessingdelay |
Philipp Hancke | a204ad2 | 2022-07-08 16:43:25 | [diff] [blame] | 110 | TimeDelta total_processing_delay = TimeDelta::Zero(); |
Philipp Hancke | 0359ba2 | 2022-05-05 13:55:36 | [diff] [blame] | 111 | // TODO(bugs.webrtc.org/13986): standardize |
Philipp Hancke | a204ad2 | 2022-07-08 16:43:25 | [diff] [blame] | 112 | TimeDelta total_assembly_time = TimeDelta::Zero(); |
Philipp Hancke | 0359ba2 | 2022-05-05 13:55:36 | [diff] [blame] | 113 | uint32_t frames_assembled_from_multiple_packets = 0; |
Johannes Kron | 00376e1 | 2019-11-25 09:25:42 | [diff] [blame] | 114 | // Total inter frame delay in seconds. |
| 115 | // https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalinterframedelay |
| 116 | double total_inter_frame_delay = 0; |
| 117 | // Total squared inter frame delay in seconds^2. |
| 118 | // https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-totalsqauredinterframedelay |
| 119 | double total_squared_inter_frame_delay = 0; |
Benjamin Wright | 514f084 | 2018-12-10 17:55:17 | [diff] [blame] | 120 | int64_t first_frame_received_to_decoded_ms = -1; |
Danil Chapovalov | b9b146c | 2018-06-15 10:28:07 | [diff] [blame] | 121 | absl::optional<uint64_t> qp_sum; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 122 | |
| 123 | int current_payload_type = -1; |
| 124 | |
| 125 | int total_bitrate_bps = 0; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 126 | |
| 127 | int width = 0; |
| 128 | int height = 0; |
| 129 | |
Sergey Silkin | 0237106 | 2019-01-31 15:45:42 | [diff] [blame] | 130 | uint32_t freeze_count = 0; |
| 131 | uint32_t pause_count = 0; |
| 132 | uint32_t total_freezes_duration_ms = 0; |
| 133 | uint32_t total_pauses_duration_ms = 0; |
| 134 | uint32_t total_frames_duration_ms = 0; |
| 135 | double sum_squared_frame_durations = 0.0; |
| 136 | |
ilnik | 2e1b40b | 2017-09-04 14:57:17 | [diff] [blame] | 137 | VideoContentType content_type = VideoContentType::UNSPECIFIED; |
| 138 | |
Åsa Persson | fcf79cc | 2019-10-22 13:23:44 | [diff] [blame] | 139 | // https://w3c.github.io/webrtc-stats/#dom-rtcinboundrtpstreamstats-estimatedplayouttimestamp |
| 140 | absl::optional<int64_t> estimated_playout_ntp_timestamp_ms; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 141 | int sync_offset_ms = std::numeric_limits<int>::max(); |
| 142 | |
| 143 | uint32_t ssrc = 0; |
| 144 | std::string c_name; |
Niels Möller | d77cc24 | 2019-08-22 07:40:25 | [diff] [blame] | 145 | RtpReceiveStats rtp_stats; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 146 | RtcpPacketTypeCounter rtcp_packet_type_counts; |
ilnik | 75204c5 | 2017-09-04 10:35:40 | [diff] [blame] | 147 | |
| 148 | // Timing frame info: all important timestamps for a full lifetime of a |
| 149 | // single 'timing frame'. |
Danil Chapovalov | b9b146c | 2018-06-15 10:28:07 | [diff] [blame] | 150 | absl::optional<webrtc::TimingFrameInfo> timing_frame_info; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 151 | }; |
| 152 | |
| 153 | struct Config { |
| 154 | private: |
| 155 | // Access to the copy constructor is private to force use of the Copy() |
| 156 | // method for those exceptional cases where we do use it. |
| 157 | Config(const Config&); |
| 158 | |
| 159 | public: |
| 160 | Config() = delete; |
| 161 | Config(Config&&); |
Tommi | 9e2b315 | 2021-06-21 20:15:39 | [diff] [blame] | 162 | Config(Transport* rtcp_send_transport, |
| 163 | VideoDecoderFactory* decoder_factory = nullptr); |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 164 | Config& operator=(Config&&); |
| 165 | Config& operator=(const Config&) = delete; |
| 166 | ~Config(); |
| 167 | |
| 168 | // Mostly used by tests. Avoid creating copies if you can. |
| 169 | Config Copy() const { return Config(*this); } |
| 170 | |
| 171 | std::string ToString() const; |
| 172 | |
| 173 | // Decoders for every payload that we can receive. |
| 174 | std::vector<Decoder> decoders; |
| 175 | |
Philip Eliasson | 2b068ce | 2020-08-03 15:55:10 | [diff] [blame] | 176 | // Ownership stays with WebrtcVideoEngine (delegated from PeerConnection). |
| 177 | VideoDecoderFactory* decoder_factory = nullptr; |
| 178 | |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 179 | // Receive-stream specific RTP settings. |
Tommi | 7a15ff3 | 2022-05-09 18:54:02 | [diff] [blame] | 180 | struct Rtp : public ReceiveStreamRtpConfig { |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 181 | Rtp(); |
| 182 | Rtp(const Rtp&); |
| 183 | ~Rtp(); |
| 184 | std::string ToString() const; |
| 185 | |
Tommi | 1c1f540 | 2021-06-14 08:54:20 | [diff] [blame] | 186 | // See NackConfig for description. |
| 187 | NackConfig nack; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 188 | |
| 189 | // See RtcpMode for description. |
| 190 | RtcpMode rtcp_mode = RtcpMode::kCompound; |
| 191 | |
| 192 | // Extended RTCP settings. |
| 193 | struct RtcpXr { |
| 194 | // True if RTCP Receiver Reference Time Report Block extension |
| 195 | // (RFC 3611) should be enabled. |
| 196 | bool receiver_reference_time_report = false; |
| 197 | } rtcp_xr; |
| 198 | |
Nico Grunbaum | a36f10b | 2021-12-09 04:59:31 | [diff] [blame] | 199 | // How to request keyframes from a remote sender. Applies only if lntf is |
| 200 | // disabled. |
| 201 | KeyFrameReqMethod keyframe_method = KeyFrameReqMethod::kPliRtcp; |
| 202 | |
Elad Alon | fadb181 | 2019-05-24 11:40:02 | [diff] [blame] | 203 | // See LntfConfig for description. |
| 204 | LntfConfig lntf; |
| 205 | |
nisse | 3b3622f | 2017-09-26 09:49:21 | [diff] [blame] | 206 | // Payload types for ULPFEC and RED, respectively. |
| 207 | int ulpfec_payload_type = -1; |
| 208 | int red_payload_type = -1; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 209 | |
| 210 | // SSRC for retransmissions. |
| 211 | uint32_t rtx_ssrc = 0; |
| 212 | |
| 213 | // Set if the stream is protected using FlexFEC. |
| 214 | bool protected_by_flexfec = false; |
| 215 | |
Philipp Hancke | 1c951ec | 2022-05-25 08:44:22 | [diff] [blame] | 216 | // Optional callback sink to support additional packet handlers such as |
Tomas Gunnarsson | 8408c99 | 2021-02-14 13:19:12 | [diff] [blame] | 217 | // FlexFec. |
| 218 | RtpPacketSinkInterface* packet_sink_ = nullptr; |
| 219 | |
nisse | 26e3abb | 2017-08-25 11:44:25 | [diff] [blame] | 220 | // Map from rtx payload type -> media payload type. |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 221 | // For RTX to be enabled, both an SSRC and this mapping are needed. |
nisse | 26e3abb | 2017-08-25 11:44:25 | [diff] [blame] | 222 | std::map<int, int> rtx_associated_payload_types; |
nisse | 26e3abb | 2017-08-25 11:44:25 | [diff] [blame] | 223 | |
Mirta Dvornicic | fe68daa | 2019-05-23 11:21:12 | [diff] [blame] | 224 | // Payload types that should be depacketized using raw depacketizer |
| 225 | // (payload header will not be parsed and must not be present, additional |
| 226 | // meta data is expected to be present in generic frame descriptor |
| 227 | // RTP header extension). |
| 228 | std::set<int> raw_payload_types; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 229 | } rtp; |
| 230 | |
| 231 | // Transport for outgoing packets (RTCP). |
| 232 | Transport* rtcp_send_transport = nullptr; |
| 233 | |
Rasmus Brandt | 1e27fec | 2019-01-23 08:47:50 | [diff] [blame] | 234 | // Must always be set. |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 235 | rtc::VideoSinkInterface<VideoFrame>* renderer = nullptr; |
| 236 | |
| 237 | // Expected delay needed by the renderer, i.e. the frame will be delivered |
| 238 | // this many milliseconds, if possible, earlier than the ideal render time. |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 239 | int render_delay_ms = 10; |
| 240 | |
Rasmus Brandt | 1e27fec | 2019-01-23 08:47:50 | [diff] [blame] | 241 | // If false, pass frames on to the renderer as soon as they are |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 242 | // available. |
Rasmus Brandt | 1e27fec | 2019-01-23 08:47:50 | [diff] [blame] | 243 | bool enable_prerenderer_smoothing = true; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 244 | |
| 245 | // Identifier for an A/V synchronization group. Empty string to disable. |
| 246 | // TODO(pbos): Synchronize streams in a sync group, not just video streams |
| 247 | // to one of the audio streams. |
| 248 | std::string sync_group; |
| 249 | |
Benjamin Wright | 192eeec | 2018-10-18 00:27:25 | [diff] [blame] | 250 | // An optional custom frame decryptor that allows the entire frame to be |
| 251 | // decrypted in whatever way the caller choses. This is not required by |
| 252 | // default. |
| 253 | rtc::scoped_refptr<webrtc::FrameDecryptorInterface> frame_decryptor; |
| 254 | |
| 255 | // Per PeerConnection cryptography options. |
| 256 | CryptoOptions crypto_options; |
Marina Ciocea | 412a31b | 2020-02-28 15:02:06 | [diff] [blame] | 257 | |
| 258 | rtc::scoped_refptr<webrtc::FrameTransformerInterface> frame_transformer; |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 259 | }; |
| 260 | |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 261 | // TODO(pbos): Add info on currently-received codec to Stats. |
| 262 | virtual Stats GetStats() const = 0; |
| 263 | |
Ruslan Burakov | 493a650 | 2019-02-27 14:32:48 | [diff] [blame] | 264 | // Sets a base minimum for the playout delay. Base minimum delay sets lower |
| 265 | // bound on minimum delay value determining lower bound on playout delay. |
| 266 | // |
| 267 | // Returns true if value was successfully set, false overwise. |
| 268 | virtual bool SetBaseMinimumPlayoutDelayMs(int delay_ms) = 0; |
| 269 | |
| 270 | // Returns current value of base minimum delay in milliseconds. |
| 271 | virtual int GetBaseMinimumPlayoutDelayMs() const = 0; |
| 272 | |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 273 | // Sets and returns recording state. The old state is moved out |
Artem Titov | ea24027 | 2021-07-26 10:40:21 | [diff] [blame] | 274 | // of the video receive stream and returned to the caller, and `state` |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 275 | // is moved in. If the state's callback is set, it will be called with |
| 276 | // recordable encoded frames as they arrive. |
Artem Titov | ea24027 | 2021-07-26 10:40:21 | [diff] [blame] | 277 | // If `generate_key_frame` is true, the method will generate a key frame. |
Markus Handell | 269ac81 | 2019-12-03 13:31:45 | [diff] [blame] | 278 | // When the function returns, it's guaranteed that all old callouts |
| 279 | // to the returned callback has ceased. |
| 280 | // Note: the client should not interpret the returned state's attributes, but |
| 281 | // instead treat it as opaque data. |
| 282 | virtual RecordingState SetAndGetRecordingState(RecordingState state, |
| 283 | bool generate_key_frame) = 0; |
| 284 | |
| 285 | // Cause eventual generation of a key frame from the sender. |
| 286 | virtual void GenerateKeyFrame() = 0; |
| 287 | |
Tommi | aeb4412 | 2022-07-14 16:33:42 | [diff] [blame] | 288 | virtual void SetRtcpMode(RtcpMode mode) = 0; |
| 289 | |
Tommi | 185f10c | 2022-08-02 09:51:20 | [diff] [blame] | 290 | // Sets or clears a flexfec RTP sink. This affects `rtp.packet_sink_` and |
| 291 | // `rtp.protected_by_flexfec` parts of the configuration. Must be called on |
| 292 | // the packet delivery thread. |
| 293 | // TODO(bugs.webrtc.org/11993): Packet delivery thread today means `worker |
| 294 | // thread` but will be `network thread`. |
| 295 | virtual void SetFlexFecProtection(RtpPacketSinkInterface* flexfec_sink) = 0; |
| 296 | |
Tommi | e644a4b | 2022-08-03 14:13:53 | [diff] [blame] | 297 | // Turns on/off loss notifications. Must be called on the packet delivery |
| 298 | // thread. |
| 299 | virtual void SetLossNotificationEnabled(bool enabled) = 0; |
| 300 | |
Tommi | 3900f21 | 2022-08-05 14:21:54 | [diff] [blame] | 301 | // Modify `rtp.nack.rtp_history_ms` post construction. Setting this value |
| 302 | // to 0 disables nack. |
| 303 | // Must be called on the packet delivery thread. |
| 304 | virtual void SetNackHistory(TimeDelta history) = 0; |
| 305 | |
Tommi | e1bd833 | 2022-08-13 08:44:10 | [diff] [blame] | 306 | virtual void SetProtectionPayloadTypes(int red_payload_type, |
| 307 | int ulpfec_payload_type) = 0; |
Tommi | 1c5f317 | 2022-08-13 08:43:59 | [diff] [blame] | 308 | |
Tommi | 2e80936 | 2022-08-12 20:06:20 | [diff] [blame] | 309 | virtual void SetRtcpXr(Config::Rtp::RtcpXr rtcp_xr) = 0; |
| 310 | |
Tommi | 13b9f81 | 2022-08-16 08:23:47 | [diff] [blame^] | 311 | virtual void SetAssociatedPayloadTypes( |
| 312 | std::map<int, int> associated_payload_types) = 0; |
| 313 | |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 314 | protected: |
Tommi | f6f4543 | 2022-05-20 13:21:20 | [diff] [blame] | 315 | virtual ~VideoReceiveStreamInterface() {} |
aleloi | 440b6d9 | 2017-08-22 12:43:23 | [diff] [blame] | 316 | }; |
| 317 | |
| 318 | } // namespace webrtc |
| 319 | |
Mirko Bonadei | 92ea95e | 2017-09-15 04:47:31 | [diff] [blame] | 320 | #endif // CALL_VIDEO_RECEIVE_STREAM_H_ |