Bug 210858 - getDisplayMedia is not respecting aspect ratio with max constraints
Summary: getDisplayMedia is not respecting aspect ratio with max constraints
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-04-22 08:41 PDT by youenn fablet
Modified: 2020-04-24 03:36 PDT (History)
13 users (show)

See Also:


Attachments
Patch (104.79 KB, patch)
2020-04-22 09:35 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (104.78 KB, patch)
2020-04-22 09:39 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (104.80 KB, patch)
2020-04-22 10:05 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (105.47 KB, patch)
2020-04-22 10:15 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (105.54 KB, patch)
2020-04-22 10:34 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (105.43 KB, patch)
2020-04-22 12:36 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (106.26 KB, patch)
2020-04-23 00:55 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (5.76 KB, patch)
2020-04-24 00:51 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2020-04-22 08:41:50 PDT
getDisplayMedia is not respecting aspect ratio with max constraints
Comment 1 youenn fablet 2020-04-22 09:35:30 PDT
Created attachment 397209 [details]
Patch
Comment 2 youenn fablet 2020-04-22 09:36:24 PDT
<rdar://problem/61405434>
Comment 3 youenn fablet 2020-04-22 09:39:43 PDT
Created attachment 397210 [details]
Patch
Comment 4 youenn fablet 2020-04-22 10:05:30 PDT
Created attachment 397214 [details]
Patch
Comment 5 youenn fablet 2020-04-22 10:15:42 PDT
Created attachment 397215 [details]
Patch
Comment 6 youenn fablet 2020-04-22 10:34:43 PDT
Created attachment 397221 [details]
Patch
Comment 7 Eric Carlson 2020-04-22 10:46:42 PDT
Comment on attachment 397221 [details]
Patch

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

> Source/WebCore/platform/mediastream/mac/ScreenDisplayCapturerMac.mm:56
> +        RELEASE_LOG(Media, "CGGetActiveDisplayList() returned error %d when trying to get display count", static_cast<int>(err));

This isn't new, but other logging uses the WebRTC channel. If you made this a member function it could use ERROR_LOG_IF.

> Source/WebCore/platform/mediastream/mac/ScreenDisplayCapturerMac.mm:203
> +    return DisplayCaptureSourceCocoa::DisplayFrameType { RetainPtr<IOSurfaceRef> { m_currentFrame.ioSurface() } };

This isn't new, but shouldn't we have a lock around access to m_currentFrame since it is changed on another thread?
Comment 8 youenn fablet 2020-04-22 12:36:15 PDT
Created attachment 397237 [details]
Patch
Comment 9 youenn fablet 2020-04-23 00:55:22 PDT
Created attachment 397325 [details]
Patch for landing
Comment 10 EWS 2020-04-23 01:59:35 PDT
Committed r260561: <https://trac.webkit.org/changeset/260561>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397325 [details].
Comment 11 Aakash Jain 2020-04-23 18:30:17 PDT
Newly added layout test fast/mediastream/getDisplayMedia-max-constraints.html seems to be failing consistently and slowing down ios-wk2 EWS. This issue was also indicated by red ios-wk2 ews bubble.
Comment 12 youenn fablet 2020-04-24 00:48:31 PDT
(In reply to Aakash Jain from comment #11)
> Newly added layout test
> fast/mediastream/getDisplayMedia-max-constraints.html seems to be failing
> consistently and slowing down ios-wk2 EWS. This issue was also indicated by
> red ios-wk2 ews bubble.

They should have been skipped on iOS
Comment 13 youenn fablet 2020-04-24 00:51:49 PDT
Reopening to attach new patch.
Comment 14 youenn fablet 2020-04-24 00:51:52 PDT
Created attachment 397434 [details]
Patch
Comment 15 EWS 2020-04-24 03:36:00 PDT
Committed r260638: <https://trac.webkit.org/changeset/260638>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 397434 [details].