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

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

Issue 1969673002: Disable HW H264 decoder for Win7 & add enable flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename. Created 4 years, 7 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') | content/renderer/media/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_video_decoder.cc
diff --git a/content/renderer/media/rtc_video_decoder.cc b/content/renderer/media/rtc_video_decoder.cc
index 123a90ebfb208de73ae3650c43e53658dc9215b6..3ee629321d2f219a7ec836741bd000bf0518eafd 100644
--- a/content/renderer/media/rtc_video_decoder.cc
+++ b/content/renderer/media/rtc_video_decoder.cc
@@ -23,6 +23,12 @@
#include "third_party/webrtc/base/refcount.h"
#include "third_party/webrtc/video_frame.h"
+#if defined(OS_WIN)
+#include "base/command_line.h"
+#include "base/win/windows_version.h"
+#include "content/public/common/content_switches.h"
+#endif // defined(OS_WIN)
+
namespace content {
const int32_t RTCVideoDecoder::ID_LAST = 0x3FFFFFFF;
@@ -89,6 +95,16 @@ std::unique_ptr<RTCVideoDecoder> RTCVideoDecoder::Create(
webrtc::VideoCodecType type,
media::GpuVideoAcceleratorFactories* factories) {
std::unique_ptr<RTCVideoDecoder> decoder;
+// See https://bugs.chromium.org/p/webrtc/issues/detail?id=5717.
+#if defined(OS_WIN)
+ if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWin7WebRtcHWH264Decoding) &&
+ type == webrtc::kVideoCodecH264 &&
+ base::win::GetVersion() == base::win::VERSION_WIN7) {
+ DLOG(ERROR) << "H264 HW decoding on Win7 is not supported.";
+ return decoder;
+ }
+#endif // defined(OS_WIN)
// Convert WebRTC codec type to media codec profile.
media::VideoCodecProfile profile;
switch (type) {
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/media/rtc_video_decoder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698