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

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

Issue 2492473002: Stop caching supported codecs in WebRtcVideoEngine2 (Closed)
Patch Set: Created 4 years, 1 month 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/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index 3cacc7da82ba3ee32cdfa69abf271635df9ec98b..dfdae5ea99ad13ba2122f6465adf8dea6f94b8f8 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -543,7 +543,6 @@ WebRtcVideoEngine2::WebRtcVideoEngine2()
external_decoder_factory_(NULL),
external_encoder_factory_(NULL) {
LOG(LS_INFO) << "WebRtcVideoEngine2::WebRtcVideoEngine2()";
- video_codecs_ = GetSupportedCodecs(external_encoder_factory_);
}
WebRtcVideoEngine2::~WebRtcVideoEngine2() {
@@ -566,8 +565,8 @@ WebRtcVideoChannel2* WebRtcVideoEngine2::CreateChannel(
external_decoder_factory_);
}
-const std::vector<VideoCodec>& WebRtcVideoEngine2::codecs() const {
- return video_codecs_;
+const std::vector<VideoCodec> WebRtcVideoEngine2::codecs() const {
+ return GetSupportedCodecs(external_encoder_factory_);
}
RtpCapabilities WebRtcVideoEngine2::GetCapabilities() const {
@@ -614,8 +613,6 @@ void WebRtcVideoEngine2::SetExternalEncoderFactory(
encoder_factory = simulcast_encoder_factory_.get();
}
external_encoder_factory_ = encoder_factory;
-
- video_codecs_ = GetSupportedCodecs(encoder_factory);
}
static std::vector<VideoCodec> GetSupportedCodecs(

Powered by Google App Engine
This is Rietveld 408576698