Skip to content

Commit

Permalink
Move BaseGvrPlayerActivity to com.google.android.exoplayer2.ext.gvr
Browse files Browse the repository at this point in the history
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219829614
  • Loading branch information
erdemguven authored and ojw28 committed Nov 6, 2018
1 parent c5db69d commit 37f4540
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -32,8 +32,10 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
* 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;
Expand Down Expand Up @@ -156,7 +156,7 @@ public void unlockCanvasAndPost(@Nullable Canvas canvas) {
}

/** Finishes constructing this object on the GL Thread. */
/* package */ void init() {
public void init() {
if (program != 0) {
return;
}
Expand All @@ -183,7 +183,7 @@ public void unlockCanvasAndPost(@Nullable Canvas canvas) {
* @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;
}
Expand Down Expand Up @@ -237,7 +237,7 @@ public void unlockCanvasAndPost(@Nullable Canvas canvas) {
}

/** Frees GL resources. */
/* package */ void shutdown() {
public void shutdown() {
if (program != 0) {
GLES20.glDeleteProgram(program);
GLES20.glDeleteTextures(1, new int[] {textureId}, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
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;
Expand Down

0 comments on commit 37f4540

Please sign in to comment.