mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Fix HDR editing support check in dolby vision test
A device (for example pixel 7) might support HDR encoding but with H265 sample mime type but the existing condition made assumption false on such devices. The test still does not pass on pixel 7 because the format matching condition is incorrect. It will be fixed in a separate CL. PiperOrigin-RevId: 711368798
This commit is contained in:
parent
2caa0d39eb
commit
969c50d60f
1 changed files with 6 additions and 3 deletions
|
|
@ -210,10 +210,13 @@ public final class HdrEditingTest {
|
|||
public void exportAndTranscode_dolbyVisionFile_whenHdrEditingIsSupported() throws Exception {
|
||||
Context context = ApplicationProvider.getApplicationContext();
|
||||
Format format = MP4_ASSET_DOLBY_VISION_HDR.videoFormat;
|
||||
assumeDeviceSupportsHdrEditing(testId, format);
|
||||
|
||||
// Check HDR support for both VIDEO_DOLBY_VISION and VIDEO_H265 mime types.
|
||||
if (EncoderUtil.getSupportedEncodersForHdrEditing(format.sampleMimeType, format.colorInfo)
|
||||
.isEmpty()) {
|
||||
assumeDeviceSupportsHdrEditing(
|
||||
testId, format.buildUpon().setSampleMimeType(MimeTypes.VIDEO_H265).build());
|
||||
}
|
||||
assumeFormatsSupported(context, testId, /* inputFormat= */ format, /* outputFormat= */ format);
|
||||
|
||||
Transformer transformer = new Transformer.Builder(context).build();
|
||||
MediaItem mediaItem = MediaItem.fromUri(Uri.parse(MP4_ASSET_DOLBY_VISION_HDR.uri));
|
||||
EditedMediaItem editedMediaItem =
|
||||
|
|
|
|||
Loading…
Reference in a new issue