/cts/tests/media/src/android/mediav2/cts/ |
D | CodecUnitTest.java | 73 mCodec.releaseOutputBuffer(bufferIndex, false); in dequeueOutput() 110 mCodec = MediaCodec.createEncoderByType(mime); in testConfigureCodecForIncompleteFormat() 112 mCodec = MediaCodec.createDecoderByType(mime); in testConfigureCodecForIncompleteFormat() 118 mCodec.configure(formatClone, null, null, in testConfigureCodecForIncompleteFormat() 129 mCodec.configure(format, null, null, in testConfigureCodecForIncompleteFormat() 134 mCodec.release(); in testConfigureCodecForIncompleteFormat() 142 mCodec = MediaCodec.createEncoderByType(mime); in testConfigureCodecForBadFlags() 144 mCodec = MediaCodec.createDecoderByType(mime); in testConfigureCodecForBadFlags() 147 mCodec.configure(format, null, null, in testConfigureCodecForBadFlags() 156 mCodec.release(); in testConfigureCodecForBadFlags() [all …]
|
D | CodecDecoderTest.java | 249 mCodec = MediaCodec.createByCodecName(decoder); in testSimpleDecode() 250 assertTrue("codec name act/got: " + mCodec.getName() + '/' + decoder, in testSimpleDecode() 251 mCodec.getName().equals(decoder)); in testSimpleDecode() 253 mCodec.getCanonicalName() != null && !mCodec.getCanonicalName().isEmpty()); in testSimpleDecode() 266 MediaFormat defFormat = mCodec.getOutputFormat(); in testSimpleDecode() 273 mCodec.start(); in testSimpleDecode() 279 if (false) mCodec.stop(); in testSimpleDecode() 280 else mCodec.reset(); in testSimpleDecode() 308 mCodec.release(); in testSimpleDecode() 372 mCodec = MediaCodec.createByCodecName(decoder); in testFlush() [all …]
|
D | CodecEncoderTest.java | 102 mCodec = MediaCodec.createByCodecName(encoder); in encodeToMemory() 112 mCodec.start(); in encodeToMemory() 116 mCodec.stop(); in encodeToMemory() 117 mCodec.release(); in encodeToMemory() 148 mCodec.setParameters(syncFrame); in forceSyncFrame() 157 mCodec.setParameters(bitrateUpdate); in updateBitrate() 272 mCodec = MediaCodec.createByCodecName(encoder); in testSimpleEncode() 273 assertTrue("codec name act/got: " + mCodec.getName() + '/' + encoder, in testSimpleEncode() 274 mCodec.getName().equals(encoder)); in testSimpleEncode() 276 mCodec.getCanonicalName() != null && !mCodec.getCanonicalName().isEmpty()); in testSimpleEncode() [all …]
|
D | CodecDecoderSurfaceTest.java | 93 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput() 99 mCodec = MediaCodec.createByCodecName(decoder); in decodeAndSavePts() 102 mCodec.start(); in decodeAndSavePts() 107 mCodec.stop(); in decodeAndSavePts() 108 mCodec.release(); in decodeAndSavePts() 208 mCodec = MediaCodec.createByCodecName(decoder); in testSimpleDecodeToSurface() 218 mCodec.start(); in testSimpleDecodeToSurface() 223 if (false) mCodec.stop(); in testSimpleDecodeToSurface() 224 else mCodec.reset(); in testSimpleDecodeToSurface() 230 mCodec.release(); in testSimpleDecodeToSurface() [all …]
|
D | CodecTestBase.java | 473 MediaCodec mCodec; field in CodecTestBase 598 mAsyncHandle.setCallBack(mCodec, isAsync); in configureCodec() 602 mCodec.configure(format, mSurface, null, in configureCodec() 605 mCodec.configure(format, mSurface, isEncoder ? MediaCodec.CONFIGURE_FLAG_ENCODE : 0, in configureCodec() 614 mCodec.flush(); in flushCodec() 630 if (false) mCodec.stop(); in reConfigureCodec() 631 else mCodec.reset(); in reConfigureCodec() 649 mCodec.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueEOS() 680 int outputBufferId = mCodec.dequeueOutputBuffer(outInfo, Q_DEQ_TIMEOUT_US); in doWork() 684 mOutFormat = mCodec.getOutputFormat(); in doWork() [all …]
|
D | EncoderColorAspectsTest.java | 93 ByteBuffer buf = mCodec.getOutputBuffer(bufferIndex); in dequeueOutput() 96 mTrackID = mMuxer.addTrack(mCodec.getOutputFormat()); in dequeueOutput() 165 mCodec = MediaCodec.createByCodecName(encoder); in testColorAspects() 172 mCodec.release(); in testColorAspects() 180 mCodec.release(); in testColorAspects() 196 mCodec.start(); in testColorAspects() 212 MediaFormat fmt = mCodec.getOutputFormat(); in testColorAspects() 214 mCodec.stop(); in testColorAspects() 215 mCodec.release(); in testColorAspects()
|
D | EncoderProfileLevelTest.java | 700 mCodec = MediaCodec.createByCodecName(encoder); in testValidateProfileLevel() 702 mCodec.getCodecInfo().getCapabilitiesForType(mMime); in testValidateProfileLevel() 727 mCodec.start(); in testValidateProfileLevel() 731 MediaFormat outFormat = mCodec.getOutputFormat(); in testValidateProfileLevel() 733 if (false) mCodec.stop(); in testValidateProfileLevel() 734 else mCodec.reset(); in testValidateProfileLevel() 744 mCodec.release(); in testValidateProfileLevel()
|
/cts/tests/media/jni/ |
D | NativeCodecUnitTest.cpp | 115 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mCodec, bufferIndex, false), in dequeueOutput() 146 mCodec = isEncoder ? AMediaCodec_createEncoderByType(mime) in setupCodec() 148 if (!mCodec) { in setupCodec() 206 mCodec = isEncoder ? AMediaCodec_createEncoderByType(mime) in testConfigureCodecForIncompleteFormat() 208 if (!mCodec) { in testConfigureCodecForIncompleteFormat() 220 if (AMEDIA_OK == AMediaCodec_configure(mCodec, format, nullptr, nullptr, in testConfigureCodecForIncompleteFormat() 228 if (AMEDIA_OK != AMediaCodec_configure(mCodec, format, nullptr, nullptr, in testConfigureCodecForIncompleteFormat() 242 if (AMEDIA_OK == AMediaCodec_configure(mCodec, mFormat, nullptr, nullptr, in testConfigureCodecForBadFlags() 247 AMediaCodec_stop(mCodec); in testConfigureCodecForBadFlags() 258 if (AMEDIA_OK == AMediaCodec_configure(mCodec, mFormat, nullptr, nullptr, in testConfigureInInitState() [all …]
|
D | NativeCodecDecoderTest.cpp | 154 CHECK_STATUS(mAsyncHandle.setCallBack(mCodec, isAsync), in configureCodec() 156 CHECK_STATUS(AMediaCodec_configure(mCodec, format, mWindow, nullptr, in configureCodec() 164 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueCodecConfig() 177 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, csdSize, 0, flags), in enqueueCodecConfig() 188 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueInput() 207 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, size, pts, flags), in enqueueInput() 225 uint8_t* buf = AMediaCodec_getOutputBuffer(mCodec, bufferIndex, &buffSize); in dequeueOutput() 234 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mCodec, bufferIndex, mWindow != nullptr), in dequeueOutput() 252 bufferIndex = AMediaCodec_dequeueInputBuffer(mCodec, -1); in queueCodecConfig() 269 mCodec = AMediaCodec_createCodecByName(decoder); in decodeToMemory() [all …]
|
D | NativeCodecEncoderTest.cpp | 271 uint8_t* inputBuffer = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &buffSize); in enqueueInput() 304 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, size, pts, flags), in enqueueInput() 320 uint8_t* buf = AMediaCodec_getOutputBuffer(mCodec, bufferIndex, &buffSize); in dequeueOutput() 334 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mCodec, bufferIndex, false), in dequeueOutput() 355 mCodec = AMediaCodec_createCodecByName(encoder); in encodeToMemory() 356 if (!mCodec) { in encodeToMemory() 364 CHECK_STATUS(AMediaCodec_start(mCodec), "AMediaCodec_start failed"); in encodeToMemory() 368 CHECK_STATUS(AMediaCodec_stop(mCodec), "AMediaCodec_stop failed"); in encodeToMemory() 369 CHECK_STATUS(AMediaCodec_delete(mCodec), "AMediaCodec_delete failed"); in encodeToMemory() 370 mCodec = nullptr; in encodeToMemory() [all …]
|
D | NativeCodecTestBase.cpp | 353 mCodec = nullptr; in CodecTestBase() 361 if (mCodec) { in ~CodecTestBase() 362 AMediaCodec_delete(mCodec); in ~CodecTestBase() 363 mCodec = nullptr; in ~CodecTestBase() 370 CHECK_STATUS(mAsyncHandle.setCallBack(mCodec, isAsync), in configureCodec() 372 CHECK_STATUS(AMediaCodec_configure(mCodec, format, nullptr, nullptr, in configureCodec() 379 CHECK_STATUS(AMediaCodec_flush(mCodec), "AMediaCodec_flush failed"); in flushCodec() 392 CHECK_STATUS(AMediaCodec_stop(mCodec), "AMediaCodec_stop failed"); in reConfigureCodec() 414 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, 0, 0, in enqueueEOS() 443 ssize_t oBufferID = AMediaCodec_dequeueOutputBuffer(mCodec, &outInfo, kQDeQTimeOutUs); in doWork() [all …]
|
D | NativeCodecTestBase.h | 143 AMediaCodec* mCodec; variable
|
/cts/tests/tests/media/src/android/media/cts/ |
D | SdkMediaCodec.java | 28 private final MediaCodec mCodec; field in SdkMediaCodec 34 this.mCodec = codec; in SdkMediaCodec() 43 return mCodec; in getMediaCodec() 48 mCodec.release(); in release() 53 mCodec.configure(format, null, null, flags); in configure() 58 surface.configure(mCodec); in setInputSurface() 63 return new InputSurface(mCodec.createInputSurface()); in createInputSurface() 68 mCodec.start(); in start() 73 mCodec.stop(); in stop() 78 return mCodec.dequeueOutputBuffer(info, timeoutUs); in dequeueOutputBuffer() [all …]
|
D | CodecState.java | 50 private MediaCodec mCodec; field in CodecState 80 mCodec = codec; in CodecState() 100 mCodec.stop(); in release() 114 mCodec.setOnFrameRenderedListener(null, null); in release() 118 mCodec.release(); in release() 119 mCodec = null; in release() 128 mCodec.start(); in start() 129 mCodecInputBuffers = mCodec.getInputBuffers(); in start() 131 mCodecOutputBuffers = mCodec.getOutputBuffers(); in start() 164 mCodec.flush(); in flush() [all …]
|
D | AdaptivePlaybackTest.java | 882 MediaCodec mCodec; 902 mCodec = codec; 927 return mCodec.getName(); 946 mCodec.configure(format, mSurface.getSurface(), null /* crypto */, 0 /* flags */); 948 mCodec.start(); 953 mCodec.setOutputSurface(null); 956 mCodec.setOutputSurface(mSurface.getSurface()); 958 mInputBuffers = mCodec.getInputBuffers(); 959 mOutputBuffers = mCodec.getOutputBuffers(); 972 mCodec.stop(); [all …]
|
D | VpxCodecTestBase.java | 843 private MediaCodecWrapper mCodec; field in VpxCodecTestBase.MediaEncoderAsync 889 ByteBuffer byteBuffer = mCodec.getInputBuffer(index); 901 mCodec.queueInputBuffer( 920 ByteBuffer outputBuffer = mCodec.getOutputBuffer(index); 949 mCodec.releaseOutputBuffer(index, false); 1051 mCodec = new NdkMediaCodec(name); in createCodecInternal() 1053 mCodec = new SdkMediaCodec(MediaCodec.createByCodecName(name), mAsync); in createCodecInternal() 1056 mCodec.setCallback(mCallback); in createCodecInternal() 1058 mCodec.configure(format, MediaCodec.CONFIGURE_FLAG_ENCODE); in createCodecInternal() 1059 mCodec.start(); in createCodecInternal() [all …]
|
D | MediaCodecTest.java | 2031 private MediaCodec mCodec; field in MediaCodecTest.MediaCodecStream 2056 mCodec = MediaCodec.createEncoderByType(mime); in MediaCodecStream() 2058 mCodec = MediaCodec.createDecoderByType(mime); in MediaCodecStream() 2060 mCodec.configure(format,null, null, encode ? MediaCodec.CONFIGURE_FLAG_ENCODE : 0); in MediaCodecStream() 2064 encode ? mCodec.getInputFormat() : mCodec.getOutputFormat(); in MediaCodecStream() 2070 mCodec.start(); in MediaCodecStream() 2104 Log.i(TAG, "sending data to " + mCodec.getName()); in read() 2105 int index = mCodec.dequeueInputBuffer(5000); in read() 2110 ByteBuffer buf = mCodec.getInputBuffer(index); in read() 2162 " on " + mCodec.getName()); in read() [all …]
|
D | MediaRecorderTest.java | 1386 if (cap.mCodec == codec) { in getMaxFrameRateForCodec()
|
/cts/tests/tests/graphics/jni/ |
D | MediaTestHelpers.cpp | 39 if (mCodec != nullptr) { in ~MediaHelper() 40 AMediaCodec_stop(mCodec); in ~MediaHelper() 41 AMediaCodec_delete(mCodec); in ~MediaHelper() 42 mCodec = nullptr; in ~MediaHelper() 62 ASSERT(mCodec); in processOneFrame() 106 ASSERT(nullptr == mCodec); in createMediaCodec() 124 mCodec = AMediaCodec_createDecoderByType(mime); in createMediaCodec() 125 ASSERT(mCodec); in createMediaCodec() 126 MEDIA_CALL(AMediaCodec_configure(mCodec, format, window, NULL, 0)); in createMediaCodec() 128 MEDIA_CALL(AMediaCodec_start(mCodec)); in createMediaCodec() [all …]
|
D | MediaTestHelpers.h | 40 AMediaCodec *mCodec = nullptr; variable
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | SoundPlayerObject.java | 65 private MediaCodec mCodec = null; field in SoundPlayerObject 152 final int inputBufIndex = mCodec.dequeueInputBuffer(TIME_OUT_US); in run() 154 ByteBuffer encodedBuf = mCodec.getInputBuffer(inputBufIndex); in run() 165 mCodec.queueInputBuffer(inputBufIndex, 0/*offset*/, in run() 184 final int outputRes = mCodec.dequeueOutputBuffer(buffInfo, TIME_OUT_US); in run() 190 mCodec.getOutputBuffer(outputBufIndex); in run() 214 mCodec.getOutputBuffer(outputBufIndex).position(0); in run() 215 mCodec.releaseOutputBuffer(outputBufIndex, in run() 326 if (mCodec != null) in setSoundWithResId() 327 mCodec = null; in setSoundWithResId() [all …]
|