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

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

Issue 1479023002: Prepare the AudioSendStream to be hooked up to send-side BWE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Remove incorrect thread check. Created 5 years 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer, 98 void RTPSenderVideo::SendVideoPacket(uint8_t* data_buffer,
99 const size_t payload_length, 99 const size_t payload_length,
100 const size_t rtp_header_length, 100 const size_t rtp_header_length,
101 uint16_t seq_num, 101 uint16_t seq_num,
102 const uint32_t capture_timestamp, 102 const uint32_t capture_timestamp,
103 int64_t capture_time_ms, 103 int64_t capture_time_ms,
104 StorageType storage) { 104 StorageType storage) {
105 if (_rtpSender.SendToNetwork(data_buffer, payload_length, rtp_header_length, 105 if (_rtpSender.SendToNetwork(data_buffer, payload_length, rtp_header_length,
106 capture_time_ms, storage, 106 capture_time_ms, storage,
107 RtpPacketSender::kNormalPriority) == 0) { 107 RtpPacketSender::kLowPriority) == 0) {
108 _videoBitrate.Update(payload_length + rtp_header_length); 108 _videoBitrate.Update(payload_length + rtp_header_length);
109 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), 109 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"),
110 "Video::PacketNormal", "timestamp", capture_timestamp, 110 "Video::PacketNormal", "timestamp", capture_timestamp,
111 "seqnum", seq_num); 111 "seqnum", seq_num);
112 } else { 112 } else {
113 LOG(LS_WARNING) << "Failed to send video packet " << seq_num; 113 LOG(LS_WARNING) << "Failed to send video packet " << seq_num;
114 } 114 }
115 } 115 }
116 116
117 void RTPSenderVideo::SendVideoPacketAsRed(uint8_t* data_buffer, 117 void RTPSenderVideo::SendVideoPacketAsRed(uint8_t* data_buffer,
(...skipping 25 matching lines...) Expand all
143 _payloadTypeRED, _payloadTypeFEC, next_fec_sequence_number, 143 _payloadTypeRED, _payloadTypeFEC, next_fec_sequence_number,
144 rtp_header_length); 144 rtp_header_length);
145 RTC_DCHECK_EQ(num_fec_packets, fec_packets.size()); 145 RTC_DCHECK_EQ(num_fec_packets, fec_packets.size());
146 if (_retransmissionSettings & kRetransmitFECPackets) 146 if (_retransmissionSettings & kRetransmitFECPackets)
147 fec_storage = kAllowRetransmission; 147 fec_storage = kAllowRetransmission;
148 } 148 }
149 } 149 }
150 if (_rtpSender.SendToNetwork( 150 if (_rtpSender.SendToNetwork(
151 red_packet->data(), red_packet->length() - rtp_header_length, 151 red_packet->data(), red_packet->length() - rtp_header_length,
152 rtp_header_length, capture_time_ms, media_packet_storage, 152 rtp_header_length, capture_time_ms, media_packet_storage,
153 RtpPacketSender::kNormalPriority) == 0) { 153 RtpPacketSender::kLowPriority) == 0) {
154 _videoBitrate.Update(red_packet->length()); 154 _videoBitrate.Update(red_packet->length());
155 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), 155 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"),
156 "Video::PacketRed", "timestamp", capture_timestamp, 156 "Video::PacketRed", "timestamp", capture_timestamp,
157 "seqnum", media_seq_num); 157 "seqnum", media_seq_num);
158 } else { 158 } else {
159 LOG(LS_WARNING) << "Failed to send RED packet " << media_seq_num; 159 LOG(LS_WARNING) << "Failed to send RED packet " << media_seq_num;
160 } 160 }
161 for (RedPacket* fec_packet : fec_packets) { 161 for (RedPacket* fec_packet : fec_packets) {
162 if (_rtpSender.SendToNetwork( 162 if (_rtpSender.SendToNetwork(
163 fec_packet->data(), fec_packet->length() - rtp_header_length, 163 fec_packet->data(), fec_packet->length() - rtp_header_length,
164 rtp_header_length, capture_time_ms, fec_storage, 164 rtp_header_length, capture_time_ms, fec_storage,
165 RtpPacketSender::kNormalPriority) == 0) { 165 RtpPacketSender::kLowPriority) == 0) {
166 _fecOverheadRate.Update(fec_packet->length()); 166 _fecOverheadRate.Update(fec_packet->length());
167 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), 167 TRACE_EVENT_INSTANT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"),
168 "Video::PacketFec", "timestamp", capture_timestamp, 168 "Video::PacketFec", "timestamp", capture_timestamp,
169 "seqnum", next_fec_sequence_number); 169 "seqnum", next_fec_sequence_number);
170 } else { 170 } else {
171 LOG(LS_WARNING) << "Failed to send FEC packet " 171 LOG(LS_WARNING) << "Failed to send FEC packet "
172 << next_fec_sequence_number; 172 << next_fec_sequence_number;
173 } 173 }
174 delete fec_packet; 174 delete fec_packet;
175 ++next_fec_sequence_number; 175 ++next_fec_sequence_number;
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 CriticalSectionScoped cs(crit_.get()); 350 CriticalSectionScoped cs(crit_.get());
351 return _retransmissionSettings; 351 return _retransmissionSettings;
352 } 352 }
353 353
354 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { 354 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) {
355 CriticalSectionScoped cs(crit_.get()); 355 CriticalSectionScoped cs(crit_.get());
356 _retransmissionSettings = settings; 356 _retransmissionSettings = settings;
357 } 357 }
358 358
359 } // namespace webrtc 359 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc ('k') | webrtc/test/mock_voe_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698