Bug 218788 - [Media in GPU Process] Update RemoteMediaPlayerMIMETypeCache to add the support for AVFoundationMSE media engine
Summary: [Media in GPU Process] Update RemoteMediaPlayerMIMETypeCache to add the suppo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-11-10 21:57 PST by Peng Liu
Modified: 2020-11-11 17:49 PST (History)
7 users (show)

See Also:


Attachments
WIP patch (39.68 KB, patch)
2020-11-10 22:00 PST, Peng Liu
no flags Details | Formatted Diff | Diff
Patch (41.16 KB, patch)
2020-11-11 10:56 PST, Peng Liu
eric.carlson: review+
Details | Formatted Diff | Diff
Patch for landing (40.15 KB, patch)
2020-11-11 15:51 PST, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2020-11-10 21:57:01 PST
Update RemoteMediaPlayerMIMETypeCache to add the support for AVFoundationMSE media engine
Comment 1 Peng Liu 2020-11-10 22:00:06 PST
Created attachment 413781 [details]
WIP patch
Comment 2 Peng Liu 2020-11-11 10:56:49 PST
Created attachment 413840 [details]
Patch
Comment 3 Peng Liu 2020-11-11 11:02:35 PST
Comment on attachment 413840 [details]
Patch

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

> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:-125
> -void RemoteMediaPlayerManager::initialize(const WebProcessCreationParameters& parameters)

Eric, do we need to keep this function?
Comment 4 Eric Carlson 2020-11-11 12:02:28 PST
Comment on attachment 413840 [details]
Patch

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

> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp:59
> +        for (auto& type : types)
> +            m_supportedTypesCache.add(type);

You can call addSupportedTypes().

>> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:-125
>> -void RemoteMediaPlayerManager::initialize(const WebProcessCreationParameters& parameters)
> 
> Eric, do we need to keep this function?

We definitely want to cache WebProcessCreationParameters.mediaMIMETypes so we don't have to ask AVFoundation for MIME types more than once in the life of the host application.
Comment 5 Peng Liu 2020-11-11 12:18:14 PST
Comment on attachment 413840 [details]
Patch

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

>> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerMIMETypeCache.cpp:59
>> +            m_supportedTypesCache.add(type);
> 
> You can call addSupportedTypes().

Right! Will fix it.

>>> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:-125
>>> -void RemoteMediaPlayerManager::initialize(const WebProcessCreationParameters& parameters)
>> 
>> Eric, do we need to keep this function?
> 
> We definitely want to cache WebProcessCreationParameters.mediaMIMETypes so we don't have to ask AVFoundation for MIME types more than once in the life of the host application.

I see! Does parameters.mediaMIMETypes includes supported MIME types of AVFoundation media engine only, or for all other media engines?
Comment 6 Peng Liu 2020-11-11 15:51:52 PST
Created attachment 413879 [details]
Patch for landing
Comment 7 EWS 2020-11-11 17:48:29 PST
Committed r269711: <https://trac.webkit.org/changeset/269711>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 413879 [details].
Comment 8 Radar WebKit Bug Importer 2020-11-11 17:49:19 PST
<rdar://problem/71307417>