diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index f7847cd5333..0e8c985e748 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -49,6 +49,7 @@
* MP3: Ignore Xing data length if it's longer than the known stream length
([#3117](https://github.com/androidx/media/issues/3117)).
* Ignore `av1C` data with unsupported version.
+ * MP4: Add support for big-endian floating point PCM in `fpcm` boxes.
* Inspector:
* Audio:
* Update `MediaCodecAudioRenderer` to extract the spatial channelMask from
@@ -72,6 +73,7 @@
* Set correct `AudioProcessor.StreamMetadata.positionOffsetUs` to allow
time-based audio processing
([#418](https://github.com/androidx/media/issues/418)).
+ * Add support for big endian 32-bit and 64-bit floating point PCM.
* Video:
* Add support for skipping frames that are late during join rather than
dropping in DecoderVideoRenderer.
diff --git a/libraries/common/src/main/java/androidx/media3/common/C.java b/libraries/common/src/main/java/androidx/media3/common/C.java
index 264566024f9..9b328d9f17b 100644
--- a/libraries/common/src/main/java/androidx/media3/common/C.java
+++ b/libraries/common/src/main/java/androidx/media3/common/C.java
@@ -181,10 +181,12 @@ private C() {}
* {@link #ENCODING_INVALID}, {@link #ENCODING_PCM_8BIT}, {@link #ENCODING_PCM_16BIT}, {@link
* #ENCODING_PCM_16BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_24BIT}, {@link
* #ENCODING_PCM_24BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_32BIT}, {@link
- * #ENCODING_PCM_32BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_FLOAT}, {@link #ENCODING_PCM_DOUBLE},
- * {@link #ENCODING_MP3}, {@link #ENCODING_AC3}, {@link #ENCODING_E_AC3}, {@link
- * #ENCODING_E_AC3_JOC}, {@link #ENCODING_AC4}, {@link #ENCODING_DTS}, {@link #ENCODING_DTS_HD},
- * {@link #ENCODING_DOLBY_TRUEHD}, {@link #ENCODING_OPUS} or {@link #ENCODING_DSD}.
+ * #ENCODING_PCM_32BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_FLOAT}, {@link
+ * #ENCODING_PCM_FLOAT_BIG_ENDIAN}, {@link #ENCODING_PCM_DOUBLE}, {@link
+ * #ENCODING_PCM_DOUBLE_BIG_ENDIAN}, {@link #ENCODING_MP3}, {@link #ENCODING_AC3}, {@link
+ * #ENCODING_E_AC3}, {@link #ENCODING_E_AC3_JOC}, {@link #ENCODING_AC4}, {@link #ENCODING_DTS},
+ * {@link #ENCODING_DTS_HD}, {@link #ENCODING_DOLBY_TRUEHD}, {@link #ENCODING_OPUS} or {@link
+ * #ENCODING_DSD}.
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
@@ -200,7 +202,9 @@ private C() {}
ENCODING_PCM_32BIT,
ENCODING_PCM_32BIT_BIG_ENDIAN,
ENCODING_PCM_FLOAT,
+ ENCODING_PCM_FLOAT_BIG_ENDIAN,
ENCODING_PCM_DOUBLE,
+ ENCODING_PCM_DOUBLE_BIG_ENDIAN,
ENCODING_MP3,
ENCODING_AAC_LC,
ENCODING_AAC_HE_V1,
@@ -226,7 +230,9 @@ private C() {}
* {@link #ENCODING_INVALID}, {@link #ENCODING_PCM_8BIT}, {@link #ENCODING_PCM_16BIT}, {@link
* #ENCODING_PCM_16BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_24BIT}, {@link
* #ENCODING_PCM_24BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_32BIT}, {@link
- * #ENCODING_PCM_32BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_FLOAT}, {@link #ENCODING_PCM_DOUBLE}.
+ * #ENCODING_PCM_32BIT_BIG_ENDIAN}, {@link #ENCODING_PCM_FLOAT}, {@link
+ * #ENCODING_PCM_FLOAT_BIG_ENDIAN}, {@link #ENCODING_PCM_DOUBLE}, {@link
+ * #ENCODING_PCM_DOUBLE_BIG_ENDIAN}.
*/
@Documented
@Retention(RetentionPolicy.SOURCE)
@@ -242,7 +248,9 @@ private C() {}
ENCODING_PCM_32BIT,
ENCODING_PCM_32BIT_BIG_ENDIAN,
ENCODING_PCM_FLOAT,
- ENCODING_PCM_DOUBLE
+ ENCODING_PCM_FLOAT_BIG_ENDIAN,
+ ENCODING_PCM_DOUBLE,
+ ENCODING_PCM_DOUBLE_BIG_ENDIAN
})
public @interface PcmEncoding {}
@@ -273,9 +281,15 @@ private C() {}
/** See {@link AudioFormat#ENCODING_PCM_FLOAT}. */
public static final int ENCODING_PCM_FLOAT = AudioFormat.ENCODING_PCM_FLOAT;
+ /** Like {@link #ENCODING_PCM_FLOAT} but with the bytes in big endian order. */
+ @UnstableApi public static final int ENCODING_PCM_FLOAT_BIG_ENDIAN = 0x71000000;
+
/** PCM encoding with double-precision floating point samples. */
@UnstableApi public static final int ENCODING_PCM_DOUBLE = 0x70000000;
+ /** Like {@link #ENCODING_PCM_DOUBLE} but with the bytes in big endian order. */
+ @UnstableApi public static final int ENCODING_PCM_DOUBLE_BIG_ENDIAN = 0x72000000;
+
/** See {@link AudioFormat#ENCODING_MP3}. */
public static final int ENCODING_MP3 = AudioFormat.ENCODING_MP3;
diff --git a/libraries/common/src/main/java/androidx/media3/common/audio/ToInt16PcmAudioProcessor.java b/libraries/common/src/main/java/androidx/media3/common/audio/ToInt16PcmAudioProcessor.java
index c49476fe20c..bfbc28bf3ec 100644
--- a/libraries/common/src/main/java/androidx/media3/common/audio/ToInt16PcmAudioProcessor.java
+++ b/libraries/common/src/main/java/androidx/media3/common/audio/ToInt16PcmAudioProcessor.java
@@ -34,7 +34,9 @@
*
{@link C#ENCODING_PCM_32BIT}
* {@link C#ENCODING_PCM_32BIT_BIG_ENDIAN}
* {@link C#ENCODING_PCM_FLOAT}
+ * {@link C#ENCODING_PCM_FLOAT_BIG_ENDIAN}
* {@link C#ENCODING_PCM_DOUBLE}
+ * {@link C#ENCODING_PCM_DOUBLE_BIG_ENDIAN}
*
*/
@UnstableApi
@@ -74,9 +76,11 @@ public void queueInput(ByteBuffer inputBuffer) {
case C.ENCODING_PCM_32BIT:
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
case C.ENCODING_PCM_FLOAT:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
resampledSize = size / 2;
break;
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
resampledSize = size / 4;
break;
case C.ENCODING_PCM_16BIT:
@@ -144,6 +148,22 @@ public void queueInput(ByteBuffer inputBuffer) {
buffer.put((byte) ((shortValue >> 8) & 0xFF));
}
break;
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ // 32 bit floating point -> 16 bit resampling. Floating point values are in the range
+ // [-1.0, 1.0], so need to be scaled by Short.MAX_VALUE.
+ for (int i = position; i < limit; i += 4) {
+ // Clamp to avoid integer overflow if the floating point values exceed their nominal range
+ // [Internal ref: b/161204847].
+ float floatValue =
+ Util.constrainValue(
+ Float.intBitsToFloat(Integer.reverseBytes(inputBuffer.getInt(i))),
+ /* min= */ -1,
+ /* max= */ 1);
+ short shortValue = (short) (floatValue * Short.MAX_VALUE);
+ buffer.put((byte) (shortValue & 0xFF));
+ buffer.put((byte) ((shortValue >> 8) & 0xFF));
+ }
+ break;
case C.ENCODING_PCM_DOUBLE:
// 64 bit floating point -> 16 bit resampling. Floating point values are in the range
// [-1.0, 1.0], so need to be scaled by Short.MAX_VALUE.
@@ -157,6 +177,22 @@ public void queueInput(ByteBuffer inputBuffer) {
buffer.put((byte) ((shortValue >> 8) & 0xFF));
}
break;
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ // 64 bit floating point -> 16 bit resampling. Floating point values are in the range
+ // [-1.0, 1.0], so need to be scaled by Short.MAX_VALUE.
+ for (int i = position; i < limit; i += 8) {
+ // Clamp to avoid integer overflow if the floating point values exceed their nominal range
+ // [Internal ref: b/161204847].
+ double doubleValue =
+ Util.constrainValue(
+ Double.longBitsToDouble(Long.reverseBytes(inputBuffer.getLong(i))),
+ /* min= */ -1,
+ /* max= */ 1);
+ short shortValue = (short) (doubleValue * Short.MAX_VALUE);
+ buffer.put((byte) (shortValue & 0xFF));
+ buffer.put((byte) ((shortValue >> 8) & 0xFF));
+ }
+ break;
case C.ENCODING_PCM_16BIT:
case C.ENCODING_INVALID:
case Format.NO_VALUE:
diff --git a/libraries/common/src/main/java/androidx/media3/common/util/MediaFormatUtil.java b/libraries/common/src/main/java/androidx/media3/common/util/MediaFormatUtil.java
index cdea1244cf4..6d57c07d726 100644
--- a/libraries/common/src/main/java/androidx/media3/common/util/MediaFormatUtil.java
+++ b/libraries/common/src/main/java/androidx/media3/common/util/MediaFormatUtil.java
@@ -532,7 +532,9 @@ private static void maybeSetPcmEncoding(
case C.ENCODING_PCM_16BIT_BIG_ENDIAN:
case C.ENCODING_PCM_24BIT_BIG_ENDIAN:
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
default:
// No matching value. Do nothing.
return;
diff --git a/libraries/common/src/main/java/androidx/media3/common/util/Util.java b/libraries/common/src/main/java/androidx/media3/common/util/Util.java
index ad58921f4a5..595825accb6 100644
--- a/libraries/common/src/main/java/androidx/media3/common/util/Util.java
+++ b/libraries/common/src/main/java/androidx/media3/common/util/Util.java
@@ -2448,11 +2448,28 @@ public static Format getPcmFormat(AudioProcessor.AudioFormat audioFormat) {
*/
@UnstableApi
public static @C.PcmEncoding int getFloatPcmEncoding(int bitDepth) {
+ return getFloatPcmEncoding(bitDepth, LITTLE_ENDIAN);
+ }
+
+ /**
+ * Converts a sample bit depth and byte order to a corresponding float PCM encoding constant.
+ *
+ * @param bitDepth The bit depth. Supported values are 32 and 64.
+ * @param byteOrder The byte order.
+ * @return The corresponding float PCM encoding. If the bit depth is unsupported then {@link
+ * C#ENCODING_INVALID} is returned.
+ */
+ @UnstableApi
+ public static @C.PcmEncoding int getFloatPcmEncoding(int bitDepth, ByteOrder byteOrder) {
switch (bitDepth) {
case 32:
- return C.ENCODING_PCM_FLOAT;
+ return byteOrder.equals(LITTLE_ENDIAN)
+ ? C.ENCODING_PCM_FLOAT
+ : C.ENCODING_PCM_FLOAT_BIG_ENDIAN;
case 64:
- return C.ENCODING_PCM_DOUBLE;
+ return byteOrder.equals(LITTLE_ENDIAN)
+ ? C.ENCODING_PCM_DOUBLE
+ : C.ENCODING_PCM_DOUBLE_BIG_ENDIAN;
default:
return C.ENCODING_INVALID;
}
@@ -2474,7 +2491,9 @@ public static boolean isEncodingLinearPcm(@C.Encoding int encoding) {
|| encoding == C.ENCODING_PCM_32BIT
|| encoding == C.ENCODING_PCM_32BIT_BIG_ENDIAN
|| encoding == C.ENCODING_PCM_FLOAT
- || encoding == C.ENCODING_PCM_DOUBLE;
+ || encoding == C.ENCODING_PCM_FLOAT_BIG_ENDIAN
+ || encoding == C.ENCODING_PCM_DOUBLE
+ || encoding == C.ENCODING_PCM_DOUBLE_BIG_ENDIAN;
}
/**
@@ -2490,7 +2509,9 @@ public static boolean isEncodingHighResolutionPcm(@C.PcmEncoding int encoding) {
|| encoding == C.ENCODING_PCM_32BIT
|| encoding == C.ENCODING_PCM_32BIT_BIG_ENDIAN
|| encoding == C.ENCODING_PCM_FLOAT
- || encoding == C.ENCODING_PCM_DOUBLE;
+ || encoding == C.ENCODING_PCM_FLOAT_BIG_ENDIAN
+ || encoding == C.ENCODING_PCM_DOUBLE
+ || encoding == C.ENCODING_PCM_DOUBLE_BIG_ENDIAN;
}
/**
@@ -2689,8 +2710,10 @@ public static int getByteDepth(@C.PcmEncoding int pcmEncoding) {
case C.ENCODING_PCM_32BIT:
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
case C.ENCODING_PCM_FLOAT:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
return 4;
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
return 8;
case C.ENCODING_INVALID:
case Format.NO_VALUE:
diff --git a/libraries/common/src/main/java/androidx/media3/common/util/WavUtil.java b/libraries/common/src/main/java/androidx/media3/common/util/WavUtil.java
index a3b334e15e7..8efcad61d3a 100644
--- a/libraries/common/src/main/java/androidx/media3/common/util/WavUtil.java
+++ b/libraries/common/src/main/java/androidx/media3/common/util/WavUtil.java
@@ -80,10 +80,12 @@ public static int getTypeForPcmEncoding(@C.PcmEncoding int pcmEncoding) {
case C.ENCODING_PCM_FLOAT:
case C.ENCODING_PCM_DOUBLE:
return TYPE_FLOAT;
- // TYPE_PCM is little endian so big endian formats don't match.
+ // TYPE_PCM/TYPE_FLOAT are little endian so big endian formats don't match.
case C.ENCODING_PCM_16BIT_BIG_ENDIAN:
case C.ENCODING_PCM_24BIT_BIG_ENDIAN:
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
case C.ENCODING_INVALID:
case Format.NO_VALUE:
default:
diff --git a/libraries/common/src/test/java/androidx/media3/common/audio/ToInt16PcmAudioProcessorTest.java b/libraries/common/src/test/java/androidx/media3/common/audio/ToInt16PcmAudioProcessorTest.java
index de934be9ce1..46be4fc8a27 100644
--- a/libraries/common/src/test/java/androidx/media3/common/audio/ToInt16PcmAudioProcessorTest.java
+++ b/libraries/common/src/test/java/androidx/media3/common/audio/ToInt16PcmAudioProcessorTest.java
@@ -147,8 +147,26 @@ private static ByteBuffer getTestSamplesForEncoding(int pcmEncoding) {
});
case C.ENCODING_PCM_FLOAT:
return createByteBuffer(new float[] {-1.0f, -0.5f, 0.0f, 0.5f, 1.0f});
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ return createByteBuffer(
+ new int[] {
+ Integer.reverseBytes(Float.floatToIntBits(-1.0f)),
+ Integer.reverseBytes(Float.floatToIntBits(-0.5f)),
+ Integer.reverseBytes(Float.floatToIntBits(0.0f)),
+ Integer.reverseBytes(Float.floatToIntBits(0.5f)),
+ Integer.reverseBytes(Float.floatToIntBits(1.0f))
+ });
case C.ENCODING_PCM_DOUBLE:
return createByteBuffer(new double[] {-1.0, -0.5, 0.0, 0.5, 1.0});
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ return createByteBuffer(
+ new long[] {
+ Long.reverseBytes(Double.doubleToLongBits(-1.0f)),
+ Long.reverseBytes(Double.doubleToLongBits(-0.5f)),
+ Long.reverseBytes(Double.doubleToLongBits(0.0f)),
+ Long.reverseBytes(Double.doubleToLongBits(0.5f)),
+ Long.reverseBytes(Double.doubleToLongBits(1.0f))
+ });
default:
throw new IllegalArgumentException();
}
@@ -158,7 +176,10 @@ private static float getToleranceForEncoding(int pcmEncoding) {
if (pcmEncoding == C.ENCODING_PCM_8BIT) {
return 256;
}
- if (pcmEncoding == C.ENCODING_PCM_FLOAT || pcmEncoding == C.ENCODING_PCM_DOUBLE) {
+ if (pcmEncoding == C.ENCODING_PCM_FLOAT
+ || pcmEncoding == C.ENCODING_PCM_DOUBLE
+ || pcmEncoding == C.ENCODING_PCM_FLOAT_BIG_ENDIAN
+ || pcmEncoding == C.ENCODING_PCM_DOUBLE_BIG_ENDIAN) {
return 1;
}
return 0;
@@ -175,7 +196,9 @@ protected ImmutableList> provideValues(Context context) {
value(C.ENCODING_PCM_32BIT).withName("ENCODING_PCM_32BIT"),
value(C.ENCODING_PCM_32BIT_BIG_ENDIAN).withName("ENCODING_PCM_32BIT_BIG_ENDIAN"),
value(C.ENCODING_PCM_FLOAT).withName("ENCODING_PCM_FLOAT"),
- value(C.ENCODING_PCM_DOUBLE).withName("ENCODING_PCM_DOUBLE"));
+ value(C.ENCODING_PCM_FLOAT_BIG_ENDIAN).withName("ENCODING_PCM_FLOAT_BIG_ENDIAN"),
+ value(C.ENCODING_PCM_DOUBLE).withName("ENCODING_PCM_DOUBLE"),
+ value(C.ENCODING_PCM_DOUBLE_BIG_ENDIAN).withName("ENCODING_PCM_DOUBLE_BIG_ENDIAN"));
}
}
}
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ChannelMappingAudioProcessor.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ChannelMappingAudioProcessor.java
index d532a3d51b0..eb0316aee4a 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ChannelMappingAudioProcessor.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ChannelMappingAudioProcessor.java
@@ -117,9 +117,11 @@ public void queueInput(ByteBuffer inputBuffer) {
buffer.putInt(inputBuffer.getInt(inputIndex));
break;
case C.ENCODING_PCM_FLOAT:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
buffer.putFloat(inputBuffer.getFloat(inputIndex));
break;
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
buffer.putDouble(inputBuffer.getDouble(inputIndex));
break;
default:
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/DefaultAudioSink.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/DefaultAudioSink.java
index 8a87b472f05..84e45f9e7ea 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/DefaultAudioSink.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/DefaultAudioSink.java
@@ -1861,7 +1861,9 @@ private FormatConfig getFormatConfig(Format format, int preferredBufferSize) {
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
case C.ENCODING_PCM_8BIT:
case C.ENCODING_PCM_FLOAT:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
case C.ENCODING_AAC_ER_BSAC:
case C.ENCODING_DSD:
case C.ENCODING_INVALID:
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/PcmAudioUtil.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/PcmAudioUtil.java
index 7a597039f36..7e43f29f8ca 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/PcmAudioUtil.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/PcmAudioUtil.java
@@ -101,6 +101,17 @@ public static int readAs32BitIntPcm(ByteBuffer buffer, @C.Encoding int pcmEncodi
} else {
return (int) (floatValue * Integer.MAX_VALUE);
}
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ float floatBeValue =
+ Util.constrainValue(
+ Float.intBitsToFloat(Integer.reverseBytes(buffer.getInt())),
+ /* min= */ -1f,
+ /* max= */ 1f);
+ if (floatBeValue < 0) {
+ return (int) (-floatBeValue * Integer.MIN_VALUE);
+ } else {
+ return (int) (floatBeValue * Integer.MAX_VALUE);
+ }
case C.ENCODING_PCM_DOUBLE:
double doubleValue = Util.constrainValue(buffer.getDouble(), /* min= */ -1f, /* max= */ 1f);
if (doubleValue < 0) {
@@ -108,6 +119,17 @@ public static int readAs32BitIntPcm(ByteBuffer buffer, @C.Encoding int pcmEncodi
} else {
return (int) (doubleValue * Integer.MAX_VALUE);
}
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ double doubleBeValue =
+ Util.constrainValue(
+ Double.longBitsToDouble(Long.reverseBytes(buffer.getLong())),
+ /* min= */ -1f,
+ /* max= */ 1f);
+ if (doubleBeValue < 0) {
+ return (int) (-doubleBeValue * Integer.MIN_VALUE);
+ } else {
+ return (int) (doubleBeValue * Integer.MAX_VALUE);
+ }
default:
throw new IllegalStateException();
}
@@ -163,6 +185,15 @@ public static void write32BitIntPcm(
buffer.putFloat((float) pcm32bit / Integer.MAX_VALUE);
}
return;
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ float floatValue;
+ if (pcm32bit < 0) {
+ floatValue = -((float) pcm32bit) / Integer.MIN_VALUE;
+ } else {
+ floatValue = (float) pcm32bit / Integer.MAX_VALUE;
+ }
+ buffer.putInt(Integer.reverseBytes(Float.floatToIntBits(floatValue)));
+ return;
case C.ENCODING_PCM_DOUBLE:
if (pcm32bit < 0) {
buffer.putDouble(-((double) pcm32bit) / Integer.MIN_VALUE);
@@ -170,6 +201,15 @@ public static void write32BitIntPcm(
buffer.putDouble((double) pcm32bit / Integer.MAX_VALUE);
}
return;
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ double doubleValue;
+ if (pcm32bit < 0) {
+ doubleValue = -((double) pcm32bit) / Integer.MIN_VALUE;
+ } else {
+ doubleValue = (double) pcm32bit / Integer.MAX_VALUE;
+ }
+ buffer.putLong(Long.reverseBytes(Double.doubleToLongBits(doubleValue)));
+ return;
default:
throw new IllegalStateException();
}
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessor.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessor.java
index b5bd8995121..b9bd4d34a1b 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessor.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessor.java
@@ -37,7 +37,9 @@
* {@link C#ENCODING_PCM_32BIT}
* {@link C#ENCODING_PCM_32BIT_BIG_ENDIAN}
* {@link C#ENCODING_PCM_FLOAT} ({@link #isActive()} will return {@code false})
+ * {@link C#ENCODING_PCM_FLOAT_BIG_ENDIAN}
* {@link C#ENCODING_PCM_DOUBLE}
+ * {@link C#ENCODING_PCM_DOUBLE_BIG_ENDIAN}
*
*/
@UnstableApi
@@ -119,12 +121,25 @@ public void queueInput(ByteBuffer inputBuffer) {
writePcm32BitFloat(pcm32BitInteger, buffer);
}
break;
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ buffer = replaceOutputBuffer(size);
+ for (int i = position; i < limit; i += 4) {
+ buffer.putFloat(Float.intBitsToFloat(Integer.reverseBytes(inputBuffer.getInt(i))));
+ }
+ break;
case C.ENCODING_PCM_DOUBLE:
buffer = replaceOutputBuffer(size / 2);
for (int i = position; i < limit; i += 8) {
buffer.putFloat((float) inputBuffer.getDouble(i));
}
break;
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ buffer = replaceOutputBuffer(size / 2);
+ for (int i = position; i < limit; i += 8) {
+ buffer.putFloat(
+ (float) Double.longBitsToDouble(Long.reverseBytes(inputBuffer.getLong(i))));
+ }
+ break;
case C.ENCODING_PCM_FLOAT:
case C.ENCODING_INVALID:
case Format.NO_VALUE:
diff --git a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/util/EventLogger.java b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/util/EventLogger.java
index b5d842fce69..196928803cd 100644
--- a/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/util/EventLogger.java
+++ b/libraries/exoplayer/src/main/java/androidx/media3/exoplayer/util/EventLogger.java
@@ -833,8 +833,12 @@ private static String encodingAsString(@C.Encoding int encoding) {
return "pcm-32be";
case C.ENCODING_PCM_DOUBLE:
return "pcm-double";
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ return "pcm-double-be";
case C.ENCODING_PCM_FLOAT:
return "pcm-float";
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ return "pcm-float-be";
case C.ENCODING_INVALID:
default:
return String.valueOf(encoding);
diff --git a/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessorTest.java b/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessorTest.java
index 77b6c58e9e3..cfbc2e10170 100644
--- a/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessorTest.java
+++ b/libraries/exoplayer/src/test/java/androidx/media3/exoplayer/audio/ToFloatPcmAudioProcessorTest.java
@@ -47,10 +47,23 @@ public class ToFloatPcmAudioProcessorTest {
* {@link C#ENCODING_PCM_24BIT_BIG_ENDIAN}
* {@link C#ENCODING_PCM_32BIT}
* {@link C#ENCODING_PCM_32BIT_BIG_ENDIAN}
+ * {@link C#ENCODING_PCM_FLOAT_BIG_ENDIAN}
* {@link C#ENCODING_PCM_DOUBLE}
+ * {@link C#ENCODING_PCM_DOUBLE_BIG_ENDIAN}
*
*/
- @TestParameter({"3", "2", "268435456", "21", "1342177280", "22", "1610612736", "1879048192"})
+ @TestParameter({
+ "3",
+ "2",
+ "268435456",
+ "21",
+ "1342177280",
+ "22",
+ "1610612736",
+ "1895825408",
+ "1879048192",
+ "1912602624"
+ })
private int pcmEncoding;
@Test
@@ -106,7 +119,9 @@ private static float getToleranceForEncoding(int pcmEncoding) {
case C.ENCODING_PCM_24BIT:
case C.ENCODING_PCM_24BIT_BIG_ENDIAN:
return 1f / 0x800000;
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
return 0;
}
throw new IllegalArgumentException();
@@ -176,8 +191,24 @@ private static ByteBuffer getTestSamplesForEncoding(int pcmEncoding) {
0x00,
0x00
});
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
+ return createByteBuffer(
+ new int[] {
+ Integer.reverseBytes(Float.floatToIntBits(1f)),
+ Integer.reverseBytes(Float.floatToIntBits(-1f)),
+ Integer.reverseBytes(Float.floatToIntBits(0.5f)),
+ Integer.reverseBytes(Float.floatToIntBits(-0.5f))
+ });
case C.ENCODING_PCM_DOUBLE:
return createByteBuffer(new double[] {1, -1, 0.5, -0.5});
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
+ return createByteBuffer(
+ new long[] {
+ Long.reverseBytes(Double.doubleToLongBits(1f)),
+ Long.reverseBytes(Double.doubleToLongBits(-1f)),
+ Long.reverseBytes(Double.doubleToLongBits(0.5f)),
+ Long.reverseBytes(Double.doubleToLongBits(-0.5f))
+ });
}
throw new IllegalArgumentException();
}
diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/ExtractorUtil.java b/libraries/extractor/src/main/java/androidx/media3/extractor/ExtractorUtil.java
index a5b29baf1f5..a411b110982 100644
--- a/libraries/extractor/src/main/java/androidx/media3/extractor/ExtractorUtil.java
+++ b/libraries/extractor/src/main/java/androidx/media3/extractor/ExtractorUtil.java
@@ -169,7 +169,9 @@ public static int getMaximumEncodedRateBytesPerSecond(@C.Encoding int encoding)
case C.ENCODING_PCM_32BIT_BIG_ENDIAN:
case C.ENCODING_PCM_8BIT:
case C.ENCODING_PCM_FLOAT:
+ case C.ENCODING_PCM_FLOAT_BIG_ENDIAN:
case C.ENCODING_PCM_DOUBLE:
+ case C.ENCODING_PCM_DOUBLE_BIG_ENDIAN:
case C.ENCODING_AAC_ER_BSAC:
case C.ENCODING_DSD:
case C.ENCODING_INVALID:
diff --git a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/BoxParser.java b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/BoxParser.java
index f850cd5600d..75bc966a2db 100644
--- a/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/BoxParser.java
+++ b/libraries/extractor/src/main/java/androidx/media3/extractor/mp4/BoxParser.java
@@ -2051,11 +2051,10 @@ private static void parseAudioSampleEntry(
int formatSpecificFlags = parent.readUnsignedIntToInt();
boolean isFloat = (formatSpecificFlags & 1) != 0;
boolean isBigEndian = (formatSpecificFlags & (1 << 1)) != 0;
- if (!isFloat) {
- pcmEncoding = Util.getPcmEncoding(bitsPerSample, isBigEndian ? BIG_ENDIAN : LITTLE_ENDIAN);
- } else if (!isBigEndian) {
- pcmEncoding = Util.getFloatPcmEncoding(bitsPerSample);
- }
+ pcmEncoding =
+ isFloat
+ ? Util.getFloatPcmEncoding(bitsPerSample, isBigEndian ? BIG_ENDIAN : LITTLE_ENDIAN)
+ : Util.getPcmEncoding(bitsPerSample, isBigEndian ? BIG_ENDIAN : LITTLE_ENDIAN);
if (pcmEncoding == C.ENCODING_INVALID) {
pcmEncoding = Format.NO_VALUE;
}
@@ -2314,9 +2313,8 @@ private static void parseAudioSampleEntry(
int sampleSize = parent.readUnsignedByte();
if (atomType == Mp4Box.TYPE_ipcm) {
pcmEncoding = Util.getPcmEncoding(sampleSize, byteOrder);
- } else if (atomType == Mp4Box.TYPE_fpcm && byteOrder.equals(LITTLE_ENDIAN)) {
- // Only little-endian floating point PCM is supported.
- pcmEncoding = Util.getFloatPcmEncoding(sampleSize);
+ } else if (atomType == Mp4Box.TYPE_fpcm) {
+ pcmEncoding = Util.getFloatPcmEncoding(sampleSize, byteOrder);
}
if (pcmEncoding == C.ENCODING_INVALID) {
pcmEncoding = Format.NO_VALUE;
diff --git a/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java b/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java
index 94cbe85b638..766f038b8b8 100644
--- a/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java
+++ b/libraries/extractor/src/test/java/androidx/media3/extractor/mp4/Mp4ExtractorParameterizedTest.java
@@ -296,11 +296,21 @@ public void mp4SampleWith32leFpcm() throws Exception {
assertExtractorBehavior("media/mp4/sample_fpcm_32le.mp4", /* peekLimit= */ 50);
}
+ @Test
+ public void mp4SampleWith32beFpcm() throws Exception {
+ assertExtractorBehavior("media/mp4/sample_fpcm_32be.mp4", /* peekLimit= */ 50);
+ }
+
@Test
public void mp4SampleWith64leFpcm() throws Exception {
assertExtractorBehavior("media/mp4/sample_fpcm_64le.mp4", /* peekLimit= */ 50);
}
+ @Test
+ public void mp4SampleWith64beFpcm() throws Exception {
+ assertExtractorBehavior("media/mp4/sample_fpcm_64be.mp4", /* peekLimit= */ 50);
+ }
+
// Only the rotation part of the transformation matrix is resolved (b/390422593 tracks supporting
// reflection too).
@Test
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.0.dump
new file mode 100644
index 00000000000..6d120533edf
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.0.dump
@@ -0,0 +1,113 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 180224
+ sample count = 22
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash 22517011
+ sample 1:
+ time = 113439
+ flags = 1
+ data = length 8192, hash CEEBE672
+ sample 2:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 60EE15F5
+ sample 3:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 45E839FE
+ sample 4:
+ time = 252759
+ flags = 1
+ data = length 8192, hash 8E3556ED
+ sample 5:
+ time = 299199
+ flags = 1
+ data = length 8192, hash E7B16C51
+ sample 6:
+ time = 345639
+ flags = 1
+ data = length 8192, hash FE0BFBA2
+ sample 7:
+ time = 392079
+ flags = 1
+ data = length 8192, hash A31D0E5D
+ sample 8:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D3B5CDCC
+ sample 9:
+ time = 484959
+ flags = 1
+ data = length 8192, hash EEBEFCBA
+ sample 10:
+ time = 531399
+ flags = 1
+ data = length 8192, hash A84DCB9A
+ sample 11:
+ time = 577839
+ flags = 1
+ data = length 8192, hash 54565C08
+ sample 12:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 830E0731
+ sample 13:
+ time = 670718
+ flags = 1
+ data = length 8192, hash 2D6C8877
+ sample 14:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 15:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 16:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 17:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 18:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 19:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 20:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 21:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.1.dump
new file mode 100644
index 00000000000..5a0044d0a64
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.1.dump
@@ -0,0 +1,89 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 131072
+ sample count = 16
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 345639
+ flags = 1
+ data = length 8192, hash FE0BFBA2
+ sample 1:
+ time = 392079
+ flags = 1
+ data = length 8192, hash A31D0E5D
+ sample 2:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D3B5CDCC
+ sample 3:
+ time = 484959
+ flags = 1
+ data = length 8192, hash EEBEFCBA
+ sample 4:
+ time = 531399
+ flags = 1
+ data = length 8192, hash A84DCB9A
+ sample 5:
+ time = 577839
+ flags = 1
+ data = length 8192, hash 54565C08
+ sample 6:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 830E0731
+ sample 7:
+ time = 670718
+ flags = 1
+ data = length 8192, hash 2D6C8877
+ sample 8:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 9:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 10:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 11:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 12:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 13:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 14:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 15:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.2.dump
new file mode 100644
index 00000000000..7a1e8a13ce6
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.2.dump
@@ -0,0 +1,57 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 65536
+ sample count = 8
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 1:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 2:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 3:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 4:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 5:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 6:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 7:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.3.dump
new file mode 100644
index 00000000000..278c1a9f2c5
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.3.dump
@@ -0,0 +1,29 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 8192
+ sample count = 1
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.0.dump
new file mode 100644
index 00000000000..6d120533edf
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.0.dump
@@ -0,0 +1,113 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 180224
+ sample count = 22
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash 22517011
+ sample 1:
+ time = 113439
+ flags = 1
+ data = length 8192, hash CEEBE672
+ sample 2:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 60EE15F5
+ sample 3:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 45E839FE
+ sample 4:
+ time = 252759
+ flags = 1
+ data = length 8192, hash 8E3556ED
+ sample 5:
+ time = 299199
+ flags = 1
+ data = length 8192, hash E7B16C51
+ sample 6:
+ time = 345639
+ flags = 1
+ data = length 8192, hash FE0BFBA2
+ sample 7:
+ time = 392079
+ flags = 1
+ data = length 8192, hash A31D0E5D
+ sample 8:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D3B5CDCC
+ sample 9:
+ time = 484959
+ flags = 1
+ data = length 8192, hash EEBEFCBA
+ sample 10:
+ time = 531399
+ flags = 1
+ data = length 8192, hash A84DCB9A
+ sample 11:
+ time = 577839
+ flags = 1
+ data = length 8192, hash 54565C08
+ sample 12:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 830E0731
+ sample 13:
+ time = 670718
+ flags = 1
+ data = length 8192, hash 2D6C8877
+ sample 14:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 15:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 16:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 17:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 18:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 19:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 20:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 21:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.1.dump
new file mode 100644
index 00000000000..5a0044d0a64
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.1.dump
@@ -0,0 +1,89 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 131072
+ sample count = 16
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 345639
+ flags = 1
+ data = length 8192, hash FE0BFBA2
+ sample 1:
+ time = 392079
+ flags = 1
+ data = length 8192, hash A31D0E5D
+ sample 2:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D3B5CDCC
+ sample 3:
+ time = 484959
+ flags = 1
+ data = length 8192, hash EEBEFCBA
+ sample 4:
+ time = 531399
+ flags = 1
+ data = length 8192, hash A84DCB9A
+ sample 5:
+ time = 577839
+ flags = 1
+ data = length 8192, hash 54565C08
+ sample 6:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 830E0731
+ sample 7:
+ time = 670718
+ flags = 1
+ data = length 8192, hash 2D6C8877
+ sample 8:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 9:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 10:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 11:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 12:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 13:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 14:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 15:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.2.dump
new file mode 100644
index 00000000000..7a1e8a13ce6
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.2.dump
@@ -0,0 +1,57 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 65536
+ sample count = 8
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 1:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 2:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 3:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 4:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 5:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 6:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 7:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.3.dump
new file mode 100644
index 00000000000..278c1a9f2c5
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.3.dump
@@ -0,0 +1,29 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 8192
+ sample count = 1
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.unknown_length.dump
new file mode 100644
index 00000000000..6d120533edf
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.reading_within_gop_sample_dependencies.unknown_length.dump
@@ -0,0 +1,113 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 180224
+ sample count = 22
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash 22517011
+ sample 1:
+ time = 113439
+ flags = 1
+ data = length 8192, hash CEEBE672
+ sample 2:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 60EE15F5
+ sample 3:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 45E839FE
+ sample 4:
+ time = 252759
+ flags = 1
+ data = length 8192, hash 8E3556ED
+ sample 5:
+ time = 299199
+ flags = 1
+ data = length 8192, hash E7B16C51
+ sample 6:
+ time = 345639
+ flags = 1
+ data = length 8192, hash FE0BFBA2
+ sample 7:
+ time = 392079
+ flags = 1
+ data = length 8192, hash A31D0E5D
+ sample 8:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D3B5CDCC
+ sample 9:
+ time = 484959
+ flags = 1
+ data = length 8192, hash EEBEFCBA
+ sample 10:
+ time = 531399
+ flags = 1
+ data = length 8192, hash A84DCB9A
+ sample 11:
+ time = 577839
+ flags = 1
+ data = length 8192, hash 54565C08
+ sample 12:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 830E0731
+ sample 13:
+ time = 670718
+ flags = 1
+ data = length 8192, hash 2D6C8877
+ sample 14:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 15:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 16:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 17:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 18:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 19:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 20:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 21:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.unknown_length.dump
new file mode 100644
index 00000000000..6d120533edf
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_32be.mp4.unknown_length.dump
@@ -0,0 +1,113 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=81964]]
+ getPosition(1089000) = [[timeUs=1089000, position=172076]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 180224
+ sample count = 22
+ track duration = 1089000
+ format 0:
+ averageBitrate = 1411200
+ peakBitrate = 1411200
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1895825408
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash 22517011
+ sample 1:
+ time = 113439
+ flags = 1
+ data = length 8192, hash CEEBE672
+ sample 2:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 60EE15F5
+ sample 3:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 45E839FE
+ sample 4:
+ time = 252759
+ flags = 1
+ data = length 8192, hash 8E3556ED
+ sample 5:
+ time = 299199
+ flags = 1
+ data = length 8192, hash E7B16C51
+ sample 6:
+ time = 345639
+ flags = 1
+ data = length 8192, hash FE0BFBA2
+ sample 7:
+ time = 392079
+ flags = 1
+ data = length 8192, hash A31D0E5D
+ sample 8:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D3B5CDCC
+ sample 9:
+ time = 484959
+ flags = 1
+ data = length 8192, hash EEBEFCBA
+ sample 10:
+ time = 531399
+ flags = 1
+ data = length 8192, hash A84DCB9A
+ sample 11:
+ time = 577839
+ flags = 1
+ data = length 8192, hash 54565C08
+ sample 12:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 830E0731
+ sample 13:
+ time = 670718
+ flags = 1
+ data = length 8192, hash 2D6C8877
+ sample 14:
+ time = 717158
+ flags = 1
+ data = length 8192, hash D63F90B
+ sample 15:
+ time = 763598
+ flags = 1
+ data = length 8192, hash B7C5D2ED
+ sample 16:
+ time = 810038
+ flags = 1
+ data = length 8192, hash F1FE1F06
+ sample 17:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 8B2CC1A7
+ sample 18:
+ time = 902918
+ flags = 1
+ data = length 8192, hash CDE3886F
+ sample 19:
+ time = 949358
+ flags = 1
+ data = length 8192, hash D1EF1E84
+ sample 20:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 8BACDA66
+ sample 21:
+ time = 1042238
+ flags = 536870913
+ data = length 8192, hash 2748823C
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.0.dump
new file mode 100644
index 00000000000..3d033cbe64b
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.0.dump
@@ -0,0 +1,201 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 360448
+ sample count = 44
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash CFBC0001
+ sample 1:
+ time = 90219
+ flags = 1
+ data = length 8192, hash 7336DB93
+ sample 2:
+ time = 113439
+ flags = 1
+ data = length 8192, hash 201EDBD0
+ sample 3:
+ time = 136659
+ flags = 1
+ data = length 8192, hash 313541B2
+ sample 4:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 9DD2FCF1
+ sample 5:
+ time = 183099
+ flags = 1
+ data = length 8192, hash 33BC7A4E
+ sample 6:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 18830446
+ sample 7:
+ time = 229539
+ flags = 1
+ data = length 8192, hash FD2406F7
+ sample 8:
+ time = 252759
+ flags = 1
+ data = length 8192, hash BE1B7BA8
+ sample 9:
+ time = 275979
+ flags = 1
+ data = length 8192, hash 9A353D12
+ sample 10:
+ time = 299199
+ flags = 1
+ data = length 8192, hash 3400D60B
+ sample 11:
+ time = 322419
+ flags = 1
+ data = length 8192, hash 38D25C56
+ sample 12:
+ time = 345639
+ flags = 1
+ data = length 8192, hash 6ECDDCDB
+ sample 13:
+ time = 368859
+ flags = 1
+ data = length 8192, hash CF0E5454
+ sample 14:
+ time = 392079
+ flags = 1
+ data = length 8192, hash 6A05383B
+ sample 15:
+ time = 415299
+ flags = 1
+ data = length 8192, hash A3FFC585
+ sample 16:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D10069AF
+ sample 17:
+ time = 461739
+ flags = 1
+ data = length 8192, hash 664FB809
+ sample 18:
+ time = 484959
+ flags = 1
+ data = length 8192, hash 88CAC28E
+ sample 19:
+ time = 508179
+ flags = 1
+ data = length 8192, hash 47EEAF48
+ sample 20:
+ time = 531399
+ flags = 1
+ data = length 8192, hash C6C3D05F
+ sample 21:
+ time = 554619
+ flags = 1
+ data = length 8192, hash 49DB5FDD
+ sample 22:
+ time = 577839
+ flags = 1
+ data = length 8192, hash F03B7AE7
+ sample 23:
+ time = 601058
+ flags = 1
+ data = length 8192, hash 830E0C93
+ sample 24:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 7C498AC0
+ sample 25:
+ time = 647498
+ flags = 1
+ data = length 8192, hash 8AFC1314
+ sample 26:
+ time = 670718
+ flags = 1
+ data = length 8192, hash B49DEE58
+ sample 27:
+ time = 693938
+ flags = 1
+ data = length 8192, hash 5D27C723
+ sample 28:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 29:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 30:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 31:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 32:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 33:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 34:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 35:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 36:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 37:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 38:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 39:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 40:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 41:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 42:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 43:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.1.dump
new file mode 100644
index 00000000000..d6883eb8c0e
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.1.dump
@@ -0,0 +1,153 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 262144
+ sample count = 32
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 345639
+ flags = 1
+ data = length 8192, hash 6ECDDCDB
+ sample 1:
+ time = 368859
+ flags = 1
+ data = length 8192, hash CF0E5454
+ sample 2:
+ time = 392079
+ flags = 1
+ data = length 8192, hash 6A05383B
+ sample 3:
+ time = 415299
+ flags = 1
+ data = length 8192, hash A3FFC585
+ sample 4:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D10069AF
+ sample 5:
+ time = 461739
+ flags = 1
+ data = length 8192, hash 664FB809
+ sample 6:
+ time = 484959
+ flags = 1
+ data = length 8192, hash 88CAC28E
+ sample 7:
+ time = 508179
+ flags = 1
+ data = length 8192, hash 47EEAF48
+ sample 8:
+ time = 531399
+ flags = 1
+ data = length 8192, hash C6C3D05F
+ sample 9:
+ time = 554619
+ flags = 1
+ data = length 8192, hash 49DB5FDD
+ sample 10:
+ time = 577839
+ flags = 1
+ data = length 8192, hash F03B7AE7
+ sample 11:
+ time = 601058
+ flags = 1
+ data = length 8192, hash 830E0C93
+ sample 12:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 7C498AC0
+ sample 13:
+ time = 647498
+ flags = 1
+ data = length 8192, hash 8AFC1314
+ sample 14:
+ time = 670718
+ flags = 1
+ data = length 8192, hash B49DEE58
+ sample 15:
+ time = 693938
+ flags = 1
+ data = length 8192, hash 5D27C723
+ sample 16:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 17:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 18:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 19:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 20:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 21:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 22:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 23:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 24:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 25:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 26:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 27:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 28:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 29:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 30:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 31:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.2.dump
new file mode 100644
index 00000000000..ebd1e530418
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.2.dump
@@ -0,0 +1,89 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 131072
+ sample count = 16
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 1:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 2:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 3:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 4:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 5:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 6:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 7:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 8:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 9:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 10:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 11:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 12:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 13:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 14:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 15:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.3.dump
new file mode 100644
index 00000000000..b79c439fed1
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.3.dump
@@ -0,0 +1,29 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 8192
+ sample count = 1
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.0.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.0.dump
new file mode 100644
index 00000000000..3d033cbe64b
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.0.dump
@@ -0,0 +1,201 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 360448
+ sample count = 44
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash CFBC0001
+ sample 1:
+ time = 90219
+ flags = 1
+ data = length 8192, hash 7336DB93
+ sample 2:
+ time = 113439
+ flags = 1
+ data = length 8192, hash 201EDBD0
+ sample 3:
+ time = 136659
+ flags = 1
+ data = length 8192, hash 313541B2
+ sample 4:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 9DD2FCF1
+ sample 5:
+ time = 183099
+ flags = 1
+ data = length 8192, hash 33BC7A4E
+ sample 6:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 18830446
+ sample 7:
+ time = 229539
+ flags = 1
+ data = length 8192, hash FD2406F7
+ sample 8:
+ time = 252759
+ flags = 1
+ data = length 8192, hash BE1B7BA8
+ sample 9:
+ time = 275979
+ flags = 1
+ data = length 8192, hash 9A353D12
+ sample 10:
+ time = 299199
+ flags = 1
+ data = length 8192, hash 3400D60B
+ sample 11:
+ time = 322419
+ flags = 1
+ data = length 8192, hash 38D25C56
+ sample 12:
+ time = 345639
+ flags = 1
+ data = length 8192, hash 6ECDDCDB
+ sample 13:
+ time = 368859
+ flags = 1
+ data = length 8192, hash CF0E5454
+ sample 14:
+ time = 392079
+ flags = 1
+ data = length 8192, hash 6A05383B
+ sample 15:
+ time = 415299
+ flags = 1
+ data = length 8192, hash A3FFC585
+ sample 16:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D10069AF
+ sample 17:
+ time = 461739
+ flags = 1
+ data = length 8192, hash 664FB809
+ sample 18:
+ time = 484959
+ flags = 1
+ data = length 8192, hash 88CAC28E
+ sample 19:
+ time = 508179
+ flags = 1
+ data = length 8192, hash 47EEAF48
+ sample 20:
+ time = 531399
+ flags = 1
+ data = length 8192, hash C6C3D05F
+ sample 21:
+ time = 554619
+ flags = 1
+ data = length 8192, hash 49DB5FDD
+ sample 22:
+ time = 577839
+ flags = 1
+ data = length 8192, hash F03B7AE7
+ sample 23:
+ time = 601058
+ flags = 1
+ data = length 8192, hash 830E0C93
+ sample 24:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 7C498AC0
+ sample 25:
+ time = 647498
+ flags = 1
+ data = length 8192, hash 8AFC1314
+ sample 26:
+ time = 670718
+ flags = 1
+ data = length 8192, hash B49DEE58
+ sample 27:
+ time = 693938
+ flags = 1
+ data = length 8192, hash 5D27C723
+ sample 28:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 29:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 30:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 31:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 32:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 33:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 34:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 35:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 36:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 37:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 38:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 39:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 40:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 41:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 42:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 43:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.1.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.1.dump
new file mode 100644
index 00000000000..d6883eb8c0e
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.1.dump
@@ -0,0 +1,153 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 262144
+ sample count = 32
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 345639
+ flags = 1
+ data = length 8192, hash 6ECDDCDB
+ sample 1:
+ time = 368859
+ flags = 1
+ data = length 8192, hash CF0E5454
+ sample 2:
+ time = 392079
+ flags = 1
+ data = length 8192, hash 6A05383B
+ sample 3:
+ time = 415299
+ flags = 1
+ data = length 8192, hash A3FFC585
+ sample 4:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D10069AF
+ sample 5:
+ time = 461739
+ flags = 1
+ data = length 8192, hash 664FB809
+ sample 6:
+ time = 484959
+ flags = 1
+ data = length 8192, hash 88CAC28E
+ sample 7:
+ time = 508179
+ flags = 1
+ data = length 8192, hash 47EEAF48
+ sample 8:
+ time = 531399
+ flags = 1
+ data = length 8192, hash C6C3D05F
+ sample 9:
+ time = 554619
+ flags = 1
+ data = length 8192, hash 49DB5FDD
+ sample 10:
+ time = 577839
+ flags = 1
+ data = length 8192, hash F03B7AE7
+ sample 11:
+ time = 601058
+ flags = 1
+ data = length 8192, hash 830E0C93
+ sample 12:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 7C498AC0
+ sample 13:
+ time = 647498
+ flags = 1
+ data = length 8192, hash 8AFC1314
+ sample 14:
+ time = 670718
+ flags = 1
+ data = length 8192, hash B49DEE58
+ sample 15:
+ time = 693938
+ flags = 1
+ data = length 8192, hash 5D27C723
+ sample 16:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 17:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 18:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 19:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 20:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 21:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 22:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 23:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 24:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 25:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 26:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 27:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 28:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 29:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 30:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 31:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.2.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.2.dump
new file mode 100644
index 00000000000..ebd1e530418
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.2.dump
@@ -0,0 +1,89 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 131072
+ sample count = 16
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 1:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 2:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 3:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 4:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 5:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 6:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 7:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 8:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 9:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 10:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 11:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 12:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 13:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 14:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 15:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.3.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.3.dump
new file mode 100644
index 00000000000..b79c439fed1
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.3.dump
@@ -0,0 +1,29 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 8192
+ sample count = 1
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.unknown_length.dump
new file mode 100644
index 00000000000..3d033cbe64b
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.reading_within_gop_sample_dependencies.unknown_length.dump
@@ -0,0 +1,201 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 360448
+ sample count = 44
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash CFBC0001
+ sample 1:
+ time = 90219
+ flags = 1
+ data = length 8192, hash 7336DB93
+ sample 2:
+ time = 113439
+ flags = 1
+ data = length 8192, hash 201EDBD0
+ sample 3:
+ time = 136659
+ flags = 1
+ data = length 8192, hash 313541B2
+ sample 4:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 9DD2FCF1
+ sample 5:
+ time = 183099
+ flags = 1
+ data = length 8192, hash 33BC7A4E
+ sample 6:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 18830446
+ sample 7:
+ time = 229539
+ flags = 1
+ data = length 8192, hash FD2406F7
+ sample 8:
+ time = 252759
+ flags = 1
+ data = length 8192, hash BE1B7BA8
+ sample 9:
+ time = 275979
+ flags = 1
+ data = length 8192, hash 9A353D12
+ sample 10:
+ time = 299199
+ flags = 1
+ data = length 8192, hash 3400D60B
+ sample 11:
+ time = 322419
+ flags = 1
+ data = length 8192, hash 38D25C56
+ sample 12:
+ time = 345639
+ flags = 1
+ data = length 8192, hash 6ECDDCDB
+ sample 13:
+ time = 368859
+ flags = 1
+ data = length 8192, hash CF0E5454
+ sample 14:
+ time = 392079
+ flags = 1
+ data = length 8192, hash 6A05383B
+ sample 15:
+ time = 415299
+ flags = 1
+ data = length 8192, hash A3FFC585
+ sample 16:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D10069AF
+ sample 17:
+ time = 461739
+ flags = 1
+ data = length 8192, hash 664FB809
+ sample 18:
+ time = 484959
+ flags = 1
+ data = length 8192, hash 88CAC28E
+ sample 19:
+ time = 508179
+ flags = 1
+ data = length 8192, hash 47EEAF48
+ sample 20:
+ time = 531399
+ flags = 1
+ data = length 8192, hash C6C3D05F
+ sample 21:
+ time = 554619
+ flags = 1
+ data = length 8192, hash 49DB5FDD
+ sample 22:
+ time = 577839
+ flags = 1
+ data = length 8192, hash F03B7AE7
+ sample 23:
+ time = 601058
+ flags = 1
+ data = length 8192, hash 830E0C93
+ sample 24:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 7C498AC0
+ sample 25:
+ time = 647498
+ flags = 1
+ data = length 8192, hash 8AFC1314
+ sample 26:
+ time = 670718
+ flags = 1
+ data = length 8192, hash B49DEE58
+ sample 27:
+ time = 693938
+ flags = 1
+ data = length 8192, hash 5D27C723
+ sample 28:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 29:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 30:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 31:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 32:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 33:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 34:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 35:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 36:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 37:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 38:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 39:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 40:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 41:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 42:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 43:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.unknown_length.dump b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.unknown_length.dump
new file mode 100644
index 00000000000..3d033cbe64b
--- /dev/null
+++ b/libraries/test_data/src/test/assets/extractordumps/mp4/sample_fpcm_64be.mp4.unknown_length.dump
@@ -0,0 +1,201 @@
+seekMap:
+ isSeekable = true
+ duration = 1089000
+ getPosition(0) = [[timeUs=0, position=44]]
+ getPosition(1) = [[timeUs=1, position=44]]
+ getPosition(544500) = [[timeUs=544500, position=163884]]
+ getPosition(1089000) = [[timeUs=1089000, position=352300]]
+numberOfTracks = 1
+track 0:
+ total output bytes = 360448
+ sample count = 44
+ track duration = 1089000
+ format 0:
+ averageBitrate = 2822400
+ peakBitrate = 2822400
+ id = 1
+ containerMimeType = audio/mp4
+ sampleMimeType = audio/raw
+ maxInputSize = 8222
+ channelCount = 1
+ sampleRate = 44100
+ pcmEncoding = 1912602624
+ language = und
+ metadata = entries=[Mp4AlternateGroup: 1, TSSE: description=null: values=[Lavf62.3.100], Mp4Timestamp: creation time=0, modification time=0, timescale=1000]
+ sample 0:
+ time = 67000
+ flags = 1
+ data = length 8192, hash CFBC0001
+ sample 1:
+ time = 90219
+ flags = 1
+ data = length 8192, hash 7336DB93
+ sample 2:
+ time = 113439
+ flags = 1
+ data = length 8192, hash 201EDBD0
+ sample 3:
+ time = 136659
+ flags = 1
+ data = length 8192, hash 313541B2
+ sample 4:
+ time = 159879
+ flags = 1
+ data = length 8192, hash 9DD2FCF1
+ sample 5:
+ time = 183099
+ flags = 1
+ data = length 8192, hash 33BC7A4E
+ sample 6:
+ time = 206319
+ flags = 1
+ data = length 8192, hash 18830446
+ sample 7:
+ time = 229539
+ flags = 1
+ data = length 8192, hash FD2406F7
+ sample 8:
+ time = 252759
+ flags = 1
+ data = length 8192, hash BE1B7BA8
+ sample 9:
+ time = 275979
+ flags = 1
+ data = length 8192, hash 9A353D12
+ sample 10:
+ time = 299199
+ flags = 1
+ data = length 8192, hash 3400D60B
+ sample 11:
+ time = 322419
+ flags = 1
+ data = length 8192, hash 38D25C56
+ sample 12:
+ time = 345639
+ flags = 1
+ data = length 8192, hash 6ECDDCDB
+ sample 13:
+ time = 368859
+ flags = 1
+ data = length 8192, hash CF0E5454
+ sample 14:
+ time = 392079
+ flags = 1
+ data = length 8192, hash 6A05383B
+ sample 15:
+ time = 415299
+ flags = 1
+ data = length 8192, hash A3FFC585
+ sample 16:
+ time = 438519
+ flags = 1
+ data = length 8192, hash D10069AF
+ sample 17:
+ time = 461739
+ flags = 1
+ data = length 8192, hash 664FB809
+ sample 18:
+ time = 484959
+ flags = 1
+ data = length 8192, hash 88CAC28E
+ sample 19:
+ time = 508179
+ flags = 1
+ data = length 8192, hash 47EEAF48
+ sample 20:
+ time = 531399
+ flags = 1
+ data = length 8192, hash C6C3D05F
+ sample 21:
+ time = 554619
+ flags = 1
+ data = length 8192, hash 49DB5FDD
+ sample 22:
+ time = 577839
+ flags = 1
+ data = length 8192, hash F03B7AE7
+ sample 23:
+ time = 601058
+ flags = 1
+ data = length 8192, hash 830E0C93
+ sample 24:
+ time = 624278
+ flags = 1
+ data = length 8192, hash 7C498AC0
+ sample 25:
+ time = 647498
+ flags = 1
+ data = length 8192, hash 8AFC1314
+ sample 26:
+ time = 670718
+ flags = 1
+ data = length 8192, hash B49DEE58
+ sample 27:
+ time = 693938
+ flags = 1
+ data = length 8192, hash 5D27C723
+ sample 28:
+ time = 717158
+ flags = 1
+ data = length 8192, hash CA1CC69F
+ sample 29:
+ time = 740378
+ flags = 1
+ data = length 8192, hash 91FB7F93
+ sample 30:
+ time = 763598
+ flags = 1
+ data = length 8192, hash 4336BF0F
+ sample 31:
+ time = 786818
+ flags = 1
+ data = length 8192, hash 558F02C0
+ sample 32:
+ time = 810038
+ flags = 1
+ data = length 8192, hash 437F7F5F
+ sample 33:
+ time = 833258
+ flags = 1
+ data = length 8192, hash B3D77D08
+ sample 34:
+ time = 856478
+ flags = 1
+ data = length 8192, hash 66314813
+ sample 35:
+ time = 879698
+ flags = 1
+ data = length 8192, hash 21C1E3FA
+ sample 36:
+ time = 902918
+ flags = 1
+ data = length 8192, hash E41F561E
+ sample 37:
+ time = 926138
+ flags = 1
+ data = length 8192, hash 92E60E5D
+ sample 38:
+ time = 949358
+ flags = 1
+ data = length 8192, hash 9D3A337F
+ sample 39:
+ time = 972578
+ flags = 1
+ data = length 8192, hash D842BCCD
+ sample 40:
+ time = 995798
+ flags = 1
+ data = length 8192, hash 92BE0436
+ sample 41:
+ time = 1019018
+ flags = 1
+ data = length 8192, hash 77BA4DD3
+ sample 42:
+ time = 1042238
+ flags = 1
+ data = length 8192, hash 35F3F564
+ sample 43:
+ time = 1065458
+ flags = 536870913
+ data = length 8192, hash 1BC134F7
+tracksEnded = true
diff --git a/libraries/test_data/src/test/assets/media/mp4/sample_fpcm_32be.mp4 b/libraries/test_data/src/test/assets/media/mp4/sample_fpcm_32be.mp4
new file mode 100644
index 00000000000..b12f1007ef9
Binary files /dev/null and b/libraries/test_data/src/test/assets/media/mp4/sample_fpcm_32be.mp4 differ
diff --git a/libraries/test_data/src/test/assets/media/mp4/sample_fpcm_64be.mp4 b/libraries/test_data/src/test/assets/media/mp4/sample_fpcm_64be.mp4
new file mode 100644
index 00000000000..e99c1296f5c
Binary files /dev/null and b/libraries/test_data/src/test/assets/media/mp4/sample_fpcm_64be.mp4 differ
diff --git a/libraries/test_utils/src/main/java/androidx/media3/test/utils/TestUtil.java b/libraries/test_utils/src/main/java/androidx/media3/test/utils/TestUtil.java
index 713d582d38e..a56fcc62712 100644
--- a/libraries/test_utils/src/main/java/androidx/media3/test/utils/TestUtil.java
+++ b/libraries/test_utils/src/main/java/androidx/media3/test/utils/TestUtil.java
@@ -254,6 +254,13 @@ public static ByteBuffer createByteBuffer(int[] data) {
return buffer;
}
+ /** Creates a {@link ByteBuffer} containing the {@code data}. */
+ public static ByteBuffer createByteBuffer(long[] data) {
+ ByteBuffer buffer = ByteBuffer.allocateDirect(data.length * 8).order(ByteOrder.nativeOrder());
+ buffer.asLongBuffer().put(data);
+ return buffer;
+ }
+
/** Creates a {@link ByteBuffer} containing the {@code data}. */
public static ByteBuffer createByteBuffer(short[] data) {
ByteBuffer buffer = ByteBuffer.allocateDirect(data.length * 2).order(ByteOrder.nativeOrder());