mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Move BaseGvrPlayerActivity to com.google.android.exoplayer2.ext.gvr
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219829614
This commit is contained in:
parent
c5db69d22c
commit
37f4540156
5 changed files with 11 additions and 10 deletions
|
|
@ -14,7 +14,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.google.android.exoplayer2.ui.spherical;
|
||||
package com.google.android.exoplayer2.ext.gvr;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
@ -32,8 +32,10 @@ import android.view.MotionEvent;
|
|||
import android.view.Surface;
|
||||
import com.google.android.exoplayer2.C;
|
||||
import com.google.android.exoplayer2.Player;
|
||||
import com.google.android.exoplayer2.ext.gvr.R;
|
||||
import com.google.android.exoplayer2.ui.PlayerControlView;
|
||||
import com.google.android.exoplayer2.ui.spherical.GlViewGroup;
|
||||
import com.google.android.exoplayer2.ui.spherical.PointerRenderer;
|
||||
import com.google.android.exoplayer2.ui.spherical.SceneRenderer;
|
||||
import com.google.android.exoplayer2.util.Assertions;
|
||||
import com.google.android.exoplayer2.util.Util;
|
||||
import com.google.vr.ndk.base.DaydreamApi;
|
||||
|
|
@ -40,7 +40,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
* GL thread before it can be rendered.
|
||||
*/
|
||||
@TargetApi(15)
|
||||
/* package */ final class CanvasRenderer {
|
||||
public final class CanvasRenderer {
|
||||
|
||||
private static final float WIDTH_UNIT = 0.8f;
|
||||
private static final float DISTANCE_UNIT = 1f;
|
||||
|
|
@ -156,7 +156,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
}
|
||||
|
||||
/** Finishes constructing this object on the GL Thread. */
|
||||
/* package */ void init() {
|
||||
public void init() {
|
||||
if (program != 0) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -183,7 +183,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
* @param viewProjectionMatrix Array of floats containing the quad's 4x4 perspective matrix in the
|
||||
* {@link android.opengl.Matrix} format.
|
||||
*/
|
||||
/* package */ void draw(float[] viewProjectionMatrix) {
|
||||
public void draw(float[] viewProjectionMatrix) {
|
||||
if (displaySurfaceTexture == null) {
|
||||
return;
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
}
|
||||
|
||||
/** Frees GL resources. */
|
||||
/* package */ void shutdown() {
|
||||
public void shutdown() {
|
||||
if (program != 0) {
|
||||
GLES20.glDeleteProgram(program);
|
||||
GLES20.glDeleteTextures(1, new int[] {textureId}, 0);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import android.widget.FrameLayout;
|
|||
import com.google.android.exoplayer2.util.Assertions;
|
||||
|
||||
/** This View uses standard Android APIs to render its child Views to a texture. */
|
||||
/* package */ final class GlViewGroup extends FrameLayout {
|
||||
public final class GlViewGroup extends FrameLayout {
|
||||
|
||||
private final CanvasRenderer canvasRenderer;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import com.google.android.exoplayer2.util.GlUtil;
|
|||
import java.nio.FloatBuffer;
|
||||
|
||||
/** Renders a pointer. */
|
||||
/* package */ final class PointerRenderer {
|
||||
public final class PointerRenderer {
|
||||
// The pointer quad is 2 * SIZE units.
|
||||
private static final float SIZE = .01f;
|
||||
private static final float DISTANCE = 1;
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
|||
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||
|
||||
/** Renders a GL Scene. */
|
||||
/* package */ final class SceneRenderer
|
||||
implements VideoFrameMetadataListener, CameraMotionListener {
|
||||
public final class SceneRenderer implements VideoFrameMetadataListener, CameraMotionListener {
|
||||
|
||||
private final AtomicBoolean frameAvailable;
|
||||
private final AtomicBoolean resetRotationAtNextFrame;
|
||||
|
|
|
|||
Loading…
Reference in a new issue