Fix TODOs formatting in Transformer

PiperOrigin-RevId: 725572106
This commit is contained in:
kimvde 2025-02-11 04:13:38 -08:00 committed by Copybara-Service
parent 5510635620
commit 9f60eb3825
34 changed files with 95 additions and 95 deletions

View File

@ -72,7 +72,7 @@ public class ForceEndOfStreamTest {
@Test @Test
public void transcode_decoderDroppingLastFourFrames_exportSucceeds() throws Exception { public void transcode_decoderDroppingLastFourFrames_exportSucceeds() throws Exception {
// TODO: b/370050055 - do we need API 29+, or the device list from // TODO: b/370050055 - Do we need API 29+, or the device list from
// Util.isFrameDropAllowedOnSurfaceInput? // Util.isFrameDropAllowedOnSurfaceInput?
assumeTrue(Util.SDK_INT >= 29); assumeTrue(Util.SDK_INT >= 29);
assumeFormatsSupported( assumeFormatsSupported(
@ -94,7 +94,7 @@ public class ForceEndOfStreamTest {
@Test @Test
public void transcode_decoderDroppingNoFrame_exportSucceeds() throws Exception { public void transcode_decoderDroppingNoFrame_exportSucceeds() throws Exception {
// TODO: b/370050055 - do we need API 29+, or the device list from // TODO: b/370050055 - Do we need API 29+, or the device list from
// Util.isFrameDropAllowedOnSurfaceInput? // Util.isFrameDropAllowedOnSurfaceInput?
assumeTrue(Util.SDK_INT >= 29); assumeTrue(Util.SDK_INT >= 29);
assumeFormatsSupported( assumeFormatsSupported(
@ -116,7 +116,7 @@ public class ForceEndOfStreamTest {
@Test @Test
public void transcode_withSlowVideoEffect_exportSucceedsWithCorrectNumberOfFrames() public void transcode_withSlowVideoEffect_exportSucceedsWithCorrectNumberOfFrames()
throws Exception { throws Exception {
// TODO: b/370050055 - do we need API 29+, or the device list from // TODO: b/370050055 - Do we need API 29+, or the device list from
// Util.isFrameDropAllowedOnSurfaceInput? // Util.isFrameDropAllowedOnSurfaceInput?
assumeTrue(Util.SDK_INT >= 29); assumeTrue(Util.SDK_INT >= 29);
assumeFormatsSupported( assumeFormatsSupported(

View File

@ -100,7 +100,7 @@ import java.util.Objects;
public abstract static class ItemConfig { public abstract static class ItemConfig {
public final int frameCount; public final int frameCount;
@Nullable public final Format format; @Nullable public final Format format;
// TODO - b/345483531: Modify output format to account for effects (such as presentation). // TODO: b/345483531 - Modify output format to account for effects (such as presentation).
@Nullable public final Format outputFormat; @Nullable public final Format outputFormat;
protected final Effects effects; protected final Effects effects;

View File

@ -2297,7 +2297,7 @@ public class TransformerEndToEndTest {
.run(testId, editedMediaItem); .run(testId, editedMediaItem);
// The test file contains 44100 samples (1 sec @44.1KHz, mono). We expect to receive 44100 / 1.5 // The test file contains 44100 samples (1 sec @44.1KHz, mono). We expect to receive 44100 / 1.5
// samples. // samples.
// TODO (b/361768785): Remove unexpected last sample when Sonic's resampler returns the right // TODO: b/361768785 - Remove unexpected last sample when Sonic's resampler returns the right
// number of samples. // number of samples.
assertThat(readBytes.get() / 2).isWithin(1).of(29400); assertThat(readBytes.get() / 2).isWithin(1).of(29400);
} }

View File

@ -235,7 +235,7 @@ public class TransformerProgressTest {
assertThat(transformerExceptionFuture.get()).isNull(); assertThat(transformerExceptionFuture.get()).isNull();
assertThat(progresses).isInOrder(); assertThat(progresses).isInOrder();
// TODO - b/322145448 Make tests more deterministic and produce at least one progress output. // TODO: b/322145448 - Make tests more deterministic and produce at least one progress output.
if (!progresses.isEmpty()) { if (!progresses.isEmpty()) {
// The progress list could be empty if the export ends before any progress can be retrieved. // The progress list could be empty if the export ends before any progress can be retrieved.
assertThat(Iterables.getFirst(progresses, /* defaultValue= */ -1)).isAtLeast(0); assertThat(Iterables.getFirst(progresses, /* defaultValue= */ -1)).isAtLeast(0);

View File

@ -48,7 +48,7 @@ import org.junit.runners.Parameterized.Parameters;
* a {@link SurfaceBitmapReader} to verify that releasing the output surface during processing * a {@link SurfaceBitmapReader} to verify that releasing the output surface during processing
* succeeds. * succeeds.
*/ */
// TODO(b/263395272): Move this test to effects/mh tests // TODO: b/263395272 - Move this test to effects/mh tests
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
public class DefaultVideoFrameProcessorParametrizedSurfaceOutputTest { public class DefaultVideoFrameProcessorParametrizedSurfaceOutputTest {
@Rule public final TestName testName = new TestName(); @Rule public final TestName testName = new TestName();

View File

@ -83,7 +83,7 @@ import org.junit.runner.RunWith;
* <p>Uses a {@link DefaultVideoFrameProcessor} to process one frame, and checks that the actual * <p>Uses a {@link DefaultVideoFrameProcessor} to process one frame, and checks that the actual
* output matches expected output, either from a golden file or from another edit. * output matches expected output, either from a golden file or from another edit.
*/ */
// TODO(b/263395272): Move this test to effects/mh tests, and remove @TestOnly dependencies. // TODO: b/263395272 - Move this test to effects/mh tests, and remove @TestOnly dependencies.
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public final class DefaultVideoFrameProcessorTextureOutputPixelTest { public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
private static final String ORIGINAL_PNG_ASSET_PATH = private static final String ORIGINAL_PNG_ASSET_PATH =
@ -160,7 +160,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -188,7 +188,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release(); texIdProducingVideoFrameProcessorTestRunner.release();
Bitmap actualBitmap = consumersBitmapReader.getBitmap(); Bitmap actualBitmap = consumersBitmapReader.getBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -230,7 +230,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -258,7 +258,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release(); texIdProducingVideoFrameProcessorTestRunner.release();
Bitmap actualBitmap = consumersBitmapReader.getBitmap(); Bitmap actualBitmap = consumersBitmapReader.getBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -266,7 +266,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
} }
@Test @Test
@Ignore("TODO: b/344529901 - enable this test when fixed.") @Ignore("TODO: b/344529901 - Enable this test when fixed.")
public void ultraHdrBitmapAndTextOverlay_hlg10Input_matchesGoldenFile() throws Exception { public void ultraHdrBitmapAndTextOverlay_hlg10Input_matchesGoldenFile() throws Exception {
Context context = getApplicationContext(); Context context = getApplicationContext();
Format format = MP4_ASSET_1080P_5_SECOND_HLG10.videoFormat; Format format = MP4_ASSET_1080P_5_SECOND_HLG10.videoFormat;
@ -455,7 +455,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -513,7 +513,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release(); texIdProducingVideoFrameProcessorTestRunner.release();
Bitmap actualBitmap = consumersBitmapReader.getBitmap(); Bitmap actualBitmap = consumersBitmapReader.getBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -546,7 +546,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing(); videoFrameProcessorTestRunner.endFrameProcessing();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -571,7 +571,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -605,7 +605,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -634,7 +634,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release(); texIdProducingVideoFrameProcessorTestRunner.release();
Bitmap actualBitmap = consumersBitmapReader.getBitmap(); Bitmap actualBitmap = consumersBitmapReader.getBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -667,7 +667,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing(); videoFrameProcessorTestRunner.endFrameProcessing();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -693,7 +693,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -722,7 +722,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release(); texIdProducingVideoFrameProcessorTestRunner.release();
Bitmap actualBitmap = consumersBitmapReader.getBitmap(); Bitmap actualBitmap = consumersBitmapReader.getBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -756,7 +756,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing(); videoFrameProcessorTestRunner.endFrameProcessing();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -782,7 +782,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd(); videoFrameProcessorTestRunner.processFirstFrameAndEnd();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -811,7 +811,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release(); texIdProducingVideoFrameProcessorTestRunner.release();
Bitmap actualBitmap = consumersBitmapReader.getBitmap(); Bitmap actualBitmap = consumersBitmapReader.getBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);
@ -845,7 +845,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing(); videoFrameProcessorTestRunner.endFrameProcessing();
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16( BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap); expectedBitmap, actualBitmap);

View File

@ -309,7 +309,7 @@ public class ExportTest {
public void exportSef() throws Exception { public void exportSef() throws Exception {
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
if (SDK_INT < 25) { if (SDK_INT < 25) {
// TODO(b/210593256): Remove test skipping after using an in-app muxer that supports B-frames // TODO: b/210593256 - Remove test skipping after using an in-app muxer that supports B-frames
// before API 25. // before API 25.
recordTestSkipped(context, testId, /* reason= */ "API version lacks muxing support"); recordTestSkipped(context, testId, /* reason= */ "API version lacks muxing support");
return; return;
@ -334,7 +334,7 @@ public class ExportTest {
public void exportSefH265() throws Exception { public void exportSefH265() throws Exception {
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
if (SDK_INT < 25) { if (SDK_INT < 25) {
// TODO(b/210593256): Remove test skipping after using an in-app muxer that supports B-frames // TODO: b/210593256 - Remove test skipping after using an in-app muxer that supports B-frames
// before API 25. // before API 25.
recordTestSkipped(context, testId, /* reason= */ "API version lacks muxing support"); recordTestSkipped(context, testId, /* reason= */ "API version lacks muxing support");
return; return;

View File

@ -64,7 +64,7 @@ public class ForceInterpretHdrVideoAsSdrTest {
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
if (SDK_INT < 29) { if (SDK_INT < 29) {
// TODO(b/269759013): Fix failures under API 29 to expand confidence on all API versions. // TODO: b/269759013 - Fix failures under API 29 to expand confidence on all API versions.
recordTestSkipped( recordTestSkipped(
context, testId, /* reason= */ "Under API 29, this API is considered best-effort."); context, testId, /* reason= */ "Under API 29, this API is considered best-effort.");
return; return;
@ -105,7 +105,7 @@ public class ForceInterpretHdrVideoAsSdrTest {
Context context = ApplicationProvider.getApplicationContext(); Context context = ApplicationProvider.getApplicationContext();
if (SDK_INT < 29) { if (SDK_INT < 29) {
// TODO(b/269759013): Fix failures under API 29 to expand confidence on all API versions. // TODO: b/269759013 - Fix failures under API 29 to expand confidence on all API versions.
recordTestSkipped( recordTestSkipped(
context, testId, /* reason= */ "Under API 29, this API is considered best-effort."); context, testId, /* reason= */ "Under API 29, this API is considered best-effort.");
return; return;

View File

@ -48,7 +48,7 @@ import org.junit.runner.RunWith;
* <p>Uses a {@link DefaultVideoFrameProcessor} to process one frame, and checks that the actual * <p>Uses a {@link DefaultVideoFrameProcessor} to process one frame, and checks that the actual
* output matches expected output, either from a golden file or from another edit. * output matches expected output, either from a golden file or from another edit.
*/ */
// TODO(b/263395272): Move this test to effects/mh tests. // TODO: b/263395272 - Move this test to effects/mh tests.
@RunWith(AndroidJUnit4.class) @RunWith(AndroidJUnit4.class)
public final class ToneMapHdrToSdrUsingOpenGlPixelTest { public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
private static final String TAG = "ToneMapHdrToSdrGl"; private static final String TAG = "ToneMapHdrToSdrGl";
@ -148,7 +148,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
Log.i(TAG, "Successfully tone mapped."); Log.i(TAG, "Successfully tone mapped.");
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -170,7 +170,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
Log.i(TAG, "Successfully tone mapped."); Log.i(TAG, "Successfully tone mapped.");
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -192,7 +192,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
Log.i(TAG, "Successfully tone mapped."); Log.i(TAG, "Successfully tone mapped.");
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -215,7 +215,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
Log.i(TAG, "Successfully tone mapped."); Log.i(TAG, "Successfully tone mapped.");
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)
@ -241,7 +241,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap(); Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
Log.i(TAG, "Successfully tone mapped."); Log.i(TAG, "Successfully tone mapped.");
// TODO(b/207848601): Switch to using proper tooling for testing against golden data. // TODO: b/207848601 - Switch to using proper tooling for testing against golden data.
float averagePixelAbsoluteDifference = float averagePixelAbsoluteDifference =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId); getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference) assertThat(averagePixelAbsoluteDifference)

View File

@ -30,7 +30,7 @@ import androidx.media3.effect.ScaleAndRotateTransformation;
* for the wrapped {@link GlEffect} rather than merging it with preceding or subsequent {@link * for the wrapped {@link GlEffect} rather than merging it with preceding or subsequent {@link
* GlEffect} instances and applying them in one combined {@link GlShaderProgram}. * GlEffect} instances and applying them in one combined {@link GlShaderProgram}.
*/ */
// TODO(b/263395272): Move this to effects/mh tests. // TODO: b/263395272 - Move this to effects/mh tests.
public final class UnoptimizedGlEffect implements GlEffect { public final class UnoptimizedGlEffect implements GlEffect {
// A passthrough effect allows for testing having an intermediate effect injected, which uses // A passthrough effect allows for testing having an intermediate effect injected, which uses
// different OpenGL shaders from having no effects. // different OpenGL shaders from having no effects.

View File

@ -118,7 +118,7 @@ public class SsimMapperTest {
List<Object[]> parameterList = new ArrayList<>(); List<Object[]> parameterList = new ArrayList<>();
for (AssetInfo assetInfo : INPUT_ASSETS) { for (AssetInfo assetInfo : INPUT_ASSETS) {
parameterList.add(new Object[] {assetInfo, MimeTypes.VIDEO_H264}); parameterList.add(new Object[] {assetInfo, MimeTypes.VIDEO_H264});
// TODO(b/210593256): Test pre 24 once in-app muxing implemented. // TODO: b/210593256 - Test pre 24 once in-app muxing implemented.
if (Util.SDK_INT >= 24) { if (Util.SDK_INT >= 24) {
parameterList.add(new Object[] {assetInfo, MimeTypes.VIDEO_H265}); parameterList.add(new Object[] {assetInfo, MimeTypes.VIDEO_H265});
} }
@ -271,7 +271,7 @@ public class SsimMapperTest {
} }
private double exportAndGetSsim(int bitrate) throws Exception { private double exportAndGetSsim(int bitrate) throws Exception {
// TODO(b/238094555): Force specific encoders to be used. // TODO: b/238094555 - Force specific encoders to be used.
String fileName = checkNotNull(getLast(FORWARD_SLASH_SPLITTER.split(videoUri))); String fileName = checkNotNull(getLast(FORWARD_SLASH_SPLITTER.split(videoUri)));
String testId = String.format("%s_%s_%s", testIdPrefix, bitrate, fileName); String testId = String.format("%s_%s_%s", testIdPrefix, bitrate, fileName);

View File

@ -92,7 +92,7 @@ import java.util.concurrent.atomic.AtomicLong;
AudioFormat inputAudioFormat = new AudioFormat(inputFormat); AudioFormat inputAudioFormat = new AudioFormat(inputFormat);
checkArgument(isInputAudioFormatValid(inputAudioFormat), /* errorMessage= */ inputAudioFormat); checkArgument(isInputAudioFormatValid(inputAudioFormat), /* errorMessage= */ inputAudioFormat);
// TODO(b/323148735) - Use improved buffer assignment logic. // TODO: b/323148735 - Use improved buffer assignment logic.
availableInputBuffers = new ConcurrentLinkedQueue<>(); availableInputBuffers = new ConcurrentLinkedQueue<>();
ByteBuffer emptyBuffer = ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder()); ByteBuffer emptyBuffer = ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder());
for (int i = 0; i < MAX_INPUT_BUFFER_COUNT; i++) { for (int i = 0; i < MAX_INPUT_BUFFER_COUNT; i++) {
@ -530,7 +530,7 @@ import java.util.concurrent.atomic.AtomicLong;
audioProcessors.add(sampleRateChanger); audioProcessors.add(sampleRateChanger);
} }
// TODO(b/262706549): Handle channel mixing with AudioMixer. // TODO: b/262706549 - Handle channel mixing with AudioMixer.
// ChannelMixingMatrix.create only has defaults for mono/stereo input/output. // ChannelMixingMatrix.create only has defaults for mono/stereo input/output.
if (requiredOutputAudioFormat.channelCount == 1 if (requiredOutputAudioFormat.channelCount == 1
|| requiredOutputAudioFormat.channelCount == 2) { || requiredOutputAudioFormat.channelCount == 2) {

View File

@ -118,7 +118,7 @@ import java.util.Objects;
throws ConfigurationException { throws ConfigurationException {
checkArgument(supportsFormat(inputFormat)); checkArgument(supportsFormat(inputFormat));
EditedMediaItem editedMediaItem = checkStateNotNull(currentEditedMediaItemInfo).editedMediaItem; EditedMediaItem editedMediaItem = checkStateNotNull(currentEditedMediaItemInfo).editedMediaItem;
// TODO(b/303029969): Evaluate throwing vs ignoring for null outputChannels. // TODO: b/303029969 - Evaluate throwing vs ignoring for null outputChannels.
checkArgument(outputChannels == null); checkArgument(outputChannels == null);
currentInputFormat = inputFormat; currentInputFormat = inputFormat;

View File

@ -87,7 +87,7 @@ import org.checkerframework.dataflow.qual.Pure;
.setCodecs(firstInputFormat.codecs) .setCodecs(firstInputFormat.codecs)
.build(); .build();
// TODO - b/324426022: Move logic for supported mime types to DefaultEncoderFactory. // TODO: b/324426022 - Move logic for supported mime types to DefaultEncoderFactory.
encoder = encoder =
encoderFactory.createForAudioEncoding( encoderFactory.createForAudioEncoding(
requestedEncoderFormat requestedEncoderFormat
@ -222,7 +222,7 @@ import org.checkerframework.dataflow.qual.Pure;
@Pure @Pure
private static TransformationRequest createFallbackTransformationRequest( private static TransformationRequest createFallbackTransformationRequest(
TransformationRequest transformationRequest, Format requestedFormat, Format actualFormat) { TransformationRequest transformationRequest, Format requestedFormat, Format actualFormat) {
// TODO(b/255953153): Consider including bitrate and other audio characteristics in the revised // TODO: b/255953153 - Consider including bitrate and other audio characteristics in the revised
// fallback. // fallback.
if (Util.areEqual(requestedFormat.sampleMimeType, actualFormat.sampleMimeType)) { if (Util.areEqual(requestedFormat.sampleMimeType, actualFormat.sampleMimeType)) {
return transformationRequest; return transformationRequest;

View File

@ -48,7 +48,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
// Limit decoded images to 4096x4096 - should be large enough for most image to video // Limit decoded images to 4096x4096 - should be large enough for most image to video
// transcode operations, and smaller than GL_MAX_TEXTURE_SIZE for most devices. // transcode operations, and smaller than GL_MAX_TEXTURE_SIZE for most devices.
// TODO: b/356072337 - consider reading this from GL_MAX_TEXTURE_SIZE. This requires an // TODO: b/356072337 - Consider reading this from GL_MAX_TEXTURE_SIZE. This requires an
// active OpenGL context. // active OpenGL context.
private static final int MAXIMUM_BITMAP_OUTPUT_DIMENSION = 4096; private static final int MAXIMUM_BITMAP_OUTPUT_DIMENSION = 4096;
@ -77,7 +77,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
*/ */
public DefaultAssetLoaderFactory( public DefaultAssetLoaderFactory(
Context context, Codec.DecoderFactory decoderFactory, Clock clock) { Context context, Codec.DecoderFactory decoderFactory, Clock clock) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this.context = context.getApplicationContext(); this.context = context.getApplicationContext();
this.decoderFactory = decoderFactory; this.decoderFactory = decoderFactory;
this.clock = clock; this.clock = clock;
@ -106,7 +106,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
* @param bitmapLoader The {@link BitmapLoader} to use to load and decode images. * @param bitmapLoader The {@link BitmapLoader} to use to load and decode images.
*/ */
public DefaultAssetLoaderFactory(Context context, BitmapLoader bitmapLoader) { public DefaultAssetLoaderFactory(Context context, BitmapLoader bitmapLoader) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this.context = context.getApplicationContext(); this.context = context.getApplicationContext();
this.bitmapLoader = bitmapLoader; this.bitmapLoader = bitmapLoader;
decoderFactory = new DefaultDecoderFactory.Builder(context).build(); decoderFactory = new DefaultDecoderFactory.Builder(context).build();
@ -133,7 +133,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
Clock clock, Clock clock,
@Nullable MediaSource.Factory mediaSourceFactory, @Nullable MediaSource.Factory mediaSourceFactory,
BitmapLoader bitmapLoader) { BitmapLoader bitmapLoader) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this.context = context.getApplicationContext(); this.context = context.getApplicationContext();
this.decoderFactory = decoderFactory; this.decoderFactory = decoderFactory;
this.clock = clock; this.clock = clock;
@ -163,7 +163,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
@Nullable MediaSource.Factory mediaSourceFactory, @Nullable MediaSource.Factory mediaSourceFactory,
BitmapLoader bitmapLoader, BitmapLoader bitmapLoader,
TrackSelector.Factory trackSelectorFactory) { TrackSelector.Factory trackSelectorFactory) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this.context = context.getApplicationContext(); this.context = context.getApplicationContext();
this.decoderFactory = decoderFactory; this.decoderFactory = decoderFactory;
this.clock = clock; this.clock = clock;
@ -180,7 +180,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
CompositionSettings compositionSettings) { CompositionSettings compositionSettings) {
MediaItem mediaItem = editedMediaItem.mediaItem; MediaItem mediaItem = editedMediaItem.mediaItem;
boolean isImage = isImage(context, mediaItem); boolean isImage = isImage(context, mediaItem);
// TODO: b/350499931 - use the MediaItem's imageDurationMs instead of the EditedMediaItem's // TODO: b/350499931 - Use the MediaItem's imageDurationMs instead of the EditedMediaItem's
// durationUs to export motion photos as video // durationUs to export motion photos as video
boolean exportVideoFromMotionPhoto = isImage && editedMediaItem.durationUs == C.TIME_UNSET; boolean exportVideoFromMotionPhoto = isImage && editedMediaItem.durationUs == C.TIME_UNSET;
if (isImage && !exportVideoFromMotionPhoto) { if (isImage && !exportVideoFromMotionPhoto) {

View File

@ -82,7 +82,7 @@ public final class DefaultAudioMixer implements AudioMixer {
} }
} }
// TODO(b/290002438, b/276734854): Improve buffer management & determine best default size. // TODO: b/290002438, b/276734854 - Improve buffer management & determine best default size.
private static final int DEFAULT_BUFFER_SIZE_MS = 500; private static final int DEFAULT_BUFFER_SIZE_MS = 500;
private final boolean outputSilenceWithNoSources; private final boolean outputSilenceWithNoSources;
@ -302,7 +302,7 @@ public final class DefaultAudioMixer implements AudioMixer {
outputBuffer = outputBuffer.slice().order(ByteOrder.nativeOrder()); outputBuffer = outputBuffer.slice().order(ByteOrder.nativeOrder());
if (newOutputPosition == mixingBuffer.limit) { if (newOutputPosition == mixingBuffer.limit) {
// TODO(b/264926272): Generalize for >2 mixing buffers. // TODO: b/264926272 - Generalize for >2 mixing buffers.
mixingBuffers[0] = mixingBuffers[1]; mixingBuffers[0] = mixingBuffers[1];
mixingBuffers[1] = allocateMixingBuffer(mixingBuffers[1].limit); mixingBuffers[1] = allocateMixingBuffer(mixingBuffers[1].limit);
} }

View File

@ -256,7 +256,7 @@ public final class DefaultDecoderFactory implements Codec.DecoderFactory {
format, /* reason= */ "Tone-mapping HDR is not supported on this device."); format, /* reason= */ "Tone-mapping HDR is not supported on this device.");
} }
if (SDK_INT < 29) { if (SDK_INT < 29) {
// TODO(b/266837571, b/267171669): Remove API version restriction after fixing linked bugs. // TODO: b/266837571, b/267171669 - Remove API version restriction after fixing linked bugs.
throw createExportException( throw createExportException(
format, /* reason= */ "Decoding HDR is not supported on this device."); format, /* reason= */ "Decoding HDR is not supported on this device.");
} }

View File

@ -49,7 +49,7 @@ import java.util.List;
import org.checkerframework.checker.nullness.qual.RequiresNonNull; import org.checkerframework.checker.nullness.qual.RequiresNonNull;
/** A default implementation of {@link Codec.EncoderFactory}. */ /** A default implementation of {@link Codec.EncoderFactory}. */
// TODO(b/224949986) Split audio and video encoder factory. // TODO: b/224949986 - Split audio and video encoder factory.
@UnstableApi @UnstableApi
public final class DefaultEncoderFactory implements Codec.EncoderFactory { public final class DefaultEncoderFactory implements Codec.EncoderFactory {
private static final int DEFAULT_AUDIO_BITRATE = 128 * 1024; private static final int DEFAULT_AUDIO_BITRATE = 128 * 1024;
@ -339,7 +339,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
} }
if (Util.SDK_INT >= 31 && ColorInfo.isTransferHdr(format.colorInfo)) { if (Util.SDK_INT >= 31 && ColorInfo.isTransferHdr(format.colorInfo)) {
// TODO(b/260389841): Validate the picked encoder supports HDR editing. // TODO: b/260389841 - Validate the picked encoder supports HDR editing.
if (EncoderUtil.getSupportedColorFormats(encoderInfo, mimeType) if (EncoderUtil.getSupportedColorFormats(encoderInfo, mimeType)
.contains(MediaCodecInfo.CodecCapabilities.COLOR_Format32bitABGR2101010)) { .contains(MediaCodecInfo.CodecCapabilities.COLOR_Format32bitABGR2101010)) {
mediaFormat.setInteger( mediaFormat.setInteger(
@ -526,7 +526,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
/** Returns a list of encoders that support the requested resolution most closely. */ /** Returns a list of encoders that support the requested resolution most closely. */
private static ImmutableList<MediaCodecInfo> filterEncodersByResolution( private static ImmutableList<MediaCodecInfo> filterEncodersByResolution(
List<MediaCodecInfo> encoders, String mimeType, int requestedWidth, int requestedHeight) { List<MediaCodecInfo> encoders, String mimeType, int requestedWidth, int requestedHeight) {
// TODO(b/267740292): Investigate the fallback logic that might prefer software encoders. // TODO: b/267740292 - Investigate the fallback logic that might prefer software encoders.
return filterEncoders( return filterEncoders(
encoders, encoders,
/* cost= */ (encoderInfo) -> { /* cost= */ (encoderInfo) -> {
@ -676,8 +676,8 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
*/ */
private static void adjustMediaFormatForH264EncoderSettings( private static void adjustMediaFormatForH264EncoderSettings(
@Nullable ColorInfo colorInfo, MediaCodecInfo encoderInfo, MediaFormat mediaFormat) { @Nullable ColorInfo colorInfo, MediaCodecInfo encoderInfo, MediaFormat mediaFormat) {
// TODO(b/210593256): Remove overriding profile/level (before API 29) after switching to in-app // TODO: b/210593256 - Remove overriding profile/level (before API 29) after switching to in-app
// muxing. // muxing.
String mimeType = MimeTypes.VIDEO_H264; String mimeType = MimeTypes.VIDEO_H264;
if (Util.SDK_INT >= 29) { if (Util.SDK_INT >= 29) {
int expectedEncodingProfile = MediaCodecInfo.CodecProfileLevel.AVCProfileHigh; int expectedEncodingProfile = MediaCodecInfo.CodecProfileLevel.AVCProfileHigh;
@ -714,8 +714,8 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
if (!mediaFormat.containsKey(MediaFormat.KEY_LEVEL)) { if (!mediaFormat.containsKey(MediaFormat.KEY_LEVEL)) {
mediaFormat.setInteger(MediaFormat.KEY_LEVEL, supportedEncodingLevel); mediaFormat.setInteger(MediaFormat.KEY_LEVEL, supportedEncodingLevel);
} }
// TODO(b/210593256): Set KEY_LATENCY to 2 to enable B-frame production after in-app muxing // TODO: b/210593256 - Set KEY_LATENCY to 2 to enable B-frame production after in-app muxing
// is the default and it supports B-frames. // is the default and it supports B-frames.
mediaFormat.setInteger(MediaFormat.KEY_LATENCY, 1); mediaFormat.setInteger(MediaFormat.KEY_LATENCY, 1);
} }
} else if (Util.SDK_INT >= 24) { } else if (Util.SDK_INT >= 24) {
@ -793,7 +793,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
* </ul> * </ul>
*/ */
private static int getSuggestedBitrate(int width, int height, float frameRate) { private static int getSuggestedBitrate(int width, int height, float frameRate) {
// TODO(b/238094555) Refactor into a BitrateProvider. // TODO: b/238094555 - Refactor into a BitrateProvider.
// Assume medium motion factor. // Assume medium motion factor.
// 1080p60 -> 16.6Mbps, 720p30 -> 3.7Mbps. // 1080p60 -> 16.6Mbps, 720p30 -> 3.7Mbps.
return (int) (width * height * frameRate * 0.07 * 2); return (int) (width * height * frameRate * 0.07 * 2);
@ -835,7 +835,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
private static boolean deviceNeedsNoH264HighProfileWorkaround() { private static boolean deviceNeedsNoH264HighProfileWorkaround() {
// The H.264/AVC encoder produces B-frames when high profile is chosen despite configuration to // The H.264/AVC encoder produces B-frames when high profile is chosen despite configuration to
// turn them off, so force not using high profile on these devices (see b/306617392). // turn them off, so force not using high profile on these devices (see b/306617392).
// TODO(b/229420356): Remove once the in-app muxer is the default and B-frames are supported. // TODO: b/229420356 - Remove once the in-app muxer is the default and B-frames are supported.
return Util.SDK_INT == 27 return Util.SDK_INT == 27
&& (Build.DEVICE.equals("ASUS_X00T_3") || Build.DEVICE.equals("TC77")); && (Build.DEVICE.equals("ASUS_X00T_3") || Build.DEVICE.equals("TC77"));
} }

View File

@ -140,7 +140,7 @@ public final class EditedMediaItem {
*/ */
@CanIgnoreReturnValue @CanIgnoreReturnValue
public Builder setFlattenForSlowMotion(boolean flattenForSlowMotion) { public Builder setFlattenForSlowMotion(boolean flattenForSlowMotion) {
// TODO(b/233986762): Support clipping with SEF flattening. // TODO: b/233986762 - Support clipping with SEF flattening.
checkArgument( checkArgument(
mediaItem.clippingConfiguration.equals(MediaItem.ClippingConfiguration.UNSET) mediaItem.clippingConfiguration.equals(MediaItem.ClippingConfiguration.UNSET)
|| !flattenForSlowMotion, || !flattenForSlowMotion,
@ -190,8 +190,8 @@ public final class EditedMediaItem {
* @param frameRate The frame rate, in frames per second. * @param frameRate The frame rate, in frames per second.
* @return This builder. * @return This builder.
*/ */
// TODO(b/210593170): Remove/deprecate frameRate parameter when frameRate parameter is added to // TODO: b/210593170 - Remove/deprecate frameRate parameter when frameRate parameter is added to
// transformer. // transformer.
@CanIgnoreReturnValue @CanIgnoreReturnValue
public Builder setFrameRate(@IntRange(from = 0) int frameRate) { public Builder setFrameRate(@IntRange(from = 0) int frameRate) {
checkArgument(frameRate > 0); checkArgument(frameRate > 0);
@ -272,7 +272,7 @@ public final class EditedMediaItem {
* The duration of the image in the output video for image {@link MediaItem}, or the media * The duration of the image in the output video for image {@link MediaItem}, or the media
* duration for other types of {@link MediaItem}, in microseconds. * duration for other types of {@link MediaItem}, in microseconds.
*/ */
// TODO - b/309767764: Consider merging with presentationDurationUs. // TODO: b/309767764 - Consider merging with presentationDurationUs.
public final long durationUs; public final long durationUs;
/** The frame rate of the image in the output video, in frames per second. */ /** The frame rate of the image in the output video, in frames per second. */
@ -317,7 +317,7 @@ public final class EditedMediaItem {
if (presentationDurationUs == C.TIME_UNSET) { if (presentationDurationUs == C.TIME_UNSET) {
if (mediaItem.clippingConfiguration.equals(MediaItem.ClippingConfiguration.UNSET) if (mediaItem.clippingConfiguration.equals(MediaItem.ClippingConfiguration.UNSET)
|| durationUs == C.TIME_UNSET) { || durationUs == C.TIME_UNSET) {
// TODO - b/290734981: Use presentationDurationUs for image presentation // TODO: b/290734981 - Use presentationDurationUs for image presentation
presentationDurationUs = durationUs; presentationDurationUs = durationUs;
} else { } else {
MediaItem.ClippingConfiguration clippingConfiguration = mediaItem.clippingConfiguration; MediaItem.ClippingConfiguration clippingConfiguration = mediaItem.clippingConfiguration;

View File

@ -151,7 +151,7 @@ public final class EncoderUtil {
@SuppressWarnings("InlinedApi") // Safe use of inlined constants from newer API versions. @SuppressWarnings("InlinedApi") // Safe use of inlined constants from newer API versions.
public static ImmutableList<Integer> getCodecProfilesForHdrFormat( public static ImmutableList<Integer> getCodecProfilesForHdrFormat(
String mimeType, @ColorTransfer int colorTransfer) { String mimeType, @ColorTransfer int colorTransfer) {
// TODO(b/239174610): Add a way to determine profiles for DV and HDR10+. // TODO: b/239174610 - Add a way to determine profiles for DV and HDR10+.
switch (mimeType) { switch (mimeType) {
case MimeTypes.VIDEO_VP9: case MimeTypes.VIDEO_VP9:
if (colorTransfer == C.COLOR_TRANSFER_HLG || colorTransfer == C.COLOR_TRANSFER_ST2084) { if (colorTransfer == C.COLOR_TRANSFER_HLG || colorTransfer == C.COLOR_TRANSFER_ST2084) {
@ -327,7 +327,7 @@ public final class EncoderUtil {
*/ */
public static int findHighestSupportedEncodingLevel( public static int findHighestSupportedEncodingLevel(
MediaCodecInfo encoderInfo, String mimeType, int profile) { MediaCodecInfo encoderInfo, String mimeType, int profile) {
// TODO(b/214964116): Merge into MediaCodecUtil. // TODO: b/214964116 - Merge into MediaCodecUtil.
MediaCodecInfo.CodecProfileLevel[] profileLevels = MediaCodecInfo.CodecProfileLevel[] profileLevels =
encoderInfo.getCapabilitiesForType(mimeType).profileLevels; encoderInfo.getCapabilitiesForType(mimeType).profileLevels;
@ -400,7 +400,7 @@ public final class EncoderUtil {
/** Checks if a {@linkplain MediaCodecInfo codec} is hardware-accelerated. */ /** Checks if a {@linkplain MediaCodecInfo codec} is hardware-accelerated. */
public static boolean isHardwareAccelerated(MediaCodecInfo encoderInfo, String mimeType) { public static boolean isHardwareAccelerated(MediaCodecInfo encoderInfo, String mimeType) {
// TODO(b/214964116): Merge into MediaCodecUtil. // TODO: b/214964116 - Merge into MediaCodecUtil.
if (Util.SDK_INT >= 29) { if (Util.SDK_INT >= 29) {
return Api29.isHardwareAccelerated(encoderInfo); return Api29.isHardwareAccelerated(encoderInfo);
} }

View File

@ -225,8 +225,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
if (shouldInitDecoder) { if (shouldInitDecoder) {
if (getProcessedTrackType(inputFormat.sampleMimeType) == C.TRACK_TYPE_VIDEO) { if (getProcessedTrackType(inputFormat.sampleMimeType) == C.TRACK_TYPE_VIDEO) {
// TODO(b/278259383): Move surface creation out of video sampleConsumer. Init decoder and // TODO: b/278259383 - Move surface creation out of video sampleConsumer. Init decoder and
// get decoder output Format before init sampleConsumer. // get decoder output Format before init sampleConsumer.
if (!ensureSampleConsumerInitialized()) { if (!ensureSampleConsumerInitialized()) {
return false; return false;
} }
@ -263,8 +263,8 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
} }
outputFormat = overrideOutputFormat(decoderOutputFormat); outputFormat = overrideOutputFormat(decoderOutputFormat);
} else { } else {
// TODO(b/278259383): Move surface creation out of video sampleConsumer. Init decoder and // TODO: b/278259383 - Move surface creation out of video sampleConsumer. Init decoder and
// get decoderOutput Format before init sampleConsumer. // get decoderOutput Format before init sampleConsumer.
outputFormat = overrideOutputFormat(inputFormat); outputFormat = overrideOutputFormat(inputFormat);
} }
} }

View File

@ -108,7 +108,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
@Override @Override
protected void initDecoder(Format inputFormat) throws ExportException { protected void initDecoder(Format inputFormat) throws ExportException {
// TODO(b/278259383): Move surface creation out of sampleConsumer. Init decoder before // TODO: b/278259383 - Move surface creation out of sampleConsumer. Init decoder before
// sampleConsumer. // sampleConsumer.
checkStateNotNull(sampleConsumer); checkStateNotNull(sampleConsumer);
boolean isDecoderToneMappingRequired = boolean isDecoderToneMappingRequired =

View File

@ -83,7 +83,7 @@ public final class ExoPlayerAssetLoader implements AssetLoader {
* testing. * testing.
*/ */
public Factory(Context context, Codec.DecoderFactory decoderFactory, Clock clock) { public Factory(Context context, Codec.DecoderFactory decoderFactory, Clock clock) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this( this(
context, context,
decoderFactory, decoderFactory,
@ -108,7 +108,7 @@ public final class ExoPlayerAssetLoader implements AssetLoader {
Codec.DecoderFactory decoderFactory, Codec.DecoderFactory decoderFactory,
Clock clock, Clock clock,
MediaSource.Factory mediaSourceFactory) { MediaSource.Factory mediaSourceFactory) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this(context, decoderFactory, clock, mediaSourceFactory, /* trackSelectorFactory= */ null); this(context, decoderFactory, clock, mediaSourceFactory, /* trackSelectorFactory= */ null);
} }
@ -131,7 +131,7 @@ public final class ExoPlayerAssetLoader implements AssetLoader {
Clock clock, Clock clock,
@Nullable MediaSource.Factory mediaSourceFactory, @Nullable MediaSource.Factory mediaSourceFactory,
@Nullable TrackSelector.Factory trackSelectorFactory) { @Nullable TrackSelector.Factory trackSelectorFactory) {
// TODO: b/381519379 - deprecate this constructor and replace with a builder. // TODO: b/381519379 - Deprecate this constructor and replace with a builder.
this.context = context; this.context = context;
this.decoderFactory = decoderFactory; this.decoderFactory = decoderFactory;
this.clock = clock; this.clock = clock;

View File

@ -207,8 +207,8 @@ public final class ImageAssetLoader implements AssetLoader {
() -> queueBitmapInternal(bitmap, format), QUEUE_BITMAP_INTERVAL_MS, MILLISECONDS); () -> queueBitmapInternal(bitmap, format), QUEUE_BITMAP_INTERVAL_MS, MILLISECONDS);
return; return;
} }
// TODO(b/262693274): consider using listener.onDurationUs() or the MediaItem change // TODO: b/262693274 - Consider using listener.onDurationUs() or the MediaItem change callback
// callback rather than setting duration here. // rather than setting duration here.
@InputResult @InputResult
int result = int result =
sampleConsumer.queueInputBitmap( sampleConsumer.queueInputBitmap(

View File

@ -314,7 +314,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
new SampleConsumerWrapper(wrappedAudioSampleConsumer, C.TRACK_TYPE_AUDIO)); new SampleConsumerWrapper(wrappedAudioSampleConsumer, C.TRACK_TYPE_AUDIO));
} }
} else { } else {
// TODO(b/270533049): Remove the check below when implementing blank video frames generation. // TODO: b/270533049 - Remove the check below when implementing blank video frames generation.
boolean videoTrackDisappeared = boolean videoTrackDisappeared =
reportedTrackCount.get() == 1 reportedTrackCount.get() == 1
&& trackType == C.TRACK_TYPE_AUDIO && trackType == C.TRACK_TYPE_AUDIO

View File

@ -218,7 +218,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
@Nullable private EditedMediaItem pendingEditedMediaItem; @Nullable private EditedMediaItem pendingEditedMediaItem;
private long pendingOffsetToCompositionTimeUs; private long pendingOffsetToCompositionTimeUs;
// TODO - b/320007703: Revisit the abstractions needed here (editedMediaItemProvider and // TODO: b/320007703 - Revisit the abstractions needed here (editedMediaItemProvider and
// Supplier<EditedMediaItem>) once we finish all the wiring to support multiple sequences. // Supplier<EditedMediaItem>) once we finish all the wiring to support multiple sequences.
public SequenceAudioRenderer( public SequenceAudioRenderer(
Context context, Context context,
@ -504,7 +504,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
super.onEnabled(joining, mayRenderStartOfStream); super.onEnabled(joining, mayRenderStartOfStream);
this.mayRenderStartOfStream = mayRenderStartOfStream; this.mayRenderStartOfStream = mayRenderStartOfStream;
videoSink.onRendererEnabled(mayRenderStartOfStream); videoSink.onRendererEnabled(mayRenderStartOfStream);
// TODO - b/328444280: Do not set a listener on VideoSink, but MediaCodecVideoRenderer must // TODO: b/328444280 - Do not set a listener on VideoSink, but MediaCodecVideoRenderer must
// unregister itself as a listener too. // unregister itself as a listener too.
videoSink.setListener(VideoSink.Listener.NO_OP, /* executor= */ (runnable) -> {}); videoSink.setListener(VideoSink.Listener.NO_OP, /* executor= */ (runnable) -> {});
} }

View File

@ -52,7 +52,7 @@ import java.util.concurrent.atomic.AtomicLong;
// If the durationUs maps to a non-integer number of samples, then an extra sample is output. // If the durationUs maps to a non-integer number of samples, then an extra sample is output.
// In the worst case, this is one sample (~22us of audio) per media item. // In the worst case, this is one sample (~22us of audio) per media item.
// TODO(b/260618558): Track leftover duration when generating in mixer. // TODO: b/260618558 - Track leftover duration when generating in mixer.
remainingBytesToOutput.addAndGet(audioFormat.bytesPerFrame * outputFrameCount); remainingBytesToOutput.addAndGet(audioFormat.bytesPerFrame * outputFrameCount);
} }

View File

@ -124,7 +124,7 @@ public final class TransformationRequest {
} }
@CanIgnoreReturnValue @CanIgnoreReturnValue
// TODO(b/255953153): remove this method once fallback has been refactored. // TODO: b/255953153 - Remove this method once fallback has been refactored.
/* package */ Builder setResolution(int outputHeight) { /* package */ Builder setResolution(int outputHeight) {
this.outputHeight = outputHeight; this.outputHeight = outputHeight;
return this; return this;

View File

@ -1665,7 +1665,7 @@ public final class Transformer {
exportResultBuilder.setVideoEncoderName(videoEncoderName); exportResultBuilder.setVideoEncoderName(videoEncoderName);
} }
// TODO(b/213341814): Add event flags for Transformer events. // TODO: b/213341814 - Add event flags for Transformer events.
transformerInternal = null; transformerInternal = null;
if (transformerState == TRANSFORMER_STATE_REMUX_PROCESSED_VIDEO) { if (transformerState == TRANSFORMER_STATE_REMUX_PROCESSED_VIDEO) {
processRemainingVideo(); processRemainingVideo();

View File

@ -529,7 +529,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
int assetLoaderProgressState = int assetLoaderProgressState =
sequenceAssetLoaders.get(i).getProgress(internalProgressHolder); sequenceAssetLoaders.get(i).getProgress(internalProgressHolder);
if (assetLoaderProgressState != PROGRESS_STATE_AVAILABLE) { if (assetLoaderProgressState != PROGRESS_STATE_AVAILABLE) {
// TODO - b/322136131 : Check for inconsistent state transitions. // TODO: b/322136131 - Check for inconsistent state transitions.
synchronized (progressLock) { synchronized (progressLock) {
progressState = assetLoaderProgressState; progressState = assetLoaderProgressState;
progressValue = 0; progressValue = 0;
@ -704,7 +704,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
} else { } else {
Format firstFormat; Format firstFormat;
if (MimeTypes.isVideo(assetLoaderOutputFormat.sampleMimeType)) { if (MimeTypes.isVideo(assetLoaderOutputFormat.sampleMimeType)) {
// TODO(b/267301878): Pass firstAssetLoaderOutputFormat once surface creation not in VSP. // TODO: b/267301878 - Pass firstAssetLoaderOutputFormat once surface creation not in VSP.
boolean isMediaCodecToneMappingRequested = boolean isMediaCodecToneMappingRequested =
transformationRequest.hdrMode == HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC; transformationRequest.hdrMode == HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC;
ColorInfo decoderOutputColor = ColorInfo decoderOutputColor =

View File

@ -93,7 +93,7 @@ import org.checkerframework.dataflow.qual.Pure;
boolean portraitEncodingEnabled, boolean portraitEncodingEnabled,
int maxFramesInEncoder) int maxFramesInEncoder)
throws ExportException { throws ExportException {
// TODO(b/278259383) Consider delaying configuration of VideoSampleExporter to use the decoder // TODO: b/278259383 - Consider delaying configuration of VideoSampleExporter to use the decoder
// output format instead of the extractor output format, to match AudioSampleExporter behavior. // output format instead of the extractor output format, to match AudioSampleExporter behavior.
super(firstInputFormat, muxerWrapper); super(firstInputFormat, muxerWrapper);
this.initialTimestampOffsetUs = initialTimestampOffsetUs; this.initialTimestampOffsetUs = initialTimestampOffsetUs;
@ -327,7 +327,7 @@ import org.checkerframework.dataflow.qual.Pure;
.setCodecs(inputFormat.codecs) .setCodecs(inputFormat.codecs)
.build(); .build();
// TODO - b/324426022: Move logic for supported mime types to DefaultEncoderFactory. // TODO: b/324426022 - Move logic for supported mime types to DefaultEncoderFactory.
encoder = encoder =
encoderFactory.createForVideoEncoding( encoderFactory.createForVideoEncoding(
requestedEncoderFormat requestedEncoderFormat
@ -395,7 +395,7 @@ import org.checkerframework.dataflow.qual.Pure;
Format requestedFormat, Format requestedFormat,
Format supportedFormat, Format supportedFormat,
@Composition.HdrMode int supportedHdrMode) { @Composition.HdrMode int supportedHdrMode) {
// TODO(b/255953153): Consider including bitrate in the revised fallback. // TODO: b/255953153 - Consider including bitrate in the revised fallback.
TransformationRequest.Builder supportedRequestBuilder = transformationRequest.buildUpon(); TransformationRequest.Builder supportedRequestBuilder = transformationRequest.buildUpon();
if (transformationRequest.hdrMode != supportedHdrMode) { if (transformationRequest.hdrMode != supportedHdrMode) {

View File

@ -46,7 +46,7 @@ import org.robolectric.ParameterizedRobolectricTestRunner.Parameters;
* For example, a buffer containing 4 float values (of {@link #AUDIO_FORMAT_STEREO_PCM_FLOAT}) would * For example, a buffer containing 4 float values (of {@link #AUDIO_FORMAT_STEREO_PCM_FLOAT}) would
* be 2000us of data (4 values = 2 frames). * be 2000us of data (4 values = 2 frames).
*/ */
// TODO(b/290002720): Expand and generalize parameterized test cases. // TODO: b/290002720 - Expand and generalize parameterized test cases.
@RunWith(ParameterizedRobolectricTestRunner.class) @RunWith(ParameterizedRobolectricTestRunner.class)
public final class DefaultAudioMixerTest { public final class DefaultAudioMixerTest {

View File

@ -152,7 +152,7 @@ public final class MediaItemExportTest {
transformer.start(new Composition.Builder(gapSequence).build(), outputDir.newFile().getPath()); transformer.start(new Composition.Builder(gapSequence).build(), outputDir.newFile().getPath());
ExportResult result = TransformerTestRunner.runLooper(transformer); ExportResult result = TransformerTestRunner.runLooper(transformer);
// TODO(b/355201372) - Assert 500ms duration. // TODO: b/355201372 - Assert 500ms duration.
assertThat(result.durationMs).isAtLeast(487); assertThat(result.durationMs).isAtLeast(487);
assertThat(result.durationMs).isAtMost(500); assertThat(result.durationMs).isAtMost(500);
@ -992,7 +992,7 @@ public final class MediaItemExportTest {
transformer.start(mediaItem, outputDir.newFile("second").getPath()); transformer.start(mediaItem, outputDir.newFile("second").getPath());
ExportResult exportResult = TransformerTestRunner.runLooper(transformer); ExportResult exportResult = TransformerTestRunner.runLooper(transformer);
// TODO(b/264974805): Make export output deterministic and check it against dump file. // TODO: b/264974805 - Make export output deterministic and check it against dump file.
assertThat(exportResult.exportException).isNull(); assertThat(exportResult.exportException).isNull();
} }

View File

@ -518,7 +518,7 @@ public final class SequenceExportTest {
assertThat(getRootCause(exception)).hasMessageThat().isEqualTo("Gaps can not be transmuxed."); assertThat(getRootCause(exception)).hasMessageThat().isEqualTo("Gaps can not be transmuxed.");
} }
// TODO - b/369154363: Enable test after shouldTranscode inconsistency is resolved. // TODO: b/369154363 - Enable test after shouldTranscode inconsistency is resolved.
@Ignore @Ignore
@Test @Test
public void transmuxAudio_gapItem_throws() throws Exception { public void transmuxAudio_gapItem_throws() throws Exception {