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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_video.h

Issue 2999063002: Add flag enabling more packets to be retransmittable. (Closed)
Patch Set: whitespace Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
index 9fb4648b82e2138e2bfdb0e75e2d87a816710b37..a38e787e63855cb5c8113a7284ccd701f2f1cbaa 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender_video.h
@@ -11,9 +11,8 @@
#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
-#include <list>
+#include <map>
#include <memory>
-#include <vector>
#include "webrtc/common_types.h"
#include "webrtc/modules/rtp_rtcp/include/flexfec_sender.h"
@@ -32,6 +31,7 @@
#include "webrtc/typedefs.h"
namespace webrtc {
+class RtpPacketizer;
class RtpPacketToSend;
class RTPSenderVideo {
@@ -55,7 +55,8 @@ class RTPSenderVideo {
const uint8_t* payload_data,
size_t payload_size,
const RTPFragmentationHeader* fragmentation,
- const RTPVideoHeader* video_header);
+ const RTPVideoHeader* video_header,
+ int64_t expected_retransmission_time_ms);
void SetVideoCodecType(RtpVideoCodecTypes type);
@@ -76,7 +77,21 @@ class RTPSenderVideo {
int SelectiveRetransmissions() const;
void SetSelectiveRetransmissions(uint8_t settings);
+ protected:
+ StorageType GetStorageType(const RTPVideoHeader& header,
+ int32_t retransmission_settings,
+ RtpPacketizer* packetizer,
+ int64_t expected_retransmission_time);
+
private:
+ struct TemporalLayerStats {
+ explicit TemporalLayerStats(int64_t window_size_ms)
+ : frame_rate_fp1000s_(window_size_ms, 1000 * 1000),
+ last_frame_time_(0) {}
+ RateStatistics frame_rate_fp1000s_;
+ int64_t last_frame_time_;
danilchap 2017/08/29 17:31:20 struct members shouldn't have '_' in the end.
sprang_webrtc 2017/08/31 15:54:29 Done.
+ };
+
size_t CalculateFecPacketOverhead() const EXCLUSIVE_LOCKS_REQUIRED(crit_);
void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet,
@@ -103,6 +118,9 @@ class RTPSenderVideo {
bool flexfec_enabled() const { return flexfec_sender_ != nullptr; }
+ TemporalLayerStats* GetTemporalLayerStats(int temporal_id)
+ EXCLUSIVE_LOCKS_REQUIRED(stats_crit_);
+
RTPSender* const rtp_sender_;
Clock* const clock_;
@@ -131,6 +149,10 @@ class RTPSenderVideo {
RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_);
// Bitrate used for video payload and RTP headers.
RateStatistics video_bitrate_ GUARDED_BY(stats_crit_);
+
+ std::map<int, TemporalLayerStats> frame_stats_by_temporal_layer_
+ GUARDED_BY(stats_crit_);
+
OneTimeEvent first_frame_sent_;
};

Powered by Google App Engine
This is Rietveld 408576698