Home | History | Annotate | Download | only in libstagefright

Lines Matching defs:portIndex

618 void OMXCodec::setMinBufferSize(OMX_U32 portIndex, OMX_U32 size) {
621 def.nPortIndex = portIndex;
627 if ((portIndex == kPortIndexInput && (mQuirks & kInputBufferSizesAreBogus))
641 if (portIndex == kPortIndexInput
650 OMX_U32 portIndex,
655 format.nPortIndex = portIndex;
674 CODEC_LOGV("portIndex: %ld, index: %ld, eCompressionFormat=%d eColorFormat=%d",
675 portIndex,
748 OMX_COLOR_FORMATTYPE colorFormat, int portIndex) {
756 portFormat.nPortIndex = portIndex;
1512 status_t OMXCodec::allocateBuffersOnPort(OMX_U32 portIndex) {
1513 if (mNativeWindow != NULL && portIndex == kPortIndexOutput) {
1517 if ((mFlags & kEnableGrallocUsageProtected) && portIndex == kPortIndexOutput) {
1524 && portIndex == kPortIndexInput) {
1534 def.nPortIndex = portIndex;
1545 portIndex == kPortIndexInput ? "input" : "output");
1548 mDealer[portIndex] = new MemoryDealer(totalSize, "OMXCodec");
1551 sp<IMemory> mem = mDealer[portIndex]->allocate(def.nBufferSize);
1559 if (portIndex == kPortIndexInput
1566 mNode, portIndex, def.nBufferSize, &buffer,
1570 mNode, portIndex, mem, &buffer);
1572 } else if (portIndex == kPortIndexOutput
1578 mNode, portIndex, def.nBufferSize, &buffer,
1582 mNode, portIndex, mem, &buffer);
1585 err = mOMX->useBuffer(mNode, portIndex, mem, &buffer);
1602 if (portIndex == kPortIndexOutput) {
1614 mPortBuffers[portIndex].push(info);
1617 portIndex == kPortIndexInput ? "input" : "output");
1620 if (portIndex == kPortIndexOutput) {
1646 // dumpPortStatus(portIndex);
1648 if (portIndex == kPortIndexInput && (mFlags & kUseSecureInputBuffers)) {
2483 portIndex = data;
2484 CODEC_LOGV("PORT_DISABLED(%ld)", portIndex);
2487 CHECK_EQ((int)mPortStatus[portIndex], (int)DISABLING);
2488 CHECK_EQ(mPortBuffers[portIndex].size(), 0u);
2490 mPortStatus[portIndex] = DISABLED;
2493 CHECK_EQ(portIndex, (OMX_U32)kPortIndexOutput);
2506 status_t err = enablePortAsync(portIndex);
2508 CODEC_LOGE("enablePortAsync(%ld) failed (err = %d)", portIndex, err);
2511 err = allocateBuffersOnPort(portIndex);
2515 portIndex == kPortIndexInput
2528 OMX_U32 portIndex = data;
2529 CODEC_LOGV("PORT_ENABLED(%ld)", portIndex);
2532 CHECK_EQ((int)mPortStatus[portIndex], (int)ENABLING);
2534 mPortStatus[portIndex] = ENABLED;
2537 CHECK_EQ(portIndex, (OMX_U32)kPortIndexOutput);
2548 OMX_U32 portIndex = data;
2550 CODEC_LOGV("FLUSH_DONE(%ld)", portIndex);
2552 CHECK_EQ((int)mPortStatus[portIndex], (int)SHUTTING_DOWN);
2553 mPortStatus[portIndex] = ENABLED;
2555 CHECK_EQ(countBuffersWeOwn(mPortBuffers[portIndex]),
2556 mPortBuffers[portIndex].size());
2563 CHECK_EQ(portIndex, (OMX_U32)kPortIndexOutput);
2565 disablePortAsync(portIndex);
2732 OMX_U32 portIndex, bool onlyThoseWeOwn) {
2733 Vector<BufferInfo> *buffers = &mPortBuffers[portIndex];
2747 CODEC_LOGV("freeing buffer %p on port %ld", info->mBuffer, portIndex);
2749 status_t err = freeBuffer(portIndex, i);
2762 status_t OMXCodec::freeBuffer(OMX_U32 portIndex, size_t bufIndex) {
2763 Vector<BufferInfo> *buffers = &mPortBuffers[portIndex];
2767 status_t err = mOMX->freeBuffer(mNode, portIndex, info->mBuffer);
2770 CHECK_EQ(portIndex, (OMX_U32)kPortIndexOutput);
2793 void OMXCodec::onPortSettingsChanged(OMX_U32 portIndex) {
2794 CODEC_LOGV("PORT_SETTINGS_CHANGED(%ld)", portIndex);
2797 CHECK_EQ(portIndex, (OMX_U32)kPortIndexOutput);
2809 if (!flushPortAsync(portIndex)) {
2810 onCmdComplete(OMX_CommandFlush, portIndex);
2813 disablePortAsync(portIndex);
2817 bool OMXCodec::flushPortAsync(OMX_U32 portIndex) {
2822 portIndex, countBuffersWeOwn(mPortBuffers[portIndex]),
2823 mPortBuffers[portIndex].size());
2825 CHECK_EQ((int)mPortStatus[portIndex], (int)ENABLED);
2826 mPortStatus[portIndex] = SHUTTING_DOWN;
2829 && countBuffersWeOwn(mPortBuffers[portIndex])
2830 == mPortBuffers[portIndex].size()) {
2838 mOMX->sendCommand(mNode, OMX_CommandFlush, portIndex);
2844 void OMXCodec::disablePortAsync(OMX_U32 portIndex) {
2847 CHECK_EQ((int)mPortStatus[portIndex], (int)ENABLED);
2848 mPortStatus[portIndex] = DISABLING;
2850 CODEC_LOGV("sending OMX_CommandPortDisable(%ld)", portIndex);
2852 mOMX->sendCommand(mNode, OMX_CommandPortDisable, portIndex);
2855 freeBuffersOnPort(portIndex, true);
2858 status_t OMXCodec::enablePortAsync(OMX_U32 portIndex) {
2861 CHECK_EQ((int)mPortStatus[portIndex], (int)DISABLED);
2862 mPortStatus[portIndex] = ENABLING;
2864 CODEC_LOGV("sending OMX_CommandPortEnable(%ld)", portIndex);
2865 return mOMX->sendCommand(mNode, OMX_CommandPortEnable, portIndex);
3279 OMX_U32 portIndex, int32_t sampleRate, int32_t numChannels) {
3284 def.nPortIndex = portIndex;
3295 pcmParams.nPortIndex = portIndex;
3363 OMX_U32 portIndex = mIsEncoder ? kPortIndexOutput : kPortIndexInput;
3367 def.nPortIndex = portIndex;
4168 void OMXCodec::dumpPortStatus(OMX_U32 portIndex) {
4171 def.nPortIndex = portIndex;
4177 printf("%s Port = {\n", portIndex == kPortIndexInput ? "Input" : "Output");
4179 CHECK((portIndex == kPortIndexInput && def.eDir == OMX_DirInput)
4180 || (portIndex == kPortIndexOutput && def.eDir == OMX_DirOutput));
4237 params.nPortIndex = portIndex;
4256 amr.nPortIndex = portIndex;