Diff
Modified: trunk/PerformanceTests/ChangeLog (264838 => 264839)
--- trunk/PerformanceTests/ChangeLog 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/PerformanceTests/ChangeLog 2020-07-24 17:19:19 UTC (rev 264839)
@@ -1,3 +1,20 @@
+2020-07-24 Jer Noble <[email protected]>
+
+ [Cocoa] Add PerformanceTest tool for measuring raw speed of a video decoder
+ https://bugs.webkit.org/show_bug.cgi?id=214723
+
+ Reviewed by Darin Adler.
+
+ * DecoderTest/Configurations/Base.xcconfig: Added.
+ * DecoderTest/Configurations/DebugRelease.xcconfig: Added.
+ * DecoderTest/Configurations/DecoderTest.xcconfig: Added.
+ * DecoderTest/DecoderTest.xcodeproj/project.pbxproj: Added.
+ * DecoderTest/DecoderTest/main.mm: Added.
+ (Function<void):
+ (main):
+ * DecoderTest/Makefile: Added.
+ * Makefile.shared: Added.
+
2020-07-22 Conrad Shultz <[email protected]>
Update macOS Version macros
Added: trunk/PerformanceTests/DecoderTest/Configurations/Base.xcconfig (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/Configurations/Base.xcconfig (rev 0)
+++ trunk/PerformanceTests/DecoderTest/Configurations/Base.xcconfig 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,166 @@
+// Copyright (C) 2020 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include? "../../../Internal/Configurations/HaveInternalSDK.xcconfig"
+
+CODE_SIGN_IDENTITY = -;
+
+ALWAYS_SEARCH_USER_PATHS = NO;
+
+CLANG_CXX_LANGUAGE_STANDARD = gnu++1z;
+CLANG_CXX_LIBRARY = libc++;
+CLANG_ENABLE_OBJC_WEAK = YES;
+CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+CLANG_WARN_BOOL_CONVERSION = YES;
+CLANG_WARN_COMMA = YES;
+CLANG_WARN_CONSTANT_CONVERSION = YES;
+CLANG_WARN_CXX0X_EXTENSIONS = NO;
+CLANG_WARN_EMPTY_BODY = YES;
+CLANG_WARN_ENUM_CONVERSION = YES;
+CLANG_WARN_INFINITE_RECURSION = YES;
+CLANG_WARN_INT_CONVERSION = YES;
+CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+CLANG_WARN_STRICT_PROTOTYPES = YES;
+CLANG_WARN_SUSPICIOUS_MOVE = YES;
+CLANG_WARN_UNREACHABLE_CODE = YES;
+CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+GCC_WARN_UNDECLARED_SELECTOR = YES;
+CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+COMBINE_HIDPI_IMAGES = NO;
+DEBUG_INFORMATION_FORMAT = dwarf-with-dsym;
+ENABLE_STRICT_OBJC_MSGSEND = YES;
+GCC_C_LANGUAGE_STANDARD = gnu99;
+GCC_DEBUGGING_SYMBOLS = default;
+GCC_DYNAMIC_NO_PIC = NO;
+GCC_ENABLE_CPP_EXCEPTIONS = NO;
+GCC_ENABLE_CPP_RTTI = NO;
+GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+GCC_ENABLE_SYMBOL_SEPARATION = NO;
+GCC_FAST_OBJC_DISPATCH = YES;
+GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+GCC_NO_COMMON_BLOCKS = YES;
+GCC_OBJC_CALL_CXX_CDTORS = YES;
+GCC_PRECOMPILE_PREFIX_HEADER = YES;
+GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+GCC_THREADSAFE_STATICS = NO;
+GCC_TREAT_WARNINGS_AS_ERRORS = YES;
+GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+GCC_WARN_64_TO_32_BIT_CONVERSION[arch=i386] = NO;
+GCC_WARN_64_TO_32_BIT_CONVERSION[arch=armv7k] = NO;
+GCC_WARN_64_TO_32_BIT_CONVERSION[arch=arm64*] = NO;
+GCC_WARN_64_TO_32_BIT_CONVERSION[arch=x86_64] = NO;
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
+GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
+GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
+GCC_WARN_ABOUT_RETURN_TYPE = YES;
+GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
+CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+GCC_WARN_SIGN_COMPARE = YES;
+GCC_WARN_UNINITIALIZED_AUTOS = YES;
+GCC_WARN_UNUSED_FUNCTION = YES;
+GCC_WARN_UNUSED_VARIABLE = YES;
+WARNING_CFLAGS = -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wconditional-uninitialized -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wvla -Wno-unknown-warning-option -Wliteral-conversion;
+
+TARGET_MAC_OS_X_VERSION_MAJOR = $(TARGET_MAC_OS_X_VERSION_MAJOR_$(MACOSX_DEPLOYMENT_TARGET:base)$(MACOSX_DEPLOYMENT_TARGET:suffix:identifier));
+TARGET_MAC_OS_X_VERSION_MAJOR_10_13 = 101300;
+TARGET_MAC_OS_X_VERSION_MAJOR_10_14 = 101400;
+TARGET_MAC_OS_X_VERSION_MAJOR_10_15 = 101500;
+TARGET_MAC_OS_X_VERSION_MAJOR_10_16 = 101600;
+TARGET_MAC_OS_X_VERSION_MAJOR_11_0 = 110000;
+TARGET_MAC_OS_X_VERSION_MAJOR_12_0 = 120000;
+
+WK_TARGET_IOS_VERSION_MAJOR = $(IPHONEOS_DEPLOYMENT_TARGET:base); // e.g. iOS 9.3 => 9
+WK_TARGET_TVOS_VERSION_MAJOR = $(TVOS_DEPLOYMENT_TARGET:base);
+WK_TARGET_WATCHOS_VERSION_MAJOR = $(WATCHOS_DEPLOYMENT_TARGET:base);
+
+SUPPORTED_PLATFORMS = iphoneos iphonesimulator macosx appletvos appletvsimulator watchos watchsimulator;
+SUPPORTS_MACCATALYST = YES;
+
+// DEBUG_DEFINES, GCC_OPTIMIZATION_LEVEL, STRIP_INSTALLED_PRODUCT and DEAD_CODE_STRIPPING vary between the debug and normal variants.
+// We set up the values for each variant here, and have the Debug configuration in the Xcode project use the _debug variant.
+DEBUG_DEFINES_debug = ;
+DEBUG_DEFINES_normal = NDEBUG;
+DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
+
+GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
+GCC_OPTIMIZATION_LEVEL_normal[sdk=iphone*] = 3;
+GCC_OPTIMIZATION_LEVEL_normal[sdk=macosx*] = 2;
+GCC_OPTIMIZATION_LEVEL_debug = 0;
+
+STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT));
+STRIP_INSTALLED_PRODUCT_normal = YES;
+STRIP_INSTALLED_PRODUCT_debug = NO;
+
+DEAD_CODE_STRIPPING_debug = NO;
+DEAD_CODE_STRIPPING_normal = YES;
+DEAD_CODE_STRIPPING = $(DEAD_CODE_STRIPPING_$(CURRENT_VARIANT));
+
+SDKROOT = macosx.internal;
+
+OTHER_CPLUSPLUSFLAGS = $(inherited) -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders;
+
+// This is required to make LLVM_TARGET_TRIPLE_SUFFIX propagate into scripts.
+LLVM_TARGET_TRIPLE_SUFFIX = $(inherited);
+
+WK_COCOA_TOUCH = $(WK_COCOA_TOUCH_$(WK_PLATFORM_NAME));
+WK_COCOA_TOUCH_iphoneos = cocoatouch;
+WK_COCOA_TOUCH_iphonesimulator = cocoatouch;
+WK_COCOA_TOUCH_maccatalyst = cocoatouch;
+WK_COCOA_TOUCH_watchos = cocoatouch;
+WK_COCOA_TOUCH_watchsimulator = cocoatouch;
+WK_COCOA_TOUCH_appletvos = cocoatouch;
+WK_COCOA_TOUCH_appletvsimulator = cocoatouch;
+WK_IS_COCOA_TOUCH = $(WK_NOT_$(WK_EMPTY_$(WK_COCOA_TOUCH)));
+
+LLVM_LTO = $(WK_LLVM_LTO_$(WK_XCODE_SUPPORTS_LTO));
+WK_LLVM_LTO_NO = NO;
+WK_LLVM_LTO_YES = $(WK_USER_LTO_MODE);
+
+WK_XCODE_SUPPORTS_LTO = $(WK_NOT_$(WK_XCODE_VERSION_BEFORE_10_2_$(XCODE_VERSION_MAJOR)));
+WK_XCODE_SUPPORTS_LTO[arch=arm*] = $(WK_NOT_$(WK_XCODE_VERSION_BEFORE_11_4_$(XCODE_VERSION_MAJOR)));
+
+WK_XCODE_VERSION_BEFORE_10_2_0800 = YES;
+WK_XCODE_VERSION_BEFORE_10_2_0900 = YES;
+WK_XCODE_VERSION_BEFORE_10_2_1000 = $(WK_XCODE_VERSION_BEFORE_10_2_1000_$(XCODE_VERSION_MINOR));
+WK_XCODE_VERSION_BEFORE_10_2_1000_1000 = YES;
+WK_XCODE_VERSION_BEFORE_10_2_1000_1010 = YES;
+
+WK_XCODE_VERSION_BEFORE_11_4_0800 = YES;
+WK_XCODE_VERSION_BEFORE_11_4_0900 = YES;
+WK_XCODE_VERSION_BEFORE_11_4_1000 = YES;
+WK_XCODE_VERSION_BEFORE_11_4_1100 = $(WK_XCODE_VERSION_BEFORE_11_4_1100_$(XCODE_VERSION_MINOR));
+WK_XCODE_VERSION_BEFORE_11_4_1100_1100 = YES;
+WK_XCODE_VERSION_BEFORE_11_4_1100_1110 = YES;
+WK_XCODE_VERSION_BEFORE_11_4_1100_1120 = YES;
+WK_XCODE_VERSION_BEFORE_11_4_1100_1130 = YES;
+
+WK_USER_LTO_MODE = $(WK_USER_LTO_MODE_$(WK_LTO_MODE));
+WK_USER_LTO_MODE_full = YES;
+WK_USER_LTO_MODE_thin = YES_THIN;
+WK_USER_LTO_MODE_none = NO;
+WK_USER_LTO_MODE_ = $(WK_DEFAULT_LTO_MODE);
+WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_thin);
Added: trunk/PerformanceTests/DecoderTest/Configurations/DebugRelease.xcconfig (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/Configurations/DebugRelease.xcconfig (rev 0)
+++ trunk/PerformanceTests/DecoderTest/Configurations/DebugRelease.xcconfig 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,52 @@
+// Copyright (C) 2020 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+#include "Base.xcconfig"
+#include? "../../../LocalOverrides.xcconfig"
+
+ARCHS = $(ARCHS_STANDARD_32_64_BIT);
+
+_ONLY_ACTIVE_ARCH_ = YES;
+
+TARGET_MAC_OS_X_VERSION_MAJOR = $(MAC_OS_X_VERSION_MAJOR);
+
+MACOSX_DEPLOYMENT_TARGET = $(MACOSX_DEPLOYMENT_TARGET_$(PLATFORM_NAME)_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+MACOSX_DEPLOYMENT_TARGET_macosx_101300 = 10.13;
+MACOSX_DEPLOYMENT_TARGET_macosx_101400 = 10.14;
+MACOSX_DEPLOYMENT_TARGET_macosx_101500 = 10.15;
+MACOSX_DEPLOYMENT_TARGET_macosx_101600 = 10.16;
+MACOSX_DEPLOYMENT_TARGET_macosx_110000 = 11.0;
+MACOSX_DEPLOYMENT_TARGET_macosx_120000 = 12.0;
+
+GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = YES;
+DEBUG_INFORMATION_FORMAT = dwarf;
+
+SDKROOT = $(SDKROOT_$(USE_INTERNAL_SDK));
+SDKROOT_ = macosx;
+SDKROOT_YES = macosx.internal;
+
+WK_DEFAULT_LTO_MODE = $(WK_USER_LTO_MODE_none);
+
+WK_CCACHE_DIR = $(SRCROOT)/../../Tools/ccache;
+#include "../../../Tools/ccache/ccache.xcconfig"
+
Added: trunk/PerformanceTests/DecoderTest/Configurations/DecoderTest.xcconfig (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/Configurations/DecoderTest.xcconfig (rev 0)
+++ trunk/PerformanceTests/DecoderTest/Configurations/DecoderTest.xcconfig 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,25 @@
+// Copyright (C) 2020 Apple Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+// notice, this list of conditions and the following disclaimer in the
+// documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRODUCT_NAME = DecoderTest
+HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR) "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(HEADER_SEARCH_PATHS) $(SRCROOT);
Added: trunk/PerformanceTests/DecoderTest/DecoderTest/config.h (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/DecoderTest/config.h (rev 0)
+++ trunk/PerformanceTests/DecoderTest/DecoderTest/config.h 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <_javascript_Core/JSExportMacros.h>
+#include <WebCore/PlatformExportMacros.h>
+#include <pal/ExportMacros.h>
+#include <wtf/Platform.h>
Added: trunk/PerformanceTests/DecoderTest/DecoderTest/main.mm (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/DecoderTest/main.mm (rev 0)
+++ trunk/PerformanceTests/DecoderTest/DecoderTest/main.mm 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,211 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#import <CoreMedia/CMBufferQueue.h>
+#import <CoreMedia/CMFormatDescription.h>
+#import <CoreMedia/CMSampleBuffer.h>
+#import <Foundation/Foundation.h>
+#import <WebCore/MediaSample.h>
+#import <WebCore/RuntimeEnabledFeatures.h>
+#import <WebCore/SharedBuffer.h>
+#import <WebCore/SourceBufferParserWebM.h>
+#import <WebCore/VP9UtilitiesCocoa.h>
+#import <WebCore/WebCoreDecompressionSession.h>
+#import <getopt.h>
+#import <webrtc/sdk/WebKit/WebKitVP9Decoder.h>
+#import <wtf/CPUTime.h>
+#import <wtf/MonotonicTime.h>
+#import <wtf/NeverDestroyed.h>
+#import <wtf/WTFSemaphore.h>
+#import <wtf/cf/TypeCastsCF.h>
+
+using namespace WebCore;
+
+static Function<void()>& updateOutputFunction()
+{
+ static NeverDestroyed<Function<void()>> function;
+ return function;
+}
+
+int main(int argc, char* argv[])
+{
+ int enableHardwareDecoder = true;
+ static struct option longopts[] = {
+ { "hardware", no_argument, &enableHardwareDecoder, 1 },
+ { "no-hardware", no_argument, &enableHardwareDecoder, 0 },
+ { NULL, 0, NULL, 0 }
+ };
+
+ auto printUsage = [&] {
+ fprintf(stderr, "Usage: %s [options] <file>\n", argv[0]);
+ fprintf(stderr, "\tOptions:\n"
+ "\t\t--[no-]hardware # Enable or disable the hardware decoder\n"
+ );
+ };
+
+
+ char c;
+ while ((c = getopt_long(argc, argv, ":hn", longopts, NULL)) != -1) {
+ switch (c) {
+ case '0': break;
+ case '?':
+ fprintf(stderr, "Invalid argument -%c.\n", optopt);
+ printUsage();
+ return -1;
+ }
+ };
+
+ if (optind == argc || optind < argc - 1) {
+ printUsage();
+ return -1;
+ }
+
+ String filename = argv[optind];
+
+ @autoreleasepool {
+ WTF::initializeMainThread();
+ webrtc::registerWebKitVP9Decoder();
+ registerSupplementalVP9Decoder();
+ RuntimeEnabledFeatures::sharedFeatures().setWebMParserEnabled(true);
+
+ auto buffer = SharedBuffer::createWithContentsOfFile(filename.utf8().data());
+ if (!buffer) {
+ fprintf(stderr, "Could not read file at \"%s\"\n", filename.utf8().data());
+ return -1;
+ }
+
+ fprintf(stdout, "Parsing \"%s\"...\n", filename.utf8().data());
+
+ SourceBufferParserWebM parser;
+ parser.setDidEncounterErrorDuringParsingCallback([&] (uint64_t errorCode) {
+ fprintf(stderr, "Parser encountered error %llu, exiting", errorCode);
+ exit(-1);
+ });
+
+ CMBufferQueueRef bufferQueue = nullptr;
+ if (noErr != CMBufferQueueCreate(kCFAllocatorDefault, 0, CMBufferQueueGetCallbacksForUnsortedSampleBuffers(), &bufferQueue)) {
+ fprintf(stderr, "Could not create buffer queue, exting");
+ return -1;
+ }
+
+ bool firstSample = true;
+ Optional<CPUTime> startCPUTime;
+ MonotonicTime startTime;
+ uint64_t decodedSamples { 0 };
+
+ updateOutputFunction() = [&] {
+ auto endTime = MonotonicTime::now();
+ auto endCPUTime = CPUTime::get();
+ auto duration = endTime - startTime;
+ float fps = decodedSamples / duration.value();
+
+ fprintf(stdout, "Decoded %llu samples in %g seconds (%g fps)\n", decodedSamples, duration.value(), fps);
+ if (startCPUTime && endCPUTime)
+ fprintf(stdout, "CPU Usage: %g %%\n", endCPUTime->percentageCPUUsageSince(*startCPUTime));
+ };
+
+ struct sigaction action { };
+ action.sa_flags = SA_SIGINFO;
+ action.sa_sigaction = [] (int, siginfo_t*, void*) {
+ if (updateOutputFunction())
+ updateOutputFunction()();
+ };
+ sigaction(SIGINFO, &action, nullptr);
+
+ WTF::Semaphore sampleSemaphore { 0 };
+ parser.setDidProvideMediaDataCallback([&] (Ref<MediaSample>&& sample, uint64_t, const String&) {
+ auto platformSample = sample->platformSample();
+ if (platformSample.type != PlatformSample::CMSampleBufferType)
+ return;
+
+ auto cmSampleBuffer = platformSample.sample.cmSampleBuffer;
+
+ auto formatDescription = CMSampleBufferGetFormatDescription(cmSampleBuffer);
+ if (CMFormatDescriptionGetMediaType(formatDescription) != kCMMediaType_Video)
+ return;
+
+ if (firstSample) {
+ auto size = sample->presentationSize();
+ startTime = MonotonicTime::now();
+ startCPUTime = CPUTime::get();
+ fprintf(stdout, "Size: %g x %g\n", size.width(), size.height());
+ firstSample = false;
+ }
+
+ CMBufferQueueEnqueue(bufferQueue, cmSampleBuffer);
+ sampleSemaphore.signal();
+ });
+
+
+ Semaphore finishedParsingSemaphore { 0 };
+ auto parserQueue = dispatch_queue_create("data parser queue", DISPATCH_QUEUE_CONCURRENT);
+ dispatch_async(parserQueue, [&, buffer = WTFMove(buffer)] {
+ Vector<unsigned char> bytes;
+ bytes.resize(buffer->size());
+ memcpy(bytes.data(), buffer->data(), buffer->size());
+ parser.appendData(WTFMove(bytes));
+ dispatch_async(dispatch_get_main_queue(), [&] {
+ finishedParsingSemaphore.signal();
+ });
+ });
+
+ Semaphore finishedDecodingSemaphore { 0 };
+ auto decoderQueue = dispatch_queue_create("decoder queue", DISPATCH_QUEUE_CONCURRENT);
+ dispatch_async(decoderQueue, [&] {
+ auto decompressionSession = WebCoreDecompressionSession::createOpenGL();
+ decompressionSession->setHardwareDecoderEnabled(enableHardwareDecoder);
+
+ do {
+ sampleSemaphore.wait();
+ if (CMBufferQueueIsEmpty(bufferQueue)) {
+ finishedDecodingSemaphore.signal();
+ return;
+ }
+
+ auto sample = adoptCF((CMSampleBufferRef)(const_cast<void*>(CMBufferQueueDequeueAndRetain(bufferQueue))));
+ decompressionSession->decodeSampleSync(sample.get());
+ ++decodedSamples;
+ } while (true);
+ });
+
+ bool shouldKeepRunning = true;
+ auto monitorQueue = dispatch_queue_create("monitor queue", DISPATCH_QUEUE_CONCURRENT);
+ dispatch_async(monitorQueue, [&] {
+ finishedParsingSemaphore.wait();
+ sampleSemaphore.signal();
+ finishedDecodingSemaphore.wait();
+
+ updateOutputFunction()();
+
+ shouldKeepRunning = false;
+ });
+
+ NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
+ while (shouldKeepRunning && [runLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:1]]) { }
+ }
+ return 0;
+}
Added: trunk/PerformanceTests/DecoderTest/DecoderTest.xcodeproj/project.pbxproj (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/DecoderTest.xcodeproj/project.pbxproj (rev 0)
+++ trunk/PerformanceTests/DecoderTest/DecoderTest.xcodeproj/project.pbxproj 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,220 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 50;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ CD89724C24CA485100AF6621 /* libwebrtc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = CD89724B24CA485100AF6621 /* libwebrtc.dylib */; };
+ CDE0C9BF24CA247A00593A83 /* _javascript_Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */; };
+ CDE0C9C124CA249A00593A83 /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9C024CA249A00593A83 /* WebKit.framework */; };
+ CDE0C9C424CA36CD00593A83 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE0C9C324CA36CD00593A83 /* CoreMedia.framework */; };
+ CDF1350124C9F99900432E1E /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDF1350024C9F99900432E1E /* main.mm */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ CDF134FB24C9F99900432E1E /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ CD89724B24CA485100AF6621 /* libwebrtc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libwebrtc.dylib; path = ../../WebKitBuild/Release/libwebrtc.dylib; sourceTree = "<group>"; };
+ CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = _javascript_Core.framework; path = System/Library/Frameworks/_javascript_Core.framework; sourceTree = SDKROOT; };
+ CDE0C9C024CA249A00593A83 /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; };
+ CDE0C9C324CA36CD00593A83 /* CoreMedia.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMedia.framework; path = System/Library/Frameworks/CoreMedia.framework; sourceTree = SDKROOT; };
+ CDEB7B2624CAC7420015249E /* config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+ CDF134FD24C9F99900432E1E /* DecoderTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = DecoderTest; sourceTree = BUILT_PRODUCTS_DIR; };
+ CDF1350024C9F99900432E1E /* main.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; };
+ CDF1350B24CA02F300432E1E /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
+ CDF1350C24CA034D00432E1E /* DecoderTest.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DecoderTest.xcconfig; sourceTree = "<group>"; };
+ CDF1350D24CA059300432E1E /* DebugRelease.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ CDF134FA24C9F99900432E1E /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CDE0C9C424CA36CD00593A83 /* CoreMedia.framework in Frameworks */,
+ CDE0C9BF24CA247A00593A83 /* _javascript_Core.framework in Frameworks */,
+ CD89724C24CA485100AF6621 /* libwebrtc.dylib in Frameworks */,
+ CDE0C9C124CA249A00593A83 /* WebKit.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ CDE0C9BD24CA247A00593A83 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ CDE0C9C324CA36CD00593A83 /* CoreMedia.framework */,
+ CDE0C9BE24CA247A00593A83 /* _javascript_Core.framework */,
+ CD89724B24CA485100AF6621 /* libwebrtc.dylib */,
+ CDE0C9C024CA249A00593A83 /* WebKit.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ CDF134F424C9F99900432E1E = {
+ isa = PBXGroup;
+ children = (
+ CDF1350A24CA02F300432E1E /* Configurations */,
+ CDF134FF24C9F99900432E1E /* DecoderTest */,
+ CDF134FE24C9F99900432E1E /* Products */,
+ CDE0C9BD24CA247A00593A83 /* Frameworks */,
+ );
+ sourceTree = "<group>";
+ };
+ CDF134FE24C9F99900432E1E /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ CDF134FD24C9F99900432E1E /* DecoderTest */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ CDF134FF24C9F99900432E1E /* DecoderTest */ = {
+ isa = PBXGroup;
+ children = (
+ CDF1350024C9F99900432E1E /* main.mm */,
+ CDEB7B2624CAC7420015249E /* config.h */,
+ );
+ path = DecoderTest;
+ sourceTree = "<group>";
+ };
+ CDF1350A24CA02F300432E1E /* Configurations */ = {
+ isa = PBXGroup;
+ children = (
+ CDF1350B24CA02F300432E1E /* Base.xcconfig */,
+ CDF1350D24CA059300432E1E /* DebugRelease.xcconfig */,
+ CDF1350C24CA034D00432E1E /* DecoderTest.xcconfig */,
+ );
+ path = Configurations;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ CDF134FC24C9F99900432E1E /* DecoderTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = CDF1350424C9F99900432E1E /* Build configuration list for PBXNativeTarget "DecoderTest" */;
+ buildPhases = (
+ CDF134F924C9F99900432E1E /* Sources */,
+ CDF134FA24C9F99900432E1E /* Frameworks */,
+ CDF134FB24C9F99900432E1E /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = DecoderTest;
+ productName = DecoderTest;
+ productReference = CDF134FD24C9F99900432E1E /* DecoderTest */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ CDF134F524C9F99900432E1E /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 1200;
+ TargetAttributes = {
+ CDF134FC24C9F99900432E1E = {
+ CreatedOnToolsVersion = 12.0;
+ };
+ };
+ };
+ buildConfigurationList = CDF134F824C9F99900432E1E /* Build configuration list for PBXProject "DecoderTest" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = CDF134F424C9F99900432E1E;
+ productRefGroup = CDF134FE24C9F99900432E1E /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ CDF134FC24C9F99900432E1E /* DecoderTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ CDF134F924C9F99900432E1E /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CDF1350124C9F99900432E1E /* main.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ CDF1350224C9F99900432E1E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = CDF1350D24CA059300432E1E /* DebugRelease.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ CDF1350324C9F99900432E1E /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = CDF1350D24CA059300432E1E /* DebugRelease.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ CDF1350524C9F99900432E1E /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = CDF1350C24CA034D00432E1E /* DecoderTest.xcconfig */;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ CDF1350624C9F99900432E1E /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = CDF1350C24CA034D00432E1E /* DecoderTest.xcconfig */;
+ buildSettings = {
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ CDF134F824C9F99900432E1E /* Build configuration list for PBXProject "DecoderTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CDF1350224C9F99900432E1E /* Debug */,
+ CDF1350324C9F99900432E1E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ CDF1350424C9F99900432E1E /* Build configuration list for PBXNativeTarget "DecoderTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ CDF1350524C9F99900432E1E /* Debug */,
+ CDF1350624C9F99900432E1E /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = CDF134F524C9F99900432E1E /* Project object */;
+}
Added: trunk/PerformanceTests/DecoderTest/Makefile (0 => 264839)
--- trunk/PerformanceTests/DecoderTest/Makefile (rev 0)
+++ trunk/PerformanceTests/DecoderTest/Makefile 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1 @@
+include ../Makefile.shared
Added: trunk/PerformanceTests/Makefile.shared (0 => 264839)
--- trunk/PerformanceTests/Makefile.shared (rev 0)
+++ trunk/PerformanceTests/Makefile.shared 2020-07-24 17:19:19 UTC (rev 264839)
@@ -0,0 +1,2 @@
+SCRIPTS_PATH ?= ../../Tools/Scripts
+include ../../Makefile.shared
Modified: trunk/Source/WebCore/ChangeLog (264838 => 264839)
--- trunk/Source/WebCore/ChangeLog 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/Source/WebCore/ChangeLog 2020-07-24 17:19:19 UTC (rev 264839)
@@ -1,3 +1,20 @@
+2020-07-24 Jer Noble <[email protected]>
+
+ [Cocoa] Add PerformanceTest tool for measuring raw speed of a video decoder
+ https://bugs.webkit.org/show_bug.cgi?id=214723
+
+ Reviewed by Darin Adler.
+
+ Export classes used by the DecoderTest performance tool. Drive-by fix: allow the
+ clients to enable or disable the hardware decoder for a given decompression session.
+
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/MediaSample.h:
+ * platform/graphics/cocoa/SourceBufferParserWebM.h:
+ * platform/graphics/cocoa/WebCoreDecompressionSession.h:
+ * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
+ (WebCore::WebCoreDecompressionSession::ensureDecompressionSessionForSample):
+
2020-07-24 Youenn Fablet <[email protected]>
Monitor the case of a fetch event not able to register to the respondWith promise
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (264838 => 264839)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-07-24 17:19:19 UTC (rev 264839)
@@ -4132,7 +4132,7 @@
CD5596911475B678001D0BD0 /* AudioFileReaderIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD55968F1475B678001D0BD0 /* AudioFileReaderIOS.cpp */; };
CD5596921475B678001D0BD0 /* AudioFileReaderIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5596901475B678001D0BD0 /* AudioFileReaderIOS.h */; };
CD5896E21CD2B15100B3BCC8 /* WebPlaybackControlsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5896E01CD2B15100B3BCC8 /* WebPlaybackControlsManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
- CD5D27781E8318E000D80A3D /* WebCoreDecompressionSession.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5D27761E8318E000D80A3D /* WebCoreDecompressionSession.h */; };
+ CD5D27781E8318E000D80A3D /* WebCoreDecompressionSession.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5D27761E8318E000D80A3D /* WebCoreDecompressionSession.h */; settings = {ATTRIBUTES = (Private, ); }; };
CD5E5B5F1A15CE54000C609E /* PageConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5E5B5E1A15CE54000C609E /* PageConfiguration.h */; settings = {ATTRIBUTES = (Private, ); }; };
CD5FF4972162E2B7004BD86F /* ISOTrackEncryptionBox.h in Headers */ = {isa = PBXBuildFile; fileRef = CD871C661FB52B6800F0B965 /* ISOTrackEncryptionBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
CD5FF4992162E2BE004BD86F /* ISOBox.h in Headers */ = {isa = PBXBuildFile; fileRef = CD871C621FB52B6500F0B965 /* ISOBox.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -4213,7 +4213,7 @@
CDC8B5A7180474F70016E685 /* MediaSourcePrivateAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5A5180474F70016E685 /* MediaSourcePrivateAVFObjC.h */; };
CDC8B5AA18047FF10016E685 /* SourceBufferPrivateAVFObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC8B5A818047FF10016E685 /* SourceBufferPrivateAVFObjC.mm */; };
CDC8B5AB18047FF10016E685 /* SourceBufferPrivateAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */; };
- CDC8B5AD1804AE5D0016E685 /* SourceBufferPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */; };
+ CDC8B5AD1804AE5D0016E685 /* SourceBufferPrivateClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC8B5AC1804AE5D0016E685 /* SourceBufferPrivateClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
CDC939A81E9BDFB100BB768D /* VideoToolboxSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC939A61E9BDFB100BB768D /* VideoToolboxSoftLink.h */; };
CDC979F51C498C0900DB50D4 /* WebCoreNSErrorExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC979F31C498C0900DB50D4 /* WebCoreNSErrorExtras.h */; };
CDCA98EB18B2C8EB00C12FF9 /* LegacyCDMPrivateMediaPlayer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDCA98EA18B2C8EB00C12FF9 /* LegacyCDMPrivateMediaPlayer.cpp */; };
@@ -4246,7 +4246,9 @@
CDECA89B1EDF447D00DCB08B /* AVAssetTrackUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = CDECA8991EDF447D00DCB08B /* AVAssetTrackUtilities.h */; };
CDEF4FD717E85C8F00AEE24B /* GridLength.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEF4FD617E85C8F00AEE24B /* GridLength.h */; settings = {ATTRIBUTES = (Private, ); }; };
CDEFA2281E7669E8000AE99C /* PlatformAudioData.h in Headers */ = {isa = PBXBuildFile; fileRef = CDE667A11E4BBA4D00E8154A /* PlatformAudioData.h */; settings = {ATTRIBUTES = (Private, ); }; };
- CDF2B004181F059C00F2B424 /* MediaDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF2B003181F059C00F2B424 /* MediaDescription.h */; };
+ CDF1350824C9FA4400432E1E /* SourceBufferParserWebM.h in Headers */ = {isa = PBXBuildFile; fileRef = CD8F667224C0F208000C421C /* SourceBufferParserWebM.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ CDF1350924C9FCA300432E1E /* SourceBufferParser.h in Headers */ = {isa = PBXBuildFile; fileRef = CDEB3D7324C41A6E001FBEEF /* SourceBufferParser.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ CDF2B004181F059C00F2B424 /* MediaDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF2B003181F059C00F2B424 /* MediaDescription.h */; settings = {ATTRIBUTES = (Private, ); }; };
CDF2B0101820540600F2B424 /* MockBox.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDF2B0061820540600F2B424 /* MockBox.cpp */; };
CDF2B0111820540600F2B424 /* MockBox.h in Headers */ = {isa = PBXBuildFile; fileRef = CDF2B0071820540600F2B424 /* MockBox.h */; };
CDF2B0121820540600F2B424 /* MockMediaPlayerMediaSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDF2B0081820540600F2B424 /* MockMediaPlayerMediaSource.cpp */; };
@@ -33315,6 +33317,8 @@
84A81F3E0FC7DFF000955300 /* SourceAlpha.h in Headers */,
CD3A496217A9D01B00274E42 /* SourceBuffer.h in Headers */,
CD3A496517A9D01B00274E42 /* SourceBufferList.h in Headers */,
+ CDF1350924C9FCA300432E1E /* SourceBufferParser.h in Headers */,
+ CDF1350824C9FA4400432E1E /* SourceBufferParserWebM.h in Headers */,
CD641EB41818F5ED00EE4C41 /* SourceBufferPrivate.h in Headers */,
CDC8B5AB18047FF10016E685 /* SourceBufferPrivateAVFObjC.h in Headers */,
CDC8B5AD1804AE5D0016E685 /* SourceBufferPrivateClient.h in Headers */,
Modified: trunk/Source/WebCore/platform/MediaSample.h (264838 => 264839)
--- trunk/Source/WebCore/platform/MediaSample.h 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/Source/WebCore/platform/MediaSample.h 2020-07-24 17:19:19 UTC (rev 264839)
@@ -54,7 +54,7 @@
} sample;
};
-class MediaSample : public ThreadSafeRefCounted<MediaSample> {
+class WEBCORE_EXPORT MediaSample : public ThreadSafeRefCounted<MediaSample> {
public:
virtual ~MediaSample() = default;
Modified: trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h (264838 => 264839)
--- trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.h 2020-07-24 17:19:19 UTC (rev 264839)
@@ -34,6 +34,7 @@
#include <wtf/Deque.h>
#include <wtf/Function.h>
#include <wtf/MediaTime.h>
+#include <wtf/UniqueRef.h>
#include <wtf/Variant.h>
#include <wtf/Vector.h>
#include <wtf/text/AtomString.h>
@@ -49,7 +50,7 @@
namespace WebCore {
-class SourceBufferParserWebM : public SourceBufferParser, private webm::Callback {
+class WEBCORE_EXPORT SourceBufferParserWebM : public SourceBufferParser, private webm::Callback {
WTF_MAKE_FAST_ALLOCATED;
public:
static MediaPlayerEnums::SupportsType isContentTypeSupported(const ContentType&);
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h (264838 => 264839)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.h 2020-07-24 17:19:19 UTC (rev 264839)
@@ -46,7 +46,7 @@
namespace WebCore {
-class WebCoreDecompressionSession : public ThreadSafeRefCounted<WebCoreDecompressionSession> {
+class WEBCORE_EXPORT WebCoreDecompressionSession : public ThreadSafeRefCounted<WebCoreDecompressionSession> {
public:
static Ref<WebCoreDecompressionSession> createOpenGL() { return adoptRef(*new WebCoreDecompressionSession(OpenGL)); }
static Ref<WebCoreDecompressionSession> createRGB() { return adoptRef(*new WebCoreDecompressionSession(RGB)); }
@@ -74,6 +74,9 @@
unsigned corruptedVideoFrames() const { return m_corruptedVideoFrames; }
MediaTime totalFrameDelay() const { return m_totalFrameDelay; }
+ bool hardwareDecoderEnabled() const { return m_hardwareDecoderEnabled; }
+ void setHardwareDecoderEnabled(bool enabled) { m_hardwareDecoderEnabled = enabled; }
+
private:
enum Mode {
OpenGL,
@@ -122,6 +125,7 @@
double m_decodeRatioMovingAverage { 0 };
bool m_invalidated { false };
+ bool m_hardwareDecoderEnabled { true };
int m_framesBeingDecoded { 0 };
unsigned m_totalVideoFrames { 0 };
unsigned m_droppedVideoFrames { 0 };
Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm (264838 => 264839)
--- trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm 2020-07-24 17:18:20 UTC (rev 264838)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm 2020-07-24 17:19:19 UTC (rev 264839)
@@ -214,7 +214,7 @@
if (!m_decompressionSession) {
CMVideoFormatDescriptionRef videoFormatDescription = CMSampleBufferGetFormatDescription(sample);
- auto videoDecoderSpecification = @{ (__bridge NSString *)kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder: @YES };
+ auto videoDecoderSpecification = @{ (__bridge NSString *)kVTVideoDecoderSpecification_EnableHardwareAcceleratedVideoDecoder: @( m_hardwareDecoderEnabled ) };
NSDictionary *attributes;
if (m_mode == OpenGL)