Title: [256804] trunk/Source/WebCore
- Revision
- 256804
- Author
- peng.l...@apple.com
- Date
- 2020-02-17 18:31:41 -0800 (Mon, 17 Feb 2020)
Log Message
MediaSource.isTypeSupported() says "video/mp4;codecs=\"avc3.42C015\"" is not supported, but it is
https://bugs.webkit.org/show_bug.cgi?id=207622
Reviewed by Eric Carlson.
Revert the behavior change of MediaPlayerPrivateMediaSourceAVFObjC::supportsType() in r253952.
* platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
(WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (256803 => 256804)
--- trunk/Source/WebCore/ChangeLog 2020-02-18 02:24:08 UTC (rev 256803)
+++ trunk/Source/WebCore/ChangeLog 2020-02-18 02:31:41 UTC (rev 256804)
@@ -1,3 +1,15 @@
+2020-02-17 Peng Liu <peng.l...@apple.com>
+
+ MediaSource.isTypeSupported() says "video/mp4;codecs=\"avc3.42C015\"" is not supported, but it is
+ https://bugs.webkit.org/show_bug.cgi?id=207622
+
+ Reviewed by Eric Carlson.
+
+ Revert the behavior change of MediaPlayerPrivateMediaSourceAVFObjC::supportsType() in r253952.
+
+ * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
+ (WebCore::AVAssetMIMETypeCache::canDecodeExtendedType):
+
2020-02-17 Youenn Fablet <you...@apple.com>
WebSocketChannelInspector.cpp should include ProgressTracker.h
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm (256803 => 256804)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm 2020-02-18 02:24:08 UTC (rev 256803)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm 2020-02-18 02:31:41 UTC (rev 256804)
@@ -59,14 +59,8 @@
#if ENABLE(VIDEO) && USE(AVFOUNDATION)
ASSERT(isAvailable());
- String outputCodecs = type.parameter(ContentType::codecsParameter());
- ASSERT(!outputCodecs.isEmpty());
- if ([PAL::getAVStreamDataParserClass() respondsToSelector:@selector(outputMIMECodecParameterForInputMIMECodecParameter:)])
- outputCodecs = [PAL::getAVStreamDataParserClass() outputMIMECodecParameterForInputMIMECodecParameter:outputCodecs];
-
- String extendedType = makeString(type.containerType(), "; codecs=\"", outputCodecs, "\"");
if ([PAL::getAVStreamDataParserClass() respondsToSelector:@selector(canParseExtendedMIMEType:)])
- return [PAL::getAVStreamDataParserClass() canParseExtendedMIMEType:extendedType];
+ return [PAL::getAVStreamDataParserClass() canParseExtendedMIMEType:type.raw()];
// 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
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm (256803 => 256804)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2020-02-18 02:24:08 UTC (rev 256803)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm 2020-02-18 02:31:41 UTC (rev 256804)
@@ -253,14 +253,20 @@
if (!parameters.isMediaSource)
return MediaPlayer::SupportsType::IsNotSupported;
+ String outputCodecs = parameters.type.parameter(ContentType::codecsParameter());
+ ASSERT(!outputCodecs.isEmpty());
+ if ([PAL::getAVStreamDataParserClass() respondsToSelector:@selector(outputMIMECodecParameterForInputMIMECodecParameter:)])
+ outputCodecs = [PAL::getAVStreamDataParserClass() outputMIMECodecParameterForInputMIMECodecParameter:outputCodecs];
+
+ String extendedType = makeString(parameters.type.containerType(), "; codecs=\"", outputCodecs, "\"");
auto supported = MediaPlayer::SupportsType::IsNotSupported;
auto& streamDataParserCache = AVStreamDataParserMIMETypeCache::singleton();
if (streamDataParserCache.isAvailable())
- supported = streamDataParserCache.canDecodeType(parameters.type.raw());
+ supported = streamDataParserCache.canDecodeType(extendedType);
else {
auto& assetCache = AVAssetMIMETypeCache::singleton();
if (assetCache.isAvailable())
- supported = assetCache.canDecodeType(parameters.type.raw());
+ supported = assetCache.canDecodeType(extendedType);
}
if (supported != MediaPlayer::SupportsType::IsSupported)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes