Bug 205541 - [Media in GPU process] Add remote media player configuration
Summary: [Media in GPU process] Add remote media player configuration
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar
Depends on:
Blocks: 205123
  Show dependency treegraph
 
Reported: 2019-12-21 10:44 PST by Eric Carlson
Modified: 2019-12-21 19:09 PST (History)
8 users (show)

See Also:


Attachments
Patch (18.06 KB, patch)
2019-12-21 13:39 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch (23.17 KB, patch)
2019-12-21 14:02 PST, Eric Carlson
no flags Details | Formatted Diff | Diff
Patch for landing (23.33 KB, patch)
2019-12-21 18:08 PST, Eric Carlson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.