| OLD | NEW |
| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 // don't recognize? | 396 // don't recognize? |
| 397 void AddCodecAndMaybeRtxCodec(const VideoCodec& codec, | 397 void AddCodecAndMaybeRtxCodec(const VideoCodec& codec, |
| 398 std::vector<VideoCodec>* codecs) { | 398 std::vector<VideoCodec>* codecs) { |
| 399 codecs->push_back(codec); | 399 codecs->push_back(codec); |
| 400 int rtx_payload_type = 0; | 400 int rtx_payload_type = 0; |
| 401 if (CodecNamesEq(codec.name, kVp8CodecName)) { | 401 if (CodecNamesEq(codec.name, kVp8CodecName)) { |
| 402 rtx_payload_type = kDefaultRtxVp8PlType; | 402 rtx_payload_type = kDefaultRtxVp8PlType; |
| 403 } else if (CodecNamesEq(codec.name, kVp9CodecName)) { | 403 } else if (CodecNamesEq(codec.name, kVp9CodecName)) { |
| 404 rtx_payload_type = kDefaultRtxVp9PlType; | 404 rtx_payload_type = kDefaultRtxVp9PlType; |
| 405 } else if (CodecNamesEq(codec.name, kH264CodecName)) { | 405 } else if (CodecNamesEq(codec.name, kH264CodecName)) { |
| 406 // TODO(magjed): Using a hardcoded payload type for RTX H264 does not work |
| 407 // when we have more than one profile. For example, when having both |
| 408 // Constrained Baseline Profile and Constrained High Profile, both |
| 409 // corresponding RTX codecs will end up with the same payload type, causing |
| 410 // failure later on. |
| 406 rtx_payload_type = kDefaultRtxH264PlType; | 411 rtx_payload_type = kDefaultRtxH264PlType; |
| 407 } else if (CodecNamesEq(codec.name, kRedCodecName)) { | 412 } else if (CodecNamesEq(codec.name, kRedCodecName)) { |
| 408 rtx_payload_type = kDefaultRtxRedPlType; | 413 rtx_payload_type = kDefaultRtxRedPlType; |
| 409 } else { | 414 } else { |
| 410 return; | 415 return; |
| 411 } | 416 } |
| 412 codecs->push_back(VideoCodec::CreateRtxCodec(rtx_payload_type, codec.id)); | 417 codecs->push_back(VideoCodec::CreateRtxCodec(rtx_payload_type, codec.id)); |
| 413 } | 418 } |
| 414 | 419 |
| 415 std::vector<VideoCodec> DefaultVideoCodecList() { | 420 std::vector<VideoCodec> DefaultVideoCodecList() { |
| (...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 rtx_mapping[video_codecs[i].codec.id] != | 2573 rtx_mapping[video_codecs[i].codec.id] != |
| 2569 ulpfec_config.red_payload_type) { | 2574 ulpfec_config.red_payload_type) { |
| 2570 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2575 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2571 } | 2576 } |
| 2572 } | 2577 } |
| 2573 | 2578 |
| 2574 return video_codecs; | 2579 return video_codecs; |
| 2575 } | 2580 } |
| 2576 | 2581 |
| 2577 } // namespace cricket | 2582 } // namespace cricket |
| OLD | NEW |