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

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

Issue 453063002: Only allow webrtc HW offload for H264 encode for extension process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a content common switch instead. Created 6 years, 4 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_encoder_factory.cc
diff --git a/content/renderer/media/rtc_video_encoder_factory.cc b/content/renderer/media/rtc_video_encoder_factory.cc
index b21792204877947f0ac89cbb01098781239c62e9..a15df7e492eea806d26821a50d2513493f1f21b5 100644
--- a/content/renderer/media/rtc_video_encoder_factory.cc
+++ b/content/renderer/media/rtc_video_encoder_factory.cc
@@ -4,7 +4,9 @@
#include "content/renderer/media/rtc_video_encoder_factory.h"
+#include "base/command_line.h"
#include "content/common/gpu/client/gpu_video_encode_accelerator_host.h"
+#include "content/public/common/content_switches.h"
#include "content/renderer/media/rtc_video_encoder.h"
#include "media/filters/gpu_video_accelerator_factories.h"
#include "media/video/video_encode_accelerator.h"
@@ -31,8 +33,11 @@ void VEAToWebRTCCodecs(
profile.profile <= media::H264PROFILE_MAX) {
codecs->push_back(cricket::WebRtcVideoEncoderFactory::VideoCodec(
webrtc::kVideoCodecGeneric, "CAST1", width, height, fps));
- codecs->push_back(cricket::WebRtcVideoEncoderFactory::VideoCodec(
- webrtc::kVideoCodecH264, "H264", width, height, fps));
+ const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kEnableWebRtcHWH264Encoding)) {
Pawel Osciak 2014/08/19 01:30:27 Could we please have this together with the kEnabl
hshi1 2014/08/19 17:34:49 You mean also check for the VP8 flag above? Done.
Pawel Osciak 2014/08/20 01:49:29 Not exactly, I meant we should not have checks for
+ codecs->push_back(cricket::WebRtcVideoEncoderFactory::VideoCodec(
+ webrtc::kVideoCodecH264, "H264", width, height, fps));
+ }
}
}
« no previous file with comments | « content/public/common/content_switches.cc ('k') | extensions/renderer/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698