Commit 9e07cf7c by maxjulian Committed by Oliver Woodman

Update exoplayer 1 and 2 to support stereo mesh layout.

Reference spec:
https://github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md#semantics

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=147060701
parent ef41303a
...@@ -515,7 +515,13 @@ public final class C { ...@@ -515,7 +515,13 @@ public final class C {
* The stereo mode for 360/3D/VR videos. * The stereo mode for 360/3D/VR videos.
*/ */
@Retention(RetentionPolicy.SOURCE) @Retention(RetentionPolicy.SOURCE)
@IntDef({Format.NO_VALUE, STEREO_MODE_MONO, STEREO_MODE_TOP_BOTTOM, STEREO_MODE_LEFT_RIGHT}) @IntDef({
Format.NO_VALUE,
STEREO_MODE_MONO,
STEREO_MODE_TOP_BOTTOM,
STEREO_MODE_LEFT_RIGHT,
STEREO_MODE_STEREO_MESH
})
public @interface StereoMode {} public @interface StereoMode {}
/** /**
* Indicates Monoscopic stereo layout, used with 360/3D/VR videos. * Indicates Monoscopic stereo layout, used with 360/3D/VR videos.
...@@ -529,6 +535,11 @@ public final class C { ...@@ -529,6 +535,11 @@ public final class C {
* Indicates Left-Right stereo layout, used with 360/3D/VR videos. * Indicates Left-Right stereo layout, used with 360/3D/VR videos.
*/ */
public static final int STEREO_MODE_LEFT_RIGHT = 2; public static final int STEREO_MODE_LEFT_RIGHT = 2;
/**
* Indicates a stereo layout where the left and right eyes have separate meshes,
* used with 360/3D/VR videos.
*/
public static final int STEREO_MODE_STEREO_MESH = 3;
/** /**
* Converts a time in microseconds to the corresponding time in milliseconds, preserving * Converts a time in microseconds to the corresponding time in milliseconds, preserving
......
...@@ -120,7 +120,7 @@ public final class Format implements Parcelable { ...@@ -120,7 +120,7 @@ public final class Format implements Parcelable {
/** /**
* The stereo layout for 360/3D/VR video, or {@link #NO_VALUE} if not applicable. Valid stereo * The stereo layout for 360/3D/VR video, or {@link #NO_VALUE} if not applicable. Valid stereo
* modes are {@link C#STEREO_MODE_MONO}, {@link C#STEREO_MODE_TOP_BOTTOM}, {@link * modes are {@link C#STEREO_MODE_MONO}, {@link C#STEREO_MODE_TOP_BOTTOM}, {@link
* C#STEREO_MODE_LEFT_RIGHT}. * C#STEREO_MODE_LEFT_RIGHT}, {@link C#STEREO_MODE_STEREO_MESH}.
*/ */
@C.StereoMode @C.StereoMode
public final int stereoMode; public final int stereoMode;
......
...@@ -673,6 +673,9 @@ public final class MatroskaExtractor implements Extractor { ...@@ -673,6 +673,9 @@ public final class MatroskaExtractor implements Extractor {
case 3: case 3:
currentTrack.stereoMode = C.STEREO_MODE_TOP_BOTTOM; currentTrack.stereoMode = C.STEREO_MODE_TOP_BOTTOM;
break; break;
case 15:
currentTrack.stereoMode = C.STEREO_MODE_STEREO_MESH;
break;
default: default:
break; break;
} }
......
...@@ -720,6 +720,9 @@ import java.util.List; ...@@ -720,6 +720,9 @@ import java.util.List;
case 2: case 2:
stereoMode = C.STEREO_MODE_LEFT_RIGHT; stereoMode = C.STEREO_MODE_LEFT_RIGHT;
break; break;
case 3:
stereoMode = C.STEREO_MODE_STEREO_MESH;
break;
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment