Fix API nullability of remaining extensions and mark them as non-null-by-default
PiperOrigin-RevId: 262303610
This commit is contained in:
parent
79d627d441
commit
70b912c23e
@ -174,8 +174,8 @@ public class LibvpxVideoRenderer extends BaseRenderer {
|
||||
*/
|
||||
public LibvpxVideoRenderer(
|
||||
long allowedJoiningTimeMs,
|
||||
Handler eventHandler,
|
||||
VideoRendererEventListener eventListener,
|
||||
@Nullable Handler eventHandler,
|
||||
@Nullable VideoRendererEventListener eventListener,
|
||||
int maxDroppedFramesToNotify) {
|
||||
this(
|
||||
allowedJoiningTimeMs,
|
||||
@ -206,10 +206,10 @@ public class LibvpxVideoRenderer extends BaseRenderer {
|
||||
*/
|
||||
public LibvpxVideoRenderer(
|
||||
long allowedJoiningTimeMs,
|
||||
Handler eventHandler,
|
||||
VideoRendererEventListener eventListener,
|
||||
@Nullable Handler eventHandler,
|
||||
@Nullable VideoRendererEventListener eventListener,
|
||||
int maxDroppedFramesToNotify,
|
||||
DrmSessionManager<ExoMediaCrypto> drmSessionManager,
|
||||
@Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
|
||||
boolean playClearSamplesWithoutKeys,
|
||||
boolean disableLoopFilter) {
|
||||
this(
|
||||
@ -249,10 +249,10 @@ public class LibvpxVideoRenderer extends BaseRenderer {
|
||||
*/
|
||||
public LibvpxVideoRenderer(
|
||||
long allowedJoiningTimeMs,
|
||||
Handler eventHandler,
|
||||
VideoRendererEventListener eventListener,
|
||||
@Nullable Handler eventHandler,
|
||||
@Nullable VideoRendererEventListener eventListener,
|
||||
int maxDroppedFramesToNotify,
|
||||
DrmSessionManager<ExoMediaCrypto> drmSessionManager,
|
||||
@Nullable DrmSessionManager<ExoMediaCrypto> drmSessionManager,
|
||||
boolean playClearSamplesWithoutKeys,
|
||||
boolean disableLoopFilter,
|
||||
boolean enableRowMultiThreadMode,
|
||||
|
@ -33,7 +33,7 @@ import java.nio.ByteBuffer;
|
||||
private static final int DECODE_ERROR = 1;
|
||||
private static final int DRM_ERROR = 2;
|
||||
|
||||
private final ExoMediaCrypto exoMediaCrypto;
|
||||
@Nullable private final ExoMediaCrypto exoMediaCrypto;
|
||||
private final long vpxDecContext;
|
||||
|
||||
@C.VideoOutputMode private volatile int outputMode;
|
||||
@ -55,7 +55,7 @@ import java.nio.ByteBuffer;
|
||||
int numInputBuffers,
|
||||
int numOutputBuffers,
|
||||
int initialInputBufferSize,
|
||||
ExoMediaCrypto exoMediaCrypto,
|
||||
@Nullable ExoMediaCrypto exoMediaCrypto,
|
||||
boolean disableLoopFilter,
|
||||
boolean enableRowMultiThreadMode,
|
||||
int threads)
|
||||
@ -170,9 +170,19 @@ import java.nio.ByteBuffer;
|
||||
|
||||
private native long vpxClose(long context);
|
||||
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,
|
||||
int numSubSamples, int[] numBytesOfClearData, int[] numBytesOfEncryptedData);
|
||||
|
||||
private native long vpxSecureDecode(
|
||||
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);
|
||||
|
||||
/**
|
||||
|
@ -17,6 +17,7 @@ package com.google.android.exoplayer2.ext.vp9;
|
||||
|
||||
import android.content.Context;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
/**
|
||||
@ -27,10 +28,10 @@ public class VpxVideoSurfaceView extends GLSurfaceView implements VpxOutputBuffe
|
||||
private final VpxRenderer renderer;
|
||||
|
||||
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);
|
||||
renderer = new VpxRenderer();
|
||||
setPreserveEGLContextOnPause(true);
|
||||
|
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* 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;
|
Loading…
x
Reference in New Issue
Block a user