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

Unified Diff: content/renderer/media/gpu/rtc_video_encoder_factory.cc

Issue 2549283002: Android: enable WebRTC HW H264 with a flag by default (Closed)
Patch Set: fix histograms value Created 4 years 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: content/renderer/media/gpu/rtc_video_encoder_factory.cc
diff --git a/content/renderer/media/gpu/rtc_video_encoder_factory.cc b/content/renderer/media/gpu/rtc_video_encoder_factory.cc
index 4124c186fb912248a0e5a8b6dc7a2290325b0b20..56d28bc2347d1859b27b14e97073e75f97363eca 100644
--- a/content/renderer/media/gpu/rtc_video_encoder_factory.cc
+++ b/content/renderer/media/gpu/rtc_video_encoder_factory.cc
@@ -5,6 +5,7 @@
#include "content/renderer/media/gpu/rtc_video_encoder_factory.h"
#include "base/command_line.h"
+#include "content/public/common/content_features.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/feature_h264_with_openh264_ffmpeg.h"
#include "content/renderer/media/gpu/rtc_video_encoder.h"
@@ -15,15 +16,6 @@
namespace content {
namespace {
-bool IsCodecDisabledByCommandLine(const base::CommandLine* cmd_line,
- const std::string codec_name) {
- if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding))
- return false;
-
- const std::string codec_filter =
- cmd_line->GetSwitchValueASCII(switches::kDisableWebRtcHWEncoding);
- return codec_filter.empty() || codec_filter == codec_name;
-}
// Translate from media::VideoEncodeAccelerator::SupportedProfile to
// one or more instances of cricket::WebRtcVideoEncoderFactory::VideoCodec
@@ -38,8 +30,7 @@ void VEAToWebRTCCodecs(
const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
if (profile.profile >= media::VP8PROFILE_MIN &&
profile.profile <= media::VP8PROFILE_MAX) {
- if (!IsCodecDisabledByCommandLine(cmd_line,
- switches::kDisableWebRtcHWEncodingVPx)) {
+ if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWVP8Encoding)) {
codecs->push_back(cricket::WebRtcVideoEncoderFactory::VideoCodec(
webrtc::kVideoCodecVP8, "VP8", width, height, fps));
}
@@ -54,8 +45,7 @@ void VEAToWebRTCCodecs(
base::FeatureList::IsEnabled(kWebRtcH264WithOpenH264FFmpeg);
#endif // BUILDFLAG(RTC_USE_H264) && !defined(MEDIA_DISABLE_FFMPEG)
if (webrtc_h264_sw_enabled ||
- !IsCodecDisabledByCommandLine(cmd_line,
- switches::kDisableWebRtcHWEncodingH264)) {
+ base::FeatureList::IsEnabled(features::kWebRtcHWH264Encoding)) {
codecs->push_back(cricket::WebRtcVideoEncoderFactory::VideoCodec(
webrtc::kVideoCodecH264, "H264", width, height, fps));
}
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/media/webrtc/peer_connection_dependency_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698