Merge pull request #1905 from khouzam:placeholderSurface

PiperOrigin-RevId: 721367514
This commit is contained in:
Copybara-Service 2025-01-30 06:34:26 -08:00
commit fc1d133454
2 changed files with 5 additions and 1 deletions

View File

@ -11,6 +11,10 @@
* Audio: * Audio:
* Make `androidx.media3.common.audio.SonicAudioProcessor` final. * Make `androidx.media3.common.audio.SonicAudioProcessor` final.
* Video: * Video:
* Change `MediaCodecVideoRenderer.shouldUsePlaceholderSurface` to
protected so that applications can override to block usage of
placeholder surfaces
([#1905](https://github.com/androidx/media/pull/1905)).
* Text: * Text:
* Metadata: * Metadata:
* Image: * Image:

View File

@ -1882,7 +1882,7 @@ public class MediaCodecVideoRenderer extends MediaCodecRenderer
return Util.SDK_INT >= 35 && codecInfo.detachedSurfaceSupported; return Util.SDK_INT >= 35 && codecInfo.detachedSurfaceSupported;
} }
private boolean shouldUsePlaceholderSurface(MediaCodecInfo codecInfo) { protected boolean shouldUsePlaceholderSurface(MediaCodecInfo codecInfo) {
return Util.SDK_INT >= 23 return Util.SDK_INT >= 23
&& !tunneling && !tunneling
&& !codecNeedsSetOutputSurfaceWorkaround(codecInfo.name) && !codecNeedsSetOutputSurfaceWorkaround(codecInfo.name)