Home
last modified time | relevance | path

Searched refs:codec (Results 1 – 25 of 27) sorted by relevance

12

/cts/tests/tests/net/src/android/net/rtp/cts/
DAudioCodecTest.java23 private void assertEquals(AudioCodec codec, int type, String rtpmap, String fmtp) { in assertEquals() argument
25 assertEquals(codec.type, type); in assertEquals()
27 assertTrue(codec.type >= 96 && codec.type <= 127); in assertEquals()
29 assertEquals(codec.rtpmap.compareToIgnoreCase(rtpmap), 0); in assertEquals()
30 assertEquals(codec.fmtp, fmtp); in assertEquals()
68 for (AudioCodec codec : codecs) { in testGetCodecs()
69 assertFalse(types[codec.type]); in testGetCodecs()
70 types[codec.type] = true; in testGetCodecs()
/cts/tests/tests/media/src/android/media/cts/
DEncoderTest.java155 MediaCodec codec, ByteBuffer[] inputBuffers, int index) { in queueInputBuffer() argument
164 codec.queueInputBuffer(index, 0 /* offset */, size, 0 /* timeUs */, 0); in queueInputBuffer()
170 MediaCodec codec, ByteBuffer[] outputBuffers, in dequeueOutputBuffer() argument
172 codec.releaseOutputBuffer(index, false /* render */); in dequeueOutputBuffer()
176 MediaCodec codec; in testEncoder() local
178 codec = MediaCodec.createByCodecName(componentName); in testEncoder()
184 codec.configure( in testEncoder()
193 codec.start(); in testEncoder()
194 ByteBuffer[] codecInputBuffers = codec.getInputBuffers(); in testEncoder()
195 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in testEncoder()
[all …]
DResourceManagerTestActivityBase.java45 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument
46 Log.d(TAG, "onInputBufferAvailable " + codec.toString()); in onInputBufferAvailable()
51 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument
52 Log.d(TAG, "onOutputBufferAvailable " + codec.toString()); in onOutputBufferAvailable()
56 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument
57 Log.d(TAG, "onError " + codec.toString() + " errorCode " + e.getErrorCode()); in onError()
61 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument
62 Log.d(TAG, "onOutputFormatChanged " + codec.toString()); in onOutputFormatChanged()
161 MediaCodec codec = null; in allocateCodecs() local
165 codec = MediaCodec.createByCodecName(name); in allocateCodecs()
[all …]
DMediaCodecCapabilitiesTest.java394 String codec = mAllCodecs.findDecoderForFormat(format); in testHaveAdaptiveVideoDecoderForAllSupportedFormats() local
396 "could not find adaptive decoder for " + mime, codec != null); in testHaveAdaptiveVideoDecoderForAllSupportedFormats()
497 MediaCodec codec = null; in testAllNonTunneledVideoCodecsSupportFlexibleYUV() local
500 codec = MediaCodec.createByCodecName(info.getName()); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
507 codec.configure(format, null /* surface */, null /* crypto */, in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
508 isEncoder ? codec.CONFIGURE_FLAG_ENCODE : 0); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
510 isEncoder ? codec.getInputFormat() : codec.getOutputFormat(); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
514 codec.start(); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
515 int ix = codec.dequeueInputBuffer(TIMEOUT_US); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
518 codec.getInputImage(ix)); in testAllNonTunneledVideoCodecsSupportFlexibleYUV()
[all …]
DDecoderTest.java617 MediaCodec codec; in decodeToMemory() local
632 codec = MediaCodec.createDecoderByType(mime); in decodeToMemory()
648 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */); in decodeToMemory()
650 codec.start(); in decodeToMemory()
651 codecInputBuffers = codec.getInputBuffers(); in decodeToMemory()
652 codecOutputBuffers = codec.getOutputBuffers(); in decodeToMemory()
655 codec.stop(); in decodeToMemory()
656 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */); in decodeToMemory()
657 codec.start(); in decodeToMemory()
658 codecInputBuffers = codec.getInputBuffers(); in decodeToMemory()
[all …]
DNativeDecoderTest.java235 MediaCodec[] codec = new MediaCodec[numtracks]; in getDecodedData() local
243 codec[i] = MediaCodec.createDecoderByType(mime); in getDecodedData()
244 codec[i].configure(format[i], null, null, 0); in getDecodedData()
245 codec[i].start(); in getDecodedData()
246 inbuffers[i] = codec[i].getInputBuffers(); in getDecodedData()
247 outbuffers[i] = codec[i].getOutputBuffers(); in getDecodedData()
263 int bufidx = codec[t].dequeueInputBuffer(5000); in getDecodedData()
277 codec[t].queueInputBuffer(bufidx, 0, sampleSize, presentationTimeUs, in getDecodedData()
283 for (int tt = 0; tt < codec.length; tt++) { in getDecodedData()
287 int bufidx = codec[tt].dequeueInputBuffer(5000); in getDecodedData()
[all …]
DVideoDecoderPerfTest.java178 MediaCodec codec = MediaCodec.createByCodecName(name); in doDecode() local
179 … VideoCapabilities cap = codec.getCodecInfo().getCapabilitiesForType(mime).getVideoCapabilities(); in doDecode()
185 codec.release(); in doDecode()
188 codec.configure(format, surface, null /* crypto */, 0 /* flags */); in doDecode()
189 codec.start(); in doDecode()
190 codecInputBuffers = codec.getInputBuffers(); in doDecode()
191 codecOutputBuffers = codec.getOutputBuffers(); in doDecode()
207 int inputBufIndex = codec.dequeueInputBuffer(kTimeOutUs); in doDecode()
227 codec.queueInputBuffer( in doDecode()
241 int outputBufIndex = codec.dequeueOutputBuffer(info, kTimeOutUs); in doDecode()
[all …]
DMediaCodecTest.java146 MediaCodec codec; in verifyException() local
151 codec = createCodecByType(null, isEncoder); in verifyException()
156 codec = createCodecByType("foobarplan9", isEncoder); // invalid type in verifyException()
161 codec = MediaCodec.createByCodecName("foobarplan9"); // invalid name in verifyException()
166 codec = createCodecByType(format.getString(MediaFormat.KEY_MIME), isEncoder); in verifyException()
170 codec.start(); in verifyException()
178 codec.flush(); in verifyException()
185 MediaCodecInfo codecInfo = codec.getCodecInfo(); // obtaining the codec info now is fine. in verifyException()
187 int bufIndex = codec.dequeueInputBuffer(0); in verifyException()
198 int bufIndex = codec.dequeueOutputBuffer(info, 0); in verifyException()
[all …]
DMediaCodecTunneledPlayer.java239 MediaCodec codec; in addTrack() local
253 codec = MediaCodec.createByCodecName(codecName); in addTrack()
254 if (codec == null) { in addTrack()
265 codec = MediaCodec.createDecoderByType(mime); in addTrack()
266 if (codec == null) { in addTrack()
272 codec.configure( in addTrack()
279 trackIndex, format, codec, true, mTunneled, mAudioSessionId); in addTrack()
283 trackIndex, format, codec, true, mTunneled, mAudioSessionId); in addTrack()
DMediaSyncTest.java680 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument
684 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument
687 || mSignaledEos || mDecoder != codec) { in onInputBufferAvailable()
691 ByteBuffer buffer = codec.getInputBuffer(index); in onInputBufferAvailable()
697 codec.queueInputBuffer( in onInputBufferAvailable()
708 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument
710 if (mEos || mDecoder != codec) { in onOutputBufferAvailable()
718 ByteBuffer outputByteBuffer = codec.getOutputBuffer(index); in onOutputBufferAvailable()
727 codec.releaseOutputBuffer(index, info.presentationTimeUs * 1000); in onOutputBufferAvailable()
730 codec.releaseOutputBuffer(index, false); in onOutputBufferAvailable()
[all …]
DMediaCodecListTest.java179 MediaCodec codec = MediaCodec.createByCodecName(info.getName()); in testComponentInstantiation() local
181 assertEquals(codec.getName(), info.getName()); in testComponentInstantiation()
183 assertEquals(codec.getCodecInfo(), info); in testComponentInstantiation()
185 codec.release(); in testComponentInstantiation()
186 codec = null; in testComponentInstantiation()
321 String codec = requiredCodec.mMimeTypeName in areRequiredCodecTypesSupported() local
323 Log.e(TAG, "Media codec (" + codec + ") is not supported"); in areRequiredCodecTypesSupported()
DMediaCodecCencPlayer.java289 MediaCodec codec; in addTrack() local
292 codec = MediaCodec.createByCodecName( in addTrack()
295 codec = MediaCodec.createDecoderByType(mime); in addTrack()
298 codec.configure( in addTrack()
307 trackIndex, format, codec, true, false, in addTrack()
312 trackIndex, format, codec, true, false, in addTrack()
DVp8CodecTestBase.java840 public void onInputBufferAvailable(MediaCodec codec, int index) {
877 public void onOutputBufferAvailable(MediaCodec codec,
928 public void onError(MediaCodec codec, CodecException e) {
936 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) {
1308 MediaEncoderAsync codec = new MediaEncoderAsync(); in encode() local
1309 codec.createCodec(0, properties.codecName, format, in encode()
1354 codec.forceSyncFrame(); in encode()
1363 codec.updateBitrate(newBitrate); in encode()
1375 inputConsumed = codec.feedInput(srcFrame, sawInputEOS); in encode()
1383 MediaEncoderOutput out = codec.getOutput(); in encode()
[all …]
DAdaptivePlaybackTest.java856 MediaCodec codec = null;
858 codec = MediaCodec.createByCodecName(codecName);
862 Log.i(TAG, "using codec: " + codec.getName());
863 mCodec = codec;
872 codec.setOnFrameRenderedListener(this, null);
875 public void onFrameRendered(MediaCodec codec, long presentationTimeUs, long nanoTime) {
1170 Decoder codec = new Decoder(codecName);
1171 codec.configureAndStart(media.getFormat(), s /* surface */);
1173 int numframes = codec.queueInputBufferRange(
1181 codec.stop();
[all …]
DVideoEncoderTest.java93 public void onOutputBufferAvailable(MediaCodec codec, int ix, BufferInfo info) { in play()
94 codec.releaseOutputBuffer(ix, info.size > 0); in play()
101 public void onInputBufferAvailable(MediaCodec codec, int ix) { in play()
106 codec.getInputBuffer(ix).put(el.first); in play()
110 + codec.getInputBuffer(ix).remaining() in play()
111 + "-byte input buffer of " + codec.getName() in play()
112 + " configured for " + codec.getInputFormat()); in play()
116 codec.queueInputBuffer( in play()
120 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in play()
124 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in play()
[all …]
DEncodeDecodeTest.java361 String codec = mcl.findEncoderForFormat(format); in encodeDecodeVideoFromBuffer() local
362 if (codec == null) { in encodeDecodeVideoFromBuffer()
367 if (VERBOSE) Log.d(TAG, "found codec: " + codec); in encodeDecodeVideoFromBuffer()
371 encoder = MediaCodec.createByCodecName(codec); in encodeDecodeVideoFromBuffer()
427 String codec = mcl.findEncoderForFormat(format); in encodeDecodeVideoFromSurfaceToSurface() local
428 if (codec == null) { in encodeDecodeVideoFromSurfaceToSurface()
433 if (VERBOSE) Log.d(TAG, "found codec: " + codec); in encodeDecodeVideoFromSurfaceToSurface()
457 encoder = MediaCodec.createByCodecName(codec); in encodeDecodeVideoFromSurfaceToSurface()
DMediaRecorderTest.java365 int fileFormat, int codec) throws Exception { in testRecordAudioInRawFormat() argument
372 mMediaRecorder.setAudioEncoder(codec); in testRecordAudioInRawFormat()
512 int codec = MediaRecorder.VideoEncoder.H264; in setupRecorder() local
513 int frameRate = getMaxFrameRateForCodec(codec); in setupRecorder()
751 private static int getMaxFrameRateForCodec(int codec) { in getMaxFrameRateForCodec() argument
753 if (cap.mCodec == codec) { in getMaxFrameRateForCodec()
DCodecState.java62 MediaCodec codec, in CodecState() argument
76 mCodec = codec; in CodecState()
DEncodeVirtualDisplayTest.java219 String codec = mcl.findEncoderForFormat(encoderFormat); in encodeVirtualDisplayTest() local
220 if (codec == null) { in encodeVirtualDisplayTest()
226 encoder = MediaCodec.createByCodecName(codec); in encodeVirtualDisplayTest()
DImageReaderDecoderTest.java421 for (Decoder codec : decoders) { in decodeTest()
422 if (codec.videoDecode(mode, checkSwirl)) { in decodeTest()
/cts/tests/tests/media/libmediandkjni/
Dnative-media-jni.cpp233 AMediaCodec **codec = new AMediaCodec*[numtracks]; in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative() local
249 codec[i] = AMediaCodec_createDecoderByType(mime); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
250 AMediaCodec_configure(codec[i], format, NULL /* surface */, NULL /* crypto */, 0); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
251 AMediaCodec_start(codec[i]); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
265 ssize_t bufidx = AMediaCodec_dequeueInputBuffer(codec[t], 5000); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
269 uint8_t *buf = AMediaCodec_getInputBuffer(codec[t], bufidx, &bufsize); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
280 AMediaCodec_queueInputBuffer(codec[t], bufidx, 0, sampleSize, presentationTimeUs, in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
290 int bufidx = AMediaCodec_dequeueInputBuffer(codec[tt], 5000); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
292 AMediaCodec_queueInputBuffer(codec[tt], bufidx, 0, 0, 0, in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
304 int status = AMediaCodec_dequeueOutputBuffer(codec[tt], &info, 1); in Java_android_media_cts_NativeDecoderTest_getDecodedDataNative()
[all …]
DAndroid.mk25 codec-utils-jni.cpp
/cts/suite/cts/deviceTests/videoperf/src/com/android/cts/videoperf/
DCodecInfo.java57 MediaCodec codec; in getSupportedFormatInfo() local
59 codec = MediaCodec.createByCodecName(codecName); in getSupportedFormatInfo()
64 CodecCapabilities cap = codec.getCodecInfo().getCapabilitiesForType(mimeType); in getSupportedFormatInfo()
67 codec.release(); in getSupportedFormatInfo()
87 codec.release(); in getSupportedFormatInfo()
92 codec.release(); in getSupportedFormatInfo()
DVideoEncoderDecoderTest.java600 MediaCodec codec = null; in runEncoder() local
602 codec = MediaCodec.createByCodecName(encoderName); in runEncoder()
603 codec.configure( in runEncoder()
610 codec.release(); in runEncoder()
616 codec.start(); in runEncoder()
617 mEncInputFormat = codec.getInputFormat(); in runEncoder()
618 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in runEncoder()
629 index = codec.dequeueInputBuffer(VIDEO_CODEC_WAIT_TIME_US /* timeoutUs */); in runEncoder()
639 Image image = codec.getInputImage(index); in runEncoder()
643 codec, image, index, inFramesCount, in runEncoder()
[all …]
/cts/libs/deviceutil/src/android/cts/util/
DMediaUtils.java172 MediaCodec codec; in supports() local
174 codec = MediaCodec.createByCodecName(codecName); in supports()
181 cap = codec.getCodecInfo().getCapabilitiesForType(mime); in supports()
184 codec.release(); in supports()
191 codec.release(); in supports()
198 codec.release(); in supports()
201 codec.release(); in supports()

12