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

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

Issue 1921653002: Enable -Winconsistent-missing-override flag. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0; 408 payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
409 strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1); 409 strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
410 assert(frequency >= 1000); 410 assert(frequency >= 1000);
411 payload->typeSpecific.Audio.frequency = frequency; 411 payload->typeSpecific.Audio.frequency = frequency;
412 payload->typeSpecific.Audio.channels = channels; 412 payload->typeSpecific.Audio.channels = channels;
413 payload->typeSpecific.Audio.rate = rate; 413 payload->typeSpecific.Audio.rate = rate;
414 payload->audio = true; 414 payload->audio = true;
415 return payload; 415 return payload;
416 } 416 }
417 417
418 int GetPayloadTypeFrequency(const RtpUtility::Payload& payload) const { 418 int GetPayloadTypeFrequency(
419 const RtpUtility::Payload& payload) const override {
419 return payload.typeSpecific.Audio.frequency; 420 return payload.typeSpecific.Audio.frequency;
420 } 421 }
421 }; 422 };
422 423
423 class RTPPayloadVideoStrategy : public RTPPayloadStrategy { 424 class RTPPayloadVideoStrategy : public RTPPayloadStrategy {
424 public: 425 public:
425 bool CodecsMustBeUnique() const override { return false; } 426 bool CodecsMustBeUnique() const override { return false; }
426 427
427 bool PayloadIsCompatible(const RtpUtility::Payload& payload, 428 bool PayloadIsCompatible(const RtpUtility::Payload& payload,
428 const uint32_t frequency, 429 const uint32_t frequency,
(...skipping 29 matching lines...) Expand all
458 } 459 }
459 RtpUtility::Payload* payload = new RtpUtility::Payload; 460 RtpUtility::Payload* payload = new RtpUtility::Payload;
460 461
461 payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0; 462 payload->name[RTP_PAYLOAD_NAME_SIZE - 1] = 0;
462 strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1); 463 strncpy(payload->name, payloadName, RTP_PAYLOAD_NAME_SIZE - 1);
463 payload->typeSpecific.Video.videoCodecType = videoType; 464 payload->typeSpecific.Video.videoCodecType = videoType;
464 payload->audio = false; 465 payload->audio = false;
465 return payload; 466 return payload;
466 } 467 }
467 468
468 int GetPayloadTypeFrequency(const RtpUtility::Payload& payload) const { 469 int GetPayloadTypeFrequency(
470 const RtpUtility::Payload& payload) const override {
469 return kVideoPayloadTypeFrequency; 471 return kVideoPayloadTypeFrequency;
470 } 472 }
471 }; 473 };
472 474
473 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy( 475 RTPPayloadStrategy* RTPPayloadStrategy::CreateStrategy(
474 const bool handling_audio) { 476 const bool handling_audio) {
475 if (handling_audio) { 477 if (handling_audio) {
476 return new RTPPayloadAudioStrategy(); 478 return new RTPPayloadAudioStrategy();
477 } else { 479 } else {
478 return new RTPPayloadVideoStrategy(); 480 return new RTPPayloadVideoStrategy();
479 } 481 }
480 } 482 }
481 483
482 } // namespace webrtc 484 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtcp_packet/receiver_report.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_receiver_audio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698