Home
last modified time | relevance | path

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

12

/cts/tests/media/src/android/mediav2/cts/
DCodecUnitTest.java73 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 …]
DCodecEncoderTest.java102 mCodec.setParameters(syncFrame); in forceSyncFrame()
111 mCodec.setParameters(bitrateUpdate); in updateBitrate()
170 mCodec = MediaCodec.createByCodecName(mCodecName); in testSimpleEncode()
171 assertTrue("codec name act/got: " + mCodec.getName() + '/' + mCodecName, in testSimpleEncode()
172 mCodec.getName().equals(mCodecName)); in testSimpleEncode()
174 mCodec.getCanonicalName() != null && !mCodec.getCanonicalName().isEmpty()); in testSimpleEncode()
198 mCodec.start(); in testSimpleEncode()
204 if (false) mCodec.stop(); in testSimpleEncode()
205 else mCodec.reset(); in testSimpleEncode()
230 mCodec.release(); in testSimpleEncode()
[all …]
DCodecDecoderSurfaceTest.java66 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput()
74 mCodec = MediaCodec.createByCodecName(decoder); in decodeAndSavePts()
77 mCodec.start(); in decodeAndSavePts()
82 mCodec.stop(); in decodeAndSavePts()
83 mCodec.release(); in decodeAndSavePts()
160 mCodec = MediaCodec.createByCodecName(mCodecName); in testSimpleDecodeToSurface()
169 mCodec.start(); in testSimpleDecodeToSurface()
174 if (false) mCodec.stop(); in testSimpleDecodeToSurface()
175 else mCodec.reset(); in testSimpleDecodeToSurface()
187 mCodec.release(); in testSimpleDecodeToSurface()
[all …]
DCodecDecoderTest.java217 mCodec = MediaCodec.createByCodecName(mCodecName); in testSimpleDecode()
218 assertTrue("codec name act/got: " + mCodec.getName() + '/' + mCodecName, in testSimpleDecode()
219 mCodec.getName().equals(mCodecName)); in testSimpleDecode()
221 mCodec.getCanonicalName() != null && !mCodec.getCanonicalName().isEmpty()); in testSimpleDecode()
234 MediaFormat defFormat = mCodec.getOutputFormat(); in testSimpleDecode()
241 mCodec.start(); in testSimpleDecode()
247 if (false) mCodec.stop(); in testSimpleDecode()
248 else mCodec.reset(); in testSimpleDecode()
276 mCodec.release(); in testSimpleDecode()
317 mCodec = MediaCodec.createByCodecName(mCodecName); in testFlush()
[all …]
DEncoderColorAspectsTest.java85 ByteBuffer buf = mCodec.getOutputBuffer(bufferIndex); in dequeueOutput()
88 mTrackID = mMuxer.addTrack(mCodec.getOutputFormat()); in dequeueOutput()
145 mCodec = MediaCodec.createByCodecName(mCodecName); in testColorAspects()
150 mCodec.release(); in testColorAspects()
166 mCodec.start(); in testColorAspects()
182 MediaFormat fmt = mCodec.getOutputFormat(); in testColorAspects()
184 mCodec.stop(); in testColorAspects()
185 mCodec.release(); in testColorAspects()
DCodecTestBase.java548 MediaCodec mCodec; field in CodecTestBase
822 mAsyncHandle.setCallBack(mCodec, isAsync); in configureCodec()
826 mCodec.configure(format, mSurface, null, in configureCodec()
829 mCodec.configure(format, mSurface, isEncoder ? MediaCodec.CONFIGURE_FLAG_ENCODE : 0, in configureCodec()
838 mCodec.flush(); in flushCodec()
854 if (false) mCodec.stop(); in reConfigureCodec()
855 else mCodec.reset(); in reConfigureCodec()
873 mCodec.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueEOS()
904 int outputBufferId = mCodec.dequeueOutputBuffer(outInfo, Q_DEQ_TIMEOUT_US); in doWork()
908 mOutFormat = mCodec.getOutputFormat(); in doWork()
[all …]
DCodecDecoderPauseTest.java94 mCodec = MediaCodec.createByCodecName(mCodecName); in testPause()
106 mCodec.start(); in testPause()
114 mCodec.reset(); in testPause()
129 mCodec.release(); in testPause()
DAdaptivePlaybackTest.java126 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput()
212 mCodec = MediaCodec.createByCodecName(mCodecName); in testAdaptivePlayback()
217 mCodec.start(); in testAdaptivePlayback()
221 mCodec.reset(); in testAdaptivePlayback()
222 mCodec.release(); in testAdaptivePlayback()
DEncodeDecodeAccuracyTest.java404 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput()
423 mCodec = MediaCodec.createByCodecName(decoder); in decodeElementaryStream()
426 mCodec.start(); in decodeElementaryStream()
430 mCodec.stop(); in decodeElementaryStream()
431 mCodec.release(); in decodeElementaryStream()
DEncoderProfileLevelTest.java708 mCodec = MediaCodec.createByCodecName(mCodecName); in testValidateProfileLevel()
710 mCodec.getCodecInfo().getCapabilitiesForType(mMime); in testValidateProfileLevel()
755 mCodec.start(); in testValidateProfileLevel()
759 MediaFormat outFormat = mCodec.getOutputFormat(); in testValidateProfileLevel()
761 if (false) mCodec.stop(); in testValidateProfileLevel()
762 else mCodec.reset(); in testValidateProfileLevel()
836 mCodec.release(); in testValidateProfileLevel()
/cts/tests/tests/media/src/android/media/cts/
DSdkMediaCodec.java29 private final MediaCodec mCodec; field in SdkMediaCodec
35 this.mCodec = codec; in SdkMediaCodec()
44 return mCodec; in getMediaCodec()
49 mCodec.release(); in release()
54 mCodec.configure(format, null, null, flags); in configure()
59 mCodec.configure(format, surface, null, flags); in configure()
64 surface.configure(mCodec); in setInputSurface()
69 return new InputSurface(mCodec.createInputSurface()); in createInputSurface()
74 mCodec.start(); in start()
79 mCodec.stop(); in stop()
[all …]
DCodecState.java55 private MediaCodec mCodec; field in CodecState
95 mCodec = codec; in CodecState()
121 mCodec.stop(); in release()
134 mCodec.setOnFrameRenderedListener(null, null); in release()
138 mCodec.setOnFirstTunnelFrameReadyListener(null, null); in release()
142 mCodec.release(); in release()
143 mCodec = null; in release()
152 mCodec.start(); in start()
153 mCodecInputBuffers = mCodec.getInputBuffers(); in start()
155 mCodecOutputBuffers = mCodec.getOutputBuffers(); in start()
[all …]
DAdaptivePlaybackTest.java886 MediaCodec mCodec;
915 mCodec = codec;
943 return mCodec.getName();
966 mCodec.configure(format, mSurface.getSurface(), null /* crypto */, 0 /* flags */);
968 mCodec.start();
973 mCodec.setOutputSurface(null);
976 mCodec.setOutputSurface(mSurface.getSurface());
978 mInputBuffers = mCodec.getInputBuffers();
979 mOutputBuffers = mCodec.getOutputBuffers();
992 mCodec.stop();
[all …]
DVideoCodecTestBase.java883 private MediaCodecWrapper mCodec; field in VideoCodecTestBase.MediaEncoderAsync
930 ByteBuffer byteBuffer = mCodec.getInputBuffer(index);
942 mCodec.queueInputBuffer(
961 ByteBuffer outputBuffer = mCodec.getOutputBuffer(index);
993 mCodec.releaseOutputBuffer(index, false);
1095 mCodec = new NdkMediaCodec(name); in createCodecInternal()
1097 mCodec = new SdkMediaCodec(MediaCodec.createByCodecName(name), mAsync); in createCodecInternal()
1100 mCodec.setCallback(mCallback); in createCodecInternal()
1102 mCodec.configure(format, MediaCodec.CONFIGURE_FLAG_ENCODE); in createCodecInternal()
1103 mCodec.start(); in createCodecInternal()
[all …]
DMediaCodecTest.java2218 private MediaCodec mCodec; field in MediaCodecTest.MediaCodecStream
2243 mCodec = MediaCodec.createEncoderByType(mime); in MediaCodecStream()
2245 mCodec = MediaCodec.createDecoderByType(mime); in MediaCodecStream()
2247 mCodec.configure(format,null, null, encode ? MediaCodec.CONFIGURE_FLAG_ENCODE : 0); in MediaCodecStream()
2251 encode ? mCodec.getInputFormat() : mCodec.getOutputFormat(); in MediaCodecStream()
2257 mCodec.start(); in MediaCodecStream()
2291 Log.i(TAG, "sending data to " + mCodec.getName()); in read()
2292 int index = mCodec.dequeueInputBuffer(5000); in read()
2297 ByteBuffer buf = mCodec.getInputBuffer(index); in read()
2349 " on " + mCodec.getName()); in read()
[all …]
/cts/tests/media/jni/
DNativeCodecUnitTest.cpp115 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 …]
DNativeCodecDecoderTest.cpp158 CHECK_STATUS(mAsyncHandle.setCallBack(mCodec, isAsync), in configureCodec()
160 CHECK_STATUS(AMediaCodec_configure(mCodec, format, mWindow, nullptr, in configureCodec()
168 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueCodecConfig()
181 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, csdSize, 0, flags), in enqueueCodecConfig()
192 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueInput()
211 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, size, pts, flags), in enqueueInput()
230 uint8_t* buf = AMediaCodec_getOutputBuffer(mCodec, bufferIndex, &buffSize); in dequeueOutput()
249 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mCodec, bufferIndex, mWindow != nullptr), in dequeueOutput()
267 bufferIndex = AMediaCodec_dequeueInputBuffer(mCodec, -1); in queueCodecConfig()
284 mCodec = AMediaCodec_createCodecByName(decoder); in decodeToMemory()
[all …]
DNativeCodecTestBase.cpp344 mCodec = nullptr; in CodecTestBase()
352 if (mCodec) { in ~CodecTestBase()
353 AMediaCodec_delete(mCodec); in ~CodecTestBase()
354 mCodec = nullptr; in ~CodecTestBase()
361 CHECK_STATUS(mAsyncHandle.setCallBack(mCodec, isAsync), in configureCodec()
363 CHECK_STATUS(AMediaCodec_configure(mCodec, format, nullptr, nullptr, in configureCodec()
370 CHECK_STATUS(AMediaCodec_flush(mCodec), "AMediaCodec_flush failed"); in flushCodec()
383 CHECK_STATUS(AMediaCodec_stop(mCodec), "AMediaCodec_stop failed"); in reConfigureCodec()
405 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, 0, 0, in enqueueEOS()
434 ssize_t oBufferID = AMediaCodec_dequeueOutputBuffer(mCodec, &outInfo, kQDeQTimeOutUs); in doWork()
[all …]
/cts/tests/tests/graphics/jni/
DMediaTestHelpers.cpp39 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 …]
DMediaTestHelpers.h40 AMediaCodec *mCodec = nullptr; variable
/cts/tests/mediapc/src/android/mediapc/cts/
DAudioPlaybackLoad.java52 mCodec = MediaCodec.createByCodecName(mDecoderName); in doDecodeAndPlayback()
55 mCodec.start(); in doDecodeAndPlayback()
59 mCodec.stop(); in doDecodeAndPlayback()
60 mCodec.release(); in doDecodeAndPlayback()
107 ByteBuffer inputBuffer = mCodec.getInputBuffer(bufferIndex); in enqueueInput()
116 mCodec.queueInputBuffer(bufferIndex, 0, size, mBasePts + pts, codecFlags); in enqueueInput()
136 final ByteBuffer buffer = mCodec.getOutputBuffer(bufferIndex); in dequeueOutput()
141 mCodec.releaseOutputBuffer(bufferIndex, false); in dequeueOutput()
DPlaybackFrameDrop.java143 mCodec = MediaCodec.createByCodecName(mDecoderName); in getFrameDropCount()
145 mCodec.start(); in getFrameDropCount()
150 mCodec.stop(); in getFrameDropCount()
151 mCodec.release(); in getFrameDropCount()
165 ByteBuffer dstBuf = mCodec.getInputBuffer(bufferIndex); in enqueueInput()
174 mCodec.queueInputBuffer(bufferIndex, 0, info.size, mBasePts + pts, info.flags); in enqueueInput()
196 mCodec.releaseOutputBuffer(bufferIndex, true); in dequeueOutput()
201 mCodec.releaseOutputBuffer(bufferIndex, false); in dequeueOutput()
205 mCodec.releaseOutputBuffer(bufferIndex, true); in dequeueOutput()
219 mCodec.releaseOutputBuffer(bufferIndex, true); in dequeueOutput()
DCodecTestBase.java198 MediaCodec mCodec; field in CodecTestBase
208 mAsyncHandle.setCallBack(mCodec, isAsync); in configureCodec()
212 mCodec.configure(format, mSurface, null, in configureCodec()
215 mCodec.configure(format, mSurface, isEncoder ? MediaCodec.CONFIGURE_FLAG_ENCODE : 0, in configureCodec()
234 mCodec.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueEOS()
265 int outputBufferId = mCodec.dequeueOutputBuffer(outInfo, Q_DEQ_TIMEOUT_US); in doWork()
269 mOutFormat = mCodec.getOutputFormat(); in doWork()
272 int inputBufferId = mCodec.dequeueInputBuffer(Q_DEQ_TIMEOUT_US); in doWork()
298 int outputBufferId = mCodec.dequeueOutputBuffer(outInfo, Q_DEQ_TIMEOUT_US); in queueEOS()
302 mOutFormat = mCodec.getOutputFormat(); in queueEOS()
[all …]
DEncoderInitializationLatencyTest.java399 mCodec = MediaCodec.createByCodecName(mEncoderName); in calculateEncoderInitializationLatency()
401 mAsyncHandle.setCallBack(mCodec, mIsAsync); in calculateEncoderInitializationLatency()
402 mCodec.configure(format, null, MediaCodec.CONFIGURE_FLAG_ENCODE, null); in calculateEncoderInitializationLatency()
404 mCodec.start(); in calculateEncoderInitializationLatency()
428 int inputBufferId = mCodec.dequeueInputBuffer(Q_DEQ_TIMEOUT_US); in calculateEncoderInitializationLatency()
436 int outputBufferId = mCodec.dequeueOutputBuffer(outInfo, Q_DEQ_TIMEOUT_US); in calculateEncoderInitializationLatency()
446 mCodec.stop(); in calculateEncoderInitializationLatency()
447 mCodec.release(); in calculateEncoderInitializationLatency()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DSoundPlayerObject.java65 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 …]

12