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

Unified Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 1641163002: Preparation CL for H264 support in WebRTC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use of BUILDFLAG instead of macro Created 4 years, 11 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
« content/renderer/BUILD.gn ('K') | « content/renderer/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc/peer_connection_dependency_factory.cc
diff --git a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
index 270cf169851d51f21a8a5377d7bacf87f2b222e7..be2cad5a1de794e4272103bc0cf8ee3831b075d8 100644
--- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
+++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
@@ -52,9 +52,11 @@
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
#include "content/renderer/render_view_impl.h"
+#include "content/renderer/renderer_features.h"
#include "crypto/openssl_util.h"
#include "jingle/glue/thread_wrapper.h"
#include "media/base/media_permission.h"
+#include "media/filters/ffmpeg_glue.h"
#include "media/renderers/gpu_video_accelerator_factories.h"
#include "third_party/WebKit/public/platform/WebMediaConstraints.h"
#include "third_party/WebKit/public/platform/WebMediaStream.h"
@@ -259,6 +261,13 @@ void PeerConnectionDependencyFactory::CreatePeerConnectionFactory() {
DVLOG(1) << "PeerConnectionDependencyFactory::CreatePeerConnectionFactory()";
+#if BUILDFLAG(RTC_USE_H264)
+ // When building with |rtc_use_h264|, |H264DecoderImpl| may be used which
+ // depends on FFmpeg, therefore we need to initialize FFmpeg before going
+ // further.
+ media::FFmpegGlue::InitializeFFmpeg();
+#endif
+
base::MessageLoop::current()->AddDestructionObserver(this);
// To allow sending to the signaling/worker threads.
jingle_glue::JingleThreadWrapper::EnsureForCurrentMessageLoop();
« content/renderer/BUILD.gn ('K') | « content/renderer/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698