Commit 58427df2 authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Remove macOS beta SDK workarounds for hardware VP9 decoding.

Now that we're building with the official SDK these aren't needed
anymore.

Bug: 1105187, 1115294
Test: Bots are okay, manually confirmed VP9 hardware decoding on Big Sur.
Change-Id: I9d190989a23266a5615cb149b4a958ad46d39611
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2545880
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#828573}
parent 321bfa35
......@@ -64,14 +64,4 @@
//
// ----------------------------------------------------------------------------
#if !defined(MAC_OS_VERSION_11_0)
#include <CoreMedia/CoreMedia.h>
enum : CMVideoCodecType { kCMVideoCodecType_VP9 = 'vp09' };
extern "C" {
void VTRegisterSupplementalVideoDecoderIfAvailable(CMVideoCodecType codecType);
}
#endif // MAC_OS_VERSION_11_0
#endif // BASE_MAC_SDK_FORWARD_DECLARATIONS_H_
......@@ -6,19 +6,12 @@ import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//media/gpu/args.gni")
import("//media/media_options.gni")
import("//tools/generate_stubs/rules.gni")
import("//ui/gl/features.gni")
assert(is_mac)
import("//build/config/mac/mac_sdk.gni")
generate_stubs("vt_beta_stubs") {
extra_header = "vt_beta_stubs_header.fragment"
sigs = [ "vt_beta.sig" ]
output_name = "vt_beta_stubs"
}
source_set("mac") {
defines = [ "MEDIA_GPU_IMPLEMENTATION" ]
visibility = [ "//media/gpu" ]
......@@ -43,7 +36,6 @@ source_set("mac") {
"VideoToolbox.framework",
]
deps = [
":vt_beta_stubs",
"//base",
"//components/crash/core/common:crash_key",
"//gpu/command_buffer/service:gles2",
......
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MEDIA_GPU_MAC_VT_BETA_H_
#define MEDIA_GPU_MAC_VT_BETA_H_
// Dynamic library loader.
#include "media/gpu/mac/vt_beta_stubs.h"
// CoreMedia and VideoToolbox types.
#include "media/gpu/mac/vt_beta_stubs_header.fragment"
// CoreMedia and VideoToolbox functions.
extern "C" {
#include "media/gpu/mac/vt_beta.sig"
} // extern "C"
#endif // MEDIA_GPU_MAC_VT_BETA_H_
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This function isn't available until we're using the macOS 11.0 SDK.
void VTRegisterSupplementalVideoDecoderIfAvailable(CMVideoCodecType codecType);
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <CoreMedia/CoreMedia.h>
......@@ -46,7 +46,6 @@
#include "media/base/media_switches.h"
#include "media/filters/vp9_parser.h"
#include "media/gpu/mac/vp9_super_frame_bitstream_filter.h"
#include "media/gpu/mac/vt_beta_stubs.h"
#include "media/gpu/mac/vt_config_util.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gl/gl_context.h"
......@@ -318,20 +317,8 @@ bool InitializeVideoToolboxInternal() {
session.reset();
if (base::mac::IsAtLeastOS11()) {
// Until our target sdk version is 11.0 we need to dynamically link the
// VTRegisterSupplementalVideoDecoderIfAvailable() symbol in.
media_gpu_mac::StubPathMap paths;
paths[media_gpu_mac::kModuleVt_beta].push_back(FILE_PATH_LITERAL(
"/System/Library/Frameworks/VideoToolbox.framework/VideoToolbox"));
if (!media_gpu_mac::InitializeStubs(paths))
return true; // VP9 support is optional.
// __builtin_available doesn't work for 11.0 yet; https://crbug.com/1115294
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunguarded-availability-new"
if (__builtin_available(macOS 11.0, *)) {
VTRegisterSupplementalVideoDecoderIfAvailable(kCMVideoCodecType_VP9);
#pragma clang diagnostic pop
// Create a VP9 decoding session.
if (!CreateVideoToolboxSession(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment