Bug
1774939: Rebuild video layer if it fails to enqueue a surface. r=mstange
For unknown reasons, AVSampleBufferDisplayLayer may sometimes stop
enqueueing new buffers. In this case it will return false for the
readyForMoreMediaData property. When this happens, there's no guarantee
that the layer will ever accept new buffers again. We can work around
this by rebuilding the video layer when it locks up, which ensures that
the video sample is displayed in the next update, seemingly without
visual jitter.
This is not useful if the video enqueueing is failing due to memory
pressure, but more serious failure points would likely be occurring at the
same time.
This patch also adds to the logging we will see when the pref
`gfx.core-animation.specialize-video.log` is set.
Differential Revision: https://phabricator.services.mozilla.com/
D149920