| 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 966a295fdf8fdd3fa61f66ff58cc7a996eb21dc2..a4b1e0aa8c5fb77f881b0bebeecb1981be71e9c4 100644
|
| --- a/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
| +++ b/content/renderer/media/webrtc/peer_connection_dependency_factory.cc
|
| @@ -21,6 +21,7 @@
|
| #include "content/common/media/media_stream_messages.h"
|
| #include "content/public/common/content_client.h"
|
| #include "content/public/common/content_switches.h"
|
| +#include "content/public/common/feature_h264_with_openh264_ffmpeg.h"
|
| #include "content/public/common/renderer_preferences.h"
|
| #include "content/public/common/webrtc_ip_handling_policy.h"
|
| #include "content/public/renderer/content_renderer_client.h"
|
| @@ -52,7 +53,6 @@
|
| #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"
|
| @@ -262,21 +262,17 @@ void PeerConnectionDependencyFactory::CreatePeerConnectionFactory() {
|
|
|
| DVLOG(1) << "PeerConnectionDependencyFactory::CreatePeerConnectionFactory()";
|
|
|
| -#if BUILDFLAG(RTC_USE_H264)
|
| - // TODO(hbos): This is temporary. Disable the runtime effects of building with
|
| - // |rtc_use_h264|. We are planning to default the |rtc_use_h264| flag to
|
| - // |proprietary_codecs| so that it will be used by Chromium trybots. This
|
| - // would also make it used by Chrome, but this feature is not ready to be
|
| - // launched yet. An upcoming CL will add browser tests for H264. That CL will
|
| - // remove this line. It should remain disabled until tested.
|
| - webrtc::DisableRtcUseH264();
|
| - // When building with |rtc_use_h264|, |H264DecoderImpl| may be used which
|
| - // depends on FFmpeg, therefore we need to initialize FFmpeg before going
|
| - // further.
|
| - // TODO(hbos): Temporarily commented out due to webrtc::DisableRtcUseH264(),
|
| - // no need to initialize FFmpeg when |H264DecoderImpl| is disabled.
|
| - // media::FFmpegGlue::InitializeFFmpeg();
|
| -#endif
|
| +#if defined(BUILDFLAG_RTC_USE_H264)
|
| + // Building /w |rtc_use_h264|, is the corresponding run-time feature enabled?
|
| + if (base::FeatureList::IsEnabled(kWebRtcH264WithOpenH264FFmpeg)) {
|
| + // |H264DecoderImpl| may be used which depends on FFmpeg, therefore we need
|
| + // to initialize FFmpeg before going further.
|
| + media::FFmpegGlue::InitializeFFmpeg();
|
| + } else {
|
| + // Feature is to be disabled, no need to make sure FFmpeg is initialized.
|
| + webrtc::DisableRtcUseH264();
|
| + }
|
| +#endif // defined(BUILDFLAG_RTC_USE_H264)
|
|
|
| base::MessageLoop::current()->AddDestructionObserver(this);
|
| // To allow sending to the signaling/worker threads.
|
|
|