WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
192379
[MediaStream] Cleanup up Mac screen capture class
https://bugs.webkit.org/show_bug.cgi?id=192379
Summary
[MediaStream] Cleanup up Mac screen capture class
Eric Carlson
Reported
2018-12-04 14:13:42 PST
Minor cleanup.
Attachments
Patch
(6.75 KB, patch)
2018-12-04 14:20 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch for landing.
(6.80 KB, patch)
2018-12-05 11:54 PST
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2018-12-04 14:14:04 PST
<
rdar://problem/46465458
>
Eric Carlson
Comment 2
2018-12-04 14:20:50 PST
Created
attachment 356532
[details]
Patch
youenn fablet
Comment 3
2018-12-04 18:44:01 PST
Comment on
attachment 356532
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=356532&action=review
> Source/WebCore/ChangeLog:12 > + (WebCore::DisplayCaptureManagerCocoa::captureDevices): Initialize Display devices first.
Maybe document why we need to do this
> Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:156 > weakThis->frameAvailable(status, displayTime, frameSurface, updateRef);
This is existing code but the weakThis check is not thread safe here. weakThis may be dead between if and next call.
> Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:-167 > - });
Do we need the call to frameAvailable to be in a background thread?
Eric Carlson
Comment 4
2018-12-05 11:54:22 PST
Created
attachment 356632
[details]
Patch for landing.
WebKit Commit Bot
Comment 5
2018-12-05 12:22:02 PST
Comment on
attachment 356632
[details]
Patch for landing. Clearing flags on attachment: 356632 Committed
r238904
: <
https://trac.webkit.org/changeset/238904
>
WebKit Commit Bot
Comment 6
2018-12-05 12:22:04 PST
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 7
2018-12-06 12:44:16 PST
Comment on
attachment 356632
[details]
Patch for landing. View in context:
https://bugs.webkit.org/attachment.cgi?id=356632&action=review
> Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:144 > + CFDictionaryRef streamOptions = (__bridge CFDictionaryRef) @{
Doing the cast here may be incompatible with ARC. Instead the local variable should be an NSDictionary * and the cast to CFDictionaryRef should go below at the call site. Or we can use two local variables.
> Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:148 > + (__bridge NSString *)kCGDisplayStreamMinimumFrameTime :@(1 / frameRate()), > + (__bridge NSString *)kCGDisplayStreamQueueDepth:@(screenQueueMaximumLength), > + (__bridge NSString *)kCGDisplayStreamColorSpace:(__bridge id)sRGBColorSpaceRef(), > + (__bridge NSString *)kCGDisplayStreamShowCursor : @(YES),
Formatting here is a little messy, inconsistent about whether there is a space before and after the colon.
Eric Carlson
Comment 8
2018-12-07 14:04:22 PST
(In reply to Darin Adler from
comment #7
)
> Comment on
attachment 356632
[details]
> Patch for landing. > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=356632&action=review
> > > Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:144 > > + CFDictionaryRef streamOptions = (__bridge CFDictionaryRef) @{ > > Doing the cast here may be incompatible with ARC. Instead the local variable > should be an NSDictionary * and the cast to CFDictionaryRef should go below > at the call site. Or we can use two local variables. > > > Source/WebCore/platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:148 > > + (__bridge NSString *)kCGDisplayStreamMinimumFrameTime :@(1 / frameRate()), > > + (__bridge NSString *)kCGDisplayStreamQueueDepth:@(screenQueueMaximumLength), > > + (__bridge NSString *)kCGDisplayStreamColorSpace:(__bridge id)sRGBColorSpaceRef(), > > + (__bridge NSString *)kCGDisplayStreamShowCursor : @(YES), > > Formatting here is a little messy, inconsistent about whether there is a > space before and after the colon.
Thanks, I will fix these in
bug 192514
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug