RESOLVED FIXED Bug 200774
[Cocoa] Adopt -preventDisplaySleepForVideoPlayback
https://bugs.webkit.org/show_bug.cgi?id=200774
Summary [Cocoa] Adopt -preventDisplaySleepForVideoPlayback
Jer Noble
Reported 2019-08-15 10:36:09 PDT
[Cocoa] Adopt -preventDisplaySleepForVideoPlayback
Attachments
Patch (1.96 KB, patch)
2019-08-15 10:37 PDT, Jer Noble
no flags
Patch (3.76 KB, patch)
2019-08-19 17:39 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2019-08-15 10:36:57 PDT
Jer Noble
Comment 2 2019-08-15 10:37:25 PDT
WebKit Commit Bot
Comment 3 2019-08-15 14:39:38 PDT
Comment on attachment 376391 [details] Patch Clearing flags on attachment: 376391 Committed r248747: <https://trac.webkit.org/changeset/248747>
WebKit Commit Bot
Comment 4 2019-08-15 14:39:40 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 5 2019-08-15 14:44:10 PDT
Comment on attachment 376391 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=376391&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:70 > +@interface AVSampleBufferDisplayLayer (WebCorePrivate) > +@property (assign, nonatomic) BOOL preventDisplaySleepForVideoPlayback; > +@end I’d like us to make it a habit to put these kinds of things into SPI headers whenever possible.
Jer Noble
Comment 6 2019-08-15 14:52:44 PDT
(In reply to Darin Adler from comment #5) > Comment on attachment 376391 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=376391&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:70 > > +@interface AVSampleBufferDisplayLayer (WebCorePrivate) > > +@property (assign, nonatomic) BOOL preventDisplaySleepForVideoPlayback; > > +@end > > I’d like us to make it a habit to put these kinds of things into SPI headers > whenever possible. Understood. The SPI declarations for AVSampleBufferDisplayLayer in AVFoundationSPI.h are ... complicated, and I was trying to make the simplest patch possible to avoid any merge problems.
Darin Adler
Comment 7 2019-08-15 14:57:33 PDT
(In reply to Jer Noble from comment #6) > Understood. The SPI declarations for AVSampleBufferDisplayLayer in > AVFoundationSPI.h are ... complicated, and I was trying to make the simplest > patch possible to avoid any merge problems. Fine with me for the short term. Not the right thing for the longer term, I think.
Jer Noble
Comment 8 2019-08-15 15:10:34 PDT
(In reply to Darin Adler from comment #7) > Fine with me for the short term. Not the right thing for the longer term, I > think. Filed bug# 200790 to track cleaning this all up.
Jer Noble
Comment 9 2019-08-19 17:37:40 PDT
Darin was correct, I was wrong, and because I tried to do the most expedient fix instead of the most correct fix, a misspelling ("preventDisplaySleep" vs. "prevent_s_DisplaySleep") got into the build, negating the benefit of this patch. Fixing.
Jer Noble
Comment 10 2019-08-19 17:39:10 PDT
Reopening to attach new patch.
Jer Noble
Comment 11 2019-08-19 17:39:11 PDT
EWS Watchlist
Comment 12 2019-08-19 17:41:10 PDT
Attachment 376725 [details] did not pass style-queue: ERROR: Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h:310: Misplaced OS version check. Please use a named macro in wtf/Platform.h, wtf/FeatureDefines.h, or an appropriate internal file. [build/version_check] [5] Total errors found: 1 in 4 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 13 2019-08-19 19:16:49 PDT
Comment on attachment 376725 [details] Patch Clearing flags on attachment: 376725 Committed r248886: <https://trac.webkit.org/changeset/248886>
WebKit Commit Bot
Comment 14 2019-08-19 19:16:50 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.