/cts/tests/media/jni/ |
D | NativeCodecEncoderSurfaceTest.cpp | 65 bool enqueueDecoderInput(size_t bufferIndex); 66 bool dequeueDecoderOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo); 67 bool dequeueEncoderOutput(size_t bufferIndex, AMediaCodecBufferInfo* info); 71 bool enqueueDecoderEOS(size_t bufferIndex); 208 bool CodecEncoderSurfaceTest::enqueueDecoderEOS(size_t bufferIndex) { in enqueueDecoderEOS() argument 210 CHECK_STATUS(AMediaCodec_queueInputBuffer(mDecoder, bufferIndex, 0, 0, 0, in enqueueDecoderEOS() 219 bool CodecEncoderSurfaceTest::enqueueDecoderInput(size_t bufferIndex) { in enqueueDecoderInput() argument 221 return enqueueDecoderEOS(bufferIndex); in enqueueDecoderInput() 225 uint8_t* buf = AMediaCodec_getInputBuffer(mDecoder, bufferIndex, &bufSize); in enqueueDecoderInput() 244 CHECK_STATUS(AMediaCodec_queueInputBuffer(mDecoder, bufferIndex, 0, size, pts, flags), in enqueueDecoderInput() [all …]
|
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() 846 int bufferIndex = 0; in testGetOutputBufferInRunningState() local [all …]
|
D | NativeCodecDecoderTest.cpp | 48 bool enqueueInput(size_t bufferIndex) override; 49 bool dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo) override; 51 bool enqueueCodecConfig(int32_t bufferIndex); 162 bool CodecDecoderTest::enqueueCodecConfig(int32_t bufferIndex) { in enqueueCodecConfig() argument 164 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueCodecConfig() 177 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, csdSize, 0, flags), in enqueueCodecConfig() 182 bool CodecDecoderTest::enqueueInput(size_t bufferIndex) { in enqueueInput() argument 184 return enqueueEOS(bufferIndex); in enqueueInput() 188 uint8_t* buf = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &bufSize); in enqueueInput() 207 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, size, pts, flags), in enqueueInput() [all …]
|
D | NativeCodecTestBase.h | 45 int32_t bufferIndex; member 49 : bufferInfo{*info}, bufferIndex{index}, isInput{false} {} in callbackObject() 51 callbackObject(int32_t index) : bufferIndex{index}, isInput{true} {} in callbackObject() 53 callbackObject() : bufferIndex{-1}, isInput{false} {} in callbackObject() 153 virtual bool enqueueInput(size_t bufferIndex) = 0; 154 virtual bool dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo) = 0; 155 bool enqueueEOS(size_t bufferIndex);
|
D | NativeCodecTestBase.cpp | 412 bool CodecTestBase::enqueueEOS(size_t bufferIndex) { in enqueueEOS() argument 414 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, 0, 0, in enqueueEOS() 430 if (element.bufferIndex >= 0) { in doWork() 432 isOk = enqueueInput(element.bufferIndex); in doWork() 435 isOk = dequeueOutput(element.bufferIndex, &element.bufferInfo); in doWork() 478 if (element.bufferIndex >= 0) { in queueEOS() 479 isOk = enqueueEOS(element.bufferIndex); in queueEOS() 484 int bufferIndex = AMediaCodec_dequeueInputBuffer(mCodec, -1); in queueEOS() local 485 if (bufferIndex >= 0) { in queueEOS() 486 isOk = enqueueEOS(bufferIndex); in queueEOS() [all …]
|
D | NativeCodecEncoderTest.cpp | 60 bool enqueueInput(size_t bufferIndex) override; 61 bool dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* bufferInfo) override; 263 bool CodecEncoderTest::enqueueInput(size_t bufferIndex) { in enqueueInput() argument 265 return enqueueEOS(bufferIndex); in enqueueInput() 271 uint8_t* inputBuffer = AMediaCodec_getInputBuffer(mCodec, bufferIndex, &buffSize); in enqueueInput() 304 CHECK_STATUS(AMediaCodec_queueInputBuffer(mCodec, bufferIndex, 0, size, pts, flags), in enqueueInput() 306 ALOGV("input: id: %zu size: %d pts: %d flags: %d", bufferIndex, size, (int)pts, flags); in enqueueInput() 313 bool CodecEncoderTest::dequeueOutput(size_t bufferIndex, AMediaCodecBufferInfo* info) { in dequeueOutput() argument 320 uint8_t* buf = AMediaCodec_getOutputBuffer(mCodec, bufferIndex, &buffSize); in dequeueOutput() 332 ALOGV("output: id: %zu size: %d pts: %d flags: %d", bufferIndex, info->size, in dequeueOutput() [all …]
|
/cts/tests/media/src/android/mediav2/cts/ |
D | CodecTestBase.java | 92 public void onInputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex) { in onInputBufferAvailable() argument 93 assertTrue(bufferIndex >= 0); in onInputBufferAvailable() 95 mCbInputQueue.add(new Pair<>(bufferIndex, (MediaCodec.BufferInfo) null)); in onInputBufferAvailable() 101 public void onOutputBufferAvailable(@NonNull MediaCodec codec, int bufferIndex, in onOutputBufferAvailable() argument 103 assertTrue(bufferIndex >= 0); in onOutputBufferAvailable() 105 mCbOutputQueue.add(new Pair<>(bufferIndex, info)); in onOutputBufferAvailable() 591 abstract void enqueueInput(int bufferIndex) throws IOException; in enqueueInput() argument 593 abstract void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info); in dequeueOutput() argument 647 void enqueueEOS(int bufferIndex) { in enqueueEOS() argument 649 mCodec.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueEOS() [all …]
|
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 | 224 private void enqueueDecoderEOS(int bufferIndex) { in enqueueDecoderEOS() argument 226 mDecoder.queueInputBuffer(bufferIndex, 0, 0, 0, MediaCodec.BUFFER_FLAG_END_OF_STREAM); in enqueueDecoderEOS() 234 private void enqueueDecoderInput(int bufferIndex) { in enqueueDecoderInput() argument 236 enqueueDecoderEOS(bufferIndex); in enqueueDecoderInput() 238 ByteBuffer inputBuffer = mDecoder.getInputBuffer(bufferIndex); in enqueueDecoderInput() 255 Log.v(LOG_TAG, "input: id: " + bufferIndex + " size: " + size + " pts: " + pts + in enqueueDecoderInput() 258 mDecoder.queueInputBuffer(bufferIndex, 0, size, pts, codecFlags); in enqueueDecoderInput() 267 private void dequeueDecoderOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueDecoderOutput() argument 272 Log.v(LOG_TAG, "output: id: " + bufferIndex + " flags: " + info.flags + " size: " + in dequeueDecoderOutput() 278 mDecoder.releaseOutputBuffer(bufferIndex, mSurface != null); in dequeueDecoderOutput() [all …]
|
D | EncoderColorAspectsTest.java | 91 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 93 ByteBuffer buf = mCodec.getOutputBuffer(bufferIndex); in dequeueOutput() 106 super.dequeueOutput(bufferIndex, info); in dequeueOutput()
|
D | CodecDecoderSurfaceTest.java | 81 void dequeueOutput(int bufferIndex, MediaCodec.BufferInfo info) { in dequeueOutput() argument 86 Log.v(LOG_TAG, "output: id: " + bufferIndex + " flags: " + info.flags + " size: " + in dequeueOutput() 93 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 | 252 MediaSync sync, ByteBuffer byteBuffer, int bufferIndex) { in runCheckAudioBuffer() 255 decoderAudio.checkReturnedAudioBuffer(byteBuffer, bufferIndex); in runCheckAudioBuffer() 256 decoderAudio.releaseOutputBuffer(bufferIndex, NO_TIMESTAMP); in runCheckAudioBuffer() 311 MediaSync sync, ByteBuffer byteBuffer, int bufferIndex) { in runFlush() 314 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 | EncodeVirtualDisplayWithCompositionTest.java | 398 int bufferIndex = mDecoder.dequeueOutputBuffer(info, DEFAULT_WAIT_TIMEOUT_US); in renderColorAndCheckResult() local 400 Log.i(TAG, "decoder dequeueOutputBuffer returned " + bufferIndex); in renderColorAndCheckResult() 402 if (bufferIndex < 0) { in renderColorAndCheckResult() 405 mDecoder.releaseOutputBuffer(bufferIndex, true); in renderColorAndCheckResult() 424 int bufferIndex = mDecoder.dequeueOutputBuffer(info, DEFAULT_WAIT_TIMEOUT_US); in renderRotationAndCheckResult() local 426 Log.i(TAG, "decoder dequeueOutputBuffer returned " + bufferIndex); in renderRotationAndCheckResult() 428 if (bufferIndex < 0) { in renderRotationAndCheckResult() 431 mDecoder.releaseOutputBuffer(bufferIndex, true); in renderRotationAndCheckResult()
|
D | MediaCodecTest.java | 1163 int bufferIndex = mediaCodec.dequeueInputBuffer(TIME_OUT_US /* timeoutUs */); in runDecodeTillFirstOutput() local 1164 if (bufferIndex != -1) { in runDecodeTillFirstOutput() 1165 ByteBuffer buffer = mediaCodec.getInputBuffer(bufferIndex); in runDecodeTillFirstOutput() 1170 mediaCodec.queueInputBuffer(bufferIndex, in runDecodeTillFirstOutput() 1270 int bufferIndex = mediaCodec.dequeueInputBuffer(0); in runDecodeShortInput() local 1271 if (bufferIndex != NO_BUFFER_INDEX) { in runDecodeShortInput() 1272 ByteBuffer buffer = mediaCodec.getInputBuffers()[bufferIndex]; in runDecodeShortInput() 1278 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 | 389 ssize_t bufferIndex = AMediaCodec_dequeueInputBuffer(codec, 2000); in fillDecoder() local 390 if (bufferIndex >= 0) { in fillDecoder() 392 uint8_t* buf = AMediaCodec_getInputBuffer(codec, bufferIndex, &bufsize); in fillDecoder() 407 codec, bufferIndex, 0, cryptoInfo, in fillDecoder() 413 codec, bufferIndex, 0, sampleSize, in fillDecoder() 425 ssize_t bufferIndex = AMediaCodec_dequeueOutputBuffer(codec, &info, 0); in drainDecoder() local 426 if (bufferIndex >= 0) { in drainDecoder() 440 AMediaCodec_releaseOutputBuffer(codec, bufferIndex, info.size != 0); in drainDecoder() 441 } else if (bufferIndex == AMEDIACODEC_INFO_OUTPUT_BUFFERS_CHANGED) { in drainDecoder() 443 } else if (bufferIndex == AMEDIACODEC_INFO_OUTPUT_FORMAT_CHANGED) { in drainDecoder() [all …]
|