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
e58427ac
authored
Apr 24, 2023
by
claincly
Committed by
Ian Baker
Apr 26, 2023
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add default impl for some InputHandler methods.
And minor fixes. PiperOrigin-RevId: 526717927
parent
28641637
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
29 deletions
library/common/src/main/java/com/google/android/exoplayer2/util/VideoFrameProcessor.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapTextureManager.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/ExternalTextureManager.java
library/effect/src/main/java/com/google/android/exoplayer2/effect/InputHandler.java
library/common/src/main/java/com/google/android/exoplayer2/util/VideoFrameProcessor.java
View file @
e58427ac
...
@@ -207,7 +207,7 @@ public interface VideoFrameProcessor {
...
@@ -207,7 +207,7 @@ public interface VideoFrameProcessor {
void
registerInputFrame
();
void
registerInputFrame
();
/**
/**
*
r
eturns the number of input frames that have been made available to the {@code
*
R
eturns the number of input frames that have been made available to the {@code
* VideoFrameProcessor} but have not been processed yet.
* VideoFrameProcessor} but have not been processed yet.
*
*
* <p>Can be called on any thread.
* <p>Can be called on any thread.
...
...
library/effect/src/main/java/com/google/android/exoplayer2/effect/BitmapTextureManager.java
View file @
e58427ac
...
@@ -21,10 +21,8 @@ import static java.lang.Math.round;
...
@@ -21,10 +21,8 @@ import static java.lang.Math.round;
import
android.graphics.Bitmap
;
import
android.graphics.Bitmap
;
import
android.opengl.GLES20
;
import
android.opengl.GLES20
;
import
android.opengl.GLUtils
;
import
android.opengl.GLUtils
;
import
android.view.Surface
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.util.FrameInfo
;
import
com.google.android.exoplayer2.util.GlTextureInfo
;
import
com.google.android.exoplayer2.util.GlTextureInfo
;
import
com.google.android.exoplayer2.util.GlUtil
;
import
com.google.android.exoplayer2.util.GlUtil
;
import
com.google.android.exoplayer2.util.VideoFrameProcessingException
;
import
com.google.android.exoplayer2.util.VideoFrameProcessingException
;
...
@@ -78,11 +76,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
...
@@ -78,11 +76,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
}
}
@Override
@Override
public
void
setDefaultBufferSize
(
int
width
,
int
height
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
queueInputBitmap
(
public
void
queueInputBitmap
(
Bitmap
inputBitmap
,
long
durationUs
,
float
frameRate
,
boolean
useHdr
)
{
Bitmap
inputBitmap
,
long
durationUs
,
float
frameRate
,
boolean
useHdr
)
{
videoFrameProcessingTaskExecutor
.
submit
(
videoFrameProcessingTaskExecutor
.
submit
(
...
@@ -90,16 +83,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
...
@@ -90,16 +83,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
}
}
@Override
@Override
public
Surface
getInputSurface
()
{
throw
new
UnsupportedOperationException
();
}
@Override
public
void
registerInputFrame
(
FrameInfo
frameInfo
)
{
// Do nothing.
}
@Override
public
int
getPendingFrameCount
()
{
public
int
getPendingFrameCount
()
{
// Always treat all queued bitmaps as immediately processed.
// Always treat all queued bitmaps as immediately processed.
return
0
;
return
0
;
...
...
library/effect/src/main/java/com/google/android/exoplayer2/effect/ExternalTextureManager.java
View file @
e58427ac
...
@@ -17,7 +17,6 @@ package com.google.android.exoplayer2.effect;
...
@@ -17,7 +17,6 @@ package com.google.android.exoplayer2.effect;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Assertions
.
checkStateNotNull
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
Assertions
.
checkStateNotNull
;
import
android.graphics.Bitmap
;
import
android.graphics.SurfaceTexture
;
import
android.graphics.SurfaceTexture
;
import
android.view.Surface
;
import
android.view.Surface
;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
...
@@ -111,12 +110,6 @@ import java.util.concurrent.atomic.AtomicInteger;
...
@@ -111,12 +110,6 @@ import java.util.concurrent.atomic.AtomicInteger;
}
}
@Override
@Override
public
void
queueInputBitmap
(
Bitmap
inputBitmap
,
long
durationUs
,
float
frameRate
,
boolean
useHdr
)
{
throw
new
UnsupportedOperationException
();
}
@Override
public
Surface
getInputSurface
()
{
public
Surface
getInputSurface
()
{
return
surface
;
return
surface
;
}
}
...
...
library/effect/src/main/java/com/google/android/exoplayer2/effect/InputHandler.java
View file @
e58427ac
...
@@ -32,24 +32,33 @@ import com.google.android.exoplayer2.util.VideoFrameProcessor;
...
@@ -32,24 +32,33 @@ import com.google.android.exoplayer2.util.VideoFrameProcessor;
*
*
* <p>Only works when the input is received on a {@link SurfaceTexture}.
* <p>Only works when the input is received on a {@link SurfaceTexture}.
*/
*/
void
setDefaultBufferSize
(
int
width
,
int
height
);
default
void
setDefaultBufferSize
(
int
width
,
int
height
)
{
throw
new
UnsupportedOperationException
();
}
/**
/**
* Provides an input {@link Bitmap} to put into the video frames.
* Provides an input {@link Bitmap} to put into the video frames.
*
*
* @see VideoFrameProcessor#queueInputBitmap
* @see VideoFrameProcessor#queueInputBitmap
*/
*/
void
queueInputBitmap
(
Bitmap
inputBitmap
,
long
durationUs
,
float
frameRate
,
boolean
useHdr
);
default
void
queueInputBitmap
(
Bitmap
inputBitmap
,
long
durationUs
,
float
frameRate
,
boolean
useHdr
)
{
throw
new
UnsupportedOperationException
();
}
/**
/**
* See {@link VideoFrameProcessor#getInputSurface}.
* See {@link VideoFrameProcessor#getInputSurface}.
*
*
* <p>Only works when the input is received on a {@link SurfaceTexture}.
* <p>Only works when the input is received on a {@link SurfaceTexture}.
*/
*/
Surface
getInputSurface
();
default
Surface
getInputSurface
()
{
throw
new
UnsupportedOperationException
();
}
/** Informs the {@code InputHandler} that a frame will be queued. */
/** Informs the {@code InputHandler} that a frame will be queued. */
void
registerInputFrame
(
FrameInfo
frameInfo
);
default
void
registerInputFrame
(
FrameInfo
frameInfo
)
{
throw
new
UnsupportedOperationException
();
}
/** See {@link VideoFrameProcessor#getPendingInputFrameCount}. */
/** See {@link VideoFrameProcessor#getPendingInputFrameCount}. */
int
getPendingFrameCount
();
int
getPendingFrameCount
();
...
...
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