# However for debugging with gdb you may want to set PV_OSCL_LIB to
# false to disable this custom loader.
PV_OSCL_LIB := true
- VALUE_ADD := false
ifeq ($(PV_OSCL_LIB), true)
PV_CFLAGS += -DHAS_OSCL_LIB_SUPPORT
+ endif
- alternate_config := $(if $(wildcard vendor/pv/pvplayer.conf),true)
- ifeq ($(alternate_config), true)
- VALUE_ADD := true
- PV_CFLAGS += -DPV_USE_VALUE_ADD=1
- endif
+ # To enable the windows codecs under vendor/pv, define VALUE_ADD to true.
+ # You need HAS_OSCL_LIB_SUPPORT as well for VALUE_ADD modules.
+ VALUE_ADD := true
+ ifeq ($(VALUE_ADD), true)
+ PV_CFLAGS += -DPV_USE_VALUE_ADD=1
endif
- alternate_config :=
PV_COPY_HEADERS_TO := libpv
OMX_OUT OMX_U32 aData2,
OMX_OUT OMX_PTR aEventData)
{
+ LOGD("PVMFOMXVideoEncNode::CallbackEventHandler: event(%d), data1(%ld) and data2(%ld)", aEvent, aData1, aData2);
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, PVLogger::GetLoggerObject("PVMFOMXVideoEncNode"), PVLOGMSG_STACK_TRACE,
(0, "PVMFOMXVideoEncNode::CallbackEventHandler: In"));
PVMFOMXVideoEncNode *Node = (PVMFOMXVideoEncNode *) aAppData;
iOMXVideoEncoder = NULL;
// Current State of the component
- OMX_STATETYPE iCurrentEncoderState = OMX_StateInvalid;
+ iCurrentEncoderState = OMX_StateInvalid;
// Shared pointer for Media Msg.Input buffer
// PVMFSharedMediaDataPtr iDataIn; //Init this value ?
void PVMFOMXVideoEncNode::FlushComplete()
{
LOG_STACK_TRACE((0, "PVMFOMXVideoEncNode::FlushComplete"));
+ bool flushCompleted = (mInputBufferRefCount == 0 &&
+ iCurrentEncoderState == OMX_StateIdle &&
+ (iCurrentCmd.size() > 0 && iCurrentCmd.front().iCmd == PVMF_GENERIC_NODE_FLUSH));
+ if (!flushCompleted) return;
+
uint32 i = 0;
-
// flush completes only when all queues of all ports are clear.
// otherwise, just return from this method and wait for FlushComplete
// from the remaining ports.
}
iCmdQueue.Erase(&aCmd);
iResetInProgress = true;
-
+ PVMFStatus status = PVMFSuccess;
// free input and output buffers
LOG_STACK_TRACE((0,"PVMFOMXVideoEncNode::DoReset(): free output buffers"));
if (iOutputBuffersFreed == false)
))
{
LOG_ERR((0,"PVMFOMXVideoEncNode::DoReset(): cannot free output buffers "));
- CommandComplete(iCurrentCmd, iCurrentCmd.front(), PVMFErrResource);
+ status = PVMFErrResource;
}
}
))
{
LOG_ERR((0,"PVMFOMXVideoEncNode::DoReset(): cannot free input buffers "));
- CommandComplete(iCurrentCmd, iCurrentCmd.front(), PVMFErrResource);
+ status = PVMFErrResource;
}
}
iEndOfDataReached = false;
iIsEOSSentToComponent = false;
iIsEOSReceivedFromComponent = false;
+ if (status != PVMFSuccess)
+ {
+ iResetInProgress = false;
+ CommandComplete(iCurrentCmd, iCurrentCmd.front(), status);
+ }
}
return;
}
break;
}
}
-
- if(iNode->IsFlushPending())
- {
- if(IncomingMsgQueueSize() == 0 && OutgoingMsgQueueSize() == 0)
- iNode->FlushComplete();
- }
}
//Process outgoing messages
iNode->ReportErrorEvent(PVMF_OMX_VIDEOENC_NODE_ERROR_ENCODE_ERROR, (OsclAny*)this);
break;
}
-
- if(iNode->IsFlushPending())
- {
- if(IncomingMsgQueueSize() == 0 && OutgoingMsgQueueSize() == 0)
- iNode->FlushComplete();
- }
}
}
-
- if(iNode->IsFlushPending())
- {
- if(IncomingMsgQueueSize() == 0 && OutgoingMsgQueueSize() == 0)
- iNode->FlushComplete();
- }
}
+
+ if (iNode->IsFlushPending())
+ {
+ if (IncomingMsgQueueSize() == 0 && OutgoingMsgQueueSize() == 0)
+ iNode->FlushComplete();
+ }
}
////////////////////////////////////////////////////////////////////////////