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

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

Issue 1665803003: Remove dead code from WebRtcVideoEngine2. (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 * libjingle 2 * libjingle
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 encoder_factory->codecs())) { 576 encoder_factory->codecs())) {
577 simulcast_encoder_factory_.reset( 577 simulcast_encoder_factory_.reset(
578 new WebRtcSimulcastEncoderFactory(encoder_factory)); 578 new WebRtcSimulcastEncoderFactory(encoder_factory));
579 encoder_factory = simulcast_encoder_factory_.get(); 579 encoder_factory = simulcast_encoder_factory_.get();
580 } 580 }
581 external_encoder_factory_ = encoder_factory; 581 external_encoder_factory_ = encoder_factory;
582 582
583 video_codecs_ = GetSupportedCodecs(); 583 video_codecs_ = GetSupportedCodecs();
584 } 584 }
585 585
586 // Checks to see whether we comprehend and could receive a particular codec
587 bool WebRtcVideoEngine2::FindCodec(const VideoCodec& in) {
588 // TODO(pbos): Probe encoder factory to figure out that the codec is supported
589 // if supported by the encoder factory. Add a corresponding test that fails
590 // with this code (that doesn't ask the factory).
591 for (size_t j = 0; j < video_codecs_.size(); ++j) {
592 VideoCodec codec(video_codecs_[j].id, video_codecs_[j].name, 0, 0, 0, 0);
593 if (codec.Matches(in)) {
594 return true;
595 }
596 }
597 return false;
598 }
599
600 // Ignore spammy trace messages, mostly from the stats API when we haven't
601 // gotten RTCP info yet from the remote side.
602 bool WebRtcVideoEngine2::ShouldIgnoreTrace(const std::string& trace) {
603 static const char* const kTracesToIgnore[] = {NULL};
604 for (const char* const* p = kTracesToIgnore; *p; ++p) {
605 if (trace.find(*p) == 0) {
606 return true;
607 }
608 }
609 return false;
610 }
611
612 std::vector<VideoCodec> WebRtcVideoEngine2::GetSupportedCodecs() const { 586 std::vector<VideoCodec> WebRtcVideoEngine2::GetSupportedCodecs() const {
613 std::vector<VideoCodec> supported_codecs = DefaultVideoCodecList(); 587 std::vector<VideoCodec> supported_codecs = DefaultVideoCodecList();
614 588
615 if (external_encoder_factory_ == NULL) { 589 if (external_encoder_factory_ == NULL) {
616 return supported_codecs; 590 return supported_codecs;
617 } 591 }
618 592
619 const std::vector<WebRtcVideoEncoderFactory::VideoCodec>& codecs = 593 const std::vector<WebRtcVideoEncoderFactory::VideoCodec>& codecs =
620 external_encoder_factory_->codecs(); 594 external_encoder_factory_->codecs();
621 for (size_t i = 0; i < codecs.size(); ++i) { 595 for (size_t i = 0; i < codecs.size(); ++i) {
(...skipping 1931 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; 2527 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id];
2554 } 2528 }
2555 } 2529 }
2556 2530
2557 return video_codecs; 2531 return video_codecs;
2558 } 2532 }
2559 2533
2560 } // namespace cricket 2534 } // namespace cricket
2561 2535
2562 #endif // HAVE_WEBRTC_VIDEO 2536 #endif // HAVE_WEBRTC_VIDEO
OLDNEW
« no previous file with comments | « talk/media/webrtc/webrtcvideoengine2.h ('k') | talk/media/webrtc/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698