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

Unified Diff: media/gpu/vt_video_encode_accelerator_mac.cc

Issue 1950563006: Reland: Tie kWebRtcH264WithOpenH264FFmpeg and kEnableWebRtcHWH264Encoding flags on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/renderer/media/rtc_video_encoder_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/vt_video_encode_accelerator_mac.cc
diff --git a/media/gpu/vt_video_encode_accelerator_mac.cc b/media/gpu/vt_video_encode_accelerator_mac.cc
index f9fadaf26652e3363508d7f680e294cf4fec93d7..dffc39ddaf463fc1e5a6f54635d5d3a0340a04ea 100644
--- a/media/gpu/vt_video_encode_accelerator_mac.cc
+++ b/media/gpu/vt_video_encode_accelerator_mac.cc
@@ -6,6 +6,7 @@
#include <memory>
+#include "base/mac/mac_util.h"
#include "base/thread_task_runner_handle.h"
#include "media/base/mac/coremedia_glue.h"
#include "media/base/mac/corevideo_glue.h"
@@ -90,6 +91,11 @@ VTVideoEncodeAccelerator::GetSupportedProfiles() {
DLOG(ERROR) << "Failed creating VideoToolbox glue.";
return profiles;
}
+ if (!base::mac::IsOSMavericksOrLater()) {
+ DLOG(ERROR) << "VideoToolbox hardware encoder is supported on Mac OS 10.9 "
+ "and later.";
+ return profiles;
+ }
const bool rv = CreateCompressionSession(
media::video_toolbox::DictionaryWithKeysAndValues(nullptr, nullptr, 0),
gfx::Size(kDefaultResolutionWidth, kDefaultResolutionHeight), true);
@@ -138,6 +144,11 @@ bool VTVideoEncodeAccelerator::Initialize(
DLOG(ERROR) << "Failed creating VideoToolbox glue.";
return false;
}
+ if (!base::mac::IsOSMavericksOrLater()) {
+ DLOG(ERROR) << "VideoToolbox hardware encoder is supported on Mac OS 10.9 "
+ "and later.";
+ return false;
+ }
client_ptr_factory_.reset(new base::WeakPtrFactory<Client>(client));
client_ = client_ptr_factory_->GetWeakPtr();
« no previous file with comments | « content/renderer/media/rtc_video_encoder_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698