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

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

Issue 2489173004: Revert of 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
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/pc/channelmanager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc
index dfdae5ea99ad13ba2122f6465adf8dea6f94b8f8..3cacc7da82ba3ee32cdfa69abf271635df9ec98b 100644
--- a/webrtc/media/engine/webrtcvideoengine2.cc
+++ b/webrtc/media/engine/webrtcvideoengine2.cc
@@ -543,6 +543,7 @@
external_decoder_factory_(NULL),
external_encoder_factory_(NULL) {
LOG(LS_INFO) << "WebRtcVideoEngine2::WebRtcVideoEngine2()";
+ video_codecs_ = GetSupportedCodecs(external_encoder_factory_);
}
WebRtcVideoEngine2::~WebRtcVideoEngine2() {
@@ -565,8 +566,8 @@
external_decoder_factory_);
}
-const std::vector<VideoCodec> WebRtcVideoEngine2::codecs() const {
- return GetSupportedCodecs(external_encoder_factory_);
+const std::vector<VideoCodec>& WebRtcVideoEngine2::codecs() const {
+ return video_codecs_;
}
RtpCapabilities WebRtcVideoEngine2::GetCapabilities() const {
@@ -613,6 +614,8 @@
encoder_factory = simulcast_encoder_factory_.get();
}
external_encoder_factory_ = encoder_factory;
+
+ video_codecs_ = GetSupportedCodecs(encoder_factory);
}
static std::vector<VideoCodec> GetSupportedCodecs(
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/pc/channelmanager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698