Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b3dc32d7
authored
May 17, 2022
by
andrewlewis
Committed by
Ian Baker
May 24, 2022
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Tidy releasing `FrameProcessorChain`
PiperOrigin-RevId: 449238525
parent
bea17b43
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameProcessorChain.java
library/transformer/src/main/java/com/google/android/exoplayer2/transformer/FrameProcessorChain.java
View file @
b3dc32d7
...
...
@@ -50,7 +50,6 @@ import java.util.concurrent.RejectedExecutionException;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
org.checkerframework.checker.nullness.qual.MonotonicNonNull
;
import
org.checkerframework.checker.nullness.qual.RequiresNonNull
;
/**
* {@code FrameProcessorChain} applies changes to individual video frames.
...
...
@@ -439,12 +438,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
}
futures
.
add
(
singleThreadExecutorService
.
submit
(
this
::
releaseFrameProcessorsAndDestroyGlContext
));
if
(
inputSurfaceTexture
!=
null
)
{
inputSurfaceTexture
.
release
();
}
if
(
inputSurface
!=
null
)
{
inputSurface
.
release
();
}
singleThreadExecutorService
.
shutdown
();
try
{
if
(!
singleThreadExecutorService
.
awaitTermination
(
RELEASE_WAIT_TIME_MS
,
MILLISECONDS
))
{
...
...
@@ -452,7 +445,10 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
}
}
catch
(
InterruptedException
e
)
{
Log
.
d
(
TAG
,
"FrameProcessorChain release was interrupted"
,
e
);
Thread
.
currentThread
().
interrupt
();
}
inputSurfaceTexture
.
release
();
inputSurface
.
release
();
}
/**
...
...
@@ -491,7 +487,6 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
* <p>This method must be called on the {@linkplain #THREAD_NAME background thread}.
*/
@WorkerThread
@RequiresNonNull
(
"inputSurfaceTexture"
)
private
void
processFrame
()
{
if
(
stopProcessing
.
get
())
{
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment