Bug 205541

Summary: [Media in GPU process] Add remote media player configuration
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, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 205123    
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing none

Description Eric Carlson 2019-12-21 10:44:42 PST
Add remote media player configuration for properties that won't change
Comment 1 Radar WebKit Bug Importer 2019-12-21 10:44:54 PST
<rdar://problem/58137418>
Comment 2 Eric Carlson 2019-12-21 13:39:15 PST
Created attachment 386303 [details]
Patch
Comment 3 Eric Carlson 2019-12-21 14:02:22 PST
Created attachment 386304 [details]
Patch
Comment 4 Simon Fraser (smfr) 2019-12-21 15:23:58 PST
Comment on attachment 386304 [details]
Patch

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

> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:46
> +    uint64_t logIdentifier;
> +    bool shouldUsePersistentCache;
> +    bool isVideo;

Maybe initialize these to be safe.

> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:122
> +        return {{ WTFMove(*mediaKeysStorageDirectory), WTFMove(*referrer), WTFMove(*userAgent), WTFMove(*sourceApplicationIdentifier), WTFMove(*networkInterfaceName), WTFMove(*mediaCacheDirectory), WTFMove(*mediaContentTypesRequiringHardwareSupport), WTFMove(*preferredAudioCharacteristics), WTFMove(*logIdentifier), WTFMove(*shouldUsePersistentCache), WTFMove(*isVideo), }};

I'd put each WTFMove on its own line.

> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:130
> +    configuration.logIdentifier = reinterpret_cast<uint64_t>(player->mediaPlayerLogIdentifier());

Are these identifiers unique across all processes that share a GPU process?
Comment 5 Eric Carlson 2019-12-21 18:08:33 PST
Created attachment 386307 [details]
Patch for landing
Comment 6 Eric Carlson 2019-12-21 18:11:00 PST
Comment on attachment 386304 [details]
Patch

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

>> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:46
>> +    bool isVideo;
> 
> Maybe initialize these to be safe.

Good point, fixed.

>> Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxyConfiguration.h:122
>> +        return {{ WTFMove(*mediaKeysStorageDirectory), WTFMove(*referrer), WTFMove(*userAgent), WTFMove(*sourceApplicationIdentifier), WTFMove(*networkInterfaceName), WTFMove(*mediaCacheDirectory), WTFMove(*mediaContentTypesRequiringHardwareSupport), WTFMove(*preferredAudioCharacteristics), WTFMove(*logIdentifier), WTFMove(*shouldUsePersistentCache), WTFMove(*isVideo), }};
> 
> I'd put each WTFMove on its own line.

Done.

>> Source/WebKit/WebProcess/GPU/media/RemoteMediaPlayerManager.cpp:130
>> +    configuration.logIdentifier = reinterpret_cast<uint64_t>(player->mediaPlayerLogIdentifier());
> 
> Are these identifiers unique across all processes that share a GPU process?

A media player's unique identifier is the same as the HTMLMediaElement that owns it, but each HTMLMediaElement has a unique ID.
Comment 7 WebKit Commit Bot 2019-12-21 19:08:37 PST
The commit-queue encountered the following flaky tests while processing attachment 386307 [details]:

imported/w3c/web-platform-tests/IndexedDB/key-generators/reading-autoincrement-indexes-cursors.any.html bug 205545 (author: shvaikalesh@gmail.com)
The commit-queue is continuing to process your patch.
Comment 8 WebKit Commit Bot 2019-12-21 19:09:26 PST
Comment on attachment 386307 [details]
Patch for landing

Clearing flags on attachment: 386307

Committed r253866: <https://trac.webkit.org/changeset/253866>
Comment 9 WebKit Commit Bot 2019-12-21 19:09:28 PST
All reviewed patches have been landed.  Closing bug.