Home
last modified time | relevance | path

Searched refs:mediaFormat (Results 1 – 8 of 8) sorted by relevance

/cts/tests/tests/mediaparser/src/android/media/mediaparser/cts/
DMockMediaParserOutputConsumer.java148 MediaFormat mediaFormat = trackData.mediaFormat; in toExoPlayerFormat() local
150 mediaFormat.getString(MediaFormat.KEY_MIME, /* defaultValue= */ null); in toExoPlayerFormat()
152 mediaFormat.containsKey(MediaFormat.KEY_TRACK_ID) in toExoPlayerFormat()
153 ? String.valueOf(mediaFormat.getInteger(MediaFormat.KEY_TRACK_ID)) in toExoPlayerFormat()
156 mediaFormat.getString(MediaFormat.KEY_CODECS_STRING, /* defaultValue= */ null); in toExoPlayerFormat()
158 mediaFormat.getInteger( in toExoPlayerFormat()
161 mediaFormat.getInteger( in toExoPlayerFormat()
164 mediaFormat.getInteger(MediaFormat.KEY_WIDTH, /* defaultValue= */ Format.NO_VALUE); in toExoPlayerFormat()
166 mediaFormat.getInteger(MediaFormat.KEY_HEIGHT, /* defaultValue= */ Format.NO_VALUE); in toExoPlayerFormat()
168 mediaFormat.getFloat( in toExoPlayerFormat()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DMediaCodecBlockModelTest.java571 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in runDecodeShortVideo() local
577 if (mediaFormat.containsKey(key)) { in runDecodeShortVideo()
578 format.setByteBuffer(key, mediaFormat.getByteBuffer(key)); in runDecodeShortVideo()
581 mediaFormat = format; in runDecodeShortVideo()
584 String[] codecs = MediaUtils.getDecoderNames(true /* isGoog */, mediaFormat); in runDecodeShortVideo()
586 Log.i(TAG, "No decoder found for format= " + mediaFormat); in runDecodeShortVideo()
599 mediaFormat, in runDecodeShortVideo()
644 MediaFormat mediaFormat = in runDecodeShortAudio() local
647 String[] codecs = MediaUtils.getDecoderNames(true /* isGoog */, mediaFormat); in runDecodeShortAudio()
649 Log.i(TAG, "No decoder found for format= " + mediaFormat); in runDecodeShortAudio()
[all …]
DDecodeAccuracyTestBase.java211 MediaFormat mediaFormat = prepareExtractor(videoFormat); in prepareVideoDecode() local
212 if (mediaFormat == null) { in prepareVideoDecode()
215 configureVideoFormat(mediaFormat, videoFormat); in prepareVideoDecode()
217 return createDecoder(mediaFormat) && configureDecoder(surface, mediaFormat); in prepareVideoDecode()
387 private boolean createDecoder(MediaFormat mediaFormat) { in createDecoder() argument
394 mediaFormat.setString(MediaFormat.KEY_FRAME_RATE, null); in createDecoder()
400 mediaCodecList.findDecoderForFormat(mediaFormat)); in createDecoder()
403 mediaFormat.getString(MediaFormat.KEY_MIME)); in createDecoder()
413 private boolean configureDecoder(Surface surface, MediaFormat mediaFormat) { in configureDecoder() argument
415 decoder.configure(mediaFormat, surface, null, 0); in configureDecoder()
[all …]
DImageReaderDecoderTest.java277 MediaFormat mediaFormat = null; in videoDecode() local
302 mediaFormat = extractor.getTrackFormat(0); in videoDecode()
303 mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, colorFormat); in videoDecode()
310 decoder, extractor, mediaFormat, in videoDecode()
319 "while " + mName + " decoding " + video + ": " + mediaFormat, e); in videoDecode()
487 MediaCodec decoder, MediaExtractor extractor, MediaFormat mediaFormat, in decodeFramesToImage() argument
494 if (VERBOSE) Log.v(TAG, "stream format: " + mediaFormat); in decodeFramesToImage()
497 decoder.configure(mediaFormat, mReaderSurface, null /* crypto */, 0 /* flags */); in decodeFramesToImage()
500 decoder.configure(mediaFormat, null /* surface */, null /* crypto */, 0 /* flags */); in decodeFramesToImage()
DMediaSyncTest.java648 MediaFormat mediaFormat = in setup() local
650 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in setup()
656 mDecoder.configure(mediaFormat, mSurface, null, 0); in setup()
703 MediaFormat mediaFormat = in getAudioTrack() local
705 int sampleRateInHz = mediaFormat.getInteger(MediaFormat.KEY_SAMPLE_RATE); in getAudioTrack()
706 int channelConfig = (mediaFormat.getInteger(MediaFormat.KEY_CHANNEL_COUNT) == 1 ? in getAudioTrack()
DMediaCodecTest.java789 MediaFormat mediaFormat = mediaExtractor.getTrackFormat( in testAsyncReset() local
791 if (!MediaUtils.checkDecoderForFormat(mediaFormat)) { in testAsyncReset()
798 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in testAsyncReset()
802 mediaCodec.configure(mediaFormat, surface, null /* crypto */, 0 /* flags */); in testAsyncReset()
1240 MediaFormat mediaFormat = in testDecodeAfterFlush()
1242 if (!MediaUtils.checkDecoderForFormat(mediaFormat)) { in testDecodeAfterFlush()
1246 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in testDecodeAfterFlush()
1248 … mediaCodec.configure(mediaFormat, outputSurface == null ? null : outputSurface.getSurface(), in testDecodeAfterFlush()
1435 MediaFormat mediaFormat = in runDecodeShortInput() local
1437 String mimeType = mediaFormat.getString(MediaFormat.KEY_MIME); in runDecodeShortInput()
[all …]
DVideoEncoderTest.java655 public void onOutputFormatChanged(MediaCodec mediaCodec, MediaFormat mediaFormat) { in onOutputFormatChanged() argument
656 Log.i(TAG, mediaCodec.getName() + " got new output format " + mediaFormat); in onOutputFormatChanged()
659 saveEncoderFormat(mediaFormat); in onOutputFormatChanged()
896 public void onOutputFormatChanged(MediaCodec mediaCodec, MediaFormat mediaFormat) { in onOutputFormatChanged() argument
897 Log.i(TAG, mediaCodec.getName() + " got new output format " + mediaFormat); in onOutputFormatChanged()
900 saveEncoderFormat(mediaFormat); in onOutputFormatChanged()
/cts/tests/media/src/android/mediav2/cts/
DMuxerTest.java1308 MediaFormat mediaFormat = new MediaFormat(); in testEmptyVideoTrack() local
1309 mediaFormat.setString(MediaFormat.KEY_MIME, mMime); in testEmptyVideoTrack()
1310 mediaFormat.setInteger(MediaFormat.KEY_HEIGHT, 96); in testEmptyVideoTrack()
1311 mediaFormat.setInteger(MediaFormat.KEY_WIDTH, 128); in testEmptyVideoTrack()
1312 mediaMuxer.addTrack(mediaFormat); in testEmptyVideoTrack()
1330 MediaFormat mediaFormat = new MediaFormat(); in testEmptyAudioTrack() local
1331 mediaFormat.setString(MediaFormat.KEY_MIME, mMime); in testEmptyAudioTrack()
1333 mediaFormat.setInteger(MediaFormat.KEY_SAMPLE_RATE, 16000); in testEmptyAudioTrack()
1335 mediaFormat.setInteger(MediaFormat.KEY_SAMPLE_RATE, 8000); in testEmptyAudioTrack()
1337 mediaFormat.setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1); in testEmptyAudioTrack()
[all …]