
Seeking was causing the player to hang in the following scenario: 1. The surfaceTexture's onFrameAvailableListener is called in ExternalTextureManager to notify that a new frame is available. 2. This call submits a task on the GL thread. 3. A seek is performed and DefaultVideoFrameProcessor.flush() is called before the task submitted in 2 is executed. 4. DefaultVideoFrameProcessor.flush() flushes the task executor, so that the task submitted in 2 never gets executed. 5. Once the seek is over, the first frame is registered and rendered on the surface texture. 6. Playback hangs because the onFrameAvailableListener is never called for this new frame. This is because surfaceTexture.updateTexImage() was never called on the frame that became available in 1. This fix is making sure that the task submitted in 2 always gets executed. Issue: androidx/media#1535 PiperOrigin-RevId: 671389215
Effect module
Provides functionality for applying effects to video frames.
Getting the module
The easiest way to get the module is to add it as a gradle dependency:
implementation 'androidx.media3:media3-effect:1.X.X'
where 1.X.X
is the version, which must match the version of the other media
modules being used.
Alternatively, you can clone this GitHub project and depend on the module locally. Instructions for doing this can be found in the top level README.