From 3a0fa0c89bda665d93506d8a20b9c8f83304cb19 Mon Sep 17 00:00:00 2001 From: kimvde Date: Tue, 10 Jan 2023 18:42:48 +0000 Subject: [PATCH] Indicate that some FrameProcessor methods can be called on any thread The FrameProcessor is created on the GL thread, but: - setInputFrameInfo() is currently called from the playback thread. - release() is currently called from the transformer internal thread. PiperOrigin-RevId: 501035719 --- .../com/google/android/exoplayer2/util/FrameProcessor.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/common/src/main/java/com/google/android/exoplayer2/util/FrameProcessor.java b/library/common/src/main/java/com/google/android/exoplayer2/util/FrameProcessor.java index cdf8d586fd..c63fd5e65f 100644 --- a/library/common/src/main/java/com/google/android/exoplayer2/util/FrameProcessor.java +++ b/library/common/src/main/java/com/google/android/exoplayer2/util/FrameProcessor.java @@ -137,6 +137,8 @@ public interface FrameProcessor { * *

The caller should update {@link FrameInfo#streamOffsetUs} when switching input streams to * ensure that frame timestamps are always monotonically increasing. + * + *

Can be called on any thread. */ void setInputFrameInfo(FrameInfo inputFrameInfo); @@ -216,6 +218,8 @@ public interface FrameProcessor { * ignored. * *

This method blocks until all resources are released or releasing times out. + * + *

Can be called on any thread. */ void release(); }