|
@@ -322,7 +322,7 @@ void SalesRecordServiceSession::Handle_DeleteVideo(SpReqAnsContext<SalesRecorder
|
|
|
void SalesRecordServiceSession::Handle_AppendWatermark(SpReqAnsContext<SalesRecorderSerVice_AppendWatermark_Req, SalesRecorderSerVice_AppendWatermark_Ans>::Pointer ctx)
|
|
|
{
|
|
|
DbgToBeidou(ctx->link, __FUNCTION__)();
|
|
|
- ErrorCodeEnum ErrorCode = m_pEntity->HandleVideoAppendWatermark(CSimpleStringW2A(ctx->Req.VideoName).GetData(), CSimpleStringW2A(ctx->Req.Watermark).GetData());
|
|
|
+ ErrorCodeEnum ErrorCode = m_pEntity->HandleVideoAppendWatermark(CSimpleStringW2A(ctx->Req.VideoName).GetData(), ctx->Req.Watermark.GetData());
|
|
|
ctx->Answer(ErrorCode);
|
|
|
}
|
|
|
|
|
@@ -856,6 +856,7 @@ static unsigned long GetFileSize(const char* filename)
|
|
|
return statbuf.st_size;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
ErrorCodeEnum CSalesRecorderEntity::SaveVideo( const char * videofilename)
|
|
|
{
|
|
|
ErrorCodeEnum ErrorCode = Error_Succeed;
|
|
@@ -932,6 +933,7 @@ ErrorCodeEnum CSalesRecorderEntity::SaveVideo( const char * videofilename)
|
|
|
return ErrorCode;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
CSimpleStringA CSalesRecorderEntity::GetTerminalStage()
|
|
|
{
|
|
|
CSmartPointer<IEntityFunction> Func = GetFunction();
|
|
@@ -955,27 +957,23 @@ void CSalesRecorderEntity::SecureClientRelease()
|
|
|
}
|
|
|
|
|
|
|
|
|
-// 请求InteractiveControl结束录像 add by ly 2018/03/12
|
|
|
ErrorCodeEnum CSalesRecorderEntity::StopRecordVideo()
|
|
|
{
|
|
|
auto rc = Error_Succeed;
|
|
|
|
|
|
auto pUIClient = new InteractiveControl::UIService_ClientBase(this);
|
|
|
|
|
|
- if(pUIClient->Connect() != Error_Succeed)
|
|
|
- {
|
|
|
+ if(pUIClient->Connect() != Error_Succeed){
|
|
|
pUIClient->SafeDelete();
|
|
|
pUIClient = NULL;
|
|
|
rc = Error_DevConnFailed;
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
+ else{
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("UIClient connected success!");
|
|
|
InteractiveControl::UIService_StopRecordVideo_Req req;
|
|
|
InteractiveControl::UIService_StopRecordVideo_Ans ans;
|
|
|
rc = (*pUIClient)(EntityResource::getLink().upgradeLink())->StopRecordVideo(req, ans, 5000);
|
|
|
- if(rc != Error_Succeed)
|
|
|
- {
|
|
|
+ if(rc != Error_Succeed){
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Stop record video failed return 0x%08x", rc);
|
|
|
}
|
|
|
|
|
@@ -1212,24 +1210,15 @@ void CSalesRecorderEntity::HandleReturnMenu()
|
|
|
}
|
|
|
|
|
|
|
|
|
-ErrorCodeEnum CSalesRecorderEntity::HandleVideoAppendWatermark(const char* pszVideoName, const char* pszWaterMark)
|
|
|
+ErrorCodeEnum CSalesRecorderEntity::HandleVideoAppendWatermark(const char* pszVideoName, const wchar_t* pszWaterMark)
|
|
|
{
|
|
|
ErrorCodeEnum Error = Error_Failed;
|
|
|
if (NULL == pszWaterMark){
|
|
|
return Error_Param;
|
|
|
}
|
|
|
|
|
|
- wchar_t* result[10] = { 0 };
|
|
|
- auto arr1 = CSimpleStringA2W(pszWaterMark).Split('|');
|
|
|
- auto arr2 = CAutoArray<CSimpleStringW>(arr1.GetCount());
|
|
|
- int icount = sizeof(result) / sizeof(char*);
|
|
|
- for (int i = 0; i < arr1.GetCount() && i < sizeof(result) / sizeof(char*); i++){
|
|
|
- arr2[i] = CSimpleStringW(arr1[i]);
|
|
|
- result[i] = (wchar_t*)arr2[i].GetData();
|
|
|
- }
|
|
|
-
|
|
|
if (m_bStarted && (NULL != m_pRecorder)){
|
|
|
- if (m_pRecorder->SetRightVideoWaterMark(result[1])) {
|
|
|
+ if (m_pRecorder->SetRightVideoWaterMark(pszWaterMark)) {
|
|
|
Error = Error_Succeed;
|
|
|
}
|
|
|
}
|