You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to the `droppedFrames` callback, but represents the number of consecutive frames that we dropped before rendering a frame or seeking or stopping the renderer.
While we already have a `maxConsecutiveDroppedFrame` available in the `DecoderCounters`, this doesn't provide enough visibility into the actual statistics of dropped frames.
If we get 200 dropped frames and a `maxConsecutive` of 20, we don't know if we dropped 20 frames in a row once and then dropped a single frame 180 times or if we dropped 20 frames 10 times.
We could add some code on our `OnDroppedFrames` callback to estimate if two calls are for consecutive frames, but that seems very fragile.
Specifying when to invoke the callback is controlled by `minConsecutiveDroppedFramesToNotify` similar to the `maxDroppedFramesToNotify` but that would only notify if more than X consecutive frames were dropped.
Adding support for both `MediaCodecVideoRenderer` and `DecoderVideoRenderer`.
Copy file name to clipboardexpand all lines: libraries/decoder_ffmpeg/src/main/java/androidx/media3/decoder/ffmpeg/ExperimentalFfmpegVideoRenderer.java
+11-2
Original file line number
Diff line number
Diff line change
@@ -57,13 +57,22 @@ public final class ExperimentalFfmpegVideoRenderer extends DecoderVideoRenderer
57
57
* @param eventListener A listener of events. May be null if delivery of events is not required.
58
58
* @param maxDroppedFramesToNotify The maximum number of frames that can be dropped between
59
59
* invocations of {@link VideoRendererEventListener#onDroppedFrames(int, long)}.
60
+
* @param minConsecutiveDroppedFramesToNotify The minimum number of consecutive frames that must
61
+
* be dropped for {@link VideoRendererEventListener#onConsecutiveDroppedFrames(int, long)} to
0 commit comments