Bug 146862

Summary: Adopt AVPlayerLayerView
Product: WebKit Reporter: Jeremy Jones <jeremyj-wk>
Component: MediaAssignee: Jeremy Jones <jeremyj-wk>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, jer.noble, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: iPhone / iPad   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 171514    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing.
none
Patch for landing.
none
Patch for landing.
none
Patch for landing.
none
Patch for landing. none

Jeremy Jones
Reported 2015-07-10 17:04:54 PDT
Adopt AVPlayerLayerView
Attachments
Patch (17.94 KB, patch)
2015-07-10 17:22 PDT, Jeremy Jones
no flags
Patch (18.08 KB, patch)
2015-07-14 10:53 PDT, Jeremy Jones
no flags
Patch (18.06 KB, patch)
2015-07-14 11:18 PDT, Jeremy Jones
no flags
Patch (60.10 KB, patch)
2015-07-20 03:24 PDT, Jeremy Jones
no flags
Patch (61.78 KB, patch)
2015-07-20 13:18 PDT, Jeremy Jones
no flags
Patch for landing. (61.77 KB, patch)
2015-07-20 13:22 PDT, Jeremy Jones
no flags
Patch for landing. (61.77 KB, patch)
2015-07-20 14:00 PDT, Jeremy Jones
no flags
Patch for landing. (62.57 KB, patch)
2015-07-20 14:35 PDT, Jeremy Jones
no flags
Patch for landing. (62.52 KB, patch)
2015-07-20 15:22 PDT, Jeremy Jones
no flags
Patch for landing. (62.69 KB, patch)
2015-07-20 15:34 PDT, Jeremy Jones
no flags
Jeremy Jones
Comment 1 2015-07-10 17:22:31 PDT
Jeremy Jones
Comment 2 2015-07-14 10:53:59 PDT
Jeremy Jones
Comment 3 2015-07-14 11:18:56 PDT
Jeremy Jones
Comment 4 2015-07-14 14:33:00 PDT
Jeremy Jones
Comment 5 2015-07-14 15:13:29 PDT
Need to add derivation of AVPictureInPicturePlayerLayerView and implement -pictureInPicturePlayerLayerView.
Jeremy Jones
Comment 6 2015-07-20 03:24:54 PDT
WebKit Commit Bot
Comment 7 2015-07-20 03:26:25 PDT
Attachment 257085 [details] did not pass style-queue: ERROR: Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:580: Should not have spaces around = in property attributes. [whitespace/property] [4] ERROR: Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:589: This { should be at the end of the previous line [whitespace/braces] [4] Total errors found: 2 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Jer Noble
Comment 8 2015-07-20 11:02:01 PDT
Comment on attachment 257085 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257085&action=review > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:583 > +@property (nonatomic, copy, nullable) NSDictionary *pixelBufferAttributes; Is this necessary? I don't see where it's used in this patch. > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:750 > + static Class theClass = nil; > + if (!theClass) { > + theClass = objc_allocateClassPair(getAVPictureInPicturePlayerLayerViewClass(), "WebAVPictureInPicturePlayerLayerView", 0); If this method is ever called simultaneously on different threads (i.e., web thread vs. main thread), there's a possibility of a race condition. Perhaps dispatch_once() here instead? > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:848 > + static Class classWebAVPlayerLayerView = nil; > + if (!classWebAVPlayerLayerView) { > + classWebAVPlayerLayerView = objc_allocateClassPair(getAVPlayerLayerViewClass(), "WebAVPlayerLayerView", 0); Ditto.
Jeremy Jones
Comment 9 2015-07-20 12:47:31 PDT
(In reply to comment #8) > Comment on attachment 257085 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=257085&action=review > > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:583 > > +@property (nonatomic, copy, nullable) NSDictionary *pixelBufferAttributes; > > Is this necessary? I don't see where it's used in this patch. It is necessary to look like an AVPlayerLayer, it is accessed by AVPlayerLayerView in AVKit. > > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:750 > > + static Class theClass = nil; > > + if (!theClass) { > > + theClass = objc_allocateClassPair(getAVPictureInPicturePlayerLayerViewClass(), "WebAVPictureInPicturePlayerLayerView", 0); > > If this method is ever called simultaneously on different threads (i.e., web > thread vs. main thread), there's a possibility of a race condition. Perhaps > dispatch_once() here instead? WebVideoFullscreenInterfaceAVKit is only ever accessed from the main thread. All the jumping between threads happens in WebVideoFullscreenControllerAVKit. Yes, dispatch_once is the right way to initialize these. I'll change that. > > > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:848 > > + static Class classWebAVPlayerLayerView = nil; > > + if (!classWebAVPlayerLayerView) { > > + classWebAVPlayerLayerView = objc_allocateClassPair(getAVPlayerLayerViewClass(), "WebAVPlayerLayerView", 0); > > Ditto. Ditto.
Simon Fraser (smfr)
Comment 10 2015-07-20 13:18:14 PDT
Comment on attachment 257085 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=257085&action=review > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:328 > + model->setLayerHostView(view.get()); Why the .get(), since setLayerHostView takes a RetainPtr<WebLayerHostView>&&?
Jeremy Jones
Comment 11 2015-07-20 13:18:31 PDT
Jeremy Jones
Comment 12 2015-07-20 13:19:24 PDT
(In reply to comment #10) > Comment on attachment 257085 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=257085&action=review > > > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:328 > > + model->setLayerHostView(view.get()); > > Why the .get(), since setLayerHostView takes a RetainPtr<WebLayerHostView>&&? I'll remove this.
Jeremy Jones
Comment 13 2015-07-20 13:22:18 PDT
Created attachment 257121 [details] Patch for landing.
Jeremy Jones
Comment 14 2015-07-20 14:00:44 PDT
Created attachment 257125 [details] Patch for landing.
Jeremy Jones
Comment 15 2015-07-20 14:35:17 PDT
Created attachment 257127 [details] Patch for landing.
WebKit Commit Bot
Comment 16 2015-07-20 15:07:24 PDT
Comment on attachment 257127 [details] Patch for landing. Rejecting attachment 257127 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 257127, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: rce/WebCore/platform/spi/cocoa/AVKitSPI.h patching file Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h Hunk #2 succeeded at 135 (offset 9 lines). patching file Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h patching file Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm patching file Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.appspot.com/results/5350159965749248
Jeremy Jones
Comment 17 2015-07-20 15:22:59 PDT
Created attachment 257131 [details] Patch for landing.
WebKit Commit Bot
Comment 18 2015-07-20 15:25:14 PDT
Comment on attachment 257131 [details] Patch for landing. Rejecting attachment 257131 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 257131, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: creenModelVideoElement.mm patching file Source/WebCore/platform/spi/cocoa/AVKitSPI.h patching file Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h patching file Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.h patching file Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm patching file Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.appspot.com/results/5774197791916032
Jeremy Jones
Comment 19 2015-07-20 15:34:46 PDT
Created attachment 257134 [details] Patch for landing.
WebKit Commit Bot
Comment 20 2015-07-20 16:29:08 PDT
Comment on attachment 257134 [details] Patch for landing. Clearing flags on attachment: 257134 Committed r187044: <http://trac.webkit.org/changeset/187044>
WebKit Commit Bot
Comment 21 2015-07-20 16:29:12 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.