⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 271214 in webkit


Ignore:
Timestamp:
Jan 6, 2021, 2:36:06 PM (6 years ago)
Author:
aestes@apple.com
Message:

[Mac] Replace most uses of HAVE(MT_PLUGIN_FORMAT_READER) with ENABLE(WEBM_FORMAT_READER)
https://bugs.webkit.org/show_bug.cgi?id=220374
<rdar://problem/72600426>

Reviewed by Eric Carlson.

Source/WebCore:

  • page/RuntimeEnabledFeatures.h:
  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::webMFormatReaderEnabled):
(WebCore::PlatformMediaSessionManager::setWebMFormatReaderEnabled):

  • platform/audio/PlatformMediaSessionManager.h:
  • platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:

(WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):
(WebCore::AVAssetMIMETypeCache::initializeCache):

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:

(WebCore::registerFormatReaderIfNecessary):
(WebCore::willUseWebMFormatReaderForType):

  • platform/graphics/cocoa/SourceBufferParserWebM.cpp:

(WebCore::canLoadFormatReader):

Source/WebKit:

  • Shared/API/c/mac/WKFormatReader.cpp:

(WKFormatReaderCreate):
(WKFormatReaderStartOnMainThread):

  • Shared/WebPreferencesDefaultValues.cpp:
  • Shared/WebPreferencesDefaultValues.h:
  • Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp:
  • Shared/mac/MediaFormatReader/CoreMediaWrapped.h:
  • Shared/mac/MediaFormatReader/FormatReader.cpp:
  • Shared/mac/MediaFormatReader/FormatReader.h:
  • Shared/mac/MediaFormatReader/SampleCursor.cpp:
  • Shared/mac/MediaFormatReader/SampleCursor.h:
  • Shared/mac/MediaFormatReader/TrackReader.cpp:
  • Shared/mac/MediaFormatReader/TrackReader.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

Source/WTF:

  • Scripts/Preferences/WebPreferencesExperimental.yaml:
  • wtf/PlatformEnableCocoa.h:
Location:
trunk/Source
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r271192 r271214  
     12021-01-06  Andy Estes  <aestes@apple.com>
     2
     3        [Mac] Replace most uses of HAVE(MT_PLUGIN_FORMAT_READER) with ENABLE(WEBM_FORMAT_READER)
     4        https://bugs.webkit.org/show_bug.cgi?id=220374
     5        <rdar://problem/72600426>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * Scripts/Preferences/WebPreferencesExperimental.yaml:
     10        * wtf/PlatformEnableCocoa.h:
     11
    1122021-01-05  Kate Cheney  <katherine_cheney@apple.com>
    213
  • trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

    r270854 r271214  
    10031003  humanReadableName: "WebM format reader"
    10041004  humanReadableDescription: "Enable MediaToolbox format reader plug-in for WebM"
    1005   condition: ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     1005  condition: ENABLE(WEBM_FORMAT_READER)
    10061006  defaultValue:
    10071007    WebKit:
  • trunk/Source/WTF/wtf/PlatformEnableCocoa.h

    r270722 r271214  
    638638#define ENABLE_SET_WEBCONTENT_PROCESS_INFORMATION_IN_NETWORK_PROCESS 1
    639639#endif
     640
     641#if !defined(ENABLE_WEBM_FORMAT_READER) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 110300
     642#define ENABLE_WEBM_FORMAT_READER 1
     643#endif
  • trunk/Source/WebCore/ChangeLog

    r271210 r271214  
     12021-01-06  Andy Estes  <aestes@apple.com>
     2
     3        [Mac] Replace most uses of HAVE(MT_PLUGIN_FORMAT_READER) with ENABLE(WEBM_FORMAT_READER)
     4        https://bugs.webkit.org/show_bug.cgi?id=220374
     5        <rdar://problem/72600426>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * page/RuntimeEnabledFeatures.h:
     10        * platform/audio/PlatformMediaSessionManager.cpp:
     11        (WebCore::PlatformMediaSessionManager::webMFormatReaderEnabled):
     12        (WebCore::PlatformMediaSessionManager::setWebMFormatReaderEnabled):
     13        * platform/audio/PlatformMediaSessionManager.h:
     14        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
     15        (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):
     16        (WebCore::AVAssetMIMETypeCache::initializeCache):
     17        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
     18        (WebCore::registerFormatReaderIfNecessary):
     19        (WebCore::willUseWebMFormatReaderForType):
     20        * platform/graphics/cocoa/SourceBufferParserWebM.cpp:
     21        (WebCore::canLoadFormatReader):
     22
    1232021-01-06  Zalan Bujtas  <zalan@apple.com>
    224
  • trunk/Source/WebCore/page/RuntimeEnabledFeatures.h

    r270758 r271214  
    246246#endif
    247247   
    248 #if HAVE(MT_PLUGIN_FORMAT_READER)
     248#if ENABLE(WEBM_FORMAT_READER)
    249249    void setWebMFormatReaderEnabled(bool isEnabled) { m_webMFormatReaderEnabled = isEnabled; }
    250250    bool webMFormatReaderEnabled() const { return m_webMFormatReaderEnabled; }
     
    393393#endif
    394394
    395 #if HAVE(MT_PLUGIN_FORMAT_READER)
     395#if ENABLE(WEBM_FORMAT_READER)
    396396    bool m_webMFormatReaderEnabled { false };
    397397#endif
  • trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.cpp

    r271194 r271214  
    3636#if ENABLE(VIDEO) || ENABLE(WEB_AUDIO)
    3737
    38 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     38#if ENABLE(WEBM_FORMAT_READER)
    3939bool PlatformMediaSessionManager::m_webMFormatReaderEnabled;
    4040#endif
     
    621621bool PlatformMediaSessionManager::webMFormatReaderEnabled()
    622622{
    623 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     623#if ENABLE(WEBM_FORMAT_READER)
    624624    return m_webMFormatReaderEnabled;
    625625#else
     
    630630void PlatformMediaSessionManager::setWebMFormatReaderEnabled(bool enabled)
    631631{
    632 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     632#if ENABLE(WEBM_FORMAT_READER)
    633633    m_webMFormatReaderEnabled = enabled;
    634634#else
  • trunk/Source/WebCore/platform/audio/PlatformMediaSessionManager.h

    r271194 r271214  
    207207    GenericTaskQueue<Timer> updateSessionStateQueue;
    208208
    209 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     209#if ENABLE(WEBM_FORMAT_READER)
    210210    static bool m_webMFormatReaderEnabled;
    211211#endif
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm

    r271194 r271214  
    6868        return true;
    6969
    70 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     70#if ENABLE(WEBM_FORMAT_READER)
    7171    if (SourceBufferParserWebM::isContentTypeSupported(type) == MediaPlayerEnums::SupportsType::IsSupported)
    7272        return true;
     
    157157        cache.add(type);
    158158
    159 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     159#if ENABLE(WEBM_FORMAT_READER)
    160160    if (SourceBufferParserWebM::isWebMFormatReaderAvailable()) {
    161161        auto webmTypes = SourceBufferParserWebM::webmMIMETypes();
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm

    r271194 r271214  
    271271static void registerFormatReaderIfNecessary()
    272272{
    273 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     273#if ENABLE(WEBM_FORMAT_READER)
    274274    static dispatch_once_t onceToken;
    275275    dispatch_once(&onceToken, ^{
     
    807807static bool willUseWebMFormatReaderForType(const String& type)
    808808{
    809 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     809#if ENABLE(WEBM_FORMAT_READER)
    810810    if (!SourceBufferParserWebM::isWebMFormatReaderAvailable())
    811811        return false;
  • trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp

    r271194 r271214  
    467467static bool canLoadFormatReader()
    468468{
    469 #if !HAVE(MT_PLUGIN_FORMAT_READER)
     469#if !ENABLE(WEBM_FORMAT_READER)
    470470    return false;
    471471#elif USE(APPLE_INTERNAL_SDK)
  • trunk/Source/WebKit/ChangeLog

    r271213 r271214  
     12021-01-06  Andy Estes  <aestes@apple.com>
     2
     3        [Mac] Replace most uses of HAVE(MT_PLUGIN_FORMAT_READER) with ENABLE(WEBM_FORMAT_READER)
     4        https://bugs.webkit.org/show_bug.cgi?id=220374
     5        <rdar://problem/72600426>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * Shared/API/c/mac/WKFormatReader.cpp:
     10        (WKFormatReaderCreate):
     11        (WKFormatReaderStartOnMainThread):
     12        * Shared/WebPreferencesDefaultValues.cpp:
     13        * Shared/WebPreferencesDefaultValues.h:
     14        * Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp:
     15        * Shared/mac/MediaFormatReader/CoreMediaWrapped.h:
     16        * Shared/mac/MediaFormatReader/FormatReader.cpp:
     17        * Shared/mac/MediaFormatReader/FormatReader.h:
     18        * Shared/mac/MediaFormatReader/SampleCursor.cpp:
     19        * Shared/mac/MediaFormatReader/SampleCursor.h:
     20        * Shared/mac/MediaFormatReader/TrackReader.cpp:
     21        * Shared/mac/MediaFormatReader/TrackReader.h:
     22        * WebProcess/WebPage/WebPage.cpp:
     23        (WebKit::WebPage::updatePreferences):
     24        * WebProcess/cocoa/WebProcessCocoa.mm:
     25        (WebKit::WebProcess::platformInitializeWebProcess):
     26
    1272021-01-06  Chris Dumez  <cdumez@apple.com>
    228
  • trunk/Source/WebKit/Shared/API/c/mac/WKFormatReader.cpp

    r270758 r271214  
    3333OSStatus WKFormatReaderCreate(CFAllocatorRef allocator, MTPluginFormatReaderRef* formatReaderRef)
    3434{
    35 #if HAVE(MT_PLUGIN_FORMAT_READER)
     35#if ENABLE(WEBM_FORMAT_READER)
    3636    auto formatReader = WebKit::FormatReader::create(allocator);
    3737    if (!formatReader)
     
    4848OSStatus WKFormatReaderStartOnMainThread(MTPluginFormatReaderRef formatReaderRef, MTPluginByteSourceRef byteSource)
    4949{
    50 #if HAVE(MT_PLUGIN_FORMAT_READER)
     50#if ENABLE(WEBM_FORMAT_READER)
    5151    auto formatReader = WebKit::FormatReader::unwrap(formatReaderRef);
    5252    if (!formatReader)
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp

    r270974 r271214  
    274274#endif // ENABLE(WEBXR)
    275275
    276 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     276#if ENABLE(WEBM_FORMAT_READER)
    277277
    278278bool defaultWebMFormatReaderEnabled()
     
    285285}
    286286
    287 #endif
     287#endif // ENABLE(WEBM_FORMAT_READER)
    288288
    289289#if ENABLE(VP9)
  • trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.h

    r270974 r271214  
    103103#endif
    104104
    105 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     105#if ENABLE(WEBM_FORMAT_READER)
    106106bool defaultWebMFormatReaderEnabled();
    107107#endif
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/CoreMediaWrapped.cpp

    r270758 r271214  
    2727#include "CoreMediaWrapped.h"
    2828
    29 #if HAVE(MT_PLUGIN_FORMAT_READER)
     29#if ENABLE(WEBM_FORMAT_READER)
    3030
    3131#include <pal/cf/CoreMediaSoftLink.h>
     
    5050} // namespace WebKit
    5151
    52 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     52#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/CoreMediaWrapped.h

    r270760 r271214  
    2626#pragma once
    2727
    28 #if HAVE(MT_PLUGIN_FORMAT_READER)
     28#if ENABLE(WEBM_FORMAT_READER)
    2929
    3030#include <pal/spi/cocoa/MediaToolboxSPI.h>
     
    156156} // namespace WebKit
    157157
    158 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     158#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/FormatReader.cpp

    r271194 r271214  
    2727#include "FormatReader.h"
    2828
    29 #if HAVE(MT_PLUGIN_FORMAT_READER)
     29#if ENABLE(WEBM_FORMAT_READER)
    3030
    3131#include "TrackReader.h"
     
    237237} // namespace WebKit
    238238
    239 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     239#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/FormatReader.h

    r270758 r271214  
    2626#pragma once
    2727
    28 #if HAVE(MT_PLUGIN_FORMAT_READER)
     28#if ENABLE(WEBM_FORMAT_READER)
    2929
    3030#include "CoreMediaWrapped.h"
     
    9393} // namespace WebKit
    9494
    95 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     95#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/SampleCursor.cpp

    r270758 r271214  
    2727#include "SampleCursor.h"
    2828
    29 #if HAVE(MT_PLUGIN_FORMAT_READER)
     29#if ENABLE(WEBM_FORMAT_READER)
    3030
    3131#include "TrackReader.h"
     
    366366} // namespace WebKit
    367367
    368 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     368#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/SampleCursor.h

    r270761 r271214  
    2626#pragma once
    2727
    28 #if HAVE(MT_PLUGIN_FORMAT_READER)
     28#if ENABLE(WEBM_FORMAT_READER)
    2929
    3030#include "CoreMediaWrapped.h"
     
    149149} // namespace WebKit
    150150
    151 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     151#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/TrackReader.cpp

    r271194 r271214  
    2727#include "TrackReader.h"
    2828
    29 #if HAVE(MT_PLUGIN_FORMAT_READER)
     29#if ENABLE(WEBM_FORMAT_READER)
    3030
    3131#include "FormatReader.h"
     
    289289} // namespace WebKit
    290290
    291 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     291#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/Shared/mac/MediaFormatReader/TrackReader.h

    r271194 r271214  
    2626#pragma once
    2727
    28 #if HAVE(MT_PLUGIN_FORMAT_READER)
     28#if ENABLE(WEBM_FORMAT_READER)
    2929
    3030#include "CoreMediaWrapped.h"
     
    123123} // namespace WebKit
    124124
    125 #endif // HAVE(MT_PLUGIN_FORMAT_READER)
     125#endif // ENABLE(WEBM_FORMAT_READER)
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r271206 r271214  
    38403840#endif
    38413841
    3842 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     3842#if ENABLE(WEBM_FORMAT_READER)
    38433843    PlatformMediaSessionManager::setWebMFormatReaderEnabled(RuntimeEnabledFeatures::sharedFeatures().webMFormatReaderEnabled());
    38443844#endif
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r271194 r271214  
    331331#endif
    332332
    333 #if ENABLE(MEDIA_SOURCE) && HAVE(MT_PLUGIN_FORMAT_READER)
     333#if ENABLE(WEBM_FORMAT_READER)
    334334    PlatformMediaSessionManager::setWebMFormatReaderEnabled(RuntimeEnabledFeatures::sharedFeatures().webMFormatReaderEnabled());
    335335#endif
Note: See TracChangeset for help on using the changeset viewer.