Title: [248064] branches/safari-608-branch/Source/WebCore
Revision
248064
Author
[email protected]
Date
2019-07-31 13:56:33 -0700 (Wed, 31 Jul 2019)

Log Message

Cherry-pick r247934. rdar://problem/53764085

    MediaSource.isTypeSupported claims FLAC-in-MP4 support on iOS and macOS, but plays silence
    https://bugs.webkit.org/show_bug.cgi?id=198583
    <rdar://problem/51487853>

    Reviewed by Maciej Stachowiak.

    * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
    (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Use anParseExtendedMIMEType:
    when it is available.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247934 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (248063 => 248064)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-31 20:56:31 UTC (rev 248063)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-31 20:56:33 UTC (rev 248064)
@@ -1,5 +1,34 @@
 2019-07-31  Alan Coon  <[email protected]>
 
+        Cherry-pick r247934. rdar://problem/53764085
+
+    MediaSource.isTypeSupported claims FLAC-in-MP4 support on iOS and macOS, but plays silence
+    https://bugs.webkit.org/show_bug.cgi?id=198583
+    <rdar://problem/51487853>
+    
+    Reviewed by Maciej Stachowiak.
+    
+    * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
+    (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Use anParseExtendedMIMEType:
+    when it is available.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247934 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-29  Eric Carlson  <[email protected]>
+
+            MediaSource.isTypeSupported claims FLAC-in-MP4 support on iOS and macOS, but plays silence
+            https://bugs.webkit.org/show_bug.cgi?id=198583
+            <rdar://problem/51487853>
+
+            Reviewed by Maciej Stachowiak.
+
+            * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h:
+            (WebCore::AVStreamDataParserMIMETypeCache::canDecodeType): Use anParseExtendedMIMEType:
+            when it is available.
+
+2019-07-31  Alan Coon  <[email protected]>
+
         Cherry-pick r247915. rdar://problem/53764061
 
     Force Reveal to always lookup from menu

Modified: branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h (248063 => 248064)


--- branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h	2019-07-31 20:56:31 UTC (rev 248063)
+++ branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.h	2019-07-31 20:56:33 UTC (rev 248064)
@@ -25,7 +25,7 @@
 
 #pragma once
 
-#if PLATFORM(COCOA)
+#if ENABLE(MEDIA_SOURCE) && USE(AVFOUNDATION)
 
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>

Modified: branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm (248063 => 248064)


--- branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm	2019-07-31 20:56:31 UTC (rev 248063)
+++ branches/safari-608-branch/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm	2019-07-31 20:56:33 UTC (rev 248064)
@@ -26,18 +26,26 @@
 #import "config.h"
 #import "AVStreamDataParserMIMETypeCache.h"
 
-#if PLATFORM(COCOA)
+#if ENABLE(MEDIA_SOURCE) && USE(AVFOUNDATION)
 
 #import "AVAssetMIMETypeCache.h"
 #import "ContentType.h"
+#import <pal/spi/mac/AVFoundationSPI.h>
+#import <wtf/HashSet.h>
+
 #import <pal/cf/CoreMediaSoftLink.h>
 #import <pal/cocoa/AVFoundationSoftLink.h>
-#import <wtf/HashSet.h>
 
 #if !PLATFORM(MACCATALYST)
 SOFT_LINK_FRAMEWORK_OPTIONAL_PREFLIGHT(AVFoundation)
 #endif
 
+NS_ASSUME_NONNULL_BEGIN
+@interface AVStreamDataParser (AVStreamDataParserExtendedMIMETypes)
++ (BOOL)canParseExtendedMIMEType:(NSString *)extendedMIMEType;
+@end
+NS_ASSUME_NONNULL_END
+
 namespace WebCore {
 
 AVStreamDataParserMIMETypeCache& AVStreamDataParserMIMETypeCache::singleton()
@@ -73,8 +81,12 @@
         return false;
 
 #if ENABLE(VIDEO) && USE(AVFOUNDATION)
-    // FIXME(rdar://50502771) AVStreamDataParser does not have an -isPlayableExtendedMIMEType: method, so just replace
-    // the container type with a valid one from AVAssetMIMETypeCache and ask that cache if it can decode this type:
+    if ([PAL::getAVStreamDataParserClass() respondsToSelector:@selector(canParseExtendedMIMEType:)])
+        return [PAL::getAVStreamDataParserClass() canParseExtendedMIMEType:mimeType];
+
+    // FIXME(rdar://50502771) AVStreamDataParser does not have an -canParseExtendedMIMEType: method on this system,
+    //  so just replace the container type with a valid one from AVAssetMIMETypeCache and ask that cache if it
+    //  can decode this type.
     auto& assetCache = AVAssetMIMETypeCache::singleton();
     if (!assetCache.isAvailable() || assetCache.types().isEmpty())
         return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to