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
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?
assumeTrue(Util.SDK_INT >= 29);
assumeFormatsSupported(
@ -94,7 +94,7 @@ public class ForceEndOfStreamTest {
@Test
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?
assumeTrue(Util.SDK_INT >= 29);
assumeFormatsSupported(
@ -116,7 +116,7 @@ public class ForceEndOfStreamTest {
@Test
public void transcode_withSlowVideoEffect_exportSucceedsWithCorrectNumberOfFrames()
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?
assumeTrue(Util.SDK_INT >= 29);
assumeFormatsSupported(

View File

@ -100,7 +100,7 @@ import java.util.Objects;
public abstract static class ItemConfig {
public final int frameCount;
@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;
protected final Effects effects;

View File

@ -2297,7 +2297,7 @@ public class TransformerEndToEndTest {
.run(testId, editedMediaItem);
// The test file contains 44100 samples (1 sec @44.1KHz, mono). We expect to receive 44100 / 1.5
// 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.
assertThat(readBytes.get() / 2).isWithin(1).of(29400);
}

View File

@ -235,7 +235,7 @@ public class TransformerProgressTest {
assertThat(transformerExceptionFuture.get()).isNull();
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()) {
// The progress list could be empty if the export ends before any progress can be retrieved.
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
* succeeds.
*/
// TODO(b/263395272): Move this test to effects/mh tests
// TODO: b/263395272 - Move this test to effects/mh tests
@RunWith(Parameterized.class)
public class DefaultVideoFrameProcessorParametrizedSurfaceOutputTest {
@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
* 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)
public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
private static final String ORIGINAL_PNG_ASSET_PATH =
@ -160,7 +160,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -188,7 +188,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -230,7 +230,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -258,7 +258,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -266,7 +266,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
}
@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 {
Context context = getApplicationContext();
Format format = MP4_ASSET_1080P_5_SECOND_HLG10.videoFormat;
@ -455,7 +455,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -513,7 +513,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -546,7 +546,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -571,7 +571,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -605,7 +605,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -634,7 +634,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -667,7 +667,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -693,7 +693,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -722,7 +722,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -756,7 +756,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -782,7 +782,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.processFirstFrameAndEnd();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -811,7 +811,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
texIdProducingVideoFrameProcessorTestRunner.release();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);
@ -845,7 +845,7 @@ public final class DefaultVideoFrameProcessorTextureOutputPixelTest {
videoFrameProcessorTestRunner.endFrameProcessing();
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 =
BitmapPixelTestUtil.getBitmapAveragePixelAbsoluteDifferenceFp16(
expectedBitmap, actualBitmap);

View File

@ -309,7 +309,7 @@ public class ExportTest {
public void exportSef() throws Exception {
Context context = ApplicationProvider.getApplicationContext();
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.
recordTestSkipped(context, testId, /* reason= */ "API version lacks muxing support");
return;
@ -334,7 +334,7 @@ public class ExportTest {
public void exportSefH265() throws Exception {
Context context = ApplicationProvider.getApplicationContext();
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.
recordTestSkipped(context, testId, /* reason= */ "API version lacks muxing support");
return;

View File

@ -64,7 +64,7 @@ public class ForceInterpretHdrVideoAsSdrTest {
Context context = ApplicationProvider.getApplicationContext();
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(
context, testId, /* reason= */ "Under API 29, this API is considered best-effort.");
return;
@ -105,7 +105,7 @@ public class ForceInterpretHdrVideoAsSdrTest {
Context context = ApplicationProvider.getApplicationContext();
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(
context, testId, /* reason= */ "Under API 29, this API is considered best-effort.");
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
* 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)
public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
private static final String TAG = "ToneMapHdrToSdrGl";
@ -148,7 +148,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -170,7 +170,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -192,7 +192,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -215,7 +215,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
assertThat(averagePixelAbsoluteDifference)
@ -241,7 +241,7 @@ public final class ToneMapHdrToSdrUsingOpenGlPixelTest {
Bitmap actualBitmap = videoFrameProcessorTestRunner.getOutputBitmap();
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 =
getBitmapAveragePixelAbsoluteDifferenceArgb8888(expectedBitmap, actualBitmap, testId);
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
* 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 {
// A passthrough effect allows for testing having an intermediate effect injected, which uses
// different OpenGL shaders from having no effects.

View File

@ -118,7 +118,7 @@ public class SsimMapperTest {
List<Object[]> parameterList = new ArrayList<>();
for (AssetInfo assetInfo : INPUT_ASSETS) {
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) {
parameterList.add(new Object[] {assetInfo, MimeTypes.VIDEO_H265});
}
@ -271,7 +271,7 @@ public class SsimMapperTest {
}
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 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);
checkArgument(isInputAudioFormatValid(inputAudioFormat), /* errorMessage= */ inputAudioFormat);
// TODO(b/323148735) - Use improved buffer assignment logic.
// TODO: b/323148735 - Use improved buffer assignment logic.
availableInputBuffers = new ConcurrentLinkedQueue<>();
ByteBuffer emptyBuffer = ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder());
for (int i = 0; i < MAX_INPUT_BUFFER_COUNT; i++) {
@ -530,7 +530,7 @@ import java.util.concurrent.atomic.AtomicLong;
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.
if (requiredOutputAudioFormat.channelCount == 1
|| requiredOutputAudioFormat.channelCount == 2) {

View File

@ -118,7 +118,7 @@ import java.util.Objects;
throws ConfigurationException {
checkArgument(supportsFormat(inputFormat));
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);
currentInputFormat = inputFormat;

View File

@ -87,7 +87,7 @@ import org.checkerframework.dataflow.qual.Pure;
.setCodecs(firstInputFormat.codecs)
.build();
// TODO - b/324426022: Move logic for supported mime types to DefaultEncoderFactory.
// TODO: b/324426022 - Move logic for supported mime types to DefaultEncoderFactory.
encoder =
encoderFactory.createForAudioEncoding(
requestedEncoderFormat
@ -222,7 +222,7 @@ import org.checkerframework.dataflow.qual.Pure;
@Pure
private static TransformationRequest createFallbackTransformationRequest(
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.
if (Util.areEqual(requestedFormat.sampleMimeType, actualFormat.sampleMimeType)) {
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
// 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.
private static final int MAXIMUM_BITMAP_OUTPUT_DIMENSION = 4096;
@ -77,7 +77,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
*/
public DefaultAssetLoaderFactory(
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.decoderFactory = decoderFactory;
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.
*/
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.bitmapLoader = bitmapLoader;
decoderFactory = new DefaultDecoderFactory.Builder(context).build();
@ -133,7 +133,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
Clock clock,
@Nullable MediaSource.Factory mediaSourceFactory,
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.decoderFactory = decoderFactory;
this.clock = clock;
@ -163,7 +163,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
@Nullable MediaSource.Factory mediaSourceFactory,
BitmapLoader bitmapLoader,
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.decoderFactory = decoderFactory;
this.clock = clock;
@ -180,7 +180,7 @@ public final class DefaultAssetLoaderFactory implements AssetLoader.Factory {
CompositionSettings compositionSettings) {
MediaItem mediaItem = editedMediaItem.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
boolean exportVideoFromMotionPhoto = isImage && editedMediaItem.durationUs == C.TIME_UNSET;
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 final boolean outputSilenceWithNoSources;
@ -302,7 +302,7 @@ public final class DefaultAudioMixer implements AudioMixer {
outputBuffer = outputBuffer.slice().order(ByteOrder.nativeOrder());
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[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.");
}
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(
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;
/** 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
public final class DefaultEncoderFactory implements Codec.EncoderFactory {
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)) {
// 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)
.contains(MediaCodecInfo.CodecCapabilities.COLOR_Format32bitABGR2101010)) {
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. */
private static ImmutableList<MediaCodecInfo> filterEncodersByResolution(
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(
encoders,
/* cost= */ (encoderInfo) -> {
@ -676,8 +676,8 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
*/
private static void adjustMediaFormatForH264EncoderSettings(
@Nullable ColorInfo colorInfo, MediaCodecInfo encoderInfo, MediaFormat mediaFormat) {
// TODO(b/210593256): Remove overriding profile/level (before API 29) after switching to in-app
// muxing.
// TODO: b/210593256 - Remove overriding profile/level (before API 29) after switching to in-app
// muxing.
String mimeType = MimeTypes.VIDEO_H264;
if (Util.SDK_INT >= 29) {
int expectedEncodingProfile = MediaCodecInfo.CodecProfileLevel.AVCProfileHigh;
@ -714,8 +714,8 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
if (!mediaFormat.containsKey(MediaFormat.KEY_LEVEL)) {
mediaFormat.setInteger(MediaFormat.KEY_LEVEL, supportedEncodingLevel);
}
// 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.
// 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.
mediaFormat.setInteger(MediaFormat.KEY_LATENCY, 1);
}
} else if (Util.SDK_INT >= 24) {
@ -793,7 +793,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
* </ul>
*/
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.
// 1080p60 -> 16.6Mbps, 720p30 -> 3.7Mbps.
return (int) (width * height * frameRate * 0.07 * 2);
@ -835,7 +835,7 @@ public final class DefaultEncoderFactory implements Codec.EncoderFactory {
private static boolean deviceNeedsNoH264HighProfileWorkaround() {
// 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).
// 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
&& (Build.DEVICE.equals("ASUS_X00T_3") || Build.DEVICE.equals("TC77"));
}

View File

@ -140,7 +140,7 @@ public final class EditedMediaItem {
*/
@CanIgnoreReturnValue
public Builder setFlattenForSlowMotion(boolean flattenForSlowMotion) {
// TODO(b/233986762): Support clipping with SEF flattening.
// TODO: b/233986762 - Support clipping with SEF flattening.
checkArgument(
mediaItem.clippingConfiguration.equals(MediaItem.ClippingConfiguration.UNSET)
|| !flattenForSlowMotion,
@ -190,8 +190,8 @@ public final class EditedMediaItem {
* @param frameRate The frame rate, in frames per second.
* @return This builder.
*/
// TODO(b/210593170): Remove/deprecate frameRate parameter when frameRate parameter is added to
// transformer.
// TODO: b/210593170 - Remove/deprecate frameRate parameter when frameRate parameter is added to
// transformer.
@CanIgnoreReturnValue
public Builder setFrameRate(@IntRange(from = 0) int frameRate) {
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
* 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;
/** 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 (mediaItem.clippingConfiguration.equals(MediaItem.ClippingConfiguration.UNSET)
|| durationUs == C.TIME_UNSET) {
// TODO - b/290734981: Use presentationDurationUs for image presentation
// TODO: b/290734981 - Use presentationDurationUs for image presentation
presentationDurationUs = durationUs;
} else {
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.
public static ImmutableList<Integer> getCodecProfilesForHdrFormat(
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) {
case MimeTypes.VIDEO_VP9:
if (colorTransfer == C.COLOR_TRANSFER_HLG || colorTransfer == C.COLOR_TRANSFER_ST2084) {
@ -327,7 +327,7 @@ public final class EncoderUtil {
*/
public static int findHighestSupportedEncodingLevel(
MediaCodecInfo encoderInfo, String mimeType, int profile) {
// TODO(b/214964116): Merge into MediaCodecUtil.
// TODO: b/214964116 - Merge into MediaCodecUtil.
MediaCodecInfo.CodecProfileLevel[] profileLevels =
encoderInfo.getCapabilitiesForType(mimeType).profileLevels;
@ -400,7 +400,7 @@ public final class EncoderUtil {
/** Checks if a {@linkplain MediaCodecInfo codec} is hardware-accelerated. */
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) {
return Api29.isHardwareAccelerated(encoderInfo);
}

View File

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

View File

@ -108,7 +108,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
@Override
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.
checkStateNotNull(sampleConsumer);
boolean isDecoderToneMappingRequired =

View File

@ -83,7 +83,7 @@ public final class ExoPlayerAssetLoader implements AssetLoader {
* testing.
*/
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(
context,
decoderFactory,
@ -108,7 +108,7 @@ public final class ExoPlayerAssetLoader implements AssetLoader {
Codec.DecoderFactory decoderFactory,
Clock clock,
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);
}
@ -131,7 +131,7 @@ public final class ExoPlayerAssetLoader implements AssetLoader {
Clock clock,
@Nullable MediaSource.Factory mediaSourceFactory,
@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.decoderFactory = decoderFactory;
this.clock = clock;

View File

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

View File

@ -314,7 +314,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
new SampleConsumerWrapper(wrappedAudioSampleConsumer, C.TRACK_TYPE_AUDIO));
}
} 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 =
reportedTrackCount.get() == 1
&& trackType == C.TRACK_TYPE_AUDIO

View File

@ -218,7 +218,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
@Nullable private EditedMediaItem pendingEditedMediaItem;
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.
public SequenceAudioRenderer(
Context context,
@ -504,7 +504,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
super.onEnabled(joining, mayRenderStartOfStream);
this.mayRenderStartOfStream = 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.
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.
// 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);
}

View File

@ -124,7 +124,7 @@ public final class TransformationRequest {
}
@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) {
this.outputHeight = outputHeight;
return this;

View File

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

View File

@ -529,7 +529,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
int assetLoaderProgressState =
sequenceAssetLoaders.get(i).getProgress(internalProgressHolder);
if (assetLoaderProgressState != PROGRESS_STATE_AVAILABLE) {
// TODO - b/322136131 : Check for inconsistent state transitions.
// TODO: b/322136131 - Check for inconsistent state transitions.
synchronized (progressLock) {
progressState = assetLoaderProgressState;
progressValue = 0;
@ -704,7 +704,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
} else {
Format firstFormat;
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 =
transformationRequest.hdrMode == HDR_MODE_TONE_MAP_HDR_TO_SDR_USING_MEDIACODEC;
ColorInfo decoderOutputColor =

View File

@ -93,7 +93,7 @@ import org.checkerframework.dataflow.qual.Pure;
boolean portraitEncodingEnabled,
int maxFramesInEncoder)
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.
super(firstInputFormat, muxerWrapper);
this.initialTimestampOffsetUs = initialTimestampOffsetUs;
@ -327,7 +327,7 @@ import org.checkerframework.dataflow.qual.Pure;
.setCodecs(inputFormat.codecs)
.build();
// TODO - b/324426022: Move logic for supported mime types to DefaultEncoderFactory.
// TODO: b/324426022 - Move logic for supported mime types to DefaultEncoderFactory.
encoder =
encoderFactory.createForVideoEncoding(
requestedEncoderFormat
@ -395,7 +395,7 @@ import org.checkerframework.dataflow.qual.Pure;
Format requestedFormat,
Format supportedFormat,
@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();
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
* 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)
public final class DefaultAudioMixerTest {

View File

@ -152,7 +152,7 @@ public final class MediaItemExportTest {
transformer.start(new Composition.Builder(gapSequence).build(), outputDir.newFile().getPath());
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).isAtMost(500);
@ -992,7 +992,7 @@ public final class MediaItemExportTest {
transformer.start(mediaItem, outputDir.newFile("second").getPath());
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();
}

View File

@ -518,7 +518,7 @@ public final class SequenceExportTest {
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
@Test
public void transmuxAudio_gapItem_throws() throws Exception {