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

Unified Diff: media/base/mac/avfoundation_glue.mm

Issue 1815983003: Remove deprecated QTKit Video Capture Support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 9 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 | « media/base/mac/avfoundation_glue.h ('k') | media/base/media_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mac/avfoundation_glue.mm
diff --git a/media/base/mac/avfoundation_glue.mm b/media/base/mac/avfoundation_glue.mm
index 297d4a47f7c72f9565469142fd0f4994c206ac76..84b773477256a0ebdca6d52f945a6f02efb429d9 100644
--- a/media/base/mac/avfoundation_glue.mm
+++ b/media/base/mac/avfoundation_glue.mm
@@ -31,24 +31,6 @@ extern NSString* const AVVideoScalingModeKey;
extern NSString* const AVVideoScalingModeResizeAspectFill;
namespace {
-// Used for logging capture API usage. Classes are a partition. Elements in this
-// enum should not be deleted or rearranged; the only permitted operation is to
-// add new elements before CAPTURE_API_MAX, that must be equal to the last item.
-enum CaptureApi {
- CAPTURE_API_QTKIT_DUE_TO_OS_PREVIOUS_TO_LION = 0,
- CAPTURE_API_QTKIT_FORCED_BY_FLAG = 1,
- CAPTURE_API_QTKIT_DUE_TO_NO_FLAG = 2,
- CAPTURE_API_QTKIT_DUE_TO_AVFOUNDATION_LOAD_ERROR = 3,
- CAPTURE_API_AVFOUNDATION_LOADED_OK = 4,
- CAPTURE_API_MAX = CAPTURE_API_AVFOUNDATION_LOADED_OK
-};
-
-void LogCaptureApi(CaptureApi api) {
- UMA_HISTOGRAM_ENUMERATION("Media.VideoCaptureApi.Mac",
- api,
- CAPTURE_API_MAX + 1);
-}
-
// This class is used to retrieve AVFoundation NSBundle and library handle. It
// must be used as a LazyInstance so that it is initialised once and in a
// thread-safe way. Normally no work is done in constructors: LazyInstance is
@@ -122,30 +104,10 @@ AVFoundationInternal* GetAVFoundationInternal() {
// This contains the logic of checking whether AVFoundation is supported.
// It's called only once and the results are cached in a static bool.
bool LoadAVFoundationInternal() {
- // AVFoundation is only available on OS Lion and above.
- if (!base::mac::IsOSLionOrLater()) {
- LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_OS_PREVIOUS_TO_LION);
- return false;
- }
-
- const base::CommandLine* command_line =
- base::CommandLine::ForCurrentProcess();
- // The force-qtkit flag takes precedence over enable-avfoundation.
- if (command_line->HasSwitch(switches::kForceQTKit)) {
- LogCaptureApi(CAPTURE_API_QTKIT_FORCED_BY_FLAG);
- return false;
- }
-
- if (!command_line->HasSwitch(switches::kEnableAVFoundation)) {
- LogCaptureApi(CAPTURE_API_QTKIT_DUE_TO_NO_FLAG);
- return false;
- }
g_avfoundation_handle.Initialize(TlsCleanup);
g_avfoundation_handle.Set(new AVFoundationInternal());
const bool ret = [AVFoundationGlue::AVFoundationBundle() load];
- LogCaptureApi(ret ? CAPTURE_API_AVFOUNDATION_LOADED_OK
- : CAPTURE_API_QTKIT_DUE_TO_AVFOUNDATION_LOAD_ERROR);
-
+ CHECK(ret);
return ret;
}
@@ -166,11 +128,6 @@ void AVFoundationGlue::InitializeAVFoundation() {
AVFOUNDATION_IS_SUPPORTED : AVFOUNDATION_NOT_SUPPORTED;
}
-bool AVFoundationGlue::IsAVFoundationSupported() {
- CHECK_NE(g_avfoundation_initialization, INITIALIZE_NOT_CALLED);
- return g_avfoundation_initialization == AVFOUNDATION_IS_SUPPORTED;
-}
-
NSBundle const* AVFoundationGlue::AVFoundationBundle() {
return GetAVFoundationInternal()->bundle();
}
« no previous file with comments | « media/base/mac/avfoundation_glue.h ('k') | media/base/media_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698