Lines Matching refs:bufferIndex
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()
246 ALOGV("input: id: %zu size: %zu pts: %d flags: %d", bufferIndex, size, (int)pts, flags); in enqueueDecoderInput()
255 bool CodecEncoderSurfaceTest::dequeueDecoderOutput(size_t bufferIndex, in dequeueDecoderOutput() argument
263 ALOGV("output: id: %zu size: %d pts: %d flags: %d", bufferIndex, bufferInfo->size, in dequeueDecoderOutput()
265 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mDecoder, bufferIndex, mWindow != nullptr), in dequeueDecoderOutput()
270 bool CodecEncoderSurfaceTest::dequeueEncoderOutput(size_t bufferIndex, in dequeueEncoderOutput() argument
277 uint8_t* buf = AMediaCodec_getOutputBuffer(mEncoder, bufferIndex, &buffSize); in dequeueEncoderOutput()
294 ALOGV("output: id: %zu size: %d pts: %d flags: %d", bufferIndex, info->size, in dequeueEncoderOutput()
296 CHECK_STATUS(AMediaCodec_releaseOutputBuffer(mEncoder, bufferIndex, false), in dequeueEncoderOutput()
305 if (element.bufferIndex >= 0) { in tryEncoderOutput()
306 if (!dequeueEncoderOutput(element.bufferIndex, &element.bufferInfo)) return false; in tryEncoderOutput()
344 if (element.bufferIndex >= 0) { in queueEOS()
345 if (!enqueueDecoderEOS(element.bufferIndex)) return false; in queueEOS()
350 int bufferIndex = AMediaCodec_dequeueInputBuffer(mDecoder, -1); in queueEOS() local
351 if (bufferIndex >= 0) { in queueEOS()
352 if (!enqueueDecoderEOS(bufferIndex)) return false; in queueEOS()
355 (int)bufferIndex); in queueEOS()
365 if (element.bufferIndex >= 0) { in queueEOS()
366 if (!dequeueDecoderOutput(element.bufferIndex, &element.bufferInfo)) return false; in queueEOS()
405 if (element.bufferIndex >= 0) { in doWork()
407 if (!enqueueDecoderInput(element.bufferIndex)) return false; in doWork()
410 if (!dequeueDecoderOutput(element.bufferIndex, &element.bufferInfo)) { in doWork()