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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 2867713003: Remove hardcoded kValueSizeBytes values from variable-length header extensions. (Closed)
Patch Set: Patch 7 Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include "webrtc/video/video_send_stream.h" 10 #include "webrtc/video/video_send_stream.h"
(...skipping 11 matching lines...) Expand all
22 #include "webrtc/base/logging.h" 22 #include "webrtc/base/logging.h"
23 #include "webrtc/base/trace_event.h" 23 #include "webrtc/base/trace_event.h"
24 #include "webrtc/base/weak_ptr.h" 24 #include "webrtc/base/weak_ptr.h"
25 #include "webrtc/call/rtp_transport_controller_send_interface.h" 25 #include "webrtc/call/rtp_transport_controller_send_interface.h"
26 #include "webrtc/common_types.h" 26 #include "webrtc/common_types.h"
27 #include "webrtc/common_video/include/video_bitrate_allocator.h" 27 #include "webrtc/common_video/include/video_bitrate_allocator.h"
28 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h" 28 #include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
29 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont roller.h" 29 #include "webrtc/modules/congestion_controller/include/send_side_congestion_cont roller.h"
30 #include "webrtc/modules/pacing/packet_router.h" 30 #include "webrtc/modules/pacing/packet_router.h"
31 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h" 31 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
32 #include "webrtc/modules/rtp_rtcp/source/rtp_sender.h"
32 #include "webrtc/modules/utility/include/process_thread.h" 33 #include "webrtc/modules/utility/include/process_thread.h"
33 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h" 34 #include "webrtc/modules/video_coding/utility/ivf_file_writer.h"
34 #include "webrtc/system_wrappers/include/field_trial.h" 35 #include "webrtc/system_wrappers/include/field_trial.h"
35 #include "webrtc/video/call_stats.h" 36 #include "webrtc/video/call_stats.h"
36 #include "webrtc/video/payload_router.h" 37 #include "webrtc/video/payload_router.h"
37 #include "webrtc/video_send_stream.h" 38 #include "webrtc/video_send_stream.h"
38 39
39 namespace webrtc { 40 namespace webrtc {
40 41
41 static const int kMinSendSidePacketHistorySize = 600; 42 static const int kMinSendSidePacketHistorySize = 600;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 "media streams, but our implementation currently only " 125 "media streams, but our implementation currently only "
125 "supports protecting a single media stream. " 126 "supports protecting a single media stream. "
126 "To avoid confusion, disabling FlexFEC completely."; 127 "To avoid confusion, disabling FlexFEC completely.";
127 return nullptr; 128 return nullptr;
128 } 129 }
129 130
130 RTC_DCHECK_EQ(1U, config.rtp.flexfec.protected_media_ssrcs.size()); 131 RTC_DCHECK_EQ(1U, config.rtp.flexfec.protected_media_ssrcs.size());
131 return std::unique_ptr<FlexfecSender>(new FlexfecSender( 132 return std::unique_ptr<FlexfecSender>(new FlexfecSender(
132 config.rtp.flexfec.payload_type, config.rtp.flexfec.ssrc, 133 config.rtp.flexfec.payload_type, config.rtp.flexfec.ssrc,
133 config.rtp.flexfec.protected_media_ssrcs[0], config.rtp.extensions, 134 config.rtp.flexfec.protected_media_ssrcs[0], config.rtp.extensions,
134 Clock::GetRealTimeClock())); 135 RTPSender::FecExtensionSizes(), Clock::GetRealTimeClock()));
135 } 136 }
136 137
137 } // namespace 138 } // namespace
138 139
139 std::string 140 std::string
140 VideoSendStream::Config::EncoderSettings::ToString() const { 141 VideoSendStream::Config::EncoderSettings::ToString() const {
141 std::stringstream ss; 142 std::stringstream ss;
142 ss << "{payload_name: " << payload_name; 143 ss << "{payload_name: " << payload_name;
143 ss << ", payload_type: " << payload_type; 144 ss << ", payload_type: " << payload_type;
144 ss << ", encoder: " << (encoder ? "(VideoEncoder)" : "nullptr"); 145 ss << ", encoder: " << (encoder ? "(VideoEncoder)" : "nullptr");
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 std::min(config_->rtp.max_packet_size, 1323 std::min(config_->rtp.max_packet_size,
1323 kPathMTU - transport_overhead_bytes_per_packet_); 1324 kPathMTU - transport_overhead_bytes_per_packet_);
1324 1325
1325 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1326 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1326 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1327 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1327 } 1328 }
1328 } 1329 }
1329 1330
1330 } // namespace internal 1331 } // namespace internal
1331 } // namespace webrtc 1332 } // namespace webrtc
OLDNEW
« webrtc/test/fuzzers/flexfec_sender_fuzzer.cc ('K') | « webrtc/test/fuzzers/flexfec_sender_fuzzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698