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

Changeset 273730 in webkit


Ignore:
Timestamp:
Mar 2, 2021, 7:37:23 AM (6 years ago)
Author:
youenn@apple.com
Message:

Enable MEDIA_SOURCE in IOS Simulator
​https://bugs.webkit.org/show_bug.cgi?id=222041
Source/WebCore:

<rdar://problem/74433510>

Reviewed by Eric Carlson.

MediaSource IDLs were protected by MEDIA_SOURCE but not by MediaSource runtime flag.
Update IDLs accordingly.

Covered by existing tests.

  • Modules/mediasource/AudioTrack+MediaSource.idl:
  • Modules/mediasource/DOMURL+MediaSource.idl:
  • Modules/mediasource/SourceBuffer.idl:
  • Modules/mediasource/SourceBufferList.idl:
  • Modules/mediasource/TextTrack+MediaSource.idl:
  • Modules/mediasource/VideoTrack+MediaSource.idl:
  • bindings/js/WebCoreBuiltinNames.h:
  • html/HTMLMediaElement.idl:

Minor change to kick in binding generator.

  • html/track/AudioTrack.idl:
  • html/track/TextTrack.idl:
  • html/track/VideoTrack.idl:
  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::mediaEngine):
If AVStreamDataParser is not available, MSE backend will not be available.
Update assertion accordingly.

Source/WebCore/PAL:

Reviewed by Eric Carlson.

Add missing header declarations in AVStreamDataParserSPI.h and use it for simulator.

  • PAL.xcodeproj/project.pbxproj:
  • pal/spi/cocoa/AVFoundationSPI.h:
  • pal/spi/cocoa/AVStreamDataParserSPI.h: Added.

Source/WTF:

Reviewed by Eric Carlson.

  • Scripts/Preferences/WebPreferences.yaml:

Move this settings out of ENABLE(MEDIA_SOURCE) to allow existing binding code to compile.

  • wtf/PlatformEnableCocoa.h:

Tools:

<rdar://problem/74433510>

Reviewed by Eric Carlson.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetPreferencesToConsistentValues):
Disable MediaSource runtime flag on simulator since it lacks implementation of AVStreamDataParser.

LayoutTests:

Reviewed by Eric Carlson.

  • fast/mediastream/MediaStream-video-element.html:

Update to sort properties lexicographically.

  • fast/mediastream/MediaStream-video-element-expected.txt:
Location:
trunk
Files:
1 added
24 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r273727 r273730  
     12021-03-02  Youenn Fablet  <youenn@apple.com>
     2
     3        Enable MEDIA_SOURCE in IOS Simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=222041
     5
     6        Reviewed by Eric Carlson.
     7
     8        * fast/mediastream/MediaStream-video-element.html:
     9        Update to sort properties lexicographically.
     10        * fast/mediastream/MediaStream-video-element-expected.txt:
     11
    1122021-03-02  Rob Buis  <rbuis@igalia.com>
    213
  • trunk/LayoutTests/fast/mediastream/MediaStream-video-element-expected.txt

    r267644 r273730  
    3232
    3333video.videoTracks[0] properties:
    34   track.id = <UUID>
    35   track.kind = main
    36   track.label = Mock video device 1
    37   track.language =
    38   track.selected = true
     34  id = <UUID>
     35  kind = main
     36  label = Mock video device 1
     37  language =
     38  selected = true
    3939
    4040**** check audio tracks ****
    … …  
    4545
    4646video.audioTracks[0] properties:
    47   track.id = <UUID>
    48   track.kind = main
    49   track.label = Mock audio device 1
    50   track.language =
    51   track.enabled = true
     47  enabled = true
     48  id = <UUID>
     49  kind = main
     50  label = Mock audio device 1
     51  language =
    5252
    5353PASS successfullyParsed is true
  • trunk/LayoutTests/fast/mediastream/MediaStream-video-element.html

    r258255 r273730  
    4545            function checkElementTrack(track)
    4646            {
     47                let properties = [];
    4748                enumerateProperties(track, function(property, value) {
    4849                     if (property == "sourceBuffer")
    … …  
    5051                     if (property == "id")
    5152                        value = "&lt;UUID>";
    52                     debug(`  track.${property} = ${value}`);
     53                     properties.push({property:property, value:value});
    5354                });
     55                properties.sort((a, b) => { return a.property.localeCompare(b.property); });
     56                properties.forEach(item => debug(`  ${item.property} = ${item.value}`));
    5457            }
    5558
  • trunk/Source/WTF/ChangeLog

    r273700 r273730  
     12021-03-02  Youenn Fablet  <youenn@apple.com>
     2
     3        Enable MEDIA_SOURCE in IOS Simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=222041
     5
     6        Reviewed by Eric Carlson.
     7
     8        * Scripts/Preferences/WebPreferences.yaml:
     9        Move this settings out of ENABLE(MEDIA_SOURCE) to allow existing binding code to compile.
     10        * wtf/PlatformEnableCocoa.h:
     11
    1122021-03-01  Truitt Savell  <tsavell@apple.com>
    213
  • trunk/Source/WTF/Scripts/Preferences/WebPreferences.yaml

    r272987 r273730  
    14231423MediaSourceEnabled:
    14241424  type: bool
    1425   condition: ENABLE(MEDIA_SOURCE)
    14261425  defaultValue:
    14271426    WebKitLegacy:
  • trunk/Source/WTF/wtf/PlatformEnableCocoa.h

    r273657 r273730  
    329329#endif
    330330
    331 #if !defined(ENABLE_MEDIA_SOURCE) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR)
     331#if !defined(ENABLE_MEDIA_SOURCE) && !PLATFORM(MACCATALYST) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV)
    332332#define ENABLE_MEDIA_SOURCE 1
    333333#endif
  • trunk/Source/WebCore/ChangeLog

    r273728 r273730  
     12021-03-02  Youenn Fablet  <youenn@apple.com>
     2
     3        Enable MEDIA_SOURCE in IOS Simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=222041
     5        <rdar://problem/74433510>
     6
     7        Reviewed by Eric Carlson.
     8
     9        MediaSource IDLs were protected by MEDIA_SOURCE but not by MediaSource runtime flag.
     10        Update IDLs accordingly.
     11
     12        Covered by existing tests.
     13
     14        * Modules/mediasource/AudioTrack+MediaSource.idl:
     15        * Modules/mediasource/DOMURL+MediaSource.idl:
     16        * Modules/mediasource/SourceBuffer.idl:
     17        * Modules/mediasource/SourceBufferList.idl:
     18        * Modules/mediasource/TextTrack+MediaSource.idl:
     19        * Modules/mediasource/VideoTrack+MediaSource.idl:
     20        * bindings/js/WebCoreBuiltinNames.h:
     21        * html/HTMLMediaElement.idl:
     22        Minor change to kick in binding generator.
     23        * html/track/AudioTrack.idl:
     24        * html/track/TextTrack.idl:
     25        * html/track/VideoTrack.idl:
     26        * platform/graphics/MediaPlayer.cpp:
     27        (WebCore::MediaPlayer::mediaEngine):
     28        If AVStreamDataParser is not available, MSE backend will not be available.
     29        Update assertion accordingly.
     30
    1312021-03-02  Zalan Bujtas  <zalan@apple.com>
    232
  • trunk/Source/WebCore/Modules/mediasource/AudioTrack+MediaSource.idl

    r267449 r273730  
    2727[
    2828    Conditional=MEDIA_SOURCE,
     29    EnabledBySetting=MediaSource,
    2930    ImplementedBy=AudioTrackMediaSource
    3031] partial interface AudioTrack {
  • trunk/Source/WebCore/Modules/mediasource/DOMURL+MediaSource.idl

    r267449 r273730  
    3333[
    3434    Conditional=MEDIA_SOURCE,
     35    EnabledBySetting=MediaSource,
    3536    ImplementedBy=DOMURLMediaSource
    3637] partial interface DOMURL {
  • trunk/Source/WebCore/Modules/mediasource/SourceBuffer.idl

    r267813 r273730  
    3737    ActiveDOMObject,
    3838    Conditional=MEDIA_SOURCE,
     39    EnabledBySetting=MediaSource,
    3940    ExportMacro=WEBCORE_EXPORT,
    4041    Exposed=Window
  • trunk/Source/WebCore/Modules/mediasource/SourceBufferList.idl

    r267813 r273730  
    3333    Conditional=MEDIA_SOURCE,
    3434    GenerateIsReachable=Impl,
     35    EnabledBySetting=MediaSource,
    3536    Exposed=Window
    3637] interface SourceBufferList : EventTarget {
  • trunk/Source/WebCore/Modules/mediasource/TextTrack+MediaSource.idl

    r267449 r273730  
    2727[
    2828    Conditional=MEDIA_SOURCE,
     29    EnabledBySetting=MediaSource,
    2930    ImplementedBy=TextTrackMediaSource
    3031] partial interface TextTrack {
  • trunk/Source/WebCore/Modules/mediasource/VideoTrack+MediaSource.idl

    r267449 r273730  
    2626[
    2727    Conditional=MEDIA_SOURCE,
     28    EnabledBySetting=MediaSource,
    2829    ImplementedBy=VideoTrackMediaSource
    2930] partial interface VideoTrack {
  • trunk/Source/WebCore/PAL/ChangeLog

    r273700 r273730  
     12021-03-02  Youenn Fablet  <youenn@apple.com>
     2
     3        Enable MEDIA_SOURCE in IOS Simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=222041
     5
     6        Reviewed by Eric Carlson.
     7
     8        Add missing header declarations in AVStreamDataParserSPI.h and use it for simulator.
     9
     10        * PAL.xcodeproj/project.pbxproj:
     11        * pal/spi/cocoa/AVFoundationSPI.h:
     12        * pal/spi/cocoa/AVStreamDataParserSPI.h: Added.
     13
    1142021-03-01  Truitt Savell  <tsavell@apple.com>
    215
  • trunk/Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj

    r273214 r273730  
    129129                416E995323DAE6BE00E871CB /* AudioToolboxSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E995123DAE6BD00E871CB /* AudioToolboxSoftLink.cpp */; };
    130130                416E995423DAE6BE00E871CB /* AudioToolboxSoftLink.h in Headers */ = {isa = PBXBuildFile; fileRef = 416E995223DAE6BE00E871CB /* AudioToolboxSoftLink.h */; };
     131                41B99E4625DD70160007829A /* AVStreamDataParserSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 41B99E4525DD70150007829A /* AVStreamDataParserSPI.h */; };
    131132                41E1F344248A6A000022D5DE /* VideoToolboxSoftLink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E995523DAEFF700E871CB /* VideoToolboxSoftLink.cpp */; };
    132133                442956CD218A72DF0080DB54 /* RevealSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 442956CC218A72DE0080DB54 /* RevealSPI.h */; };
    … …  
    336337                416E995523DAEFF700E871CB /* VideoToolboxSoftLink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VideoToolboxSoftLink.cpp; sourceTree = "<group>"; };
    337338                416E995623DAEFF700E871CB /* VideoToolboxSoftLink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoToolboxSoftLink.h; sourceTree = "<group>"; };
     339                41B99E4525DD70150007829A /* AVStreamDataParserSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AVStreamDataParserSPI.h; sourceTree = "<group>"; };
    338340                442956CC218A72DE0080DB54 /* RevealSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RevealSPI.h; sourceTree = "<group>"; };
    339341                4450FC9D21F5F602004DFA56 /* QuickLookSoftLink.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = QuickLookSoftLink.mm; sourceTree = "<group>"; };
    … …  
    491493                                0C7785701F45130F00F4EBB6 /* AVFoundationSPI.h */,
    492494                                0C2DA1221F3BEB4900DBC317 /* AVKitSPI.h */,
     495                                41B99E4525DD70150007829A /* AVStreamDataParserSPI.h */,
    493496                                29CDEB9E2548D055007C07B7 /* AXSpeechManagerSPI.h */,
    494497                                0C2DA1231F3BEB4900DBC317 /* CFNSURLConnectionSPI.h */,
    … …  
    818821                                0C7785891F45130F00F4EBB6 /* AVFoundationSPI.h in Headers */,
    819822                                0C2DA13E1F3BEB4900DBC317 /* AVKitSPI.h in Headers */,
     823                                41B99E4625DD70160007829A /* AVStreamDataParserSPI.h in Headers */,
    820824                                29CDEBA62548D57F007C07B7 /* AXSpeechManagerSPI.h in Headers */,
    821825                                CDF91113220E4EEC001EA39E /* CelestialSPI.h in Headers */,
  • trunk/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h

    r272188 r273730  
    4242
    4343#if ENABLE(MEDIA_SOURCE)
     44#if PLATFORM(IOS_FAMILY_SIMULATOR)
     45#import "AVStreamDataParserSPI.h"
     46#else
    4447#import <AVFoundation/AVStreamDataParser.h>
     48#endif
    4549#endif
    4650
  • trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h

    r272852 r273730  
    255255    macro(SpeechRecognitionResult) \
    256256    macro(SpeechRecognitionResultList) \
     257    macro(SourceBuffer) \
     258    macro(SourceBufferList) \
    257259    macro(StaticRange) \
    258260    macro(StereoPannerNode) \
    … …  
    370372    macro(isLoading) \
    371373    macro(isSecureContext) \
     374    macro(kind) \
     375    macro(language) \
    372376    macro(localStreams) \
    373377    macro(location) \
  • trunk/Source/WebCore/html/HTMLMediaElement.idl

    r267813 r273730  
    2323 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2424 */
    25 
    2625
    2726typedef (
  • trunk/Source/WebCore/html/track/AudioTrack.idl

    r267813 r273730  
    3232] interface AudioTrack {
    3333    readonly attribute DOMString id;
    34     [ConditionallyReadWrite=MEDIA_SOURCE] attribute DOMString kind;
     34    [SettingsConditionallyReadWrite=MediaSource] attribute DOMString kind;
    3535    readonly attribute DOMString label;
    36     [ConditionallyReadWrite=MEDIA_SOURCE] attribute DOMString language;
     36    [SettingsConditionallyReadWrite=MediaSource] attribute DOMString language;
    3737
    3838    attribute boolean enabled;
  • trunk/Source/WebCore/html/track/TextTrack.idl

    r267813 r273730  
    3838    [ImplementedAs=kindForBindings] attribute TextTrackKind kind;
    3939    readonly attribute DOMString label;
    40     [ConditionallyReadWrite=MEDIA_SOURCE] attribute DOMString language;
     40    [SettingsConditionallyReadWrite=MediaSource] attribute DOMString language;
    4141    readonly attribute DOMString inBandMetadataTrackDispatchType;
    4242
  • trunk/Source/WebCore/html/track/VideoTrack.idl

    r267813 r273730  
    3131] interface VideoTrack {
    3232    readonly attribute DOMString id;
    33     [ConditionallyReadWrite=MEDIA_SOURCE] attribute DOMString kind;
     33    [SettingsConditionallyReadWrite=MediaSource] attribute DOMString kind;
    3434    readonly attribute DOMString label;
    35     [ConditionallyReadWrite=MEDIA_SOURCE] attribute DOMString language;
     35    [SettingsConditionallyReadWrite=MediaSource] attribute DOMString language;
    3636
    3737    attribute boolean selected;
  • trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp

    r273568 r273730  
    326326
    327327    if (currentIndex == notFound) {
     328#if PLATFORM(IOS_FAMILY_SIMULATOR)
     329        ASSERT(identifier == MediaPlayerEnums::MediaEngineIdentifier::AVFoundationMSE);
     330#else
    328331        ASSERT_NOT_REACHED();
     332#endif
    329333        return nullptr;
    330334    }
  • trunk/Tools/ChangeLog

    r273729 r273730  
     12021-03-02  Youenn Fablet  <youenn@apple.com>
     2
     3        Enable MEDIA_SOURCE in IOS Simulator
     4        https://bugs.webkit.org/show_bug.cgi?id=222041
     5        <rdar://problem/74433510>
     6
     7        Reviewed by Eric Carlson.
     8
     9        * WebKitTestRunner/ios/TestControllerIOS.mm:
     10        (WTR::TestController::platformResetPreferencesToConsistentValues):
     11        Disable MediaSource runtime flag on simulator since it lacks implementation of AVStreamDataParser.
     12
    1132021-03-02  Aakash Jain  <aakash_jain@apple.com>
    214
  • trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm

    r273610 r273730  
    151151#if PLATFORM(IOS_FAMILY_SIMULATOR)
    152152    WKPreferencesSetVP9DecoderEnabled(preferences, false);
     153    WKPreferencesSetMediaSourceEnabled(preferences, false);
    153154#endif
    154155}
Note: See TracChangeset for help on using the changeset viewer.