// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PV2WAY_ENGINE_SDKINFO_LABEL "1364347"
-#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100407
+#define PV2WAY_ENGINE_SDKINFO_LABEL "1366021"
+#define PV2WAY_ENGINE_SDKINFO_DATE 0x20100408
#endif //PV_2WAY_SDKINFO_H_INCLUDED
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1364347"
-#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100407
+#define PVAUTHOR_ENGINE_SDKINFO_LABEL "1366021"
+#define PVAUTHOR_ENGINE_SDKINFO_DATE 0x20100408
#endif //PV_AUTHOR_SDKINFO_H_INCLUDED
// This header file is automatically generated at build-time
// *** OFFICIAL RELEASE INFO -- Will not auto update
-#define PVPLAYER_ENGINE_SDKINFO_LABEL "1364347"
-#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100407
+#define PVPLAYER_ENGINE_SDKINFO_LABEL "1366021"
+#define PVPLAYER_ENGINE_SDKINFO_DATE 0x20100408
#endif //PV_PLAYER_SDKINFO_H_INCLUDED
return PVMFErrResource;
}
- // send command for port re-enabling (for this to happen, we must first recreate the buffers)
- Err = OMX_SendCommand(iOMXDecoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);
- if (Err != OMX_ErrorNone)
- {
- PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
- (0, "PVMFOMXAudioDecNode::HandlePortReEnable() Port Reconfiguration -> problem sending Port Enable command at port %d", iPortIndexForDynamicReconfig));
-
- SetState(EPVMFNodeError);
- ReportErrorEvent(PVMFErrResource);
- return PVMFErrResource;
- }
-
// get also input info (for frame duration if necessary)
OMX_PTR CodecProfilePtr;
if (iPortIndexForDynamicReconfig == iOutputPortIndex)
{
+ uint32 iBeforeConfigNumOutputBuffers = iNumOutputBuffers;
+
// GET the output buffer params and sizes
OMX_AUDIO_PARAM_PCMMODETYPE Audio_Pcm_Param;
Audio_Pcm_Param.nPortIndex = iOutputPortIndex; // we're looking for output port params
ReportInfoEvent(PVMFPvmiBufferAllocatorNotAcquired);
}
+
+ if (iNumOutputBuffers > iBeforeConfigNumOutputBuffers)
+ {
+ //Reallocate FillBufferDone THREADSAFE CALLBACK AOs in case of port reconfiguration
+ if (iThreadSafeHandlerFillBufferDone)
+ {
+ OSCL_DELETE(iThreadSafeHandlerFillBufferDone);
+ iThreadSafeHandlerFillBufferDone = NULL;
+ }
+ // use the new queue depth of iNumOutputBuffers to prevent deadlock
+ iThreadSafeHandlerFillBufferDone = OSCL_NEW(FillBufferDoneThreadSafeCallbackAO, (this, iNumOutputBuffers, "FillBufferDoneAO", Priority() + 1));
+
+ if (NULL == iThreadSafeHandlerFillBufferDone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXAudioDecNode::HandlePortReEnable() Port Reconfiguration -> Can't reallocate FillBufferDone threadsafe callback queue!"));
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrNoMemory);
+ return false;
+ }
+ }
+
+ // send command for port re-enabling (for this to happen, we must first recreate the buffers)
+ Err = OMX_SendCommand(iOMXDecoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);
+ if (Err != OMX_ErrorNone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXAudioDecNode::HandlePortReEnable() Port Reconfiguration -> problem sending Port Enable command at port %d", iPortIndexForDynamicReconfig));
+
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrResource);
+ return PVMFErrResource;
+ }
+
/* Allocate output buffers */
if (!CreateOutMemPool(iNumOutputBuffers))
{
else
{
// this is input port
+ uint32 iBeforeConfigNumInputBuffers = iNumInputBuffers;
// read the alignment again - just in case
iInputBufferAlignment = iParamPort.nBufferAlignment;
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_STACK_TRACE,
(0, "PVMFOMXAudioDecNode::HandlePortReEnable() new buffers %d, size %d", iNumInputBuffers, iOMXComponentInputBufferSize));
+ if (iNumInputBuffers > iBeforeConfigNumInputBuffers)
+ {
+ //Reallocate EmptyBufferDone THREADSAFE CALLBACK AOs in case of port reconfiguration
+ if (iThreadSafeHandlerEmptyBufferDone)
+ {
+ OSCL_DELETE(iThreadSafeHandlerEmptyBufferDone);
+ iThreadSafeHandlerEmptyBufferDone = NULL;
+ }
+ // use the new queue depth of iNumInputBuffers to prevent deadlock
+ iThreadSafeHandlerEmptyBufferDone = OSCL_NEW(EmptyBufferDoneThreadSafeCallbackAO, (this, iNumInputBuffers, "EmptyBufferDoneAO", Priority() + 1));
+
+ if (NULL == iThreadSafeHandlerEmptyBufferDone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXAudioDecNode::HandlePortReEnable() Port Reconfiguration -> Can't reallocate EmptyBufferDone threadsafe callback queue!"));
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrNoMemory);
+ return false;
+ }
+ }
+
+
+ // send command for port re-enabling (for this to happen, we must first recreate the buffers)
+ Err = OMX_SendCommand(iOMXDecoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);
+ if (Err != OMX_ErrorNone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXAudioDecNode::HandlePortReEnable() Port Reconfiguration -> problem sending Port Enable command at port %d", iPortIndexForDynamicReconfig));
+
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrResource);
+ return PVMFErrResource;
+ }
+
+
/* Allocate input buffers */
if (!CreateInputMemPool(iNumInputBuffers))
{
// is this output port?
if (iPortIndexForDynamicReconfig == iOutputPortIndex)
{
+ uint32 iBeforeConfigNumOutputBuffers = iNumOutputBuffers;
+
// check the new buffer size
iOMXComponentOutputBufferSize = iParamPort.nBufferSize;
return PVMFFailure;
}
+ if (iNumOutputBuffers > iBeforeConfigNumOutputBuffers)
+ {
+ //Reallocate FillBufferDone THREADSAFE CALLBACK AOs in case of port reconfiguration
+ if (iThreadSafeHandlerFillBufferDone)
+ {
+ OSCL_DELETE(iThreadSafeHandlerFillBufferDone);
+ iThreadSafeHandlerFillBufferDone = NULL;
+ }
+ // use the new queue depth of iNumOutputBuffers to prevent deadlock
+ iThreadSafeHandlerFillBufferDone = OSCL_NEW(FillBufferDoneThreadSafeCallbackAOEnc, (this, iNumOutputBuffers, "FillBufferDoneAO", Priority() + 1));
+
+ if (NULL == iThreadSafeHandlerFillBufferDone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXEncNode-%s::HandleProcessingState() Port Reconfiguration ->Can't reallocate FillBufferDone threadsafe callback queue!", iNodeTypeId));
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrNoMemory);
+ return false;
+ }
+ }
+
// send command for port re-enabling (for this to happen, we must first recreate the buffers)
Err = OMX_SendCommand(iOMXEncoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);
if (OMX_ErrorNone != Err)
{
// this is input port
+ uint32 iBeforeConfigNumInputBuffers = iNumInputBuffers;
+
// read the input port buffer alignment requirement
iInputBufferAlignment = iParamPort.nBufferAlignment;
iOMXComponentInputBufferSize = iParamPort.nBufferSize;
return PVMFFailure;
}
+ if (iNumInputBuffers > iBeforeConfigNumInputBuffers)
+ {
+ //Reallocate EmptyBufferDone THREADSAFE CALLBACK AOs in case of port reconfiguration
+ if (iThreadSafeHandlerEmptyBufferDone)
+ {
+ OSCL_DELETE(iThreadSafeHandlerEmptyBufferDone);
+ iThreadSafeHandlerEmptyBufferDone = NULL;
+ }
+ // use the new queue depth of iNumInputBuffers to prevent deadlock
+ iThreadSafeHandlerEmptyBufferDone = OSCL_NEW(EmptyBufferDoneThreadSafeCallbackAOEnc, (this, iNumInputBuffers, "EmptyBufferDoneAO", Priority() + 1));
+
+ if (NULL == iThreadSafeHandlerEmptyBufferDone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXEncNode-%s::HandleProcessingState() Port Reconfiguration -> Can't reallocate EmptyBufferDone threadsafe callback queue!", iNodeTypeId));
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrNoMemory);
+ return false;
+ }
+ }
+
// send command for port re-enabling (for this to happen, we must first recreate the buffers)
Err = OMX_SendCommand(iOMXEncoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);
if (OMX_ErrorNone != Err)
// is this output port?
if (iPortIndexForDynamicReconfig == iOutputPortIndex)
{
+ uint32 iBeforeConfigNumOutputBuffers = iNumOutputBuffers;
// read the alignment
iOutputBufferAlignment = iParamPort.nBufferAlignment;
}
+
+ if (iNumOutputBuffers > iBeforeConfigNumOutputBuffers)
+ {
+ //Reallocate FillBufferDone THREADSAFE CALLBACK AOs in case of port reconfiguration
+ if (iThreadSafeHandlerFillBufferDone)
+ {
+ OSCL_DELETE(iThreadSafeHandlerFillBufferDone);
+ iThreadSafeHandlerFillBufferDone = NULL;
+ }
+ // use the new queue depth of iNumOutputBuffers to prevent deadlock
+ iThreadSafeHandlerFillBufferDone = OSCL_NEW(FillBufferDoneThreadSafeCallbackAO, (this, iNumOutputBuffers, "FillBufferDoneAO", Priority() + 1));
+
+ if (NULL == iThreadSafeHandlerFillBufferDone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXVideoDecNode::HandlePortReEnable() Can't reallocate FillBufferDone threadsafe callback queue!"));
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrNoMemory);
+ return false;
+ }
+ }
+
// it is now safe to send command for port reenable
// send command for port re-enabling (for this to happen, we must first recreate the buffers)
Err = OMX_SendCommand(iOMXDecoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);
}
else
{
+ uint32 iBeforeConfigNumInputBuffers = iNumInputBuffers;
+
// read the alignment
iInputBufferAlignment = iParamPort.nBufferAlignment;
ReportErrorEvent(PVMFErrNoMemory);
return false;
}
+
+ if (iNumInputBuffers > iBeforeConfigNumInputBuffers)
+ {
+ //Reallocate EmptyBufferDone THREADSAFE CALLBACK AOs in case of port reconfiguration
+ if (iThreadSafeHandlerEmptyBufferDone)
+ {
+ OSCL_DELETE(iThreadSafeHandlerEmptyBufferDone);
+ iThreadSafeHandlerEmptyBufferDone = NULL;
+ }
+ // use the new queue depth of iNumInputBuffers to prevent deadlock
+ iThreadSafeHandlerEmptyBufferDone = OSCL_NEW(EmptyBufferDoneThreadSafeCallbackAO, (this, iNumInputBuffers, "EmptyBufferDoneAO", Priority() + 1));
+
+ if (NULL == iThreadSafeHandlerEmptyBufferDone)
+ {
+ PVLOGGER_LOGMSG(PVLOGMSG_INST_HLDBG, iLogger, PVLOGMSG_ERR,
+ (0, "PVMFOMXVideoDecNode::HandlePortReEnable() Can't reallocate EmptyBufferDone threadsafe callback queue!"));
+ SetState(EPVMFNodeError);
+ ReportErrorEvent(PVMFErrNoMemory);
+ return false;
+ }
+ }
+
// it is now safe to send command for port reenable
// send command for port re-enabling (for this to happen, we must first recreate the buffers)
Err = OMX_SendCommand(iOMXDecoder, OMX_CommandPortEnable, iPortIndexForDynamicReconfig, NULL);