Make ImageOutput clearable
It's currently not possible to remove a previously set image output on ExoPlayer, although the underlying renderer already supports receiving null to clear the output. Marking the parameter as nullable allows apps to clear it as well. PiperOrigin-RevId: 642569081
This commit is contained in:
parent
20d56341fc
commit
27e6395dbc
@ -17,6 +17,9 @@
|
||||
* Video:
|
||||
* Text:
|
||||
* Metadata:
|
||||
* Image:
|
||||
* Allow `null` as parameter for `ExoPlayer.setImageOutput` to clear a
|
||||
previously set `ImageOutput`.
|
||||
* DRM:
|
||||
* Effect:
|
||||
* Remove unused `OverlaySettings.useHdr` since dynamic range of overlay
|
||||
|
@ -1978,8 +1978,8 @@ public interface ExoPlayer extends Player {
|
||||
/**
|
||||
* Sets the {@link ImageOutput} where rendered images will be forwarded.
|
||||
*
|
||||
* @param imageOutput The {@link ImageOutput}.
|
||||
* @param imageOutput The {@link ImageOutput}. May be null to clear a previously set image output.
|
||||
*/
|
||||
@UnstableApi
|
||||
void setImageOutput(ImageOutput imageOutput);
|
||||
void setImageOutput(@Nullable ImageOutput imageOutput);
|
||||
}
|
||||
|
@ -1895,7 +1895,7 @@ import java.util.concurrent.TimeoutException;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setImageOutput(ImageOutput imageOutput) {
|
||||
public void setImageOutput(@Nullable ImageOutput imageOutput) {
|
||||
verifyApplicationThread();
|
||||
sendRendererMessage(TRACK_TYPE_IMAGE, MSG_SET_IMAGE_OUTPUT, imageOutput);
|
||||
}
|
||||
|
@ -1352,7 +1352,7 @@ public class SimpleExoPlayer extends BasePlayer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setImageOutput(ImageOutput imageOutput) {
|
||||
public void setImageOutput(@Nullable ImageOutput imageOutput) {
|
||||
blockUntilConstructorFinished();
|
||||
player.setImageOutput(imageOutput);
|
||||
}
|
||||
|
@ -434,7 +434,7 @@ public class StubExoPlayer extends StubPlayer implements ExoPlayer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setImageOutput(ImageOutput imageOutput) {
|
||||
public void setImageOutput(@Nullable ImageOutput imageOutput) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user