aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJianhong Jiang <jianhong@google.com>2009-09-30 17:52:52 -0700
committerJianhong Jiang <jianhong@google.com>2009-09-30 17:58:44 -0700
commit64584c4692f71eefcebf6c4ec44fef596ffc333d (patch)
tree5a3c192e64640cd489c80452ec3048cfb4455514
parent4e940ba6ecc880296b306d738530cafd046fe6de (diff)
downloadopencore-64584c4692f71eefcebf6c4ec44fef596ffc333d.tar.gz
Better error reporting in case of recording failure.
-rw-r--r--android/author/authordriver.cpp7
-rw-r--r--engines/author/src/pvauthorengine.cpp8
-rw-r--r--engines/author/src/pvauthorengine.h2
-rw-r--r--nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp5
4 files changed, 19 insertions, 3 deletions
diff --git a/android/author/authordriver.cpp b/android/author/authordriver.cpp
index 80bf6078f..7aada711a 100644
--- a/android/author/authordriver.cpp
+++ b/android/author/authordriver.cpp
@@ -1413,7 +1413,12 @@ void AuthorDriver::CommandCompleted(const PVCmdResponse& aResponse)
switch(s) {
case PVMFSuccess: s = android::OK; break;
case PVMFPending: *(char *)0 = 0; break; /* XXX assert */
- default: s = android::UNKNOWN_ERROR;
+ default:
+ LOGE("Command %d completed with error %d",ac->which, s);
+ // s = android::UNKNOWN_ERROR;
+ // FIXME: Similar to mediaplayer, set the return status to
+ // something android specific. For now, use PVMF
+ // return codes as is.
}
// Call the user's requested completion function
diff --git a/engines/author/src/pvauthorengine.cpp b/engines/author/src/pvauthorengine.cpp
index 9303a4e4d..e949107d0 100644
--- a/engines/author/src/pvauthorengine.cpp
+++ b/engines/author/src/pvauthorengine.cpp
@@ -102,6 +102,7 @@ PVAuthorEngine::PVAuthorEngine() :
{
iLogger = PVLogger::GetLoggerObject("PVAuthorEngine");
iDoResetNodeContainers = false;
+ lastNodeCommandError = PVMFFailure;
}
////////////////////////////////////////////////////////////////////////////
@@ -567,7 +568,10 @@ void PVAuthorEngine::NodeUtilCommandCompleted(const PVMFCmdResp& aResponse)
return;
}
else
+ {
+ lastNodeCommandError = aResponse.GetCmdStatus();
SetPVAEState(PVAE_STATE_ERROR);
+ }
}
//RESET needs to be handled seperately, if the EngineState is ERROR, ignore all cmds till
//there are more pending commands, else send out commandComplete Failure
@@ -579,7 +583,7 @@ void PVAuthorEngine::NodeUtilCommandCompleted(const PVMFCmdResp& aResponse)
}
else
{
- CompleteEngineCommand(cmd, PVMFFailure); //Send Failure to this command, engine is in error state
+ CompleteEngineCommand(cmd, lastNodeCommandError); //Send Failure to this command, engine is in error state
return;
}
}
@@ -693,7 +697,7 @@ void PVAuthorEngine::NodeUtilCommandCompleted(const PVMFCmdResp& aResponse)
{
if (iState == PVAE_STATE_ERROR)
{
- CompleteEngineCommand(cmd, PVMFFailure);
+ CompleteEngineCommand(cmd, status);
}
else
{
diff --git a/engines/author/src/pvauthorengine.h b/engines/author/src/pvauthorengine.h
index 46b5c0345..ffbcc0665 100644
--- a/engines/author/src/pvauthorengine.h
+++ b/engines/author/src/pvauthorengine.h
@@ -388,6 +388,8 @@ class PVAuthorEngine : public PVAuthorEngineInterface,
PVMFTimebase_Tickcount iAuthorClockTimebase;
PVMFMediaClock iAuthorClock;
PVMFStatus SendAuthoringClockToDataSources(bool aReset = false);
+
+ PVMFStatus lastNodeCommandError;
};
diff --git a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
index f266a00bc..023f8fecd 100644
--- a/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
+++ b/nodes/pvomxencnode/src/pvmf_omx_enc_node.cpp
@@ -52,6 +52,9 @@
#define PVOMXENC_MEDIADATA_POOLNUM (PVOMXENCMAXNUMDPBFRAMESPLUS1 + PVOMXENC_EXTRA_YUVBUFFER_POOLNUM)
#define PVOMXENC_MEDIADATA_CHUNKSIZE 128
+#include "utils/Log.h"
+#undef LOG_TAG
+#define LOG_TAG "PVOMXEncNode"
const uint32 DEFAULT_VOL_HEADER_LENGTH = 28;
const uint8 DEFAULT_VOL_HEADER[DEFAULT_VOL_HEADER_LENGTH] =
@@ -5739,6 +5742,7 @@ void PVMFOMXEncNode::DoPrepare(PVMFOMXEncNodeCommand& aCmd)
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
(0, "PVMFOMXEncNode-%s::DoPrepare(): Got Component %s handle ", iNodeTypeId, CompOfRole[ii]));
+ LOGE("PVMFOMXEncNode-%s::DoPrepare(): Got Component %s handle ", iNodeTypeId, CompOfRole[ii]);
break;
}
@@ -5746,6 +5750,7 @@ void PVMFOMXEncNode::DoPrepare(PVMFOMXEncNodeCommand& aCmd)
{
PVLOGGER_LOGMSG(PVLOGMSG_INST_LLDBG, iLogger, PVLOGMSG_DEBUG,
(0, "PVMFOMXEncNode-%s::DoPrepare(): Cannot get component %s handle, try another component if available", iNodeTypeId, CompOfRole[ii]));
+ LOGE("PVMFOMXEncNode-%s::DoPrepare(): Cannot get component %s handle, try another component if available", iNodeTypeId, CompOfRole[ii]);
}
}