/cts/tests/tests/media/common/jni/ |
D | NdkMediaCodec-jni.cpp | 49 AMediaCodec *codec = AMediaCodec_createCodecByName(tmp); in Java_android_media_cts_NdkMediaCodec_AMediaCodecCreateCodecByName() local 50 if (codec == NULL) { in Java_android_media_cts_NdkMediaCodec_AMediaCodecCreateCodecByName() 56 return reinterpret_cast<jlong>(codec); in Java_android_media_cts_NdkMediaCodec_AMediaCodecCreateCodecByName() 61 JNIEnv * /*env*/, jclass /*clazz*/, jlong codec) { in Java_android_media_cts_NdkMediaCodec_AMediaCodecDelete() argument 62 media_status_t err = AMediaCodec_delete(reinterpret_cast<AMediaCodec *>(codec)); in Java_android_media_cts_NdkMediaCodec_AMediaCodecDelete() 67 JNIEnv * /*env*/, jclass /*clazz*/, jlong codec) { in Java_android_media_cts_NdkMediaCodec_AMediaCodecStart() argument 68 media_status_t err = AMediaCodec_start(reinterpret_cast<AMediaCodec *>(codec)); in Java_android_media_cts_NdkMediaCodec_AMediaCodecStart() 73 JNIEnv * /*env*/, jclass /*clazz*/, jlong codec) { in Java_android_media_cts_NdkMediaCodec_AMediaCodecStop() argument 74 media_status_t err = AMediaCodec_stop(reinterpret_cast<AMediaCodec *>(codec)); in Java_android_media_cts_NdkMediaCodec_AMediaCodecStop() 81 jlong codec, in Java_android_media_cts_NdkMediaCodec_AMediaCodecConfigure() argument [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0470/ |
D | poc.cpp | 45 AMediaCodec *codec; in main() local 50 codec = AMediaCodec_createCodecByName("c2.android.av1-aom.decoder"); in main() 51 if (!codec) { in main() 59 AMediaCodec_delete(codec); in main() 66 AMediaCodec_configure(codec, format, nullptr, nullptr, isEncoder); in main() 67 AMediaCodec_start(codec); in main() 76 AMediaCodec_dequeueInputBuffer(codec, DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS); in main() 80 uint8_t *buf = AMediaCodec_getInputBuffer(codec, inIdx, &bufSize); in main() 91 status = AMediaCodec_queueInputBuffer(codec, inIdx, 0, bytesRead, 0, bufferFlags); in main() 105 AMediaCodec_dequeueOutputBuffer(codec, &info, DEQUEUE_BUFFER_TIMEOUT_MICROSECONDS); in main() [all …]
|
/cts/tests/tests/media/drmframework/src/android/media/drmframework/cts/ |
D | MediaDrmCodecTest.java | 107 MediaCodec codec = MediaCodec.createDecoderByType(MIME_TYPE); in testCryptoError() local 115 codec.configure(format, null, crypto, 0); in testCryptoError() 116 codec.start(); in testCryptoError() 117 int index = codec.dequeueInputBuffer(-1); in testCryptoError() 119 ByteBuffer buffer = codec.getInputBuffer(index); in testCryptoError() 129 codec.queueSecureInputBuffer(index, 0, cryptoInfo, 0, 0); in testCryptoError() 135 buffer = codec.getInputBuffer(index); in testCryptoError() 136 codec.stop(); in testCryptoError() 138 codec.release(); in testCryptoError() 159 MediaCodec codec = MediaCodec.createDecoderByType(MIME_TYPE); in testCryptoErrorLostSessionState() local [all …]
|
/cts/tests/tests/media/misc/src/android/media/misc/cts/ |
D | ResourceManagerTestActivityBase.java | 59 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument 60 Log.v(TAG, "onInputBufferAvailable " + codec.toString()); in onInputBufferAvailable() 65 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument 66 Log.v(TAG, "onOutputBufferAvailable " + codec.toString()); in onOutputBufferAvailable() 70 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument 72 Log.e(TAG, "onError " + codec.toString() + " errorCode " + error); in onError() 74 if (mFirstMediaCodec == codec) { in onError() 76 Log.d(TAG, "Codec " + codec + " Was expected to be Reclaimed"); in onError() 78 codec.release(); in onError() 83 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument [all …]
|
D | ResourceManagerCodecActivity.java | 78 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument 83 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument 87 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument 88 Log.d(TAG, "onError " + codec.toString() + " errorCode " + e.getErrorCode()); in onError() 92 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument 93 Log.d(TAG, "onOutputFormatChanged " + codec.toString()); in onOutputFormatChanged() 205 MediaCodec codec = null; in allocateCodecs() local 212 codec = MediaCodec.createByCodecName(name); in allocateCodecs() 213 codec.setCallback(mCallback); in allocateCodecs() 215 codec.configure(format, null, null, flag); in allocateCodecs() [all …]
|
/cts/tests/tests/media/decoder/src/android/media/decoder/cts/ |
D | VideoDecoderCallback.java | 52 public void onInputBufferAvailable(MediaCodec codec, int index) { in onInputBufferAvailable() argument 53 ByteBuffer inputBuffer = codec.getInputBuffer(index); in onInputBufferAvailable() 58 codec.queueInputBuffer(index, 0, sampleSize, presentationTime, flags); in onInputBufferAvailable() 67 public void onOutputBufferAvailable(MediaCodec codec, int index, MediaCodec.BufferInfo info) { in onOutputBufferAvailable() argument 69 codec.releaseOutputBuffer(index, false); in onOutputBufferAvailable() 76 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in onError() argument 81 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in onOutputFormatChanged() argument
|
D | NativeDecoderTest.java | 201 MediaCodec[] codec = new MediaCodec[numtracks]; in getDecodedData() local 209 codec[i] = MediaCodec.createDecoderByType(mime); in getDecodedData() 210 codec[i].configure(format[i], null, null, 0); in getDecodedData() 211 codec[i].start(); in getDecodedData() 212 inbuffers[i] = codec[i].getInputBuffers(); in getDecodedData() 213 outbuffers[i] = codec[i].getOutputBuffers(); in getDecodedData() 229 int bufidx = codec[t].dequeueInputBuffer(5000); in getDecodedData() 243 codec[t].queueInputBuffer(bufidx, 0, sampleSize, presentationTimeUs, in getDecodedData() 249 for (int tt = 0; tt < codec.length; tt++) { in getDecodedData() 253 int bufidx = codec[tt].dequeueInputBuffer(5000); in getDecodedData() [all …]
|
D | HDRDecoderTest.java | 307 MediaCodec codec, int index, BufferInfo info) { in testHdrMetadata() 312 MediaFormat bufferFormat = codec.getOutputFormat(index); in testHdrMetadata() 319 codec.releaseOutputBuffer(index, true); in testHdrMetadata() 332 codec.releaseOutputBuffer(index, true); in testHdrMetadata() 343 public void onInputBufferAvailable(MediaCodec codec, int index) { in testHdrMetadata() 349 ByteBuffer inputBuffer = codec.getInputBuffer(index); in testHdrMetadata() 352 codec.queueInputBuffer( in testHdrMetadata() 366 codec.setParameters(params); in testHdrMetadata() 372 codec.queueInputBuffer(index, 0, size, timestamp, 0); in testHdrMetadata() 377 public void onError(MediaCodec codec, MediaCodec.CodecException e) { in testHdrMetadata() [all …]
|
D | DecoderTestAacDrc.java | 548 MediaCodec codec; in decodeToMemory() local 564 codec = MediaCodec.createDecoderByType(mime); in decodeToMemory() 566 codec = MediaCodec.createByCodecName(decoderName); in decodeToMemory() 582 codec.configure(configFormat, null /* surface */, null /* crypto */, 0 /* flags */); in decodeToMemory() 588 final int targetLevelFromCodec = DecoderTest.getOutputFormatInteger(codec, in decodeToMemory() 597 codec.start(); in decodeToMemory() 598 codecInputBuffers = codec.getInputBuffers(); in decodeToMemory() 599 codecOutputBuffers = codec.getOutputBuffers(); in decodeToMemory() 607 codec.setParameters(b); in decodeToMemory() 624 int inputBufIndex = codec.dequeueInputBuffer(kTimeOutUs); in decodeToMemory() [all …]
|
/cts/tests/tests/media/codec/src/android/media/codec/cts/ |
D | MediaCodecTest.java | 17 package android.media.codec.cts; 224 MediaCodec codec; in verifyException() local 229 codec = createCodecByType(null, isEncoder); in verifyException() 234 codec = createCodecByType("foobarplan9", isEncoder); // invalid type in verifyException() 239 codec = MediaCodec.createByCodecName("foobarplan9"); // invalid name in verifyException() 244 codec = createCodecByType(format.getString(MediaFormat.KEY_MIME), isEncoder); in verifyException() 248 codec.start(); in verifyException() 256 codec.flush(); in verifyException() 264 MediaCodecInfo codecInfo = codec.getCodecInfo(); // obtaining the codec info now is fine. in verifyException() 266 int bufIndex = codec.dequeueInputBuffer(0); in verifyException() [all …]
|
D | MediaCodecCapabilitiesTest.java | 16 package android.media.codec.cts; 520 String codec = mAllCodecs.findDecoderForFormat(format); in testHaveAdaptiveVideoDecoderForAllSupportedFormats() local 522 "could not find adaptive decoder for " + mime, codec != null); in testHaveAdaptiveVideoDecoderForAllSupportedFormats() 679 MediaCodec codec = null; in testAllAdvertisedVideoEncoderBitrateModes() local 681 codec = MediaCodec.createByCodecName(info.getName()); in testAllAdvertisedVideoEncoderBitrateModes() 682 codec.configure(format, null /* surface */, null /* crypto */, in testAllAdvertisedVideoEncoderBitrateModes() 685 if (codec != null) { in testAllAdvertisedVideoEncoderBitrateModes() 686 codec.release(); in testAllAdvertisedVideoEncoderBitrateModes() 727 MediaCodec codec = null; in testAllNonTunneledVideoCodecsSupportFlexibleYUV() local 731 codec = MediaCodec.createByCodecName(info.getName()); in testAllNonTunneledVideoCodecsSupportFlexibleYUV() [all …]
|
D | MediaCodecInstancesTest.java | 17 package android.media.codec.cts; 99 MediaCodec codec = null; in getActualMax() local 114 codec = MediaCodec.createByCodecName(name); in getActualMax() 115 codec.configure(format, isCompSecureVidDec ? obj.second : null, null, flag); in getActualMax() 116 codec.start(); in getActualMax() 117 codecs.add(codec); in getActualMax() 118 codec = null; in getActualMax() 146 if (codec != null) { in getActualMax() 148 codec.release(); in getActualMax() 149 codec = null; in getActualMax() [all …]
|
/cts/tests/tests/media/encoder/src/android/media/encoder/cts/ |
D | EncoderTest.java | 102 MediaCodec codec = MediaCodec.createEncoderByType(mime); in isDefaultCodec() local 103 boolean isDefault = codec.getName().equalsIgnoreCase(codecName); in isDefaultCodec() 104 mDefaultEncoders.put(mime, codec.getName()); in isDefaultCodec() 105 codec.release(); in isDefaultCodec() 220 MediaCodec codec, ByteBuffer[] inputBuffers, int index, in queueInputBuffer() argument 268 codec.queueInputBuffer(index, 0 /* offset */, size, timeUs, 0 /* flags */); in queueInputBuffer() 274 MediaCodec codec, ByteBuffer[] outputBuffers, in dequeueOutputBuffer() argument 276 codec.releaseOutputBuffer(index, false /* render */); in dequeueOutputBuffer() 332 MediaCodec codec; in testEncoder() local 334 codec = MediaCodec.createByCodecName(componentName); in testEncoder() [all …]
|
/cts/tests/tests/media/decoder/jni/ |
D | native-media-jni.cpp | 304 std::unique_ptr<AMediaCodec*[]> codec(new AMediaCodec*[numtracks]()); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() local 321 codec[i] = AMediaCodec_createDecoderByType(mime); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 322 AMediaCodec_configure(codec[i], format, NULL /* surface */, NULL /* crypto */, 0); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 330 AMediaCodec_setAsyncNotifyCallback(codec[i], aCB, &callbackData[i]); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 332 AMediaCodec_start(codec[i]); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 350 bufidx = AMediaCodec_dequeueInputBuffer(codec[t], 5000); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 355 uint8_t *buf = AMediaCodec_getInputBuffer(codec[t], bufidx, &bufsize); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 366 AMediaCodec_queueInputBuffer(codec[t], bufidx, 0, sampleSize, presentationTimeUs, in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 380 bufidx = AMediaCodec_dequeueInputBuffer(codec[tt], 5000); in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() 383 AMediaCodec_queueInputBuffer(codec[tt], bufidx, 0, 0, 0, in Java_android_media_decoder_cts_NativeDecoderTest_getDecodedDataNative() [all …]
|
/cts/tests/video/src/android/video/cts/ |
D | CodecInfo.java | 56 MediaCodec codec; in getSupportedFormatInfo() local 58 codec = MediaCodec.createByCodecName(codecName); in getSupportedFormatInfo() 63 CodecCapabilities cap = codec.getCodecInfo().getCapabilitiesForType(mimeType); in getSupportedFormatInfo() 66 codec.release(); in getSupportedFormatInfo() 86 info.mIsSoftware = !codec.getCodecInfo().isHardwareAccelerated(); in getSupportedFormatInfo() 88 codec.release(); in getSupportedFormatInfo()
|
D | VideoEncoderDecoderTest.java | 620 MediaCodec codec = null; in runEncoder() local 622 codec = MediaCodec.createByCodecName(encoderName); in runEncoder() 624 codec.configure( in runEncoder() 631 codec.release(); in runEncoder() 637 codec.start(); in runEncoder() 638 mEncInputFormat = codec.getInputFormat(); in runEncoder() 639 ByteBuffer[] codecOutputBuffers = codec.getOutputBuffers(); in runEncoder() 640 MediaFormat inputFormat = codec.getInputFormat(); in runEncoder() 658 index = codec.dequeueInputBuffer(VIDEO_CODEC_WAIT_TIME_US /* timeoutUs */); in runEncoder() 670 Image image = codec.getInputImage(index); in runEncoder() [all …]
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2018-9537/ |
D | poc.cpp | 184 Codec *codec = new Codec(); in main() local 185 if (!codec) { in main() 195 if (codec->initDecoder()) { in main() 203 free(codec); in main() 220 codec->decodeFrames(rawData, rawDataSize); in main() 225 delete codec; in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-9308/ |
D | poc.cpp | 96 Codec *codec = new Codec(); in main() local 97 if (!codec) { in main() 102 if (codec->initDecoder()) { in main() 103 codec->decodeFrames((UCHAR *)(data), static_cast<UINT>(size)); in main() 106 delete codec; in main()
|
/cts/tests/tests/media/common/src/android/media/cts/ |
D | MediaCodecCryptoAsyncHelper.java | 105 public void onInputSlot(MediaCodec codec, int index) throws Exception { in onInputSlot() argument 108 ByteBuffer inputBuffer = codec.getInputBuffer(index); in onInputSlot() 117 codec.queueInputBuffer( in onInputSlot() 126 codec.queueSecureInputBuffer( in onInputSlot() 134 codec.queueInputBuffer( in onInputSlot() 161 public boolean onOutputSlot(MediaCodec codec, int index, in onOutputSlot() argument 168 codec.releaseOutputBuffer(index, false); in onOutputSlot() 216 public void onInputBufferAvailable(MediaCodec codec, int index) { in runShortClearKeyVideoWithNoCryptoErrorOverride() 222 MediaCodec codec, int index, MediaCodec.BufferInfo info) { in runShortClearKeyVideoWithNoCryptoErrorOverride() 227 public void onOutputFormatChanged(MediaCodec codec, MediaFormat format) { in runShortClearKeyVideoWithNoCryptoErrorOverride() [all …]
|
D | InputSurfaceInterface.java | 32 void configure(MediaCodec codec); in configure() argument 34 void configure(NdkMediaCodec codec); in configure() argument
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2020-0034/ |
D | poc.cpp | 75 vpx_codec_ctx_t codec; in main() local 79 FAIL_CHECK(vpx_codec_dec_init(&codec, &vpx_codec_vp8_dx_algo, &cfg, 0) == VPX_CODEC_OK); in main() 92 vpx_codec_decode(&codec, data, frame_size, nullptr, 0); in main() 97 while ((img = vpx_codec_get_frame(&codec, &iter)) != nullptr) { in main() 105 vpx_codec_destroy(&codec); in main()
|
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2019-1988/ |
D | poc.cpp | 31 auto codec = SkAndroidCodec::MakeFromData(bytes); in decode() local 32 if (!codec) { in decode() 36 auto size = codec->getSampledDimensions(sampleSize); in decode() 46 codec->getAndroidPixels(bm.info(), bm.getPixels(), bm.rowBytes(), &options); in decode()
|
/cts/tests/media/common/src/android/mediav2/common/cts/ |
D | CodecAsyncHandler.java | 80 public void onInputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex) { in onInputBufferAvailable() argument 92 public void onOutputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex, in onOutputBufferAvailable() argument 105 public void onError(@NonNull MediaCodec codec, MediaCodec.CodecException e) { in onError() argument 119 public void onCryptoError(@NonNull MediaCodec codec, @NonNull MediaCodec.CryptoException e) { in onCryptoError() argument 133 public void onOutputFormatChanged(@NonNull MediaCodec codec, @NonNull MediaFormat format) { in onOutputFormatChanged() argument 145 public void setCallBack(MediaCodec codec, boolean isCodecInAsyncMode) { in setCallBack() argument 147 codec.setCallback(this); in setCallBack() 149 codec.setCallback(null); in setCallBack()
|
/cts/tests/mediapc/ |
D | README.md | 29 To select codecs by media type, *media-type-prefix* can be passed to media codec tests to select on… 37 To select codecs by applying regular expressions, *codec-filter* can be passed to media codec tests… 42 …ses -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:codec-filter:="c2\.andro… 46 To select codecs by name, *codec-prefix* can be passed to media codec tests to select one or more c… 51 …ses -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:codec-prefix:=c2.android. 57 …ses -- --module-arg CtsMediaPerformanceClassTestCases:instrumentation-arg:codec-prefix:=c2.android…
|
/cts/tests/media/ |
D | README.md | 2 Current folder comprises of files necessary for testing media extractor, media muxer, media codec S… 26 To select codecs by name, *codec-prefix* can be passed to media codec tests to select one or more c… 31 atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.… 37 atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-prefix:=c2.… 41 To select codecs by applying regular expressions, *codec-filter* can be passed to media codec tests… 46 atest CtsMediaV2TestCases -- --module-arg CtsMediaV2TestCases:instrumentation-arg:codec-filter:="c2… 50 To select codecs by type, *media-type-sel* can be passed to media codec tests to select one or more… 52 Example: To limit media codec decoder tests to mp3 and vorbis decoder 75 | Identifier for codec-sel | Mime |
|