use of androidx.media3.exoplayer.mediacodec.MediaCodecInfo in project media by androidx.
the class MediaCodecInfoTest method isSeamlessAdaptationSupported_withDifferentMimeType_returnsFalse.
@Test
@SuppressWarnings("deprecation")
public void isSeamlessAdaptationSupported_withDifferentMimeType_returnsFalse() {
MediaCodecInfo codecInfo = buildH264CodecInfo(/* adaptive= */
true);
Format hdAv1Format = FORMAT_H264_HD.buildUpon().setSampleMimeType(VIDEO_AV1).build();
assertThat(codecInfo.isSeamlessAdaptationSupported(FORMAT_H264_HD, hdAv1Format, /* isNewFormatComplete= */
true)).isFalse();
}
use of androidx.media3.exoplayer.mediacodec.MediaCodecInfo in project media by androidx.
the class MediaCodecInfoTest method isSeamlessAdaptationSupported_colorInfoOmittedFromCompleteNewFormat_returnsFalse.
@Test
@SuppressWarnings("deprecation")
public void isSeamlessAdaptationSupported_colorInfoOmittedFromCompleteNewFormat_returnsFalse() {
MediaCodecInfo codecInfo = buildH264CodecInfo(/* adaptive= */
false);
Format hdrVariantFormat = FORMAT_H264_4K.buildUpon().setColorInfo(buildColorInfo(C.COLOR_SPACE_BT601)).build();
assertThat(codecInfo.isSeamlessAdaptationSupported(hdrVariantFormat, FORMAT_H264_4K, /* isNewFormatComplete= */
true)).isFalse();
}
use of androidx.media3.exoplayer.mediacodec.MediaCodecInfo in project media by androidx.
the class MediaCodecInfoTest method canKeepCodec_colorInfoOmittedFromNewFormat_returnsNo.
@Test
public void canKeepCodec_colorInfoOmittedFromNewFormat_returnsNo() {
MediaCodecInfo codecInfo = buildH264CodecInfo(/* adaptive= */
false);
Format hdrVariantFormat = FORMAT_H264_4K.buildUpon().setColorInfo(buildColorInfo(C.COLOR_SPACE_BT601)).build();
assertThat(codecInfo.canReuseCodec(hdrVariantFormat, FORMAT_H264_4K)).isEqualTo(new DecoderReuseEvaluation(codecInfo.name, hdrVariantFormat, FORMAT_H264_4K, REUSE_RESULT_NO, DISCARD_REASON_VIDEO_COLOR_INFO_CHANGED));
}
use of androidx.media3.exoplayer.mediacodec.MediaCodecInfo in project media by androidx.
the class MediaCodecInfoTest method isSeamlessAdaptationSupported_withRotation_returnsFalse.
@Test
@SuppressWarnings("deprecation")
public void isSeamlessAdaptationSupported_withRotation_returnsFalse() {
MediaCodecInfo codecInfo = buildH264CodecInfo(/* adaptive= */
true);
Format hdRotatedFormat = FORMAT_H264_HD.buildUpon().setRotationDegrees(90).build();
assertThat(codecInfo.isSeamlessAdaptationSupported(FORMAT_H264_HD, hdRotatedFormat, /* isNewFormatComplete= */
true)).isFalse();
}
use of androidx.media3.exoplayer.mediacodec.MediaCodecInfo in project media by androidx.
the class MediaCodecInfoTest method isSeamlessAdaptationSupported_colorInfoOmittedFromIncompleteNewFormat_returnsTrue.
@Test
@SuppressWarnings("deprecation")
public void isSeamlessAdaptationSupported_colorInfoOmittedFromIncompleteNewFormat_returnsTrue() {
MediaCodecInfo codecInfo = buildH264CodecInfo(/* adaptive= */
false);
Format hdrVariantFormat = FORMAT_H264_4K.buildUpon().setColorInfo(buildColorInfo(C.COLOR_SPACE_BT601)).build();
assertThat(codecInfo.isSeamlessAdaptationSupported(hdrVariantFormat, FORMAT_H264_4K, /* isNewFormatComplete= */
false)).isTrue();
}
Aggregations