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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2623513002: Explicitly only add transport-cc RTCP feedback param to default FlexFEC codec. (Closed)
Patch Set: Rebase. Created 3 years, 11 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) 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (!is_payload_used[i - kFirstDynamicPayloadType]) 564 if (!is_payload_used[i - kFirstDynamicPayloadType])
565 return rtc::Optional<int>(i); 565 return rtc::Optional<int>(i);
566 } 566 }
567 // No free payload type. 567 // No free payload type.
568 return rtc::Optional<int>(); 568 return rtc::Optional<int>();
569 } 569 }
570 570
571 // This is a helper function for GetSupportedCodecs below. It will append new 571 // This is a helper function for GetSupportedCodecs below. It will append new
572 // unique codecs from |input_codecs| to |unified_codecs|. It will add default 572 // unique codecs from |input_codecs| to |unified_codecs|. It will add default
573 // feedback params to the codecs and will also add an associated RTX codec for 573 // feedback params to the codecs and will also add an associated RTX codec for
574 // recognized codecs (VP8, VP9, H264, and Red). 574 // recognized codecs (VP8, VP9, H264, and RED).
575 static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs, 575 static void AppendVideoCodecs(const std::vector<VideoCodec>& input_codecs,
576 std::vector<VideoCodec>* unified_codecs) { 576 std::vector<VideoCodec>* unified_codecs) {
577 for (VideoCodec codec : input_codecs) { 577 for (VideoCodec codec : input_codecs) {
578 const rtc::Optional<int> payload_type = 578 const rtc::Optional<int> payload_type =
579 NextFreePayloadType(*unified_codecs); 579 NextFreePayloadType(*unified_codecs);
580 if (!payload_type) 580 if (!payload_type)
581 return; 581 return;
582 codec.id = *payload_type; 582 codec.id = *payload_type;
583 // TODO(magjed): Move the responsibility of setting these parameters to the 583 // TODO(magjed): Move the responsibility of setting these parameters to the
584 // encoder factories instead. 584 // encoder factories instead.
585 if (codec.name != kRedCodecName && codec.name != kUlpfecCodecName) 585 if (codec.name != kRedCodecName && codec.name != kUlpfecCodecName &&
586 codec.name != kFlexfecCodecName)
586 AddDefaultFeedbackParams(&codec); 587 AddDefaultFeedbackParams(&codec);
587 // Don't add same codec twice. 588 // Don't add same codec twice.
588 if (FindMatchingCodec(*unified_codecs, codec)) 589 if (FindMatchingCodec(*unified_codecs, codec))
589 continue; 590 continue;
590 591
591 unified_codecs->push_back(codec); 592 unified_codecs->push_back(codec);
592 593
593 // Add associated RTX codec for recognized codecs. 594 // Add associated RTX codec for recognized codecs.
594 // TODO(deadbeef): Should we add RTX codecs for external codecs whose names 595 // TODO(deadbeef): Should we add RTX codecs for external codecs whose names
595 // we don't recognize? 596 // we don't recognize?
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 rtx_mapping[video_codecs[i].codec.id] != 2588 rtx_mapping[video_codecs[i].codec.id] !=
2588 ulpfec_config.red_payload_type) { 2589 ulpfec_config.red_payload_type) {
2589 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2590 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2590 } 2591 }
2591 } 2592 }
2592 2593
2593 return video_codecs; 2594 return video_codecs;
2594 } 2595 }
2595 2596
2596 } // namespace cricket 2597 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/internalencoderfactory.cc ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698