docs/doc/reference/com/google/android/exoplayer2/effect/FrameDropEffect.html
Package com.google.android.exoplayer2.effect
All Implemented Interfaces:GlEffect, Effect
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classFrameDropEffectextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[GlEffect](GlEffect.html "interface in com.google.android.exoplayer2.effect")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Drops frames to lower average frame rate to around targetFrameRate.
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| static FrameDropEffect | createDefaultFrameDropEffect(float targetFrameRate) |
Deprecated.
Creates a FrameDropEffect with the default frame dropping strategy.
|
| static FrameDropEffect | createSimpleFrameDropEffect(float expectedFrameRate, float targetFrameRate) |
Deprecated.
Creates a FrameDropEffect that keeps every nth frame, where n is the inputFrameRate divided by the targetFrameRate.
|
| GlShaderProgram | toGlShaderProgram(Context context, boolean useHdr) |
Deprecated.
Returns a GlShaderProgram that applies the effect.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
isNoOp
-
public static[FrameDropEffect](FrameDropEffect.html "class in com.google.android.exoplayer2.effect")createDefaultFrameDropEffect(float targetFrameRate)
Deprecated.
Creates a FrameDropEffect with the default frame dropping strategy.
The strategy used is to queue the current frame, x, with timestamp T_x if and only if one of the following is true:
- x is the first frame,
- (T\_x - T\_lastQueued) is closer to the target frame interval than (T\_(x+1) - T\_lastQueued)
Where T_lastQueued is the timestamp of the last queued frame and T_(x+1) is the timestamp of the next frame. The target frame interval is determined from targetFrameRate.
Parameters:targetFrameRate - The number of frames per second the output video should roughly have.
-
public static[FrameDropEffect](FrameDropEffect.html "class in com.google.android.exoplayer2.effect")createSimpleFrameDropEffect(float expectedFrameRate,
float targetFrameRate)
Deprecated.
Creates a FrameDropEffect that keeps every nth frame, where n is the inputFrameRate divided by the targetFrameRate.
For example, if the input stream came in at 60fps and the targeted frame rate was 20fps, every 3rd frame would be kept. If n is not an integer, then we round to the nearest one.
Parameters:expectedFrameRate - The number of frames per second in the input stream.targetFrameRate - The number of frames per second the output video should roughly have.
-
public[GlShaderProgram](GlShaderProgram.html "interface in com.google.android.exoplayer2.effect")toGlShaderProgram([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,
boolean useHdr)
throws[VideoFrameProcessingException](../util/VideoFrameProcessingException.html "class in com.google.android.exoplayer2.util")
Deprecated.
Description copied from interface: GlEffect
Returns a GlShaderProgram that applies the effect.
Specified by:toGlShaderProgram in interface GlEffectParameters:context - A Context.useHdr - Whether input textures come from an HDR source. If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709.Throws:VideoFrameProcessingException - If an error occurs while creating the GlShaderProgram.