Move Spherical UI components to the UI module

PiperOrigin-RevId: 357549002
This commit is contained in:
olly 2021-02-15 12:06:08 +00:00 committed by kim-vde
parent 6a642ec58b
commit 1b6dd40aa5
13 changed files with 14 additions and 17 deletions

View File

@ -8,6 +8,8 @@
* Add builder for `PlayerNotificationManager`. * Add builder for `PlayerNotificationManager`.
* Library restructuring: * Library restructuring:
* `DebugTextViewHelper` moved from `ui` package to `util` package. * `DebugTextViewHelper` moved from `ui` package to `util` package.
* Spherical UI components moved from `video.spherical` package to
`ui.spherical` package, and made package private.
* Remove deprecated symbols: * Remove deprecated symbols:
* Remove `Player.DefaultEventListener`. Use `Player.EventListener` * Remove `Player.DefaultEventListener`. Use `Player.EventListener`
instead. instead.

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.video.spherical; package com.google.android.exoplayer2.ui.spherical;
import android.opengl.Matrix; import android.opengl.Matrix;
import com.google.android.exoplayer2.util.TimedValueQueue; import com.google.android.exoplayer2.util.TimedValueQueue;
@ -27,7 +27,7 @@ import com.google.android.exoplayer2.util.TimedValueQueue;
* <li>Recenters the rotations to componsate the yaw of the initial rotation. * <li>Recenters the rotations to componsate the yaw of the initial rotation.
* </ul> * </ul>
*/ */
public final class FrameRotationQueue { /* package */ final class FrameRotationQueue {
private final float[] recenterMatrix; private final float[] recenterMatrix;
private final float[] rotationMatrix; private final float[] rotationMatrix;
private final TimedValueQueue<float[]> rotations; private final TimedValueQueue<float[]> rotations;

View File

@ -23,7 +23,6 @@ import android.opengl.Matrix;
import android.view.Display; import android.view.Display;
import android.view.Surface; import android.view.Surface;
import androidx.annotation.BinderThread; import androidx.annotation.BinderThread;
import com.google.android.exoplayer2.video.spherical.FrameRotationQueue;
/** /**
* Listens for orientation sensor events, converts event data to rotation matrix and roll value, and * Listens for orientation sensor events, converts event data to rotation matrix and roll value, and

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.video.spherical; package com.google.android.exoplayer2.ui.spherical;
import androidx.annotation.IntDef; import androidx.annotation.IntDef;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
@ -24,7 +24,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
/** The projection mesh used with 360/VR videos. */ /** The projection mesh used with 360/VR videos. */
public final class Projection { /* package */ final class Projection {
/** Enforces allowed (sub) mesh draw modes. */ /** Enforces allowed (sub) mesh draw modes. */
@Documented @Documented

View File

@ -13,15 +13,15 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.video.spherical; package com.google.android.exoplayer2.ui.spherical;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.ui.spherical.Projection.Mesh;
import com.google.android.exoplayer2.ui.spherical.Projection.SubMesh;
import com.google.android.exoplayer2.util.ParsableBitArray; import com.google.android.exoplayer2.util.ParsableBitArray;
import com.google.android.exoplayer2.util.ParsableByteArray; import com.google.android.exoplayer2.util.ParsableByteArray;
import com.google.android.exoplayer2.util.Util; import com.google.android.exoplayer2.util.Util;
import com.google.android.exoplayer2.video.spherical.Projection.Mesh;
import com.google.android.exoplayer2.video.spherical.Projection.SubMesh;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.zip.Inflater; import java.util.zip.Inflater;
@ -34,7 +34,7 @@ import java.util.zip.Inflater;
* *
* <p>The decoder does not perform CRC checks at the moment. * <p>The decoder does not perform CRC checks at the moment.
*/ */
public final class ProjectionDecoder { /* package */ final class ProjectionDecoder {
private static final int TYPE_YTMP = 0x79746d70; private static final int TYPE_YTMP = 0x79746d70;
private static final int TYPE_MSHP = 0x6d736870; private static final int TYPE_MSHP = 0x6d736870;

View File

@ -22,7 +22,6 @@ import android.opengl.GLES20;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.google.android.exoplayer2.C; import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.util.GlUtil; import com.google.android.exoplayer2.util.GlUtil;
import com.google.android.exoplayer2.video.spherical.Projection;
import java.nio.FloatBuffer; import java.nio.FloatBuffer;
/** /**

View File

@ -29,9 +29,6 @@ import com.google.android.exoplayer2.util.GlUtil;
import com.google.android.exoplayer2.util.TimedValueQueue; import com.google.android.exoplayer2.util.TimedValueQueue;
import com.google.android.exoplayer2.video.VideoFrameMetadataListener; import com.google.android.exoplayer2.video.VideoFrameMetadataListener;
import com.google.android.exoplayer2.video.spherical.CameraMotionListener; import com.google.android.exoplayer2.video.spherical.CameraMotionListener;
import com.google.android.exoplayer2.video.spherical.FrameRotationQueue;
import com.google.android.exoplayer2.video.spherical.Projection;
import com.google.android.exoplayer2.video.spherical.ProjectionDecoder;
import java.util.Arrays; import java.util.Arrays;
import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicBoolean;
import org.checkerframework.checker.nullness.qual.MonotonicNonNull; import org.checkerframework.checker.nullness.qual.MonotonicNonNull;

View File

@ -44,7 +44,7 @@ import androidx.annotation.Nullable;
* a nicer UI. An even more advanced UI would reproject the user's touch point into 3D and drag the * a nicer UI. An even more advanced UI would reproject the user's touch point into 3D and drag the
* Mesh as the user moves their finger. However, that requires quaternion interpolation. * Mesh as the user moves their finger. However, that requires quaternion interpolation.
*/ */
/* package */ class TouchTracker extends GestureDetector.SimpleOnGestureListener /* package */ final class TouchTracker extends GestureDetector.SimpleOnGestureListener
implements View.OnTouchListener, OrientationListener.Listener { implements View.OnTouchListener, OrientationListener.Listener {
/* package */ interface Listener { /* package */ interface Listener {

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.video.spherical; package com.google.android.exoplayer2.ui.spherical;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.video.spherical; package com.google.android.exoplayer2.ui.spherical;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.google.android.exoplayer2.video.spherical; package com.google.android.exoplayer2.ui.spherical;
import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;