/cts/tests/media/jni/ |
D | NativeCodecEncoderSurfaceTest.cpp | 66 bool enqueueDecoderInput(size_t bufferIndex); 67 bool dequeueDecoderOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo); 68 bool dequeueEncoderOutput(size_t bufferIndex, AMediaCodecBufferInfo* info); 72 bool enqueueDecoderEOS(size_t bufferIndex); 214 bool CodecEncoderSurfaceTest::enqueueDecoderEOS(size_t bufferIndex) { in enqueueDecoderEOS() argument 216 CHECK_STATUS(AMediaCodec_queueInputBuffer(mDecoder, bufferIndex, 0, 0, 0, in enqueueDecoderEOS() 225 bool CodecEncoderSurfaceTest::enqueueDecoderInput(size_t bufferIndex) { in enqueueDecoderInput() argument 227 return enqueueDecoderEOS(bufferIndex); in enqueueDecoderInput() 231 uint8_t* buf = AMediaCodec_getInputBuffer(mDecoder, bufferIndex, &bufSize); in enqueueDecoderInput() 250 CHECK_STATUS(AMediaCodec_queueInputBuffer(mDecoder, bufferIndex, 0, size, pts, flags), in enqueueDecoderInput() [all …]
|
D | NativeCodecTestBase.h | 48 int32_t bufferIndex; member 52 : bufferInfo{*info}, bufferIndex{index}, isInput{false} {} in callbackObject() 54 callbackObject(int32_t index) : bufferIndex{index}, isInput{true} {} in callbackObject() 56 callbackObject() : bufferIndex{-1}, isInput{false} {} in callbackObject() 156 virtual bool enqueueInput(size_t bufferIndex) = 0; 157 virtual bool dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo) = 0; 158 bool enqueueEOS(size_t bufferIndex);
|
D | NativeCodecUnitTest.cpp | 32 bool enqueueInput(size_t bufferIndex) override; 33 bool dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo) override; 106 bool NativeCodecUnitTest::enqueueInput(size_t bufferIndex) { in enqueueInput() argument 107 (void)bufferIndex; in enqueueInput() 111 bool NativeCodecUnitTest::dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* info) { in dequeueOutput() argument 115 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mCodec, bufferIndex, false), in dequeueOutput() 700 int bufferIndex = mIsCodecInAsyncMode ? mAsyncHandle.getInput().bufferIndex in testGetInputBufferInRunningState() local 702 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in testGetInputBufferInRunningState() 707 if (!enqueueEOS(bufferIndex)) return false; in testGetInputBufferInRunningState() 850 int bufferIndex = 0; in testGetOutputBufferInRunningState() local [all …]
|
D | NativeCodecDecoderTest.cpp | 50 bool enqueueInput(size_t bufferIndex) override; 51 bool dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo) override; 53 bool enqueueCodecConfig(int32_t bufferIndex); 166 bool CodecDecoderTest::enqueueCodecConfig(int32_t bufferIndex) { in enqueueCodecConfig() argument 168 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueCodecConfig() 181 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, csdSize, 0, flags), in enqueueCodecConfig() 186 bool CodecDecoderTest::enqueueInput(size_t bufferIndex) { in enqueueInput() argument 188 return enqueueEOS(bufferIndex); in enqueueInput() 192 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueInput() 211 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, size, pts, flags), in enqueueInput() [all …]
|
D | NativeCodecTestBase.cpp | 403 bool CodecTestBase::enqueueEOS(size_t bufferIndex) { in enqueueEOS() argument 405 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, 0, 0, in enqueueEOS() 421 if (element.bufferIndex >= 0) { in doWork() 423 isOk = enqueueInput(element.bufferIndex); in doWork() 426 isOk = dequeueOutput(element.bufferIndex, &element.bufferInfo); in doWork() 469 if (element.bufferIndex >= 0) { in queueEOS() 471 isOk = enqueueEOS(element.bufferIndex); in queueEOS() 473 isOk = dequeueOutput(element.bufferIndex, &element.bufferInfo); in queueEOS() 514 if (element.bufferIndex >= 0) { in waitForAllOutputs() 515 isOk = dequeueOutput(element.bufferIndex, &element.bufferInfo); in waitForAllOutputs()
|
/cts/tests/mediapc/src/android/mediapc/cts/ |
D | AudioPlaybackLoad.java | 103 void enqueueInput(int bufferIndex) { in enqueueInput() argument 105 enqueueEOS(bufferIndex); in enqueueInput() 107 ByteBuffer inputBuffer = mCodec.getInputBuffer(bufferIndex); in enqueueInput() 116 mCodec.queueInputBuffer(bufferIndex, 0, size, mBasePts + pts, codecFlags); in enqueueInput() 129 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 136 final ByteBuffer buffer = mCodec.getOutputBuffer(bufferIndex); in dequeueOutput() 141 mCodec.releaseOutputBuffer(bufferIndex, false); in dequeueOutput()
|
D | PlaybackFrameDrop.java | 156 void enqueueInput(int bufferIndex) { in enqueueInput() argument 161 enqueueEOS(bufferIndex); in enqueueInput() 165 ByteBuffer dstBuf = mCodec.getInputBuffer(bufferIndex); in enqueueInput() 174 mCodec.queueInputBuffer(bufferIndex, 0, info.size, mBasePts + pts, info.flags); in enqueueInput() 188 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 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()
|
D | CodecTestBase.java | 83 public void onInputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex) { in onInputBufferAvailable() argument 84 assertTrue(bufferIndex >= 0); in onInputBufferAvailable() 86 mCbInputQueue.add(new Pair<>(bufferIndex, (MediaCodec.BufferInfo) null)); in onInputBufferAvailable() 92 public void onOutputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex, in onOutputBufferAvailable() argument 94 assertTrue(bufferIndex >= 0); in onOutputBufferAvailable() 96 mCbOutputQueue.add(new Pair<>(bufferIndex, info)); in onOutputBufferAvailable() 201 abstract void enqueueInput(int bufferIndex) throws IOException; in enqueueInput() argument 203 abstract void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info); in dequeueOutput() argument 232 void enqueueEOS(int bufferIndex) { in enqueueEOS() argument 234 mCodec.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueEOS() [all …]
|
D | CodecTranscoderTestBase.java | 128 void enqueueDecoderEOS(int bufferIndex) { in enqueueDecoderEOS() argument 130 mDecoder.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueDecoderEOS() 138 void enqueueDecoderInput(int bufferIndex) { in enqueueDecoderInput() argument 140 enqueueDecoderEOS(bufferIndex); in enqueueDecoderInput() 142 ByteBuffer inputBuffer = mDecoder.getInputBuffer(bufferIndex); in enqueueDecoderInput() 154 mDecoder.queueInputBuffer(bufferIndex, 0, size, pts, codecFlags); in enqueueDecoderInput() 161 void dequeueDecoderOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueDecoderOutput() argument 168 mDecoder.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueDecoderOutput() 171 void dequeueEncoderOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueEncoderOutput() argument 178 mEncoder.releaseOutputBuffer(bufferIndex, false); in dequeueEncoderOutput() [all …]
|
/cts/tests/media/src/android/mediav2/cts/ |
D | CodecUnitTest.java | 65 void enqueueInput(int bufferIndex) { in enqueueInput() argument 69 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 73 mCodec.releaseOutputBuffer(bufferIndex, false); in dequeueOutput() 1027 int bufferIndex = mIsCodecInAsyncMode ? mAsyncHandle.getInput().first : in testGetInputBufferInRunningState() local 1029 ByteBuffer buffer = mCodec.getInputBuffer(bufferIndex); in testGetInputBufferInRunningState() 1031 ByteBuffer bufferDup = mCodec.getInputBuffer(bufferIndex); in testGetInputBufferInRunningState() 1033 enqueueEOS(bufferIndex); in testGetInputBufferInRunningState() 1163 int bufferIndex = 0; in testGetOutputBufferInRunningState() local 1167 bufferIndex = element.first; in testGetOutputBufferInRunningState() 1168 ByteBuffer buffer = mCodec.getOutputBuffer(bufferIndex); in testGetOutputBufferInRunningState() [all …]
|
D | CodecEncoderSurfaceTest.java | 184 private void enqueueDecoderEOS(int bufferIndex) { in enqueueDecoderEOS() argument 186 mDecoder.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueDecoderEOS() 194 private void enqueueDecoderInput(int bufferIndex) { in enqueueDecoderInput() argument 196 enqueueDecoderEOS(bufferIndex); in enqueueDecoderInput() 198 ByteBuffer inputBuffer = mDecoder.getInputBuffer(bufferIndex); in enqueueDecoderInput() 215 Log.v(LOG_TAG, "input: id: " + bufferIndex + " size: " + size + " pts: " + pts + in enqueueDecoderInput() 218 mDecoder.queueInputBuffer(bufferIndex, 0, size, pts, codecFlags); in enqueueDecoderInput() 227 private void dequeueDecoderOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueDecoderOutput() argument 232 Log.v(LOG_TAG, "output: id: " + bufferIndex + " flags: " + info.flags + " size: " + in dequeueDecoderOutput() 238 mDecoder.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueDecoderOutput() [all …]
|
D | CodecTestBase.java | 99 public void onInputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex) { in onInputBufferAvailable() argument 100 assertTrue(bufferIndex >= 0); in onInputBufferAvailable() 102 mCbInputQueue.add(new Pair<>(bufferIndex, (MediaCodec.BufferInfo) null)); in onInputBufferAvailable() 108 public void onOutputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex, in onOutputBufferAvailable() argument 110 assertTrue(bufferIndex >= 0); in onOutputBufferAvailable() 112 mCbOutputQueue.add(new Pair<>(bufferIndex, info)); in onOutputBufferAvailable() 815 abstract void enqueueInput(int bufferIndex) throws IOException; in enqueueInput() argument 817 abstract void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info); in dequeueOutput() argument 871 void enqueueEOS(int bufferIndex) { in enqueueEOS() argument 873 mCodec.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueEOS() [all …]
|
D | EncodeDecodeAccuracyTest.java | 221 private void dequeueEncoderOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueEncoderOutput() argument 223 Log.v(LOG_TAG, "encoder output: id: " + bufferIndex + " flags: " + info.flags + in dequeueEncoderOutput() 231 ByteBuffer buf = mEncoder.getOutputBuffer(bufferIndex); in dequeueEncoderOutput() 250 mEncoder.releaseOutputBuffer(bufferIndex, false); in dequeueEncoderOutput() 392 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 397 Log.v(LOG_TAG, "output: id: " + bufferIndex + " flags: " + info.flags + " size: " + in dequeueOutput() 404 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput()
|
D | EncoderColorAspectsTest.java | 83 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 85 ByteBuffer buf = mCodec.getOutputBuffer(bufferIndex); in dequeueOutput() 94 super.dequeueOutput(bufferIndex, info); in dequeueOutput()
|
D | AdaptivePlaybackTest.java | 118 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 126 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput()
|
D | CodecDecoderSurfaceTest.java | 54 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 59 Log.v(LOG_TAG, "output: id: " + bufferIndex + " flags: " + info.flags + " size: " + in dequeueOutput() 66 mCodec.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueOutput()
|
D | CodecEncoderTest.java | 88 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 93 super.dequeueOutput(bufferIndex, info); in dequeueOutput()
|
/cts/tests/tests/media/src/android/media/cts/ |
D | MediaSyncTest.java | 249 MediaSync sync, ByteBuffer byteBuffer, int bufferIndex) { in runCheckAudioBuffer() 252 decoderAudio.checkReturnedAudioBuffer(byteBuffer, bufferIndex); in runCheckAudioBuffer() 253 decoderAudio.releaseOutputBuffer(bufferIndex, NO_TIMESTAMP); in runCheckAudioBuffer() 308 MediaSync sync, ByteBuffer byteBuffer, int bufferIndex) { in runFlush() 311 returnedIndex[0] = bufferIndex; in runFlush() 506 MediaSync sync, ByteBuffer byteBuffer, int bufferIndex) { in runPlayAV() 509 decoderAudio.releaseOutputBuffer(bufferIndex, NO_TIMESTAMP); in runPlayAV() 514 && mTaggedAudioBufferIndex == bufferIndex) { in runPlayAV() 614 public AudioBuffer(ByteBuffer byteBuffer, int bufferIndex) { in AudioBuffer() argument 616 mBufferIndex = bufferIndex; in AudioBuffer() [all …]
|
D | EncodeVirtualDisplayWithCompositionTestImpl.java | 322 int bufferIndex = mDecoder.dequeueOutputBuffer(info, DEQUEUE_TIMEOUT_US); in renderColorAndCheckResult() local 324 Log.i(TAG, "decoder dequeueOutputBuffer returned " + bufferIndex); in renderColorAndCheckResult() 326 if (bufferIndex < 0) { in renderColorAndCheckResult() 329 mDecoder.releaseOutputBuffer(bufferIndex, true); in renderColorAndCheckResult() 348 int bufferIndex = mDecoder.dequeueOutputBuffer(info, DEQUEUE_TIMEOUT_US); in renderRotationAndCheckResult() local 350 Log.i(TAG, "decoder dequeueOutputBuffer returned " + bufferIndex); in renderRotationAndCheckResult() 352 if (bufferIndex < 0) { in renderRotationAndCheckResult() 355 mDecoder.releaseOutputBuffer(bufferIndex, true); in renderRotationAndCheckResult()
|
D | MediaCodecTest.java | 1346 int bufferIndex = mediaCodec.dequeueInputBuffer(TIME_OUT_US /* timeoutUs */); in runDecodeTillFirstOutput() local 1347 if (bufferIndex != -1) { in runDecodeTillFirstOutput() 1348 ByteBuffer buffer = mediaCodec.getInputBuffer(bufferIndex); in runDecodeTillFirstOutput() 1353 mediaCodec.queueInputBuffer(bufferIndex, in runDecodeTillFirstOutput() 1453 int bufferIndex = mediaCodec.dequeueInputBuffer(0); in runDecodeShortInput() local 1454 if (bufferIndex != NO_BUFFER_INDEX) { in runDecodeShortInput() 1455 ByteBuffer buffer = mediaCodec.getInputBuffers()[bufferIndex]; in runDecodeShortInput() 1461 mediaCodec.queueInputBuffer(bufferIndex, in runDecodeShortInput()
|
/cts/tests/tests/graphics/jni/ |
D | MediaTestHelpers.cpp | 134 ssize_t bufferIndex = AMediaCodec_dequeueInputBuffer(mCodec, 2000); in processOneInputBuffer() local 136 if (bufferIndex < 0) in processOneInputBuffer() 141 AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufferSize); in processOneInputBuffer() 149 MEDIA_CALL(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, sampleSize, in processOneInputBuffer()
|
/cts/tests/tests/media/libmediandkjni/ |
D | native-mediadrm-jni.cpp | 426 ssize_t bufferIndex = AMediaCodec_dequeueInputBuffer(codec, 2000); in fillDecoder() local 427 if (bufferIndex >= 0) { in fillDecoder() 429 uint8_t* buf = AMediaCodec_getInputBuffer(codec, bufferIndex, &bufsize); in fillDecoder() 444 codec, bufferIndex, 0, cryptoInfo, in fillDecoder() 450 codec, bufferIndex, 0, sampleSize, in fillDecoder() 462 ssize_t bufferIndex = AMediaCodec_dequeueOutputBuffer(codec, &info, 0); in drainDecoder() local 463 if (bufferIndex >= 0) { in drainDecoder() 477 AMediaCodec_releaseOutputBuffer(codec, bufferIndex, info.size != 0); in drainDecoder() 478 } else if (bufferIndex == AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED) { in drainDecoder() 480 } else if (bufferIndex == AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED) { in drainDecoder() [all …]
|
/cts/tests/video/src/android/video/cts/ |
D | CodecPerformanceTestBase.java | 318 void enqueueDecoderInput(int bufferIndex) { in enqueueDecoderInput() argument 321 ByteBuffer dstBuf = mDecoder.getInputBuffer(bufferIndex); in enqueueDecoderInput() 328 mDecoder.queueInputBuffer(bufferIndex, 0, info.size, info.presentationTimeUs, info.flags); in enqueueDecoderInput() 331 void dequeueDecoderOutput(int bufferIndex, MediaCodec.BufferInfo info, boolean render) { in dequeueDecoderOutput() argument 338 mDecoder.releaseOutputBuffer(bufferIndex, render); in dequeueDecoderOutput()
|
D | CodecEncoderPerformanceTestBase.java | 99 private void dequeueEncoderOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueEncoderOutput() argument 106 mEncoder.releaseOutputBuffer(bufferIndex, false); in dequeueEncoderOutput()
|