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
5e538a2a
authored
Oct 15, 2019
by
olly
Committed by
Oliver Woodman
Oct 15, 2019
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Clean up GvrPlayerActivity
PiperOrigin-RevId: 274845045
parent
34c53176
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
6 additions
and
35 deletions
extensions/gvr/src/main/java/com/google/android/exoplayer2/ext/gvr/GvrPlayerActivity.java
extensions/gvr/src/main/res/layout/vr_ui.xml → extensions/gvr/src/main/res/layout/exo_vr_ui.xml
extensions/gvr/src/main/res/values-v21/styles.xml
extensions/gvr/src/main/res/values/styles.xml
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/CanvasRenderer.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/GlViewGroup.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/PointerRenderer.java
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SphericalSurfaceView.java
extensions/gvr/src/main/java/com/google/android/exoplayer2/ext/gvr/GvrPlayerActivity.java
View file @
5e538a2a
This diff is collapsed.
Click to expand it.
extensions/gvr/src/main/res/layout/vr_ui.xml
→
extensions/gvr/src/main/res/layout/
exo_
vr_ui.xml
View file @
5e538a2a
...
@@ -13,16 +13,8 @@
...
@@ -13,16 +13,8 @@
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.
-->
-->
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
<com.google.android.exoplayer2.ui.PlayerControlView
xmlns:tools=
"http://schemas.android.com/tools"
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/video_ui_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@android:color/black"
android:orientation=
"horizontal"
tools:ignore=
"Overdraw"
>
<com.google.android.exoplayer2.ui.PlayerControlView
android:id=
"@+id/controller"
android:id=
"@+id/controller"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
/>
android:layout_height=
"match_parent"
/>
</merge>
extensions/gvr/src/main/res/values-v21/styles.xml
deleted
100644 → 0
View file @
34c53176
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->
<resources>
<style
name=
"VrTheme"
parent=
"android:Theme.Material"
/>
</resources>
extensions/gvr/src/main/res/values/styles.xml
View file @
5e538a2a
...
@@ -14,5 +14,5 @@
...
@@ -14,5 +14,5 @@
limitations under the License.
limitations under the License.
-->
-->
<resources>
<resources>
<style
name=
"
VrTheme"
parent=
"android:Theme.Holo
"
/>
<style
name=
"
ExoVrTheme"
parent=
"android:Theme.DeviceDefault
"
/>
</resources>
</resources>
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/CanvasRenderer.java
View file @
5e538a2a
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
* 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
.
ui
.
spherical
;
package
com
.
google
.
android
.
exoplayer2
.
ui
.
spherical
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
GlUtil
.
checkGlError
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
GlUtil
.
checkGlError
;
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/GlViewGroup.java
View file @
5e538a2a
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
* 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
.
ui
.
spherical
;
package
com
.
google
.
android
.
exoplayer2
.
ui
.
spherical
;
import
android.content.Context
;
import
android.content.Context
;
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/PointerRenderer.java
View file @
5e538a2a
...
@@ -13,7 +13,6 @@
...
@@ -13,7 +13,6 @@
* 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
.
ui
.
spherical
;
package
com
.
google
.
android
.
exoplayer2
.
ui
.
spherical
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
GlUtil
.
checkGlError
;
import
static
com
.
google
.
android
.
exoplayer2
.
util
.
GlUtil
.
checkGlError
;
...
@@ -26,7 +25,7 @@ import java.nio.FloatBuffer;
...
@@ -26,7 +25,7 @@ import java.nio.FloatBuffer;
/** Renders a pointer. */
/** Renders a pointer. */
public
final
class
PointerRenderer
{
public
final
class
PointerRenderer
{
// The pointer quad is 2 * SIZE units.
// The pointer quad is 2 * SIZE units.
private
static
final
float
SIZE
=
.
01
f
;
private
static
final
float
SIZE
=
0
.01f
;
private
static
final
float
DISTANCE
=
1
;
private
static
final
float
DISTANCE
=
1
;
// Standard vertex shader.
// Standard vertex shader.
...
...
library/ui/src/main/java/com/google/android/exoplayer2/ui/spherical/SphericalSurfaceView.java
View file @
5e538a2a
...
@@ -55,7 +55,7 @@ public final class SphericalSurfaceView extends GLSurfaceView {
...
@@ -55,7 +55,7 @@ public final class SphericalSurfaceView extends GLSurfaceView {
// Arbitrary vertical field of view.
// Arbitrary vertical field of view.
private
static
final
int
FIELD_OF_VIEW_DEGREES
=
90
;
private
static
final
int
FIELD_OF_VIEW_DEGREES
=
90
;
private
static
final
float
Z_NEAR
=
.
1
f
;
private
static
final
float
Z_NEAR
=
0
.1f
;
private
static
final
float
Z_FAR
=
100
;
private
static
final
float
Z_FAR
=
100
;
// TODO Calculate this depending on surface size and field of view.
// TODO Calculate this depending on surface size and field of view.
...
@@ -84,7 +84,7 @@ public final class SphericalSurfaceView extends GLSurfaceView {
...
@@ -84,7 +84,7 @@ public final class SphericalSurfaceView extends GLSurfaceView {
// Configure sensors and touch.
// Configure sensors and touch.
sensorManager
=
sensorManager
=
(
SensorManager
)
Assertions
.
checkNotNull
(
context
.
getSystemService
(
Context
.
SENSOR_SERVICE
));
(
SensorManager
)
Assertions
.
checkNotNull
(
context
.
getSystemService
(
Context
.
SENSOR_SERVICE
));
Sensor
orientationSensor
=
null
;
@Nullable
Sensor
orientationSensor
=
null
;
if
(
Util
.
SDK_INT
>=
18
)
{
if
(
Util
.
SDK_INT
>=
18
)
{
// TYPE_GAME_ROTATION_VECTOR is the easiest sensor since it handles all the complex math for
// TYPE_GAME_ROTATION_VECTOR is the easiest sensor since it handles all the complex math for
// fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the magnetometer on
// fusion. It's used instead of TYPE_ROTATION_VECTOR since the latter uses the magnetometer on
...
...
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