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

Side by Side Diff: media/engine/webrtcvideoengine.cc

Issue 3019453002: Delete member VideoReceiveStream::Config::Rtp::ulpfec. (Closed)
Patch Set: Added DCHECK. Created 3 years, 2 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
« no previous file with comments | « call/video_receive_stream.cc ('k') | media/engine/webrtcvideoengine_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 2210 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 2221
2222 std::unique_ptr<webrtc::VideoDecoder> internal_decoder( 2222 std::unique_ptr<webrtc::VideoDecoder> internal_decoder(
2223 internal_decoder_factory_->CreateVideoDecoderWithParams(codec, 2223 internal_decoder_factory_->CreateVideoDecoderWithParams(codec,
2224 decoder_params)); 2224 decoder_params));
2225 return internal_decoder; 2225 return internal_decoder;
2226 } 2226 }
2227 2227
2228 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureCodecs( 2228 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureCodecs(
2229 const std::vector<VideoCodecSettings>& recv_codecs, 2229 const std::vector<VideoCodecSettings>& recv_codecs,
2230 DecoderMap* old_decoders) { 2230 DecoderMap* old_decoders) {
2231 RTC_DCHECK(!recv_codecs.empty());
2231 *old_decoders = std::move(allocated_decoders_); 2232 *old_decoders = std::move(allocated_decoders_);
2232 config_.decoders.clear(); 2233 config_.decoders.clear();
2233 config_.rtp.rtx_associated_payload_types.clear(); 2234 config_.rtp.rtx_associated_payload_types.clear();
2234 for (const auto& recv_codec : recv_codecs) { 2235 for (const auto& recv_codec : recv_codecs) {
2235 webrtc::SdpVideoFormat video_format(recv_codec.codec.name, 2236 webrtc::SdpVideoFormat video_format(recv_codec.codec.name,
2236 recv_codec.codec.params); 2237 recv_codec.codec.params);
2237 std::unique_ptr<webrtc::VideoDecoder> new_decoder; 2238 std::unique_ptr<webrtc::VideoDecoder> new_decoder;
2238 2239
2239 auto it = old_decoders->find(video_format); 2240 auto it = old_decoders->find(video_format);
2240 if (it != old_decoders->end()) { 2241 if (it != old_decoders->end()) {
(...skipping 15 matching lines...) Expand all
2256 config_.rtp.rtx_associated_payload_types[recv_codec.rtx_payload_type] = 2257 config_.rtp.rtx_associated_payload_types[recv_codec.rtx_payload_type] =
2257 recv_codec.codec.id; 2258 recv_codec.codec.id;
2258 2259
2259 const bool did_insert = 2260 const bool did_insert =
2260 allocated_decoders_ 2261 allocated_decoders_
2261 .insert(std::make_pair(video_format, std::move(new_decoder))) 2262 .insert(std::make_pair(video_format, std::move(new_decoder)))
2262 .second; 2263 .second;
2263 RTC_CHECK(did_insert); 2264 RTC_CHECK(did_insert);
2264 } 2265 }
2265 2266
2266 config_.rtp.ulpfec = recv_codecs.front().ulpfec; 2267 const auto& codec = recv_codecs.front();
2268 config_.rtp.ulpfec_payload_type = codec.ulpfec.ulpfec_payload_type;
2269 config_.rtp.red_payload_type = codec.ulpfec.red_payload_type;
2267 2270
2268 config_.rtp.nack.rtp_history_ms = 2271 config_.rtp.nack.rtp_history_ms = HasNack(codec.codec) ? kNackHistoryMs : 0;
2269 HasNack(recv_codecs.begin()->codec) ? kNackHistoryMs : 0; 2272 if (codec.ulpfec.red_rtx_payload_type != -1) {
2270 if (config_.rtp.ulpfec.red_rtx_payload_type != -1) {
2271 config_.rtp 2273 config_.rtp
2272 .rtx_associated_payload_types[config_.rtp.ulpfec.red_rtx_payload_type] = 2274 .rtx_associated_payload_types[codec.ulpfec.red_rtx_payload_type] =
2273 config_.rtp.ulpfec.red_payload_type; 2275 codec.ulpfec.red_payload_type;
2274 } 2276 }
2275 } 2277 }
2276 2278
2277 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureFlexfecCodec( 2279 void WebRtcVideoChannel::WebRtcVideoReceiveStream::ConfigureFlexfecCodec(
2278 int flexfec_payload_type) { 2280 int flexfec_payload_type) {
2279 flexfec_config_.payload_type = flexfec_payload_type; 2281 flexfec_config_.payload_type = flexfec_payload_type;
2280 } 2282 }
2281 2283
2282 void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetLocalSsrc( 2284 void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetLocalSsrc(
2283 uint32_t local_ssrc) { 2285 uint32_t local_ssrc) {
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
2681 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - 2683 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() -
2682 1); 2684 1);
2683 } 2685 }
2684 2686
2685 std::vector<webrtc::VideoStream> streams; 2687 std::vector<webrtc::VideoStream> streams;
2686 streams.push_back(stream); 2688 streams.push_back(stream);
2687 return streams; 2689 return streams;
2688 } 2690 }
2689 2691
2690 } // namespace cricket 2692 } // namespace cricket
OLDNEW
« no previous file with comments | « call/video_receive_stream.cc ('k') | media/engine/webrtcvideoengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698