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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_payload_registry.cc

Issue 1702043002: Remove video-codec max bitrate from TMMBN. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 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 10
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 bool CodecsMustBeUnique() const override { return false; } 426 bool CodecsMustBeUnique() const override { return false; }
427 427
428 bool PayloadIsCompatible(const RtpUtility::Payload& payload, 428 bool PayloadIsCompatible(const RtpUtility::Payload& payload,
429 const uint32_t frequency, 429 const uint32_t frequency,
430 const size_t channels, 430 const size_t channels,
431 const uint32_t rate) const override { 431 const uint32_t rate) const override {
432 return !payload.audio; 432 return !payload.audio;
433 } 433 }
434 434
435 void UpdatePayloadRate(RtpUtility::Payload* payload, 435 void UpdatePayloadRate(RtpUtility::Payload* payload,
436 const uint32_t rate) const override { 436 const uint32_t rate) const override {}
437 payload->typeSpecific.Video.maxRate = rate;
438 }
439 437
440 RtpUtility::Payload* CreatePayloadType( 438 RtpUtility::Payload* CreatePayloadType(
441 const char payloadName[RTP_PAYLOAD_NAME_SIZE], 439 const char payloadName[RTP_PAYLOAD_NAME_SIZE],
442 const int8_t payloadType, 440 const int8_t payloadType,
443 const uint32_t frequency, 441 const uint32_t frequency,
444 const size_t channels, 442 const size_t channels,
445 const uint32_t rate) const override { 443 const uint32_t rate) const override {
446 RtpVideoCodecTypes videoType = kRtpVideoGeneric; 444 RtpVideoCodecTypes videoType = kRtpVideoGeneric;
447 445
448 if (RtpUtility::StringCompare(payloadName, "VP8", 3)) { 446 if (RtpUtility::StringCompare(payloadName, "VP8", 3)) {
449 videoType = kRtpVideoVp8; 447 videoType = kRtpVideoVp8;
450 } else if (RtpUtility::StringCompare(payloadName, "VP9", 3)) { 448 } else if (RtpUtility::StringCompare(payloadName, "VP9", 3)) {
451 videoType = kRtpVideoVp9; 449 videoType = kRtpVideoVp9;
452 } else if (RtpUtility::StringCompare(payloadName, "H264", 4)) { 450 } else if (RtpUtility::StringCompare(payloadName, "H264", 4)) {
453 videoType = kRtpVideoH264; 451 videoType = kRtpVideoH264;
454 } else if (RtpUtility::StringCompare(payloadName, "I420", 4)) { 452 } else if (RtpUtility::StringCompare(payloadName, "I420", 4)) {
455 videoType = kRtpVideoGeneric; 453 videoType = kRtpVideoGeneric;
456 } else if (RtpUtility::StringCompare(payloadName, "ULPFEC", 6) || 454 } else if (RtpUtility::StringCompare(payloadName, "ULPFEC", 6) ||
457 RtpUtility::StringCompare(payloadName, "RED", 3)) { 455 RtpUtility::StringCompare(payloadName, "RED", 3)) {
458 videoType = kRtpVideoNone; 456 videoType = kRtpVideoNone;
459 } else { 457 } else {
460 videoType = kRtpVideoGeneric; 458 videoType = kRtpVideoGeneric;
461 } 459 }
462 RtpUtility::Payload* payload = new RtpUtility::Payload; 460 RtpUtility::Payload* payload = new RtpUtility::Payload;
463 461
464 payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0; 462 payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
465 strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1); 463 strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
466 payload->typeSpecific.Video.videoCodecType = videoType; 464 payload->typeSpecific.Video.videoCodecType = videoType;
467 payload->typeSpecific.Video.maxRate = rate;
468 payload->audio = false; 465 payload->audio = false;
469 return payload; 466 return payload;
470 } 467 }
471 468
472 int GetPayloadTypeFrequency(const RtpUtility::Payload& payload) const { 469 int GetPayloadTypeFrequency(const RtpUtility::Payload& payload) const {
473 return kVideoPayloadTypeFrequency; 470 return kVideoPayloadTypeFrequency;
474 } 471 }
475 }; 472 };
476 473
477 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy( 474 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy(
478 const bool handling_audio) { 475 const bool handling_audio) {
479 if (handling_audio) { 476 if (handling_audio) {
480 return new RTPPayloadAudioStrategy(); 477 return new RTPPayloadAudioStrategy();
481 } else { 478 } else {
482 return new RTPPayloadVideoStrategy(); 479 return new RTPPayloadVideoStrategy();
483 } 480 }
484 } 481 }
485 482
486 } // namespace webrtc 483 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_sender_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698