mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
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
This commit is contained in:
parent
ef41303a04
commit
9e07cf7c73
4 changed files with 19 additions and 2 deletions
|
|
@ -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 {
|
||||||
* 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 {
|
||||||
/**
|
/**
|
||||||
* 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 {
|
||||||
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;
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue