mirror of
https://github.com/androidx/media.git
synced 2025-05-04 06:00:37 +08:00
Test: Rename to avoid redundant substrings.
Rename test files to avoid substrings that can be implied by the directory name, like "Transformation" and "Test" No functional changes. Renaming-only. PiperOrigin-RevId: 477724724
This commit is contained in:
parent
26a73605f8
commit
9786802527
@ -37,7 +37,7 @@ import androidx.media3.common.FrameProcessingException;
|
|||||||
import androidx.media3.common.FrameProcessor;
|
import androidx.media3.common.FrameProcessor;
|
||||||
import androidx.media3.common.SurfaceInfo;
|
import androidx.media3.common.SurfaceInfo;
|
||||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||||
import com.google.android.exoplayer2.testutil.DecodeOneFrameTestUtil;
|
import com.google.android.exoplayer2.testutil.DecodeOneFrameUtil;
|
||||||
import com.google.android.exoplayer2.video.ColorInfo;
|
import com.google.android.exoplayer2.video.ColorInfo;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -464,9 +464,9 @@ public final class GlEffectsFrameProcessorPixelTest {
|
|||||||
DebugViewProvider.NONE,
|
DebugViewProvider.NONE,
|
||||||
ColorInfo.SDR_BT709_LIMITED,
|
ColorInfo.SDR_BT709_LIMITED,
|
||||||
/* releaseFramesAutomatically= */ true));
|
/* releaseFramesAutomatically= */ true));
|
||||||
DecodeOneFrameTestUtil.decodeOneAssetFileFrame(
|
DecodeOneFrameUtil.decodeOneAssetFileFrame(
|
||||||
INPUT_MP4_ASSET_STRING,
|
INPUT_MP4_ASSET_STRING,
|
||||||
new DecodeOneFrameTestUtil.Listener() {
|
new DecodeOneFrameUtil.Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void onContainerExtracted(MediaFormat mediaFormat) {
|
public void onContainerExtracted(MediaFormat mediaFormat) {
|
||||||
glEffectsFrameProcessor.setInputFrameInfo(
|
glEffectsFrameProcessor.setInputFrameInfo(
|
||||||
|
@ -35,7 +35,7 @@ import org.junit.runner.RunWith;
|
|||||||
|
|
||||||
/** Tests repeated transcoding operations (as a stress test and to help reproduce flakiness). */
|
/** Tests repeated transcoding operations (as a stress test and to help reproduce flakiness). */
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public final class RepeatedTranscodeTransformationTest {
|
public final class RepeatedTranscodeTest {
|
||||||
private static final int TRANSCODE_COUNT = 10;
|
private static final int TRANSCODE_COUNT = 10;
|
||||||
|
|
||||||
@Test
|
@Test
|
@ -30,7 +30,7 @@ import org.junit.runner.RunWith;
|
|||||||
|
|
||||||
/** {@link Transformer} instrumentation test for applying a frame edit. */
|
/** {@link Transformer} instrumentation test for applying a frame edit. */
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class SetFrameEditTransformationTest {
|
public class SetFrameEditTest {
|
||||||
@Test
|
@Test
|
||||||
public void setFrameEditTransform() throws Exception {
|
public void setFrameEditTransform() throws Exception {
|
||||||
Context context = ApplicationProvider.getApplicationContext();
|
Context context = ApplicationProvider.getApplicationContext();
|
@ -18,7 +18,7 @@ package com.google.android.exoplayer2.transformer.mh;
|
|||||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_1080P_1_SECOND_HDR10_VIDEO_SDR_CONTAINER;
|
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_1080P_1_SECOND_HDR10_VIDEO_SDR_CONTAINER;
|
||||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_1080P_4_SECOND_HDR10;
|
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_1080P_4_SECOND_HDR10;
|
||||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.recordTestSkipped;
|
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.recordTestSkipped;
|
||||||
import static com.google.android.exoplayer2.transformer.mh.analysis.FileTestUtil.assertFileHasColorTransfer;
|
import static com.google.android.exoplayer2.transformer.mh.analysis.FileUtil.assertFileHasColorTransfer;
|
||||||
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
||||||
import static com.google.android.exoplayer2.util.MimeTypes.VIDEO_H265;
|
import static com.google.android.exoplayer2.util.MimeTypes.VIDEO_H265;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
@ -45,8 +45,8 @@ import org.junit.runner.RunWith;
|
|||||||
// TODO(b/239172735): Add HLG tests after finding a shareable HLG file.
|
// TODO(b/239172735): Add HLG tests after finding a shareable HLG file.
|
||||||
/** {@link Transformer} instrumentation test for applying an HDR frame edit. */
|
/** {@link Transformer} instrumentation test for applying an HDR frame edit. */
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class SetHdrEditingTransformationTest {
|
public class SetHdrEditingTest {
|
||||||
public static final String TAG = "SetHdrEditingTransformationTest";
|
public static final String TAG = "SetHdrEditingTest";
|
||||||
private static final ColorInfo HDR10_DEFAULT_COLOR_INFO =
|
private static final ColorInfo HDR10_DEFAULT_COLOR_INFO =
|
||||||
new ColorInfo(
|
new ColorInfo(
|
||||||
C.COLOR_SPACE_BT2020,
|
C.COLOR_SPACE_BT2020,
|
@ -16,7 +16,7 @@
|
|||||||
package com.google.android.exoplayer2.transformer.mh;
|
package com.google.android.exoplayer2.transformer.mh;
|
||||||
|
|
||||||
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_1080P_4_SECOND_HDR10;
|
import static com.google.android.exoplayer2.transformer.AndroidTestUtil.MP4_ASSET_1080P_4_SECOND_HDR10;
|
||||||
import static com.google.android.exoplayer2.transformer.mh.analysis.FileTestUtil.assertFileHasColorTransfer;
|
import static com.google.android.exoplayer2.transformer.mh.analysis.FileUtil.assertFileHasColorTransfer;
|
||||||
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
import static com.google.android.exoplayer2.util.Assertions.checkNotNull;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
@ -39,8 +39,8 @@ import org.junit.runner.RunWith;
|
|||||||
// TODO(b/239172735): Add HLG tests after finding a shareable HLG file.
|
// TODO(b/239172735): Add HLG tests after finding a shareable HLG file.
|
||||||
/** {@link Transformer} instrumentation test for applying an HDR to SDR tone mapping edit. */
|
/** {@link Transformer} instrumentation test for applying an HDR to SDR tone mapping edit. */
|
||||||
@RunWith(AndroidJUnit4.class)
|
@RunWith(AndroidJUnit4.class)
|
||||||
public class SetHdrToSdrToneMapTransformationTest {
|
public class SetHdrToSdrToneMapTest {
|
||||||
public static final String TAG = "SetHdrToSdrToneMapTransformationTest";
|
public static final String TAG = "SetHdrToSdrToneMapTest";
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void transform_toneMapNoRequestedTranscode_hdr10File_toneMapsOrThrows() throws Exception {
|
public void transform_toneMapNoRequestedTranscode_hdr10File_toneMapsOrThrows() throws Exception {
|
@ -22,13 +22,13 @@ import static com.google.common.truth.Truth.assertThat;
|
|||||||
import android.media.MediaFormat;
|
import android.media.MediaFormat;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import com.google.android.exoplayer2.C;
|
import com.google.android.exoplayer2.C;
|
||||||
import com.google.android.exoplayer2.testutil.DecodeOneFrameTestUtil;
|
import com.google.android.exoplayer2.testutil.DecodeOneFrameUtil;
|
||||||
import com.google.android.exoplayer2.util.MediaFormatUtil;
|
import com.google.android.exoplayer2.util.MediaFormatUtil;
|
||||||
import com.google.android.exoplayer2.util.Util;
|
import com.google.android.exoplayer2.util.Util;
|
||||||
import com.google.android.exoplayer2.video.ColorInfo;
|
import com.google.android.exoplayer2.video.ColorInfo;
|
||||||
|
|
||||||
/** Utilities for reading color info from a file. */
|
/** Utilities for reading color info from a file. */
|
||||||
public class FileTestUtil {
|
public class FileUtil {
|
||||||
public static void assertFileHasColorTransfer(
|
public static void assertFileHasColorTransfer(
|
||||||
@Nullable String filePath, @C.ColorTransfer int expectedColorTransfer) throws Exception {
|
@Nullable String filePath, @C.ColorTransfer int expectedColorTransfer) throws Exception {
|
||||||
if (Util.SDK_INT < 29) {
|
if (Util.SDK_INT < 29) {
|
||||||
@ -36,9 +36,9 @@ public class FileTestUtil {
|
|||||||
// required for MediaFormatUtil#getColorInfo.
|
// required for MediaFormatUtil#getColorInfo.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
DecodeOneFrameTestUtil.decodeOneCacheFileFrame(
|
DecodeOneFrameUtil.decodeOneCacheFileFrame(
|
||||||
checkNotNull(filePath),
|
checkNotNull(filePath),
|
||||||
new DecodeOneFrameTestUtil.Listener() {
|
new DecodeOneFrameUtil.Listener() {
|
||||||
@Override
|
@Override
|
||||||
public void onContainerExtracted(MediaFormat mediaFormat) {
|
public void onContainerExtracted(MediaFormat mediaFormat) {
|
||||||
@Nullable ColorInfo extractedColor = MediaFormatUtil.getColorInfo(mediaFormat);
|
@Nullable ColorInfo extractedColor = MediaFormatUtil.getColorInfo(mediaFormat);
|
||||||
@ -54,5 +54,5 @@ public class FileTestUtil {
|
|||||||
/* surface= */ null);
|
/* surface= */ null);
|
||||||
}
|
}
|
||||||
|
|
||||||
private FileTestUtil() {}
|
private FileUtil() {}
|
||||||
}
|
}
|
@ -33,7 +33,7 @@ import java.nio.ByteBuffer;
|
|||||||
import org.checkerframework.checker.nullness.qual.Nullable;
|
import org.checkerframework.checker.nullness.qual.Nullable;
|
||||||
|
|
||||||
/** Utilities for decoding a frame for tests. */
|
/** Utilities for decoding a frame for tests. */
|
||||||
public class DecodeOneFrameTestUtil {
|
public class DecodeOneFrameUtil {
|
||||||
|
|
||||||
/** Listener for decoding events. */
|
/** Listener for decoding events. */
|
||||||
public interface Listener {
|
public interface Listener {
|
||||||
@ -171,5 +171,5 @@ public class DecodeOneFrameTestUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private DecodeOneFrameTestUtil() {}
|
private DecodeOneFrameUtil() {}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user