mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Effect: Allow SingleFrameGlTextureProcessor to throw errors.
Implementations outside media3 should be able to throw FrameProcessingException if they come across an error during configure(). PiperOrigin-RevId: 506020149
This commit is contained in:
parent
d1a27bf2a8
commit
089510bc64
1 changed files with 4 additions and 2 deletions
|
|
@ -74,8 +74,9 @@ public abstract class SingleFrameGlTextureProcessor implements GlTextureProcesso
|
||||||
* @param inputWidth The input width, in pixels.
|
* @param inputWidth The input width, in pixels.
|
||||||
* @param inputHeight The input height, in pixels.
|
* @param inputHeight The input height, in pixels.
|
||||||
* @return The output width and height of frames processed through {@link #drawFrame(int, long)}.
|
* @return The output width and height of frames processed through {@link #drawFrame(int, long)}.
|
||||||
|
* @throws FrameProcessingException If an error occurs while configuring.
|
||||||
*/
|
*/
|
||||||
public abstract Size configure(int inputWidth, int inputHeight);
|
public abstract Size configure(int inputWidth, int inputHeight) throws FrameProcessingException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws one frame.
|
* Draws one frame.
|
||||||
|
|
@ -144,7 +145,8 @@ public abstract class SingleFrameGlTextureProcessor implements GlTextureProcesso
|
||||||
}
|
}
|
||||||
|
|
||||||
@EnsuresNonNull("outputTexture")
|
@EnsuresNonNull("outputTexture")
|
||||||
private void configureOutputTexture(int inputWidth, int inputHeight) throws GlUtil.GlException {
|
private void configureOutputTexture(int inputWidth, int inputHeight)
|
||||||
|
throws GlUtil.GlException, FrameProcessingException {
|
||||||
this.inputWidth = inputWidth;
|
this.inputWidth = inputWidth;
|
||||||
this.inputHeight = inputHeight;
|
this.inputHeight = inputHeight;
|
||||||
Size outputSize = configure(inputWidth, inputHeight);
|
Size outputSize = configure(inputWidth, inputHeight);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue