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
70b912c2
authored
Aug 08, 2019
by
tonihei
Committed by
Oliver Woodman
Aug 09, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fix API nullability of remaining extensions and mark them as non-null-by-default
PiperOrigin-RevId: 262303610
parent
79d627d4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
15 deletions
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxVideoSurfaceView.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/package-info.java
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/LibvpxVideoRenderer.java
View file @
70b912c2
...
@@ -174,8 +174,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -174,8 +174,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
*/
*/
public
LibvpxVideoRenderer
(
public
LibvpxVideoRenderer
(
long
allowedJoiningTimeMs
,
long
allowedJoiningTimeMs
,
Handler
eventHandler
,
@Nullable
Handler
eventHandler
,
VideoRendererEventListener
eventListener
,
@Nullable
VideoRendererEventListener
eventListener
,
int
maxDroppedFramesToNotify
)
{
int
maxDroppedFramesToNotify
)
{
this
(
this
(
allowedJoiningTimeMs
,
allowedJoiningTimeMs
,
...
@@ -206,10 +206,10 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -206,10 +206,10 @@ public class LibvpxVideoRenderer extends BaseRenderer {
*/
*/
public
LibvpxVideoRenderer
(
public
LibvpxVideoRenderer
(
long
allowedJoiningTimeMs
,
long
allowedJoiningTimeMs
,
Handler
eventHandler
,
@Nullable
Handler
eventHandler
,
VideoRendererEventListener
eventListener
,
@Nullable
VideoRendererEventListener
eventListener
,
int
maxDroppedFramesToNotify
,
int
maxDroppedFramesToNotify
,
DrmSessionManager
<
ExoMediaCrypto
>
drmSessionManager
,
@Nullable
DrmSessionManager
<
ExoMediaCrypto
>
drmSessionManager
,
boolean
playClearSamplesWithoutKeys
,
boolean
playClearSamplesWithoutKeys
,
boolean
disableLoopFilter
)
{
boolean
disableLoopFilter
)
{
this
(
this
(
...
@@ -249,10 +249,10 @@ public class LibvpxVideoRenderer extends BaseRenderer {
...
@@ -249,10 +249,10 @@ public class LibvpxVideoRenderer extends BaseRenderer {
*/
*/
public
LibvpxVideoRenderer
(
public
LibvpxVideoRenderer
(
long
allowedJoiningTimeMs
,
long
allowedJoiningTimeMs
,
Handler
eventHandler
,
@Nullable
Handler
eventHandler
,
VideoRendererEventListener
eventListener
,
@Nullable
VideoRendererEventListener
eventListener
,
int
maxDroppedFramesToNotify
,
int
maxDroppedFramesToNotify
,
DrmSessionManager
<
ExoMediaCrypto
>
drmSessionManager
,
@Nullable
DrmSessionManager
<
ExoMediaCrypto
>
drmSessionManager
,
boolean
playClearSamplesWithoutKeys
,
boolean
playClearSamplesWithoutKeys
,
boolean
disableLoopFilter
,
boolean
disableLoopFilter
,
boolean
enableRowMultiThreadMode
,
boolean
enableRowMultiThreadMode
,
...
...
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxDecoder.java
View file @
70b912c2
...
@@ -33,7 +33,7 @@ import java.nio.ByteBuffer;
...
@@ -33,7 +33,7 @@ import java.nio.ByteBuffer;
private
static
final
int
DECODE_ERROR
=
1
;
private
static
final
int
DECODE_ERROR
=
1
;
private
static
final
int
DRM_ERROR
=
2
;
private
static
final
int
DRM_ERROR
=
2
;
private
final
ExoMediaCrypto
exoMediaCrypto
;
@Nullable
private
final
ExoMediaCrypto
exoMediaCrypto
;
private
final
long
vpxDecContext
;
private
final
long
vpxDecContext
;
@C
.
VideoOutputMode
private
volatile
int
outputMode
;
@C
.
VideoOutputMode
private
volatile
int
outputMode
;
...
@@ -55,7 +55,7 @@ import java.nio.ByteBuffer;
...
@@ -55,7 +55,7 @@ import java.nio.ByteBuffer;
int
numInputBuffers
,
int
numInputBuffers
,
int
numOutputBuffers
,
int
numOutputBuffers
,
int
initialInputBufferSize
,
int
initialInputBufferSize
,
ExoMediaCrypto
exoMediaCrypto
,
@Nullable
ExoMediaCrypto
exoMediaCrypto
,
boolean
disableLoopFilter
,
boolean
disableLoopFilter
,
boolean
enableRowMultiThreadMode
,
boolean
enableRowMultiThreadMode
,
int
threads
)
int
threads
)
...
@@ -170,9 +170,19 @@ import java.nio.ByteBuffer;
...
@@ -170,9 +170,19 @@ import java.nio.ByteBuffer;
private
native
long
vpxClose
(
long
context
);
private
native
long
vpxClose
(
long
context
);
private
native
long
vpxDecode
(
long
context
,
ByteBuffer
encoded
,
int
length
);
private
native
long
vpxDecode
(
long
context
,
ByteBuffer
encoded
,
int
length
);
private
native
long
vpxSecureDecode
(
long
context
,
ByteBuffer
encoded
,
int
length
,
ExoMediaCrypto
mediaCrypto
,
int
inputMode
,
byte
[]
key
,
byte
[]
iv
,
private
native
long
vpxSecureDecode
(
int
numSubSamples
,
int
[]
numBytesOfClearData
,
int
[]
numBytesOfEncryptedData
);
long
context
,
ByteBuffer
encoded
,
int
length
,
@Nullable
ExoMediaCrypto
mediaCrypto
,
int
inputMode
,
byte
[]
key
,
byte
[]
iv
,
int
numSubSamples
,
int
[]
numBytesOfClearData
,
int
[]
numBytesOfEncryptedData
);
private
native
int
vpxGetFrame
(
long
context
,
VpxOutputBuffer
outputBuffer
);
private
native
int
vpxGetFrame
(
long
context
,
VpxOutputBuffer
outputBuffer
);
/**
/**
...
...
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/VpxVideoSurfaceView.java
View file @
70b912c2
...
@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.ext.vp9;
...
@@ -17,6 +17,7 @@ package com.google.android.exoplayer2.ext.vp9;
import
android.content.Context
;
import
android.content.Context
;
import
android.opengl.GLSurfaceView
;
import
android.opengl.GLSurfaceView
;
import
androidx.annotation.Nullable
;
import
android.util.AttributeSet
;
import
android.util.AttributeSet
;
/**
/**
...
@@ -27,10 +28,10 @@ public class VpxVideoSurfaceView extends GLSurfaceView implements VpxOutputBuffe
...
@@ -27,10 +28,10 @@ public class VpxVideoSurfaceView extends GLSurfaceView implements VpxOutputBuffe
private
final
VpxRenderer
renderer
;
private
final
VpxRenderer
renderer
;
public
VpxVideoSurfaceView
(
Context
context
)
{
public
VpxVideoSurfaceView
(
Context
context
)
{
this
(
context
,
null
);
this
(
context
,
/* attrs= */
null
);
}
}
public
VpxVideoSurfaceView
(
Context
context
,
AttributeSet
attrs
)
{
public
VpxVideoSurfaceView
(
Context
context
,
@Nullable
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
super
(
context
,
attrs
);
renderer
=
new
VpxRenderer
();
renderer
=
new
VpxRenderer
();
setPreserveEGLContextOnPause
(
true
);
setPreserveEGLContextOnPause
(
true
);
...
...
extensions/vp9/src/main/java/com/google/android/exoplayer2/ext/vp9/package-info.java
0 → 100644
View file @
70b912c2
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@NonNullApi
package
com
.
google
.
android
.
exoplayer2
.
ext
.
vp9
;
import
com.google.android.exoplayer2.util.NonNullApi
;
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