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

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

Issue 2448463003: Rename {,Set}GenericFECStatus to {,Set}UlpfecConfig. (Closed)
Patch Set: Rebase. 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
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 const uint8_t* payload_data, 53 const uint8_t* payload_data,
54 size_t payload_size, 54 size_t payload_size,
55 const RTPFragmentationHeader* fragmentation, 55 const RTPFragmentationHeader* fragmentation,
56 const RTPVideoHeader* video_header); 56 const RTPVideoHeader* video_header);
57 57
58 int32_t SendRTPIntraRequest(); 58 int32_t SendRTPIntraRequest();
59 59
60 void SetVideoCodecType(RtpVideoCodecTypes type); 60 void SetVideoCodecType(RtpVideoCodecTypes type);
61 61
62 // FEC 62 // FEC
63 void SetGenericFECStatus(bool enable, 63 void SetUlpfecConfig(bool enabled,
64 uint8_t payload_type_red, 64 int red_payload_type,
65 uint8_t payload_type_fec); 65 int ulpfec_payload_type);
66 66
67 void GenericFECStatus(bool* enable, 67 void GetUlpfecConfig(bool* enabled,
68 uint8_t* payload_type_red, 68 int* red_payload_type,
69 uint8_t* payload_type_fec) const; 69 int* ulpfec_payload_type) const;
70 70
71 void SetFecParameters(const FecProtectionParams* delta_params, 71 void SetFecParameters(const FecProtectionParams* delta_params,
72 const FecProtectionParams* key_params); 72 const FecProtectionParams* key_params);
73 73
74 uint32_t VideoBitrateSent() const; 74 uint32_t VideoBitrateSent() const;
75 uint32_t FecOverheadRate() const; 75 uint32_t FecOverheadRate() const;
76 76
77 int SelectiveRetransmissions() const; 77 int SelectiveRetransmissions() const;
78 void SetSelectiveRetransmissions(uint8_t settings); 78 void SetSelectiveRetransmissions(uint8_t settings);
79 79
80 private: 80 private:
81 void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet, 81 void SendVideoPacket(std::unique_ptr<RtpPacketToSend> packet,
82 StorageType storage); 82 StorageType storage);
83 83
84 void SendVideoPacketAsRed(std::unique_ptr<RtpPacketToSend> media_packet, 84 void SendVideoPacketAsRed(std::unique_ptr<RtpPacketToSend> media_packet,
85 StorageType media_packet_storage, 85 StorageType media_packet_storage,
86 bool protect); 86 bool protect);
87 87
88 RTPSender* const rtp_sender_; 88 RTPSender* const rtp_sender_;
89 Clock* const clock_; 89 Clock* const clock_;
90 90
91 // Should never be held when calling out of this class. 91 // Should never be held when calling out of this class.
92 rtc::CriticalSection crit_; 92 rtc::CriticalSection crit_;
93 rtc::SequencedTaskChecker encoder_checker_; 93 rtc::SequencedTaskChecker encoder_checker_;
94 94
95 RtpVideoCodecTypes video_type_ = kRtpVideoGeneric; 95 RtpVideoCodecTypes video_type_;
96 int32_t retransmission_settings_ GUARDED_BY(crit_) = kRetransmitBaseLayer; 96 int32_t retransmission_settings_ GUARDED_BY(crit_);
97 VideoRotation last_rotation_ GUARDED_BY(encoder_checker_) = kVideoRotation_0; 97 VideoRotation last_rotation_ GUARDED_BY(encoder_checker_);
98 98
99 // FEC 99 // FEC
100 bool fec_enabled_ GUARDED_BY(crit_) = false; 100 bool fec_enabled_ GUARDED_BY(crit_);
101 int8_t red_payload_type_ GUARDED_BY(crit_) = 0; 101 int red_payload_type_ GUARDED_BY(crit_);
102 int8_t fec_payload_type_ GUARDED_BY(crit_) = 0; 102 int fec_payload_type_ GUARDED_BY(crit_);
103 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{ 103 FecProtectionParams delta_fec_params_ GUARDED_BY(crit_);
104 0, 1, kFecMaskRandom}; 104 FecProtectionParams key_fec_params_ GUARDED_BY(crit_);
105 FecProtectionParams key_fec_params_ GUARDED_BY(crit_) = FecProtectionParams{
106 0, 1, kFecMaskRandom};
107 UlpfecGenerator ulpfec_generator_ GUARDED_BY(crit_); 105 UlpfecGenerator ulpfec_generator_ GUARDED_BY(crit_);
108 106
109 rtc::CriticalSection stats_crit_; 107 rtc::CriticalSection stats_crit_;
110 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets 108 // Bitrate used for FEC payload, RED headers, RTP headers for FEC packets
111 // and any padding overhead. 109 // and any padding overhead.
112 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_); 110 RateStatistics fec_bitrate_ GUARDED_BY(stats_crit_);
113 // Bitrate used for video payload and RTP headers. 111 // Bitrate used for video payload and RTP headers.
114 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_); 112 RateStatistics video_bitrate_ GUARDED_BY(stats_crit_);
115 OneTimeEvent first_frame_sent_; 113 OneTimeEvent first_frame_sent_;
116 }; 114 };
117 115
118 } // namespace webrtc 116 } // namespace webrtc
119 117
120 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_ 118 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_SENDER_VIDEO_H_
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698