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

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

Issue 2826263004: Move responsibility for RTP header extensions on video receive. (Closed)
Patch Set: Crude rebase. 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 | « media/engine/fakewebrtccall.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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 config->rtp.rtcp_mode = send_params_.rtcp.reduced_size 1245 config->rtp.rtcp_mode = send_params_.rtcp.reduced_size
1246 ? webrtc::RtcpMode::kReducedSize 1246 ? webrtc::RtcpMode::kReducedSize
1247 : webrtc::RtcpMode::kCompound; 1247 : webrtc::RtcpMode::kCompound;
1248 1248
1249 config->rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false; 1249 config->rtp.remb = send_codec_ ? HasRemb(send_codec_->codec) : false;
1250 config->rtp.transport_cc = 1250 config->rtp.transport_cc =
1251 send_codec_ ? HasTransportCc(send_codec_->codec) : false; 1251 send_codec_ ? HasTransportCc(send_codec_->codec) : false;
1252 1252
1253 sp.GetFidSsrc(ssrc, &config->rtp.rtx_ssrc); 1253 sp.GetFidSsrc(ssrc, &config->rtp.rtx_ssrc);
1254 1254
1255 config->rtp.extensions = recv_rtp_extensions_;
1256
1257 // TODO(brandtr): Generalize when we add support for multistream protection. 1255 // TODO(brandtr): Generalize when we add support for multistream protection.
1258 flexfec_config->payload_type = recv_flexfec_payload_type_; 1256 flexfec_config->payload_type = recv_flexfec_payload_type_;
1259 if (IsFlexfecAdvertisedFieldTrialEnabled() && 1257 if (IsFlexfecAdvertisedFieldTrialEnabled() &&
1260 sp.GetFecFrSsrc(ssrc, &flexfec_config->remote_ssrc)) { 1258 sp.GetFecFrSsrc(ssrc, &flexfec_config->remote_ssrc)) {
1261 flexfec_config->protected_media_ssrcs = {ssrc}; 1259 flexfec_config->protected_media_ssrcs = {ssrc};
1262 flexfec_config->local_ssrc = config->rtp.local_ssrc; 1260 flexfec_config->local_ssrc = config->rtp.local_ssrc;
1263 flexfec_config->rtcp_mode = config->rtp.rtcp_mode; 1261 flexfec_config->rtcp_mode = config->rtp.rtcp_mode;
1264 // TODO(brandtr): We should be spec-compliant and set |transport_cc| here 1262 // TODO(brandtr): We should be spec-compliant and set |transport_cc| here
1265 // based on the rtcp-fb for the FlexFEC codec, not the media codec. 1263 // based on the rtcp-fb for the FlexFEC codec, not the media codec.
1266 flexfec_config->transport_cc = config->rtp.transport_cc; 1264 flexfec_config->transport_cc = config->rtp.transport_cc;
1267 flexfec_config->rtp_header_extensions = config->rtp.extensions;
1268 } 1265 }
1269 } 1266 }
1270 1267
1271 bool WebRtcVideoChannel::RemoveRecvStream(uint32_t ssrc) { 1268 bool WebRtcVideoChannel::RemoveRecvStream(uint32_t ssrc) {
1272 LOG(LS_INFO) << "RemoveRecvStream: " << ssrc; 1269 LOG(LS_INFO) << "RemoveRecvStream: " << ssrc;
1273 if (ssrc == 0) { 1270 if (ssrc == 0) {
1274 LOG(LS_ERROR) << "RemoveRecvStream with 0 ssrc is not supported."; 1271 LOG(LS_ERROR) << "RemoveRecvStream with 0 ssrc is not supported.";
1275 return false; 1272 return false;
1276 } 1273 }
1277 1274
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2337 2334
2338 void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetRecvParameters( 2335 void WebRtcVideoChannel::WebRtcVideoReceiveStream::SetRecvParameters(
2339 const ChangedRecvParameters& params) { 2336 const ChangedRecvParameters& params) {
2340 bool video_needs_recreation = false; 2337 bool video_needs_recreation = false;
2341 bool flexfec_needs_recreation = false; 2338 bool flexfec_needs_recreation = false;
2342 DecoderMap old_decoders; 2339 DecoderMap old_decoders;
2343 if (params.codec_settings) { 2340 if (params.codec_settings) {
2344 ConfigureCodecs(*params.codec_settings, &old_decoders); 2341 ConfigureCodecs(*params.codec_settings, &old_decoders);
2345 video_needs_recreation = true; 2342 video_needs_recreation = true;
2346 } 2343 }
2347 if (params.rtp_header_extensions) {
2348 config_.rtp.extensions = *params.rtp_header_extensions;
2349 flexfec_config_.rtp_header_extensions = *params.rtp_header_extensions;
2350 video_needs_recreation = true;
2351 flexfec_needs_recreation = true;
2352 }
2353 if (params.flexfec_payload_type) { 2344 if (params.flexfec_payload_type) {
2354 ConfigureFlexfecCodec(*params.flexfec_payload_type); 2345 ConfigureFlexfecCodec(*params.flexfec_payload_type);
2355 flexfec_needs_recreation = true; 2346 flexfec_needs_recreation = true;
2356 } 2347 }
2357 if (flexfec_needs_recreation) { 2348 if (flexfec_needs_recreation) {
2358 LOG(LS_INFO) << "MaybeRecreateWebRtcFlexfecStream (recv) because of " 2349 LOG(LS_INFO) << "MaybeRecreateWebRtcFlexfecStream (recv) because of "
2359 "SetRecvParameters"; 2350 "SetRecvParameters";
2360 MaybeRecreateWebRtcFlexfecStream(); 2351 MaybeRecreateWebRtcFlexfecStream();
2361 } 2352 }
2362 if (video_needs_recreation) { 2353 if (video_needs_recreation) {
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
2683 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() - 2674 stream.temporal_layer_thresholds_bps.resize(GetDefaultVp9TemporalLayers() -
2684 1); 2675 1);
2685 } 2676 }
2686 2677
2687 std::vector<webrtc::VideoStream> streams; 2678 std::vector<webrtc::VideoStream> streams;
2688 streams.push_back(stream); 2679 streams.push_back(stream);
2689 return streams; 2680 return streams;
2690 } 2681 }
2691 2682
2692 } // namespace cricket 2683 } // namespace cricket
OLDNEW
« no previous file with comments | « media/engine/fakewebrtccall.cc ('k') | media/engine/webrtcvideoengine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698