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
5ebbe320
authored
Apr 19, 2023
by
tofunmi
Committed by
Rohit Singh
Apr 24, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Release BitmapTextureManager resources
PiperOrigin-RevId: 525434071
parent
9ca440eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapTextureManager.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/DefaultVideoFrameProcessor.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapTextureManager.java
View file @
5ebbe320
...
...
@@ -99,6 +99,20 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
});
}
/**
* Releases all resources.
*
* @see VideoFrameProcessor#release()
*/
public
void
release
()
{
videoFrameProcessingTaskExecutor
.
submit
(
()
->
{
if
(
currentGlTextureInfo
!=
null
)
{
GlUtil
.
deleteTexture
(
currentGlTextureInfo
.
texId
);
}
});
}
// Methods that must be called on the GL thread.
private
void
setupBitmap
(
Bitmap
bitmap
,
long
durationUs
,
float
frameRate
,
boolean
useHdr
)
...
...
library/effect/src/main/java/com/google/android/exoplayer2/effect/DefaultVideoFrameProcessor.java
View file @
5ebbe320
...
...
@@ -408,6 +408,9 @@ public final class DefaultVideoFrameProcessor implements VideoFrameProcessor {
if
(
inputExternalTextureManager
!=
null
)
{
inputExternalTextureManager
.
release
();
}
if
(
inputBitmapTextureManager
!=
null
)
{
inputBitmapTextureManager
.
release
();
}
}
/**
...
...
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