[prev in list] [next in list] [prev in thread] [next in thread]
List: helix-client-cvs
Subject: [Client-cvs] encodesvc/engine/encsession settingsadvisor.cpp, 1.81.2.31.4.3, 1.81.2.31.4.4 settingsa
From: gwang () helixcommunity ! org
Date: 2013-09-24 9:01:49
[Download RAW message or body]
Update of /cvsroot/client/encodesvc/engine/encsession
In directory cvs01.internal.helixcommunity.org:/tmp/cvs-serv5403
Modified Files:
Tag: PRODUCER_14_0_9
settingsadvisor.cpp settingsadvisor.h
Log Message:
Synopsis
========
This CR Fix (Helix Producer Linux 64bit version) Crash and encoder loop deadlock.
Support realvideo encoder version 8&910
Branch : PRODUCER_14_0_9
reviewed by: James
My Fix:
1. Fix some bugs will cause producer crahs.
2. Fix Encoder deadloop when resample frame rates.
3. Add linux 64bit version realvideo encoder for
version 8&9&10
Files affected:
===============
/client/encodesvc/common/graphmanager/hxtgraphmanager.cpp
/client/encodesvc/engine/encsession/settingsadvisor.cpp
/client/encodesvc/engine/encsession/settingsadvisor.h
/client_rn/encodesvc/plugins/transform/h263/encfilter/h263filter.cpp
/client_rn/encodesvc/plugins/transform/h264/encfilter/h264filter.cpp
/common/system/platform/unix/UnixThreads.cpp
/common/system/platform/unix/pthreadthreads.cpp
/common/system/platform/unix/solaristhreads.cpp
/common/system/pub/platform/unix/UnixThreads.h
/producerapps_rn/installer/producer/copyfiles_unix.py
/producerapps_rn/installer/producer/make_tempdir
/server-restricted/common/util/platform/intel/cpuid.cpp
/video/colconverter/rgb2yuv.c
Files added:
============
/datatype_rn/rm/video/dll/erv3.x64.so
/datatype_rn/rm/video/dll/erv4.x64.so
Testing Performed:
=================
Unit Tests:
1 No
NOTE:
=================
/producerapps_rn/installer/producer/make_tempdir
These modules which can't complie was just comment.
Leak Tests: None
Performance Tests: N/A
Platforms Tested: linux-2.6-i686
QA Hints
no
Index: settingsadvisor.h
===================================================================
RCS file: /cvsroot/client/encodesvc/engine/encsession/settingsadvisor.h,v
retrieving revision 1.25.2.7
retrieving revision 1.25.2.7.4.1
diff -u -d -r1.25.2.7 -r1.25.2.7.4.1
--- settingsadvisor.h 4 Jul 2013 09:44:54 -0000 1.25.2.7
+++ settingsadvisor.h 24 Sep 2013 09:01:42 -0000 1.25.2.7.4.1
@@ -468,6 +468,15 @@
HX_RESULT ConstructSAString(CHXTMessageEntry* pEntry, const char* \
pszFormat, UINT32 ulNumArgs, CHXString* pArgument, IHXTPropertyBag* pBag, char** \
ppszOut);
HX_RESULT GetVariableArgumentListBuffer(CHXTMessageEntry* pEntry, UINT32 \
ulNumArgs, CHXString* pArgument, IHXTPropertyBag* pBag, HXArgument* \
pHXArgument,
BYTE** ppBuffer, UINT32* \
pulBufferSize, HXBOOL* pbSomeArgsNotFound, CHXString* pArgsNotFound); +#if \
defined(_LONG_IS_64)&&defined(_LINUX) + HX_RESULT \
FormatVariableArgumentList(const char* pszFormat, + CHXTMessageEntry* pEntry, \
+ UINT32 ulNumArgs,
+ CHXString* pArgument,
+ IHXTPropertyBag* pBag,
+ HXArgument* pHXArgument,
+ CHXString& szOutput);
+#endif
HX_RESULT GetArgumentFromBag(const char* pszArgName, HXArgumentType \
eArgType, IHXTPropertyBag* pBag, HXArgument* pArg);
HX_RESULT GetPropertyFromBag(IHXTPropertyBag* pBag, const char* pszName, \
HXArgument* pArg);
HXArgumentType ConvertPropertyBagTypeToHXArgumentType(EHXTTypeId eType);
Index: settingsadvisor.cpp
===================================================================
RCS file: /cvsroot/client/encodesvc/engine/encsession/settingsadvisor.cpp,v
retrieving revision 1.81.2.31.4.3
retrieving revision 1.81.2.31.4.4
diff -u -d -r1.81.2.31.4.3 -r1.81.2.31.4.4
--- settingsadvisor.cpp 10 Sep 2013 08:22:16 -0000 1.81.2.31.4.3
+++ settingsadvisor.cpp 24 Sep 2013 09:01:41 -0000 1.81.2.31.4.4
@@ -2439,20 +2439,22 @@
&ulBufferSize, &bSomeArgsNotFound, &strArgsNotFound);
if (SUCCEEDED(retVal))
{
- // Now assign this buffer to the va_list
#if defined(_LONG_IS_64)&&defined(_LINUX)
- va_list argptr;
- //va_start(argptr,pBuffer);
+ FormatVariableArgumentList((const char*) strFormat,
+ pEntry,
+ ulNumArgs,
+ pArgument,
+ pBag,
+ pHXArgument,
+ strSAString);
#else
+ // Now assign this buffer to the va_list
va_list argptr = (va_list) pBuffer;
-#endif
+
// Do the sprintf formatting
- // strSAString.FormatV((const char*) strFormat, argptr);
- strSAString.Format("Now Just for test \
%s",strFormat.GetBuffer(0));
-#if defined(_LONG_IS_64)&&defined(_LINUX)
- va_end(argptr);
-#endif
+ strSAString.FormatV((const char*) strFormat, argptr);
// Did we have some missing arguments?
+#endif
if (bSomeArgsNotFound)
{
// Append a message saying that we were missing some \
arguments @@ -2664,6 +2666,108 @@
return retVal;
}
+#if defined(_LONG_IS_64)&&defined(_LINUX)
+HX_RESULT CHXTSettingsAdvisor::FormatVariableArgumentList(const char* pszFormat,
+ CHXTMessageEntry* pEntry,
+ UINT32 ulNumArgs,
+ CHXString* pArgument,
+ IHXTPropertyBag* pBag,
+ HXArgument* pHXArgument,
+ CHXString& szOutput)
+{
+ HX_RESULT ret = HXR_OK;
+
+ if( pszFormat && pEntry && ulNumArgs && pArgument && pBag)
+ {
+ UINT32 nFormatLen = strlen(pszFormat);
+ UINT32 nArgument = 0;
+ char* pszBuf = (char*)pszFormat;
+ HXBOOL bFormating = FALSE;
+ CHXString strStore;
+ while (nFormatLen > 0)
+ {
+ if(bFormating)
+ {
+ if(('l' == *pszBuf)||
+ ('s' == *pszBuf)||
+ ('d' == *pszBuf)||
+ ('u' == *pszBuf)||
+ ('f' == *pszBuf)||
+ ('.' == *pszBuf)||
+ (('0' <= *pszBuf)&&
+ ('9' >= *pszBuf)))
+ {
+ strStore += *pszBuf;
+ }
+ else
+ {
+ if((strStore.GetLength() > 1)&&(nArgument < ulNumArgs) && \
SUCCEEDED(ret)) + {
+ CHXString strResult;
+ // get the arguments and format the strings
+ const char* pszArg = (const char*) pArgument[nArgument];
+ // Get the type of the i-th argument
+ HXArgumentType eType = pEntry->FindArgumentType(pszArg);
+ // Get a pointer to the i-th HXArgument in the array
+ HXArgument* pHXArg = &pHXArgument[nArgument];
+ // Get the value from the bag (doing any conversion \
necessary) + ret = GetArgumentFromBag(pszArg, eType, pBag, \
pHXArg); + if( SUCCEEDED(ret) )
+ {
+ switch (pHXArg->m_eType)
+ {
+ case HXArgumentTypeBoolean:
+ \
strResult.Format(strStore.GetBuffer(0),pHXArg->m_Union.m_bValue); + \
break; + case HXArgumentTypeInt:
+ \
strResult.Format(strStore.GetBuffer(0),pHXArg->m_Union.m_lValue); + \
break; + case HXArgumentTypeUnsignedInt:
+ \
strResult.Format(strStore.GetBuffer(0),pHXArg->m_Union.m_ulValue); + \
break; + case HXArgumentTypeInt64:
+ \
strResult.Format(strStore.GetBuffer(0),pHXArg->m_Union.m_llValue); + \
break; + case HXArgumentTypeDouble:
+ \
strResult.Format(strStore.GetBuffer(0),pHXArg->m_Union.m_dValue); + \
break; + case HXArgumentTypeString:
+ \
strResult.Format(strStore.GetBuffer(0),pHXArg->m_Union.m_pszValue); + \
break; + default:
+ ret = HXR_FAIL;
+ break;
+ }
+ }
+ if( SUCCEEDED(ret) )
+ {
+ strStore = strResult;
+ }
+ nArgument++;
+ }
+ szOutput += strStore;
+ szOutput += *pszBuf;
+ bFormating = FALSE;
+ }
+ }
+ else if('%' == *pszBuf)
+ {
+ strStore = "%";
+ bFormating = TRUE;
+ }
+ else
+ {
+ szOutput += *pszBuf;
+ }
+ pszBuf++;
+ nFormatLen--;
+ }
+ }
+
+ return ret;
+}
+#endif
+
HX_RESULT CHXTSettingsAdvisor::GetArgumentFromBag(const char* pszArgName, \
HXArgumentType eArgType, IHXTPropertyBag* pBag, HXArgument* pArg) {
HX_RESULT retVal = HXR_INVALID_PARAMETER;
_______________________________________________
Client-cvs mailing list
Client-cvs@helixcommunity.org
http://lists.helixcommunity.org/mailman/listinfo/client-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic