Bug 205632

Summary: Create media mime type cache base class to reduce duplicate code
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Eric Carlson 2019-12-29 14:32:47 PST
AVStreamDataParserMIMETypeCache and AVAssetMIMETypeCache have a lot of very similar code so create a base class so they can share.
Comment 1 Radar WebKit Bug Importer 2019-12-29 14:33:00 PST
<rdar://problem/58233565>
Comment 2 Eric Carlson 2019-12-29 14:52:47 PST Comment hidden (obsolete)
Comment 3 Eric Carlson 2019-12-29 17:27:00 PST Comment hidden (obsolete)
Comment 4 Eric Carlson 2019-12-29 20:27:13 PST
Created attachment 386504 [details]
Patch
Comment 5 Jer Noble 2019-12-29 22:31:39 PST
Comment on attachment 386504 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=386504&action=review

r=me with nits. 

> Source/WebCore/platform/graphics/MIMETypeCache.h:48
> +    WEBCORE_EXPORT void setSupportedTypes(const Vector<String>&);

Nit: The implementation doesn’t match the name here. It doesn’t replace the existing set of supported types, instead it adds new types to the existing set. ‘addSupportedTypes’ maybe?

> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:263
> +    if (AVStreamDataParserMIMETypeCache::singleton().isAvailable())

This could use a “auto cache = ...” so you’re not calling the singleton() method so much.
Comment 6 Eric Carlson 2019-12-30 11:11:30 PST
Created attachment 386541 [details]
Patch
Comment 7 WebKit Commit Bot 2019-12-30 12:51:54 PST
The commit-queue encountered the following flaky tests while processing attachment 386541 [details]:

highlight/highlight-world-leak.html bug 205643 (author: megan_gardner@apple.com)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2019-12-30 12:52:49 PST
Comment on attachment 386541 [details]
Patch

Clearing flags on attachment: 386541

Committed r253952: <https://trac.webkit.org/changeset/253952>
Comment 9 WebKit Commit Bot 2019-12-30 12:52:51 PST
All reviewed patches have been landed.  Closing bug.