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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender.h

Issue 2339363002: Deprecate RtpSender::SendPadData with provided timestamps. (Closed)
Patch Set: nits Created 4 years, 3 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
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
13 13
14 #include <map> 14 #include <map>
15 #include <memory> 15 #include <memory>
16 #include <utility> 16 #include <utility>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/constructormagic.h" 19 #include "webrtc/base/constructormagic.h"
20 #include "webrtc/base/criticalsection.h" 20 #include "webrtc/base/criticalsection.h"
21 #include "webrtc/base/deprecation.h"
21 #include "webrtc/base/random.h" 22 #include "webrtc/base/random.h"
22 #include "webrtc/base/rate_statistics.h" 23 #include "webrtc/base/rate_statistics.h"
23 #include "webrtc/base/thread_annotations.h" 24 #include "webrtc/base/thread_annotations.h"
24 #include "webrtc/common_types.h" 25 #include "webrtc/common_types.h"
25 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 26 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
26 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h" 27 #include "webrtc/modules/rtp_rtcp/source/playout_delay_oracle.h"
27 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" 28 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h"
28 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_history.h" 29 #include "webrtc/modules/rtp_rtcp/source/rtp_packet_history.h"
29 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" 30 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
30 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 31 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 uint8_t payload_type_red, 265 uint8_t payload_type_red,
265 uint8_t payload_type_fec); 266 uint8_t payload_type_fec);
266 267
267 void GenericFECStatus(bool* enable, 268 void GenericFECStatus(bool* enable,
268 uint8_t* payload_type_red, 269 uint8_t* payload_type_red,
269 uint8_t* payload_type_fec) const; 270 uint8_t* payload_type_fec) const;
270 271
271 int32_t SetFecParameters(const FecProtectionParams *delta_params, 272 int32_t SetFecParameters(const FecProtectionParams *delta_params,
272 const FecProtectionParams *key_params); 273 const FecProtectionParams *key_params);
273 274
275 size_t SendPadData(size_t bytes, int probe_cluster_id);
stefan-webrtc 2016/09/15 13:02:02 Can this be made private now perhaps?
danilchap 2016/09/15 14:22:42 Done. Yes, it can. TimeToSendPadding can be used i
276
277 RTC_DEPRECATED
274 size_t SendPadData(size_t bytes, 278 size_t SendPadData(size_t bytes,
275 bool timestamp_provided, 279 bool timestamp_provided,
276 uint32_t timestamp, 280 uint32_t timestamp,
277 int64_t capture_time_ms); 281 int64_t capture_time_ms);
278 size_t SendPadData(size_t bytes,
279 bool timestamp_provided,
280 uint32_t timestamp,
281 int64_t capture_time_ms,
282 int probe_cluster_id);
283 282
284 // Called on update of RTP statistics. 283 // Called on update of RTP statistics.
285 void RegisterRtpStatisticsCallback(StreamDataCountersCallback* callback); 284 void RegisterRtpStatisticsCallback(StreamDataCountersCallback* callback);
286 StreamDataCountersCallback* GetRtpStatisticsCallback() const; 285 StreamDataCountersCallback* GetRtpStatisticsCallback() const;
287 286
288 uint32_t BitrateSent() const; 287 uint32_t BitrateSent() const;
289 288
290 void SetRtpState(const RtpState& rtp_state); 289 void SetRtpState(const RtpState& rtp_state);
291 RtpState GetRtpState() const; 290 RtpState GetRtpState() const;
292 void SetRtxRtpState(const RtpState& rtp_state); 291 void SetRtxRtpState(const RtpState& rtp_state);
293 RtpState GetRtxRtpState() const; 292 RtpState GetRtxRtpState() const;
294 bool ActivateCVORtpHeaderExtension(); 293 bool ActivateCVORtpHeaderExtension();
295 294
296 protected: 295 protected:
297 int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type); 296 int32_t CheckPayloadType(int8_t payload_type, RtpVideoCodecTypes* video_type);
298 297
299 private: 298 private:
300 // Maps capture time in milliseconds to send-side delay in milliseconds. 299 // Maps capture time in milliseconds to send-side delay in milliseconds.
301 // Send-side delay is the difference between transmission time and capture 300 // Send-side delay is the difference between transmission time and capture
302 // time. 301 // time.
303 typedef std::map<int64_t, int> SendDelayMap; 302 typedef std::map<int64_t, int> SendDelayMap;
304 303
304 size_t DeprecatedSendPadData(size_t bytes,
305 bool timestamp_provided,
306 uint32_t timestamp,
307 int64_t capture_time_ms,
308 int probe_cluster_id);
309
305 size_t CreateRtpHeader(uint8_t* header, 310 size_t CreateRtpHeader(uint8_t* header,
306 int8_t payload_type, 311 int8_t payload_type,
307 uint32_t ssrc, 312 uint32_t ssrc,
308 bool marker_bit, 313 bool marker_bit,
309 uint32_t timestamp, 314 uint32_t timestamp,
310 uint16_t sequence_number, 315 uint16_t sequence_number,
311 const std::vector<uint32_t>& csrcs) const 316 const std::vector<uint32_t>& csrcs) const
312 EXCLUSIVE_LOCKS_REQUIRED(send_critsect_); 317 EXCLUSIVE_LOCKS_REQUIRED(send_critsect_);
313 318
314 bool PrepareAndSendPacket(std::unique_ptr<RtpPacketToSend> packet, 319 bool PrepareAndSendPacket(std::unique_ptr<RtpPacketToSend> packet,
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_); 432 std::map<int8_t, int8_t> rtx_payload_type_map_ GUARDED_BY(send_critsect_);
428 433
429 RateLimiter* const retransmission_rate_limiter_; 434 RateLimiter* const retransmission_rate_limiter_;
430 435
431 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender); 436 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RTPSender);
432 }; 437 };
433 438
434 } // namespace webrtc 439 } // namespace webrtc
435 440
436 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_ 441 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698