RESOLVED FIXED 228560
[Cocoa] Remove support for AVAssetImageGenerator
https://bugs.webkit.org/show_bug.cgi?id=228560
Summary [Cocoa] Remove support for AVAssetImageGenerator
Jer Noble
Reported 2021-07-28 11:30:18 PDT
[Cocoa] Remove support for AVAssetImageGenerator
Attachments
Patch (13.40 KB, patch)
2021-07-28 13:39 PDT, Jer Noble
ews-feeder: commit-queue-
Patch (13.41 KB, patch)
2021-07-28 13:46 PDT, Jer Noble
ews-feeder: commit-queue-
Patch (13.42 KB, patch)
2021-07-28 14:17 PDT, Jer Noble
no flags
Patch for landing (13.64 KB, patch)
2021-07-28 15:11 PDT, Jer Noble
ews-feeder: commit-queue-
Patch for landing (18.80 KB, patch)
2021-07-28 23:18 PDT, Jer Noble
no flags
Patch for landing (16.74 KB, patch)
2021-07-28 23:37 PDT, Jer Noble
ews-feeder: commit-queue-
Patch for landing (16.75 KB, patch)
2021-07-29 21:59 PDT, Jer Noble
no flags
Patch (21.25 KB, patch)
2021-07-31 18:22 PDT, Jer Noble
no flags
Patch for landing (24.58 KB, patch)
2021-07-31 19:22 PDT, Jer Noble
no flags
Patch for landing (26.32 KB, patch)
2021-07-31 19:43 PDT, Jer Noble
no flags
Patch for landing (26.45 KB, patch)
2021-08-02 08:11 PDT, Jer Noble
no flags
Patch (13.17 KB, patch)
2021-08-04 12:35 PDT, Jer Noble
eric.carlson: review+
Patch for landing (13.03 KB, patch)
2021-08-04 17:30 PDT, Jer Noble
ews-feeder: commit-queue-
Patch for landing (13.03 KB, patch)
2021-08-05 13:00 PDT, Jer Noble
no flags
Jer Noble
Comment 1 2021-07-28 13:39:31 PDT
Jer Noble
Comment 2 2021-07-28 13:46:57 PDT
Jer Noble
Comment 3 2021-07-28 14:17:09 PDT
Eric Carlson
Comment 4 2021-07-28 15:01:43 PDT
Comment on attachment 434467 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434467&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2387 > + if ([m_videoOutput respondsToSelector:@selector(requestNotificationOfMediaDataChangeAsSoonAsPossible)]) > + [m_videoOutput requestNotificationOfMediaDataChangeAsSoonAsPossible]; As discussed, it might be worth logging an error if it doesn't support this selector
Jer Noble
Comment 5 2021-07-28 15:11:31 PDT
Created attachment 434471 [details] Patch for landing
Jer Noble
Comment 6 2021-07-28 23:18:37 PDT
Created attachment 434498 [details] Patch for landing
EWS Watchlist
Comment 7 2021-07-28 23:19:19 PDT
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Jer Noble
Comment 8 2021-07-28 23:37:59 PDT
Created attachment 434499 [details] Patch for landing
Jer Noble
Comment 9 2021-07-29 16:31:09 PDT
The mac-AS-debug-wk2 test failure will be fixed by bug #228620.
EWS
Comment 10 2021-07-29 20:04:51 PDT
ChangeLog entry in LayoutTests/imported/w3c/ChangeLog contains OOPS!.
EWS
Comment 11 2021-07-29 20:13:27 PDT
ChangeLog entry in LayoutTests/imported/w3c/ChangeLog contains OOPS!.
Jer Noble
Comment 12 2021-07-29 21:59:17 PDT
Created attachment 434605 [details] Patch for landing
Jer Noble
Comment 13 2021-07-30 11:45:08 PDT
After running tests on a mac-AS-debug-wk2 and catching some of the timeouts & using the Web Inspector, I'm confident that the test failures are unrelated to my patch. The failures, when caught, appear to be a result of `testRunner.notifyDone()` not causing the test contents to be dumped. In all the results I've caught, the DOM includes `"TEST COMPLETE"`, but WKTR is still waiting for results to be dumped. I have caught other flaky tests that are stuck in AVPlayerItem -seekToTime:toleranceBefore:toleranceAfter:completionHandler: being stuck without the completionHandler being called. Calling -cancelPendingSeeks through lldb causes the test to "unstick" and run to completion. Also unrelated to this patch.
EWS
Comment 14 2021-07-30 11:49:54 PDT
Committed r280488 (240120@main): <https://commits.webkit.org/240120@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434605 [details].
Radar WebKit Bug Importer
Comment 15 2021-07-30 11:50:34 PDT
Truitt Savell
Comment 16 2021-07-30 14:41:26 PDT
It looks like the changes in https://trac.webkit.org/changeset/280488/webkit broke 10 media/modern-media-controls/ tests causing them to time out tracking in https://bugs.webkit.org/show_bug.cgi?id=228660
WebKit Commit Bot
Comment 17 2021-07-31 00:50:30 PDT
Re-opened since this is blocked by bug 228677
Jer Noble
Comment 18 2021-07-31 18:22:23 PDT
Jer Noble
Comment 19 2021-07-31 19:22:38 PDT
Created attachment 434710 [details] Patch for landing
Jer Noble
Comment 20 2021-07-31 19:43:27 PDT
Created attachment 434711 [details] Patch for landing
EWS
Comment 21 2021-08-01 13:37:19 PDT
ChangeLog entry in LayoutTests/imported/w3c/ChangeLog contains OOPS!.
Jer Noble
Comment 22 2021-08-02 08:11:27 PDT
Created attachment 434751 [details] Patch for landing
EWS
Comment 23 2021-08-02 08:39:28 PDT
Committed r280531 (240163@main): <https://commits.webkit.org/240163@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434751 [details].
Ryan Haddad
Comment 24 2021-08-02 13:08:56 PDT
(In reply to EWS from comment #23) > Committed r280531 (240163@main): <https://commits.webkit.org/240163@main> It appears that we are seeing modern-media-controls layout test timeouts again: https://build.webkit.org/results/Apple-BigSur-Release-AppleSilicon-WK2-Tests/r280531%20(2978)/results.html
Ryan Haddad
Comment 25 2021-08-03 18:11:06 PDT
Reverted r280531 and r280589 for reason: caused Committed r280624 (240237@main): <https://commits.webkit.org/240237@main>
Jer Noble
Comment 26 2021-08-04 12:35:17 PDT
Eric Carlson
Comment 27 2021-08-04 14:42:40 PDT
Comment on attachment 434926 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434926&action=review > Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:-132 > - tearDownVideoRendering(); Last changed in 2011! > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2429 > m_videoOutputDelegate = adoptNS([[WebCoreAVFPullDelegate alloc] init]); > + [m_videoOutputDelegate setParent:*this]; Nit: since you pass a reference, and so never need to clear the parent, you could add an initializer and pass it there. > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2513 > + updateLastImage(UpdateType::UpdateSynchronously); Is it OK to ignore the old warning about not doing this synchronously? > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2566 > + bool satisfied = timeoutTimer.isActive(); Isn't there is a (very) small chance that this will be wrong because you check the timer after the logging above? > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2568 > + INFO_LOG(LOGIDENTIFIER, "timed out"); Why not log this as an error so it always shows up in logs?
Jer Noble
Comment 28 2021-08-04 16:46:14 PDT
(In reply to Eric Carlson from comment #27) > Comment on attachment 434926 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=434926&action=review > > > Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:-132 > > - tearDownVideoRendering(); > > Last changed in 2011! :-D > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2429 > > m_videoOutputDelegate = adoptNS([[WebCoreAVFPullDelegate alloc] init]); > > + [m_videoOutputDelegate setParent:*this]; > > Nit: since you pass a reference, and so never need to clear the parent, you > could add an initializer and pass it there. Good idea. I'll make it the same signature as WebCoreAVFLoaderDelegate. > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2513 > > + updateLastImage(UpdateType::UpdateSynchronously); > > Is it OK to ignore the old warning about not doing this synchronously? Lol yes. Because later on in updateLastImage(), it used to call into AVAssetImageGenerator, which is super synchronous. Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2566 > > + bool satisfied = timeoutTimer.isActive(); > > Isn't there is a (very) small chance that this will be wrong because you > check the timer after the logging above? I don't think so? The timer's time might be up, but it hasn't fired yet (because it has to run on the main run-loop). > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:2568 > > + INFO_LOG(LOGIDENTIFIER, "timed out"); > > Why not log this as an error so it always shows up in logs? Will do.
Jer Noble
Comment 29 2021-08-04 17:30:50 PDT
Created attachment 434955 [details] Patch for landing
Jer Noble
Comment 30 2021-08-05 13:00:55 PDT
Created attachment 435016 [details] Patch for landing
Jer Noble
Comment 31 2021-08-05 14:16:21 PDT
Jer Noble
Comment 32 2021-08-06 07:46:46 PDT
Looks like the EWS failures are due to https://trac.webkit.org/changeset/280702/webkit. Landing.
EWS
Comment 33 2021-08-06 08:09:27 PDT
Committed r280723 (240314@main): <https://commits.webkit.org/240314@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 435016 [details].
Note You need to log in before you can comment on or make changes to this bug.