فهرست منبع

Z991239-3451 #comment 增加视频提示接口

80274480 3 سال پیش
والد
کامیت
8a31120a90

+ 8 - 4
Module/include/EventCode.h

@@ -631,10 +631,14 @@ ERROR_ACCESSAUTH_CONNECT_ACS}
 #define LOG_EVT_UI_STOPRECORDPREVIEW				0x30B00A02				//停止录像预览
 #define LOG_EVT_UI_STARTAFTERPREVIEWRECORD			0x30B00A03				//开始预览后录像
 #define LOG_EVT_UI_ADJUSTVIDEOECHOSIZE				0x30B00A04				//调整视频回显框大小
-
-#define LOG_EVT_OPEN_ADV_FROM_LOCAL_CONFIG	0x30B00B01		     //通过本地配置要求打开广告播放
-#define LOG_EVT_FORBIDDIEN_ADV_FROM_LOCAL_CONFIG	0x30B00B02 //通过本地配置要求关闭广告播放
-
+#define LOG_EVT_LOCALMEDIAPLAYER_LOST				0x30B00B01				//本地媒体播放lost
+#define LOG_EVT_OPEN_ADV_FROM_LOCAL_CONFIG			0x30B00B02		     	//通过本地配置要求打开广告播放
+#define LOG_EVT_FORBIDDIEN_ADV_FROM_LOCAL_CONFIG	0x30B00B03 				//通过本地配置要求关闭广告播放
+
+#define LOG_EVT_START_REMOTERECORD_SUCCESS			0x30B10001				//启动远程双录成功
+#define LOG_EVT_START_REMOTERECORD_FAILED			0x30B10002				//启动远程双录失败
+#define LOG_EVT_STOP_REMOTERECORD_SUCCESS			0x30B10003				//停止远程录像成功
+#define LOG_EVT_STOP_REMOTERECORD_FAILED			0x30B10004				//停止远程录像失败
 
 /*----End--InteractiveControl------------------------------*/
 #define IDCertificate_Public_Start                  	0x20190000

+ 24 - 0
Module/mod_interactivecontrol/InteractiveControl.xml

@@ -380,6 +380,30 @@
 			</res>
 		</twoway>
 		
+		<!-- ²¥·Å²úÆ·Ìáʾ -->
+		<twoway name="StartPlayNotice" overlap="true">
+			<req>
+				<param name="CfgInx" type="int"/>
+				<param name="WndX" type="int"/>
+				<param name="WndY" type="int"/>
+				<param name="WndWidth" type="int"/>
+				<param name="WndHeight" type="int"/>
+				<param name="VideoName" type="wstring"/>
+			</req>
+			<res>
+				<param name="ErrorCode" type="uint"/>
+				<param name="ErrorMsg" type="wstring"/>
+			</res>
+		</twoway>
+		<twoway name="StopPlayNotice" overlap="true">
+			<req>
+				<param name="CfgInx" type="int"/>
+			</req>
+			<res>
+				<param name="ErrorCode" type="uint"/>
+				<param name="ErrorMsg" type="wstring"/>
+			</res>
+		</twoway>
 	</class>
 	
 

+ 58 - 0
Module/mod_interactivecontrol/InteractiveControl_client_g.h

@@ -1172,6 +1172,64 @@ public:
 		return Error;
 	}
 
+	ErrorCodeEnum StartPlayNotice(UIService_StartPlayNotice_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(UIService_Method_StartPlayNotice, UIService_MethodSignature_StartPlayNotice, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum StartPlayNotice(UIService_StartPlayNotice_Req &Req, UIService_StartPlayNotice_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StartPlayNotice(UIService_StartPlayNotice_Req &Req, UIService_StartPlayNotice_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum StopPlayNotice(UIService_StopPlayNotice_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(UIService_Method_StopPlayNotice, UIService_MethodSignature_StopPlayNotice, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum StopPlayNotice(UIService_StopPlayNotice_Req &Req, UIService_StopPlayNotice_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StopPlayNotice(UIService_StopPlayNotice_Req &Req, UIService_StopPlayNotice_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
 
 	bool SafeDelete()
 	{

+ 55 - 0
Module/mod_interactivecontrol/InteractiveControl_def_g.h

@@ -69,6 +69,8 @@ namespace InteractiveControl {
 #define UIService_Method_SetHandfreeOutVolume 47
 #define UIService_Method_GetPickupOutVolume 48
 #define UIService_Method_SetPickupOutVolume 49
+#define UIService_Method_StartPlayNotice 50
+#define UIService_Method_StopPlayNotice 51
 
 #define UIService_MethodSignature_SetUIState -649355360
 #define UIService_MethodSignature_SendAgentText -389826246
@@ -120,6 +122,8 @@ namespace InteractiveControl {
 #define UIService_MethodSignature_SetHandfreeOutVolume 2042464727
 #define UIService_MethodSignature_GetPickupOutVolume 1201465844
 #define UIService_MethodSignature_SetPickupOutVolume -1088342808
+#define UIService_MethodSignature_StartPlayNotice -1901549012
+#define UIService_MethodSignature_StopPlayNotice -1978922649
 
 struct UIService_SetUIState_Info
 {
@@ -1029,6 +1033,57 @@ struct UIService_SetPickupOutVolume_Ans
 
 };
 
+struct UIService_StartPlayNotice_Req
+{
+	int CfgInx;
+	int WndX;
+	int WndY;
+	int WndWidth;
+	int WndHeight;
+	CSimpleStringW VideoName;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & CfgInx & WndX & WndY & WndWidth & WndHeight & VideoName;
+	}
+
+};
+
+struct UIService_StartPlayNotice_Ans
+{
+	unsigned int ErrorCode;
+	CSimpleStringW ErrorMsg;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ErrorCode & ErrorMsg;
+	}
+
+};
+
+struct UIService_StopPlayNotice_Req
+{
+	int CfgInx;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & CfgInx;
+	}
+
+};
+
+struct UIService_StopPlayNotice_Ans
+{
+	unsigned int ErrorCode;
+	CSimpleStringW ErrorMsg;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ErrorCode & ErrorMsg;
+	}
+
+};
+
 
 ///////////////////////////
 

+ 50 - 0
Module/mod_interactivecontrol/InteractiveControl_server_g.h

@@ -380,6 +380,20 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
+		case UIService_Method_StartPlayNotice:
+			if (dwSignature == UIService_MethodSignature_StartPlayNotice) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case UIService_Method_StopPlayNotice:
+			if (dwSignature == UIService_MethodSignature_StopPlayNotice) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
 		default:
 			Error = Error_MethodNotFound;
 			break;
@@ -641,6 +655,16 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
+		case UIService_Method_StartPlayNotice:
+			if (dwSignature != UIService_MethodSignature_StartPlayNotice) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case UIService_Method_StopPlayNotice:
+			if (dwSignature != UIService_MethodSignature_StopPlayNotice) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
 		default:
 			Error = Error_MethodNotFound;
 			break;
@@ -898,6 +922,16 @@ public:
 	/// override by user
 	}
 
+	virtual void Handle_StartPlayNotice(SpReqAnsContext<UIService_StartPlayNotice_Req, UIService_StartPlayNotice_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_StopPlayNotice(SpReqAnsContext<UIService_StopPlayNotice_Req, UIService_StopPlayNotice_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
 	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
 	{
 		CAutoBuffer Buf;
@@ -1314,6 +1348,22 @@ public:
 						Handle_SetPickupOutVolume(ctx);
 					}
 					break;
+				case UIService_Method_StartPlayNotice:
+					{
+						SpReqAnsContext<UIService_StartPlayNotice_Req,UIService_StartPlayNotice_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<UIService_StartPlayNotice_Req,UIService_StartPlayNotice_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_StartPlayNotice(ctx);
+					}
+					break;
+				case UIService_Method_StopPlayNotice:
+					{
+						SpReqAnsContext<UIService_StopPlayNotice_Req,UIService_StopPlayNotice_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<UIService_StopPlayNotice_Req,UIService_StopPlayNotice_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_StopPlayNotice(ctx);
+					}
+					break;
 				default:
 					assert(0);
 					break;

+ 155 - 10
Module/mod_interactivecontrol/mod_interactivecontrol.cpp

@@ -181,6 +181,8 @@ public:
 	virtual void Handle_SetHandfreeOutVolume(SpReqAnsContext<UIService_SetHandfreeOutVolume_Req, UIService_SetHandfreeOutVolume_Ans>::Pointer ctx);
 	virtual void Handle_GetPickupOutVolume(SpReqAnsContext<UIService_GetPickupOutVolume_Req, UIService_GetPickupOutVolume_Ans>::Pointer ctx);
 	virtual void Handle_SetPickupOutVolume(SpReqAnsContext<UIService_SetPickupOutVolume_Req, UIService_SetPickupOutVolume_Ans>::Pointer ctx);
+	virtual void Handle_StartPlayNotice(SpReqAnsContext<UIService_StartPlayNotice_Req, UIService_StartPlayNotice_Ans>::Pointer ctx);
+	virtual void Handle_StopPlayNotice(SpReqAnsContext<UIService_StopPlayNotice_Req, UIService_StopPlayNotice_Ans>::Pointer ctx);
 
 private:
 	CITCtrlEntity *m_pEntity;
@@ -1151,6 +1153,19 @@ public:
 			return error;
 		}
 	}
+	
+	ErrorCodeEnum StartPlayNotice(int nCfgInx, int nWndX, int nWndY, int nWndWidth, int nWndHeight, CSimpleStringW VideoName, DWORD dwTimeout)
+	{
+		PlayService_StartPlayNotice_Req Req;
+		Req.CfgInx = nCfgInx;
+		Req.WndX = nWndX;
+		Req.WndY = nWndY;
+		Req.WndWidth = nWndWidth;
+		Req.WndHeight = nWndHeight;
+		Req.VideoName = VideoName;
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		return m_pPlayClient->StartPlayNotice(Req, spAsyncWait, dwTimeout);
+	}
 
 	ErrorCodeEnum StartPlayAudio(CSimpleStringW AudioNames, DWORD dwTimeout)
 	{
@@ -1212,6 +1227,14 @@ public:
 			return error;
 		}
 	}
+	
+	ErrorCodeEnum StopPlayNotice(int nCfgInx, DWORD dwTimeout)
+	{
+		PlayService_StopPlayNotice_Req Req;
+		Req.CfgInx = nCfgInx;
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		return m_pPlayClient->StopPlayNotice(Req, spAsyncWait, dwTimeout);
+	}
 
 	ErrorCodeEnum StopPlayAudio(DWORD dwTimeout)
 	{
@@ -1825,6 +1848,49 @@ public:
 		return eState;
 	}
 
+	CSimpleStringA EncryptString(LPCTSTR lpszText)
+	{
+		int	iEncrypt=0;
+		int len = strlen(lpszText);
+		CSimpleStringA csEncrypted('\0', len*2+1);
+		for(int i=0; i<len; ++i) {
+			sprintf(&csEncrypted[i*2],"%02X", (int)((lpszText[i]) ^ (128 | (iEncrypt++ & 127))));
+		}
+		return CSimpleStringA((LPCTSTR)csEncrypted);
+	}
+
+
+	//隐藏录像文件信息中的卡号信息
+	CSimpleStringA EncryptVideoNameCarNumber(CSimpleStringA StrVideoName)
+	{
+		CSimpleStringA StrVideoInfo;
+
+		char *result[16] = {0};
+		auto arr1 = CSimpleStringA2W(StrVideoName).Split('@');
+		int iCount = arr1.GetCount();
+		
+		if(iCount > 0){
+			auto arr2 = CAutoArray<CSimpleStringA>(iCount);
+			int i = 0;
+			for (; i < iCount; ++i){
+				arr2[i] = CSimpleStringW2A(arr1[i]);
+				if (5 != i){
+					if (0 != i){
+						StrVideoInfo += "@";
+					}
+					StrVideoInfo += arr2[i];
+				}
+				else{
+					StrVideoInfo += "@";
+					StrVideoInfo += EncryptString(const_cast<LPSTR>(arr2[i].GetData()));
+					
+				}
+			}
+		}
+
+		return StrVideoInfo;
+	}
+
 
 private:
 	CSimpleStringA m_SessionID;
@@ -2284,18 +2350,31 @@ void UIServiceSession::Handle_StartRemoteRecord(SpReqAnsContext<UIService_StartR
 		m_pEntity->GetFunction()->GetSysVar("CameraState",camstate);
 		Dbg("start remote record, camstate=%s, videoname=%s.",(LPCTSTR)camstate,(LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
 		if (camstate[0] == 'N') {
-			LogEvent(Severity_Middle,LOG_EVT_UI_STARTREMOTERECORD,(LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+			LogEvent(Severity_Middle,LOG_EVT_UI_STARTREMOTERECORD,(LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 			ctx->Ans.ErrorCode = 0;
 			ctx->Ans.ErrorMsg = CSimpleStringA2W("");
 			m_pEntity->m_bSalesRecording = TRUE;
+			LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_REMOTERECORD_SUCCESS, "start remote record success!");
 		}
 		else if(camstate[0] == 'I') {
 			ctx->Ans.ErrorCode = 0x30B81001;
 			ctx->Ans.ErrorMsg = CSimpleStringA2W("录音录像设备正在启动,请稍后重试!");
+			LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_REMOTERECORD_FAILED, "录音录像设备正在启动,请稍后重试!");
+		}
+		else if (camstate[0] == 'E' || camstate[0] == 'O'){
+			ctx->Ans.ErrorCode = 0x30B81003;
+			ctx->Ans.ErrorMsg = CSimpleStringA2W("摄像头故障,请联系分行技术部!");
+			if ('E' == camstate[0]){
+				LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_REMOTERECORD_FAILED, "env 摄像头故障,启动远程双录失败");
+			} 
+			else{
+				LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_REMOTERECORD_FAILED, "opt 摄像头故障,启动远程双录失败");
+			}
 		}
 		else {
 			ctx->Ans.ErrorCode = 0x30B81002;
 			ctx->Ans.ErrorMsg = CSimpleStringA2W("录音录像设备出现故障,请稍后重试!");
+			LogWarn(Severity_Middle, Error_Debug, LOG_EVT_START_REMOTERECORD_FAILED, "录音录像设备出现故障,请稍后重试!");
 		}
 	}
 
@@ -2305,10 +2384,16 @@ void UIServiceSession::Handle_StartRemoteRecord(SpReqAnsContext<UIService_StartR
 void UIServiceSession::Handle_StopRemoteRecord(SpReqAnsContext<UIService_StopRemoteRecord_Req, UIService_StopRemoteRecord_Ans>::Pointer ctx)
 {
 	Dbg("stop remote record,videoname=%s",(LPCTSTR)CSimpleStringW2A(ctx->Req.content));
-	LogEvent(Severity_Middle,LOG_EVT_UI_STOPREMOTERECORD,(LPCTSTR)CSimpleStringW2A(ctx->Req.content));
+	LogEvent(Severity_Middle,LOG_EVT_UI_STOPREMOTERECORD,(LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.content))));
 	m_pEntity->m_bSalesRecording = FALSE;
 	ErrorCodeEnum Error = m_pEntity->StopRecord(CSimpleStringW2A(ctx->Req.content));
 	ctx->Answer(Error);
+	if (Error_Succeed == Error){
+		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_STOP_REMOTERECORD_SUCCESS, "stop remote record success!");
+	} 
+	else{
+		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_STOP_REMOTERECORD_FAILED, "stop remote record failed!");
+	}
 }
 
 void UIServiceSession::Handle_StartSalesRecord(SpReqAnsContext<UIService_StartSalesRecord_Req, UIService_StartSalesRecord_Ans>::Pointer ctx)
@@ -2355,7 +2440,7 @@ void UIServiceSession::Handle_StartSalesRecord(SpReqAnsContext<UIService_StartSa
 					m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
 					Dbg("start record,camstate=%s,videoname=%s", (LPCTSTR)camstate, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
 					if (camstate[0] == 'N') {
-						LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORD, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+						LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORD, (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 						m_pEntity->m_bSalesRecording = TRUE;
 						ctx->Ans.ErrorCode = 0;
 						ctx->Ans.ErrorMsg = CSimpleStringA2W("");
@@ -2373,7 +2458,7 @@ void UIServiceSession::Handle_StartSalesRecord(SpReqAnsContext<UIService_StartSa
 				}
 			}
 			else {
-				CSimpleStringA videoname = CSimpleStringA::Format("ews|%s", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+				CSimpleStringA videoname = CSimpleStringA::Format("ews|%s", (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 				if (ePadtype == deviceType) {
 					if (false == m_pEntity->m_bSalesRecordPriorityEws) {
 						videoname = videoname.SubString(4, videoname.GetLength() - 4);
@@ -2392,7 +2477,7 @@ void UIServiceSession::Handle_StartSalesRecord(SpReqAnsContext<UIService_StartSa
 			m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
 			Dbg("start record,camstate=%s,videoname=%s", (LPCTSTR)camstate, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
 			if (camstate[0] == 'N') {
-				LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORD, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+				LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORD, (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 				m_pEntity->m_bSalesRecording = TRUE;
 				ctx->Ans.ErrorCode = 0;
 				ctx->Ans.ErrorMsg = CSimpleStringA2W("");
@@ -2463,7 +2548,7 @@ void UIServiceSession::Handle_StartRecordPreview(SpReqAnsContext<UIService_Start
 					m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
 					Dbg("start record preview,camstate=%s,videoname=%s", (LPCTSTR)camstate, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
 					if (camstate[0] == 'N') {
-						LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORDPREVIEW, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+						LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORDPREVIEW, (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 						ctx->Ans.ErrorCode = 0;
 						ctx->Ans.ErrorMsg = CSimpleStringA2W("");
 					}
@@ -2481,7 +2566,7 @@ void UIServiceSession::Handle_StartRecordPreview(SpReqAnsContext<UIService_Start
 			}
 			else {
 				m_pEntity->m_bSalesRecordUseEws = true;
-				CSimpleStringA videoname = CSimpleStringA::Format("ews|%s", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+				CSimpleStringA videoname = CSimpleStringA::Format("ews|%s", (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 				if (ePadtype == deviceType) {
 					if (false == m_pEntity->m_bSalesRecordPriorityEws) {
 						videoname = videoname.SubString(4, videoname.GetLength() - 4);
@@ -2500,7 +2585,7 @@ void UIServiceSession::Handle_StartRecordPreview(SpReqAnsContext<UIService_Start
 			m_pEntity->GetFunction()->GetSysVar("CameraState", camstate);
 			Dbg("start record preview,camstate=%s,videoname=%s", (LPCTSTR)camstate, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
 			if (camstate[0] == 'N') {
-				LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORDPREVIEW, (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+				LogEvent(Severity_Middle, LOG_EVT_UI_STARTRECORDPREVIEW, (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 				ctx->Ans.ErrorCode = 0;
 				ctx->Ans.ErrorMsg = CSimpleStringA2W("");
 			}
@@ -2548,9 +2633,9 @@ void UIServiceSession::Handle_StartSalesVideoRecord(SpReqAnsContext<UIService_St
 		}
 	}
 
-	CSimpleStringA videoname = CSimpleStringW2A(ctx->Req.VideoName);
+	CSimpleStringA videoname = m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName));
 	if (true == m_pEntity->m_bSalesRecordUseEws){
-		videoname = CSimpleStringA::Format("ews|%s", (LPCTSTR)CSimpleStringW2A(ctx->Req.VideoName));
+		videoname = CSimpleStringA::Format("ews|%s", (LPCTSTR)(m_pEntity->EncryptVideoNameCarNumber(CSimpleStringW2A(ctx->Req.VideoName))));
 	}
 	
 	LogEvent(Severity_Middle, LOG_EVT_UI_STARTAFTERPREVIEWRECORD, videoname.GetData());
@@ -2653,6 +2738,66 @@ void UIServiceSession::Handle_SetPickupOutVolume(SpReqAnsContext<UIService_SetPi
 }
 
 
+
+void UIServiceSession::Handle_StartPlayNotice(SpReqAnsContext<UIService_StartPlayNotice_Req, UIService_StartPlayNotice_Ans>::Pointer ctx)
+{
+	ErrorCodeEnum Error = Error_Succeed;
+	auto pPlayClient = new LocalPlayClient(m_pEntity);
+	if (pPlayClient->Connect() != Error_Succeed) {
+		pPlayClient->SafeDelete();
+		pPlayClient = NULL;
+		ctx->Ans.ErrorCode = Error_DevConnFailed;
+		ctx->Ans.ErrorMsg = CSimpleStringA2W("StartPlayNotice, Connect PlayClient entity failed!");
+		Error = Error_DevConnFailed;
+		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_LOCALMEDIAPLAYER_LOST, "StartPlayNotice call");
+	}
+	else{
+		PlayService_StartPlayNotice_Req req;
+		PlayService_StartPlayNotice_Ans ans;
+		req.CfgInx = ctx->Req.CfgInx;
+		req.WndX = ctx->Req.WndX;
+		req.WndY = ctx->Req.WndY;
+		req.WndWidth = ctx->Req.WndWidth;
+		req.WndHeight = ctx->Req.WndHeight;
+		req.VideoName = ctx->Req.VideoName;
+		Error = pPlayClient->StartPlayNotice(req, ans, 800);
+		Dbg("StartPlayNotice Result = 0x%08x.", Error);
+		ctx->Ans.ErrorCode = Error;
+	}
+
+	ctx->Answer(Error);
+}
+
+
+void UIServiceSession::Handle_StopPlayNotice(SpReqAnsContext<UIService_StopPlayNotice_Req, UIService_StopPlayNotice_Ans>::Pointer ctx)
+{
+	ErrorCodeEnum Error = Error_Succeed;
+	auto pPlayClient = new LocalPlayClient(m_pEntity);
+	if (pPlayClient->Connect() != Error_Succeed) {
+		pPlayClient->SafeDelete();
+		pPlayClient = NULL;
+		ctx->Ans.ErrorCode = Error_DevConnFailed;
+		ctx->Ans.ErrorMsg = CSimpleStringA2W("StopPlayNotice, Connect PlayClient entity failed!");
+		Error = Error_DevConnFailed;
+		LogWarn(Severity_Middle, Error_Debug, LOG_EVT_LOCALMEDIAPLAYER_LOST, "StopPlayNotice call");
+	}
+	else{
+		PlayService_StopPlayNotice_Req req;
+		PlayService_StopPlayNotice_Ans ans;
+		req.CfgInx = ctx->Req.CfgInx;
+		Error = pPlayClient->StopPlayNotice(req, ans, 800);
+		if (Error_Succeed == Error){
+			ctx->Ans.ErrorMsg = CSimpleStringA2W("Stop Play Notice success!");
+		}
+		else{
+			ctx->Ans.ErrorMsg = CSimpleStringA2W("Stop Play Notice failed!");
+		}
+		ctx->Ans.ErrorCode = Error;
+	}
+
+	ctx->Answer(Error);
+}
+
 ChannelClient::ChannelClient( CITCtrlEntity *pEntity ) : ChannelService_ClientBase(pEntity)
 {
 

+ 33 - 0
Module/mod_localmediaplay/LocalMediaPlay.xml

@@ -83,9 +83,42 @@
 			<res>
 			</res>
 		</twoway>
+		<twoway name="StartPlayNotice" overlap="true">
+			<req>
+				<param name="CfgInx" type="int"/>
+				<param name="WndX" type="int"/>
+				<param name="WndY" type="int"/>
+				<param name="WndWidth" type="int"/>
+				<param name="WndHeight" type="int"/>
+				<param name="VideoName" type="wstring"/>
+			</req>
+			<res>
+				<param name="ErrorCode" type="uint"/>
+				<param name="ErrorMsg" type="wstring"/>
+			</res>
+		</twoway>
+		<twoway name="StopPlayNotice" overlap="true">
+			<req>
+				<param name="CfgInx" type="int"/>
+			</req>
+			<res>
+				<param name="ErrorCode" type="uint"/>
+				<param name="ErrorMsg" type="wstring"/>
+			</res>
+		</twoway>
+		<twoway name="StopPlayAllMedias" overlap="true">
+			<req>
+			</req>
+			<res>
+			</res>
+		</twoway>
 	</class>	
 	<message name="AudioPlayRet">
 			<param name="AudioNames" type="string"/>
 			<param name="ret" type="bool" />
 	</message>
+	<message name="VideoPlayRet">
+			<param name="VideoNames" type="string"/>
+			<param name="ret" type="bool" />
+	</message>
 </entity>

+ 88 - 0
Module/mod_localmediaplay/LocalMediaPlay_client_g.h

@@ -329,6 +329,94 @@ public:
 		return Error;
 	}
 
+	ErrorCodeEnum StartPlayNotice(PlayService_StartPlayNotice_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(PlayService_Method_StartPlayNotice, PlayService_MethodSignature_StartPlayNotice, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum StartPlayNotice(PlayService_StartPlayNotice_Req &Req, PlayService_StartPlayNotice_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StartPlayNotice(PlayService_StartPlayNotice_Req &Req, PlayService_StartPlayNotice_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StartPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum StopPlayNotice(PlayService_StopPlayNotice_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(PlayService_Method_StopPlayNotice, PlayService_MethodSignature_StopPlayNotice, Buf, spAsyncWait, dwTimeout);
+	}
+	ErrorCodeEnum StopPlayNotice(PlayService_StopPlayNotice_Req &Req, PlayService_StopPlayNotice_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StopPlayNotice(PlayService_StopPlayNotice_Req &Req, PlayService_StopPlayNotice_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopPlayNotice(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
+	ErrorCodeEnum StopPlayAllMedias(PlayService_StopPlayAllMedias_Req &Req, CSmartPointer<IAsynWaitSp> &spAsyncWait, DWORD dwTimeout)
+	{
+		CSmartPointer<IClientSessionFunction> pFunc = GetFunction();
+		CAutoBuffer Buf = SpObject2Buffer(Req);
+		return pFunc->AsyncRequest(PlayService_Method_StopPlayAllMedias, PlayService_MethodSignature_StopPlayAllMedias, Buf, spAsyncWait, dwTimeout);
+	}
+
+	ErrorCodeEnum StopPlayAllMedias(PlayService_StopPlayAllMedias_Req &Req, PlayService_StopPlayAllMedias_Ans &Ans, DWORD dwTimeout)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopPlayAllMedias(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+	ErrorCodeEnum StopPlayAllMedias(PlayService_StopPlayAllMedias_Req &Req, PlayService_StopPlayAllMedias_Ans &Ans, DWORD dwTimeout, DWORD &dwUserError)
+	{
+		CSmartPointer<IAsynWaitSp> spAsyncWait;
+		ErrorCodeEnum Error = StopPlayAllMedias(Req, spAsyncWait, dwTimeout);
+		if (Error == Error_Succeed) {
+			bool bEnd = false;
+			Error = SpWaitAnswerObject(spAsyncWait, Ans, bEnd, dwUserError, dwTimeout);
+			LOG_ASSERT(Error || bEnd);
+		}
+		return Error;
+	}
+
 
 	bool SafeDelete()
 	{

+ 75 - 1
Module/mod_localmediaplay/LocalMediaPlay_def_g.h

@@ -22,7 +22,9 @@ namespace LocalMediaPlay {
 #define PlayService_Method_SetLocalVideoVolume 7
 #define PlayService_Method_GetLocalAudioVolume 8
 #define PlayService_Method_SetLocalAudioVolume 9
-
+#define PlayService_Method_StartPlayNotice 10
+#define PlayService_Method_StopPlayNotice 11
+#define PlayService_Method_StopPlayAllMedias 12
 
 #define PlayService_MethodSignature_StartPlayVideo -271954219
 #define PlayService_MethodSignature_StartPlayAudio -1816705386
@@ -34,6 +36,9 @@ namespace LocalMediaPlay {
 #define PlayService_MethodSignature_SetLocalVideoVolume -1955837375
 #define PlayService_MethodSignature_GetLocalAudioVolume -1928277327
 #define PlayService_MethodSignature_SetLocalAudioVolume -1142072027
+#define PlayService_MethodSignature_StartPlayNotice -194355636
+#define PlayService_MethodSignature_StopPlayNotice -1978922649
+#define PlayService_MethodSignature_StopPlayAllMedias -1517000886
 
 struct PlayService_StartPlayVideo_Req
 {
@@ -244,6 +249,75 @@ struct PlayService_SetLocalAudioVolume_Ans
 
 };
 
+struct PlayService_StartPlayNotice_Req
+{
+	int CfgInx;
+	int WndX;
+	int WndY;
+	int WndWidth;
+	int WndHeight;
+	CSimpleStringW VideoName;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & CfgInx & WndX & WndY & WndWidth & WndHeight & VideoName;
+	}
+
+};
+
+struct PlayService_StartPlayNotice_Ans
+{
+	unsigned int ErrorCode;
+	CSimpleStringW ErrorMsg;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ErrorCode & ErrorMsg;
+	}
+
+};
+
+struct PlayService_StopPlayNotice_Req
+{
+	int CfgInx;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & CfgInx;
+	}
+
+};
+
+struct PlayService_StopPlayNotice_Ans
+{
+	unsigned int ErrorCode;
+	CSimpleStringW ErrorMsg;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & ErrorCode & ErrorMsg;
+	}
+
+};
+
+struct PlayService_StopPlayAllMedias_Req
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
+struct PlayService_StopPlayAllMedias_Ans
+{
+
+	void Serialize(SpBuffer &Buf)
+	{
+	}
+
+};
+
 
 ///////////////////////////
 

+ 16 - 0
Module/mod_localmediaplay/LocalMediaPlay_msg_g.h

@@ -10,8 +10,10 @@
 
 namespace LocalMediaPlay {
 #define eMsg_AudioPlayRet 0
+#define eMsg_VideoPlayRet 1
 
 #define eMsgSig_AudioPlayRet -1055633973
+#define eMsgSig_VideoPlayRet 963429899
 
 struct AudioPlayRet
 {
@@ -27,5 +29,19 @@ struct AudioPlayRet
 
 ///////////////////////////
 
+struct VideoPlayRet
+{
+	CSimpleStringA VideoNames;
+	bool ret;
+
+	void Serialize(SpBuffer &Buf)
+	{
+		auto & buf = Buf & VideoNames & ret;
+	}
+
+};
+
+///////////////////////////
+
 } // namespace LocalMediaPlay
 #endif // __LOCALMEDIAPLAY_MSG_G_H

+ 75 - 0
Module/mod_localmediaplay/LocalMediaPlay_server_g.h

@@ -100,6 +100,27 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
+		case PlayService_Method_StartPlayNotice:
+			if (dwSignature == PlayService_MethodSignature_StartPlayNotice) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case PlayService_Method_StopPlayNotice:
+			if (dwSignature == PlayService_MethodSignature_StopPlayNotice) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case PlayService_Method_StopPlayAllMedias:
+			if (dwSignature == PlayService_MethodSignature_StopPlayAllMedias) {
+				bOverlap = true;
+			} else {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
 		default:
 			Error = Error_MethodNotFound;
 			break;
@@ -161,6 +182,21 @@ public:
 				Error = Error_MethodSignatureFailed;
 			}
 			break;
+		case PlayService_Method_StartPlayNotice:
+			if (dwSignature != PlayService_MethodSignature_StartPlayNotice) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case PlayService_Method_StopPlayNotice:
+			if (dwSignature != PlayService_MethodSignature_StopPlayNotice) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
+		case PlayService_Method_StopPlayAllMedias:
+			if (dwSignature != PlayService_MethodSignature_StopPlayAllMedias) {
+				Error = Error_MethodSignatureFailed;
+			}
+			break;
 		default:
 			Error = Error_MethodNotFound;
 			break;
@@ -218,6 +254,21 @@ public:
 	/// override by user
 	}
 
+	virtual void Handle_StartPlayNotice(SpReqAnsContext<PlayService_StartPlayNotice_Req, PlayService_StartPlayNotice_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_StopPlayNotice(SpReqAnsContext<PlayService_StopPlayNotice_Req, PlayService_StopPlayNotice_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
+	virtual void Handle_StopPlayAllMedias(SpReqAnsContext<PlayService_StopPlayAllMedias_Req, PlayService_StopPlayAllMedias_Ans>::Pointer ctx)
+	{
+	/// override by user
+	}
+
 	virtual void OnRequest(CSmartPointer<ITransactionContext> pTransactionContext)
 	{
 		CAutoBuffer Buf;
@@ -314,6 +365,30 @@ public:
 						Handle_SetLocalAudioVolume(ctx);
 					}
 					break;
+				case PlayService_Method_StartPlayNotice:
+					{
+						SpReqAnsContext<PlayService_StartPlayNotice_Req,PlayService_StartPlayNotice_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<PlayService_StartPlayNotice_Req,PlayService_StartPlayNotice_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_StartPlayNotice(ctx);
+					}
+					break;
+				case PlayService_Method_StopPlayNotice:
+					{
+						SpReqAnsContext<PlayService_StopPlayNotice_Req,PlayService_StopPlayNotice_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<PlayService_StopPlayNotice_Req,PlayService_StopPlayNotice_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_StopPlayNotice(ctx);
+					}
+					break;
+				case PlayService_Method_StopPlayAllMedias:
+					{
+						SpReqAnsContext<PlayService_StopPlayAllMedias_Req,PlayService_StopPlayAllMedias_Ans>::Pointer ctx;
+						ctx.Attach(new SpReqAnsContext<PlayService_StopPlayAllMedias_Req,PlayService_StopPlayAllMedias_Ans>(pTransactionContext));
+						SpBuffer2Object(Buf, ctx->Req);
+						Handle_StopPlayAllMedias(ctx);
+					}
+					break;
 				default:
 					assert(0);
 					break;

+ 0 - 1
Module/mod_localmediaplay/mod_localmediaplay.cpp

@@ -204,7 +204,6 @@ void CLocalMediaPlayEntity::loadDefaultMedia()
 			}
 			else if (sectionList[i].IsStartWith("Image"))
 			{
-			// ����ͼƬ����
 #ifdef RVC_OS_WIN
 				CImgPlayConfig curImg;
 				ZeroMemory(&curImg, sizeof(CImgPlayConfig));

+ 0 - 3
Module/mod_mediacontroller/capture.cpp

@@ -620,9 +620,6 @@ static void record_audio_data_callback(const void* input, unsigned long audiolen
 			if (!audio_cap->audio_shm_queue->InsertAudio(&frm)) {
 				Dbg("%s:%d InsertAudio to audio_shm_queue failed!", __FUNCTION__, __LINE__);
 			}
-			else {
-				Dbg("%s:%d InsertAudio to shm_queue success! and framesize is :%d, and shm_queue length is %d, frm.iseriesnumber = %d.", __FUNCTION__, __LINE__, frm.framesize, audio_cap->audio_shm_queue->GetAudioLens(), frm.iseriesnumber);
-			}
 			audio_cap->uaudiolen -= RVC_AUDIO_BUFFER_LEN;
 		}