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
860aa2f9
authored
Aug 13, 2019
by
sofijajvc
Committed by
Andrew Lewis
Aug 15, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Remove video decoder buffers from nullness blacklist
PiperOrigin-RevId: 263104935
parent
9f0fd870
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderInputBuffer.java
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderInputBuffer.java
View file @
860aa2f9
...
...
@@ -15,12 +15,13 @@
*/
package
com
.
google
.
android
.
exoplayer2
.
video
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.decoder.DecoderInputBuffer
;
/** Input buffer to a video decoder. */
public
class
VideoDecoderInputBuffer
extends
DecoderInputBuffer
{
public
ColorInfo
colorInfo
;
@Nullable
public
ColorInfo
colorInfo
;
public
VideoDecoderInputBuffer
()
{
super
(
DecoderInputBuffer
.
BUFFER_REPLACEMENT_MODE_DIRECT
);
...
...
library/core/src/main/java/com/google/android/exoplayer2/video/VideoDecoderOutputBuffer.java
View file @
860aa2f9
...
...
@@ -15,6 +15,7 @@
*/
package
com
.
google
.
android
.
exoplayer2
.
video
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.C
;
import
com.google.android.exoplayer2.decoder.OutputBuffer
;
import
java.nio.ByteBuffer
;
...
...
@@ -33,16 +34,16 @@ public abstract class VideoDecoderOutputBuffer extends OutputBuffer {
/** Output mode. */
@C
.
VideoOutputMode
public
int
mode
;
/** RGB buffer for RGB mode. */
public
ByteBuffer
data
;
@Nullable
public
ByteBuffer
data
;
public
int
width
;
public
int
height
;
public
ColorInfo
colorInfo
;
@Nullable
public
ColorInfo
colorInfo
;
/** YUV planes for YUV mode. */
public
ByteBuffer
[]
yuvPlanes
;
@Nullable
public
ByteBuffer
[]
yuvPlanes
;
public
int
[]
yuvStrides
;
@Nullable
public
int
[]
yuvStrides
;
public
int
colorspace
;
/**
...
...
@@ -88,6 +89,10 @@ public abstract class VideoDecoderOutputBuffer extends OutputBuffer {
if
(
yuvPlanes
==
null
)
{
yuvPlanes
=
new
ByteBuffer
[
3
];
}
ByteBuffer
data
=
this
.
data
;
ByteBuffer
[]
yuvPlanes
=
this
.
yuvPlanes
;
// Rewrapping has to be done on every frame since the stride might have changed.
yuvPlanes
[
0
]
=
data
.
slice
();
yuvPlanes
[
0
].
limit
(
yLength
);
...
...
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