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

Unified Diff: webrtc/media/engine/webrtcvideoencoderfactory.cc

Issue 2859223003: WebRtcVideoEncoderFactory cleanup (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/media/engine/webrtcvideoencoderfactory.cc
diff --git a/webrtc/media/engine/webrtcvideoencoderfactory.cc b/webrtc/media/engine/webrtcvideoencoderfactory.cc
deleted file mode 100644
index a332d86b6095acf788453fefc786aa788ffdb88c..0000000000000000000000000000000000000000
--- a/webrtc/media/engine/webrtcvideoencoderfactory.cc
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/media/engine/webrtcvideoencoderfactory.h"
-
-#include "webrtc/common_types.h"
-
-namespace cricket {
-
-webrtc::VideoEncoder* WebRtcVideoEncoderFactory::CreateVideoEncoder(
- const cricket::VideoCodec& codec) {
- return CreateVideoEncoder(webrtc::PayloadNameToCodecType(codec.name)
- .value_or(webrtc::kVideoCodecUnknown));
-}
-
-const std::vector<cricket::VideoCodec>&
-WebRtcVideoEncoderFactory::supported_codecs() const {
- codecs_.clear();
- const std::vector<VideoCodec>& encoder_codecs = codecs();
- for (const VideoCodec& encoder_codec : encoder_codecs) {
- codecs_.push_back(cricket::VideoCodec(encoder_codec.name));
- }
- return codecs_;
-}
-
-webrtc::VideoEncoder* WebRtcVideoEncoderFactory::CreateVideoEncoder(
- webrtc::VideoCodecType type) {
- const cricket::VideoCodec codec(
- webrtc::CodecTypeToPayloadName(type).value_or("Unknown codec"));
- return CreateVideoEncoder(codec);
-}
-
-const std::vector<WebRtcVideoEncoderFactory::VideoCodec>&
-WebRtcVideoEncoderFactory::codecs() const {
- encoder_codecs_.clear();
- const std::vector<cricket::VideoCodec>& codecs = supported_codecs();
- for (const cricket::VideoCodec& codec : codecs) {
- encoder_codecs_.push_back(
- VideoCodec(webrtc::PayloadNameToCodecType(codec.name)
- .value_or(webrtc::kVideoCodecUnknown),
- codec.name));
- }
- return encoder_codecs_;
-}
-
-} // namespace cricket
« no previous file with comments | « webrtc/media/engine/webrtcvideoencoderfactory.h ('k') | webrtc/media/engine/webrtcvideoencoderfactory_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698