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

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

Issue 2491293002: Make FlexFEC packets paceable through RTPSender. (Closed)
Patch Set: Feedback response 3. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ 11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ 12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
13 13
14 #include <list> 14 #include <list>
15 #include <memory> 15 #include <memory>
16 #include <vector> 16 #include <vector>
17 17
18 #include "webrtc/base/criticalsection.h" 18 #include "webrtc/base/criticalsection.h"
19 #include "webrtc/base/onetimeevent.h" 19 #include "webrtc/base/onetimeevent.h"
20 #include "webrtc/base/optional.h"
20 #include "webrtc/base/rate_statistics.h" 21 #include "webrtc/base/rate_statistics.h"
21 #include "webrtc/base/sequenced_task_checker.h" 22 #include "webrtc/base/sequenced_task_checker.h"
22 #include "webrtc/base/thread_annotations.h" 23 #include "webrtc/base/thread_annotations.h"
23 #include "webrtc/common_types.h" 24 #include "webrtc/common_types.h"
24 #include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h" 25 #include "webrtc/modules/rtp_rtcp/include/flexfec_sender.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/rtp_rtcp_config.h" 27 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
27 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h" 28 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
28 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h" 29 #include "webrtc/modules/rtp_rtcp/source/rtp_utility.h"
29 #include "webrtc/modules/rtp_rtcp/source/ulpfec_generator.h" 30 #include "webrtc/modules/rtp_rtcp/source/ulpfec_generator.h"
(...skipping 30 matching lines...) Expand all
60 size_t payload_size, 61 size_t payload_size,
61 const RTPFragmentationHeader* fragmentation, 62 const RTPFragmentationHeader* fragmentation,
62 const RTPVideoHeader* video_header); 63 const RTPVideoHeader* video_header);
63 64
64 void SetVideoCodecType(RtpVideoCodecTypes type); 65 void SetVideoCodecType(RtpVideoCodecTypes type);
65 66
66 // ULPFEC. 67 // ULPFEC.
67 void SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type); 68 void SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type);
68 void GetUlpfecConfig(int* red_payload_type, int* ulpfec_payload_type) const; 69 void GetUlpfecConfig(int* red_payload_type, int* ulpfec_payload_type) const;
69 70
71 // FlexFEC/ULPFEC.
70 void SetFecParameters(const FecProtectionParams& delta_params, 72 void SetFecParameters(const FecProtectionParams& delta_params,
71 const FecProtectionParams& key_params); 73 const FecProtectionParams& key_params);
72 74
75 // FlexFEC.
76 rtc::Optional<uint32_t> FlexfecSsrc() const;
77
73 uint32_t VideoBitrateSent() const; 78 uint32_t VideoBitrateSent() const;
74 uint32_t FecOverheadRate() const; 79 uint32_t FecOverheadRate() const;
75 80
76 int SelectiveRetransmissions() const; 81 int SelectiveRetransmissions() const;
77 void SetSelectiveRetransmissions(uint8_t settings); 82 void SetSelectiveRetransmissions(uint8_t settings);
78 83
79 private: 84 private:
80 size_t CalculateFecPacketOverhead() const EXCLUSIVE_LOCKS_REQUIRED(crit_); 85 size_t CalculateFecPacketOverhead() const EXCLUSIVE_LOCKS_REQUIRED(crit_);
81 86
82 void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet, 87 void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // and any padding overhead. 135 // and any padding overhead.
131 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); 136 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_);
132 // Bitrate used for video payload and RTP headers. 137 // Bitrate used for video payload and RTP headers.
133 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); 138 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_);
134 OneTimeEvent first_frame_sent_; 139 OneTimeEvent first_frame_sent_;
135 }; 140 };
136 141
137 } // namespace webrtc 142 } // namespace webrtc
138 143
139 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ 144 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698