/cts/tests/tests/mediaparser/src/android/media/mediaparser/cts/ |
D | MockMediaParserOutputConsumer.java | 152 MediaFormat mediaFormat = trackData.mediaFormat; in toExoPlayerFormat() local 154 mediaFormat.getString(MediaFormat.KEY_MIME, /* defaultValue= */ null); in toExoPlayerFormat() 156 mediaFormat.containsKey(MediaFormat.KEY_TRACK_ID) in toExoPlayerFormat() 157 ? String.valueOf(mediaFormat.getInteger(MediaFormat.KEY_TRACK_ID)) in toExoPlayerFormat() 160 mediaFormat.getString(MediaFormat.KEY_CODECS_STRING, /* defaultValue= */ null); in toExoPlayerFormat() 162 mediaFormat.getInteger( in toExoPlayerFormat() 165 mediaFormat.getInteger( in toExoPlayerFormat() 168 mediaFormat.getInteger(MediaFormat.KEY_WIDTH, /* defaultValue= */ Format.NO_VALUE); in toExoPlayerFormat() 170 mediaFormat.getInteger(MediaFormat.KEY_HEIGHT, /* defaultValue= */ Format.NO_VALUE); in toExoPlayerFormat() 172 mediaFormat.getFloat( in toExoPlayerFormat() [all …]
|
/cts/tests/tests/mediaediting/src/android/media/mediaediting/cts/ |
D | VideoDecodingWrapper.java | 60 private final MediaFormat mediaFormat; field in VideoDecodingWrapper 100 @Nullable MediaFormat mediaFormat = null; in VideoDecodingWrapper() local 103 mediaFormat = mediaExtractor.getTrackFormat(i); in VideoDecodingWrapper() 109 checkStateNotNull(mediaFormat); in VideoDecodingWrapper() 110 checkState(mediaFormat.containsKey(MediaFormat.KEY_WIDTH)); in VideoDecodingWrapper() 111 int width = mediaFormat.getInteger(MediaFormat.KEY_WIDTH); in VideoDecodingWrapper() 112 checkState(mediaFormat.containsKey(MediaFormat.KEY_HEIGHT)); in VideoDecodingWrapper() 113 int height = mediaFormat.getInteger(MediaFormat.KEY_HEIGHT); in VideoDecodingWrapper() 124 String sampleMimeType = checkNotNull(mediaFormat.getString(MediaFormat.KEY_MIME)); in VideoDecodingWrapper() 125 mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, MEDIA_CODEC_COLOR_SPACE); in VideoDecodingWrapper() [all …]
|
D | MediaEditingUtil.java | 267 @Nullable MediaFormat mediaFormat = null; in getMuxedWidthHeight() local 270 mediaFormat = mediaExtractor.getTrackFormat(i); in getMuxedWidthHeight() 276 checkStateNotNull(mediaFormat); in getMuxedWidthHeight() 277 checkState(mediaFormat.containsKey(MediaFormat.KEY_WIDTH)); in getMuxedWidthHeight() 278 checkState(mediaFormat.containsKey(MediaFormat.KEY_HEIGHT)); in getMuxedWidthHeight() 281 if (mediaFormat.containsKey(MediaFormat.KEY_ROTATION)) { in getMuxedWidthHeight() 282 rotationDegree = mediaFormat.getInteger(MediaFormat.KEY_ROTATION); in getMuxedWidthHeight() 285 .setWidth(mediaFormat.getInteger(MediaFormat.KEY_WIDTH)) in getMuxedWidthHeight() 286 .setHeight(mediaFormat.getInteger(MediaFormat.KEY_HEIGHT)) in getMuxedWidthHeight() 294 @Nullable MediaFormat mediaFormat = null; in getMuxedOutputProfile() local [all …]
|
D | AndroidTestUtil.java | 827 MediaFormat mediaFormat = MediaFormatUtil.createMediaFormatFromFormat(format); in canDecode() local 832 mediaFormat, MediaFormat.KEY_PROFILE, codecProfileAndLevel.first); in canDecode() 834 return EncoderUtil.findCodecForFormat(mediaFormat, /* isDecoder= */ true) != null in canDecode()
|
/cts/tests/tests/media/codec/src/android/media/codec/cts/ |
D | MediaCodecBlockModelTest.java | 170 MediaFormat mediaFormat = in runDecodeShortAudio() local 173 String[] codecs = MediaUtils.getDecoderNames(true /* isGoog */, mediaFormat); in runDecodeShortAudio() 175 Log.i(TAG, "No decoder found for format= " + mediaFormat); in runDecodeShortAudio() 185 mediaFormat, in runDecodeShortAudio() 223 MediaFormat mediaFormat = new MediaFormat( in runEncodeShortAudio() local 225 mediaFormat.setString(MediaFormat.KEY_MIME, MediaFormat.MIMETYPE_AUDIO_AAC); in runEncodeShortAudio() 226 mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, 128000); in runEncodeShortAudio() 228 String[] codecs = MediaUtils.getEncoderNames(true /* isGoog */, mediaFormat); in runEncodeShortAudio() 230 Log.i(TAG, "No encoder found for format= " + mediaFormat); in runEncodeShortAudio() 240 mediaFormat, in runEncodeShortAudio() [all …]
|
D | MediaCodecResourceTest.java | 64 CodecInfo(String name, int maxSupportedInstances, String mime, MediaFormat mediaFormat) { in CodecInfo() argument 68 this.mediaFormat = mediaFormat; in CodecInfo() 73 public final MediaFormat mediaFormat; field in MediaCodecResourceTest.CodecInfo 137 mediaCodec.configure(codecInfo.mediaFormat, /* surface= */ null, in testLowerPriorityProcessFailsToReclaimResources() 164 mediaCodec.configure(codecInfo.mediaFormat, /* surface= */ null, /* crypto= */ null, in testLowerPriorityProcessFailsToReclaimResources() 224 mediaCodec.configure(codecInfo.mediaFormat, /* surface= */ null, in testHigherPriorityProcessReclaimsResources() 251 mediaCodec.configure(codecInfo.mediaFormat, /* surface= */ null, /* crypto= */ null, in testHigherPriorityProcessReclaimsResources() 300 MediaFormat mediaFormat = new MediaFormat(); in getFirstVideoHardwareDecoder() local 301 mediaFormat.setString(MediaFormat.KEY_MIME, mime); in getFirstVideoHardwareDecoder() 302 mediaFormat.setInteger(MediaFormat.KEY_HEIGHT, height); in getFirstVideoHardwareDecoder() [all …]
|
D | MediaCodecTest.java | 841 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in testAsyncReset() local 843 if (!MediaUtils.checkDecoderForFormat(mediaFormat)) { in testAsyncReset() 850 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in testAsyncReset() 854 mediaCodec.configure(mediaFormat, surface, null /* crypto */, 0 /* flags */); in testAsyncReset() 1303 MediaFormat mediaFormat = in testDecodeAfterFlush() 1305 if (!MediaUtils.checkDecoderForFormat(mediaFormat)) { in testDecodeAfterFlush() 1309 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in testDecodeAfterFlush() 1311 … mediaCodec.configure(mediaFormat, outputSurface == null ? null : outputSurface.getSurface(), in testDecodeAfterFlush() 1500 MediaFormat mediaFormat = in runDecodeShortInput() local 1502 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in runDecodeShortInput() [all …]
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | MediaCodecCryptoAsyncHelper.java | 196 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in runShortClearKeyVideoWithNoCryptoErrorOverride() local 198 String mime = mediaFormat.getString(MediaFormat.KEY_MIME); in runShortClearKeyVideoWithNoCryptoErrorOverride() 239 mediaFormat, in runShortClearKeyVideoWithNoCryptoErrorOverride() 314 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in runDecodeShortClearKeyVideo() local 316 String mime = mediaFormat.getString(MediaFormat.KEY_MIME); in runDecodeShortClearKeyVideo() 357 mediaFormat, in runDecodeShortClearKeyVideo() 402 MediaFormat mediaFormat, in runComponentWithInput() argument 410 mediaCodec.configure(mediaFormat, surface, crypto, flags); in runComponentWithInput() 442 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in runDecodeShortVideoUsingBlockModel() local 444 String mime = mediaFormat.getString(MediaFormat.KEY_MIME); in runDecodeShortVideoUsingBlockModel() [all …]
|
D | MediaCodecBlockModelHelper.java | 357 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in runDecodeShortVideo() local 363 if (mediaFormat.containsKey(key)) { in runDecodeShortVideo() 364 format.setByteBuffer(key, mediaFormat.getByteBuffer(key)); in runDecodeShortVideo() 367 mediaFormat = format; in runDecodeShortVideo() 370 String[] codecs = MediaUtils.getDecoderNames(true /* isGoog */, mediaFormat); in runDecodeShortVideo() 372 Log.i(TAG, "No decoder found for format= " + mediaFormat); in runDecodeShortVideo() 385 mediaFormat, in runDecodeShortVideo() 426 MediaFormat mediaFormat, in runComponentWithLinearInput() argument 472 mediaCodec.configure(mediaFormat, surface, crypto, flags); in runComponentWithLinearInput()
|
/cts/tests/tests/media/decoder/src/android/media/decoder/cts/ |
D | DecodeAccuracyTestBase.java | 212 MediaFormat mediaFormat = prepareExtractor(videoFormat); in prepareVideoDecode() local 213 if (mediaFormat == null) { in prepareVideoDecode() 216 configureVideoFormat(mediaFormat, videoFormat); in prepareVideoDecode() 217 Assume.assumeTrue("Decoder " + codecName + " doesn't support format " + mediaFormat, in prepareVideoDecode() 218 MediaUtils.supports(codecName, mediaFormat)); in prepareVideoDecode() 220 return createDecoder(mediaFormat) && configureDecoder(surface, mediaFormat); in prepareVideoDecode() 390 private boolean createDecoder(MediaFormat mediaFormat) { in createDecoder() argument 397 mediaFormat.setString(MediaFormat.KEY_FRAME_RATE, null); in createDecoder() 403 mediaCodecList.findDecoderForFormat(mediaFormat)); in createDecoder() 406 mediaFormat.getString(MediaFormat.KEY_MIME)); in createDecoder() [all …]
|
D | ImageReaderDecoderTest.java | 360 MediaFormat mediaFormat = null; in decodeTest() local 365 mediaFormat = mExtractor.getTrackFormat(0); in decodeTest() 366 mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, colorFormat); in decodeTest() 372 assumeTrue("Media format " + mediaFormat + " is not supported by " + mCodecName, in decodeTest() 373 caps.isFormatSupported(mediaFormat)); in decodeTest() 382 mDecoder, mExtractor, mediaFormat, in decodeTest() 431 MediaCodec decoder, MediaExtractor extractor, MediaFormat mediaFormat, in decodeFramesToImage() argument 438 if (VERBOSE) Log.v(TAG, "stream format: " + mediaFormat); in decodeFramesToImage() 441 decoder.configure(mediaFormat, mReaderSurface, null /* crypto */, 0 /* flags */); in decodeFramesToImage() 444 decoder.configure(mediaFormat, null /* surface */, null /* crypto */, 0 /* flags */); in decodeFramesToImage()
|
D | DecodeAccuracyTest.java | 188 MediaFormat mediaFormat = in input() local 190 String mediaType = mediaFormat.getString(MediaFormat.KEY_MIME); in input() 196 if (!MediaUtils.supports(componentName, mediaFormat)) { in input()
|
/cts/tests/media/src/android/mediav2/cts/ |
D | MuxerTest.java | 1312 MediaFormat mediaFormat = new MediaFormat(); in testEmptyVideoTrack() local 1313 mediaFormat.setString(MediaFormat.KEY_MIME, mMediaType); in testEmptyVideoTrack() 1314 mediaFormat.setInteger(MediaFormat.KEY_HEIGHT, 96); in testEmptyVideoTrack() 1315 mediaFormat.setInteger(MediaFormat.KEY_WIDTH, 128); in testEmptyVideoTrack() 1316 mediaMuxer.addTrack(mediaFormat); in testEmptyVideoTrack() 1334 MediaFormat mediaFormat = new MediaFormat(); in testEmptyAudioTrack() local 1335 mediaFormat.setString(MediaFormat.KEY_MIME, mMediaType); in testEmptyAudioTrack() 1337 mediaFormat.setInteger(MediaFormat.KEY_SAMPLE_RATE, 16000); in testEmptyAudioTrack() 1339 mediaFormat.setInteger(MediaFormat.KEY_SAMPLE_RATE, 8000); in testEmptyAudioTrack() 1341 mediaFormat.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1); in testEmptyAudioTrack() [all …]
|
/cts/tests/tests/media/misc/src/android/media/misc/cts/ |
D | MediaSyncTest.java | 649 MediaFormat mediaFormat = in setup() local 651 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in setup() 657 mDecoder.configure(mediaFormat, mSurface, null, 0); in setup() 704 MediaFormat mediaFormat = in getAudioTrack() local 706 int sampleRateInHz = mediaFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE); in getAudioTrack() 707 int channelConfig = (mediaFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT) == 1 ? in getAudioTrack()
|
/cts/tests/tests/mediatranscoding/src/android/media/mediatranscoding/cts/ |
D | MediaTranscodingManagerTest.java | 559 MediaFormat mediaFormat = createMediaFormat(mime, width, height, frameRate, BIT_RATE); in testVideoFormatResolverShouldTranscode() local 563 mediaFormat); in testVideoFormatResolverShouldTranscode() 580 MediaFormat mediaFormat = createMediaFormat(MediaFormat.MIMETYPE_VIDEO_AV1, WIDTH, HEIGHT, in testVideoFormatResolverAv1Mime() local 585 mediaFormat); in testVideoFormatResolverAv1Mime() 596 MediaFormat mediaFormat = createMediaFormat(mime, width, height, frameRate, BIT_RATE); in testVideoFormatResolverInvalidArgs() local 600 mediaFormat); in testVideoFormatResolverInvalidArgs()
|
/cts/tests/tests/media/muxer/src/android/media/muxer/cts/ |
D | MediaMuxerTest.java | 505 (mediaFormat) -> { in testAdditionOfHdrStaticMetadata() 506 if (!mediaFormat.getString(MediaFormat.KEY_MIME).startsWith("video/")) { in testAdditionOfHdrStaticMetadata() 507 return mediaFormat; in testAdditionOfHdrStaticMetadata() 509 MediaFormat result = new MediaFormat(mediaFormat); in testAdditionOfHdrStaticMetadata() 539 (mediaFormat) -> { in testAdditionOfInvalidHdrStaticMetadataIsIgnored() 540 MediaFormat result = new MediaFormat(mediaFormat); in testAdditionOfInvalidHdrStaticMetadataIsIgnored()
|
/cts/tests/tests/media/encoder/src/android/media/encoder/cts/ |
D | VideoEncoderTest.java | 715 public void onOutputFormatChanged(MediaCodec mediaCodec, MediaFormat mediaFormat) { in onOutputFormatChanged() argument 716 Log.i(TAG, mediaCodec.getName() + " got new output format " + mediaFormat); in onOutputFormatChanged() 719 saveEncoderFormat(mediaFormat); in onOutputFormatChanged() 956 public void onOutputFormatChanged(MediaCodec mediaCodec, MediaFormat mediaFormat) { in onOutputFormatChanged() argument 957 Log.i(TAG, mediaCodec.getName() + " got new output format " + mediaFormat); in onOutputFormatChanged() 960 saveEncoderFormat(mediaFormat); in onOutputFormatChanged()
|