Commit e832a4e0 by samrobinson Committed by Ian Baker

Adjust SEF reader times to long.

PiperOrigin-RevId: 342642410
parent 4ff7eb49
...@@ -31,9 +31,9 @@ public final class SlowMotionData implements Metadata.Entry { ...@@ -31,9 +31,9 @@ public final class SlowMotionData implements Metadata.Entry {
public static final class Segment implements Parcelable { public static final class Segment implements Parcelable {
/** The start time, in milliseconds, of the track segment that is intended to be slow motion. */ /** The start time, in milliseconds, of the track segment that is intended to be slow motion. */
public final int startTimeMs; public final long startTimeMs;
/** The end time, in milliseconds, of the track segment that is intended to be slow motion. */ /** The end time, in milliseconds, of the track segment that is intended to be slow motion. */
public final int endTimeMs; public final long endTimeMs;
/** /**
* The speed reduction factor. * The speed reduction factor.
* *
...@@ -49,7 +49,7 @@ public final class SlowMotionData implements Metadata.Entry { ...@@ -49,7 +49,7 @@ public final class SlowMotionData implements Metadata.Entry {
* @param endTimeMs See {@link #endTimeMs}. * @param endTimeMs See {@link #endTimeMs}.
* @param speedDivisor See {@link #speedDivisor}. * @param speedDivisor See {@link #speedDivisor}.
*/ */
public Segment(int startTimeMs, int endTimeMs, int speedDivisor) { public Segment(long startTimeMs, long endTimeMs, int speedDivisor) {
this.startTimeMs = startTimeMs; this.startTimeMs = startTimeMs;
this.endTimeMs = endTimeMs; this.endTimeMs = endTimeMs;
this.speedDivisor = speedDivisor; this.speedDivisor = speedDivisor;
...@@ -88,8 +88,8 @@ public final class SlowMotionData implements Metadata.Entry { ...@@ -88,8 +88,8 @@ public final class SlowMotionData implements Metadata.Entry {
@Override @Override
public void writeToParcel(Parcel dest, int flags) { public void writeToParcel(Parcel dest, int flags) {
dest.writeInt(startTimeMs); dest.writeLong(startTimeMs);
dest.writeInt(endTimeMs); dest.writeLong(endTimeMs);
dest.writeInt(speedDivisor); dest.writeInt(speedDivisor);
} }
...@@ -98,8 +98,8 @@ public final class SlowMotionData implements Metadata.Entry { ...@@ -98,8 +98,8 @@ public final class SlowMotionData implements Metadata.Entry {
@Override @Override
public Segment createFromParcel(Parcel in) { public Segment createFromParcel(Parcel in) {
int startTimeMs = in.readInt(); long startTimeMs = in.readLong();
int endTimeMs = in.readInt(); long endTimeMs = in.readLong();
int speedDivisor = in.readInt(); int speedDivisor = in.readInt();
return new Segment(startTimeMs, endTimeMs, speedDivisor); return new Segment(startTimeMs, endTimeMs, speedDivisor);
} }
......
...@@ -234,8 +234,8 @@ import java.util.List; ...@@ -234,8 +234,8 @@ import java.util.List;
throw new ParserException(); throw new ParserException();
} }
try { try {
int startTimeMs = Integer.parseInt(values.get(0)); long startTimeMs = Long.parseLong(values.get(0));
int endTimeMs = Integer.parseInt(values.get(1)); long endTimeMs = Long.parseLong(values.get(1));
int speedMode = Integer.parseInt(values.get(2)); int speedMode = Integer.parseInt(values.get(2));
int speedDivisor = 1 << (speedMode - 1); int speedDivisor = 1 << (speedMode - 1);
segments.add(new SlowMotionData.Segment(startTimeMs, endTimeMs, speedDivisor)); segments.add(new SlowMotionData.Segment(startTimeMs, endTimeMs, speedDivisor));
......
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