123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570 |
- #include "stdafx.h"
- #include "SpBase.h"
- #include "SpIni.h"
- #include "Event.h"
- #include "mod_mediacontroller/Event.h"
- #include "mod_assistantchannel/AssistantChannel_client_g.h"
- using namespace AssistantChannel;
- #include "mod_assistantchannel/chan_protocol.h"
- #include "../../Other/rvcmediacommon/rvc_media_common.h"
- #include "libvideoqueue.h"
- #include "libfacecapture.h"
- #include "jpeg2k.h"
- #include "videoutil.h"
- #include "y2k_time.h"
- #include "EventCode.h"
- #include "CommEntityUtil.hpp"
- #include "cv.h"
- #include "highgui.h"
- #ifdef RVC_OS_WIN
- #define ENV_CAP_TIMEOUT 15
- #define OPT_CAP_TIMEOUT 10
- #else
- #define ENV_CAP_TIMEOUT 150
- #define OPT_CAP_TIMEOUT 100
- #endif
- class CPhotoCaptureEntity;
- class ChannelClient : public ChannelService_ClientBase
- {
- public:
- ChannelClient(CPhotoCaptureEntity *pEntity);
- virtual void OnMessage(ErrorCodeEnum Error, ChannelService_Packet_Info &Msg, CSmartPointer<IReleasable> pData);
- };
- // 旋转180度
- int RotationDown(unsigned char* src, int srcW, int srcH, int channel)
- {
- unsigned char* tempSrc = NULL;
- int mSize = srcW * srcH * sizeof(char) * channel;
- int i = 0;
- int j = 0;
- int k = 0;
- int desW = 0;
- int desH = 0;
- desW = srcW;
- desH = srcH;
- tempSrc = (unsigned char*)malloc(sizeof(char) * srcW * srcH * channel);
- memcpy(tempSrc, src, mSize);
- for (i = 0; i < desH; i++)
- {
- for (j = 0; j < desW; j++)
- {
- for (k = 0; k < channel; k++)
- {
- //src[(i * desW + j) * channel + k] = tempSrc[((srcH - 1 - i) * srcW + srcW - 1 - j) * channel + k];
- src[(i * desW + j) * channel + k] = tempSrc[((srcH - 1 - i) * srcW + j) * channel + k];
- }
- }
- }
- free(tempSrc);
- return 0;
- }
- // id: 0x905
- class CPhotoCaptureEntity : public CEntityBase, public ITimerListener, public ILogListener
- {
- public:
- CPhotoCaptureEntity() : m_video_env_q(NULL), m_video_opt_q(NULL), m_dwCapture(0), m_bConnectAssist(FALSE) {m_pChannelClient = NULL;}
- virtual ~CPhotoCaptureEntity() {}
- virtual const char *GetEntityName() const { return "Snapshot"; }
- virtual void OnPreStart(CAutoArray<CSimpleStringA> strArgs,CSmartPointer<ITransactionContext> pTransactionContext)
- {
- ErrorCodeEnum Error = __OnStart(Error_Succeed);
- pTransactionContext->SendAnswer(Error);
- }
- virtual void OnPreClose(EntityCloseCauseEnum eCloseCause,CSmartPointer<ITransactionContext> pTransactionContext)
- {
- ErrorCodeEnum Error = __OnClose(Error_Succeed);
- pTransactionContext->SendAnswer(Error);
- }
- ErrorCodeEnum __OnStart(ErrorCodeEnum preOperationError)
- {
- LOG_FUNCTION();
- if (preOperationError != Error_Succeed)
- return preOperationError;
- //is Pad Version
- m_eDeviceType = RvcGetDeviceType();
- if ((ePadtype == m_eDeviceType)||(eMobilePadType == m_eDeviceType)||(eDesk2SType == m_eDeviceType)||(eDesk1SType == m_eDeviceType)||(eDesk2SIntegratedType == m_eDeviceType))
- {
- m_video_env_q = new Clibvideoqueue(REC_COMMON_VIDEO_ENV_SHM_SNAPSHOT_QUEUE);
- }
- else
- { // == 2
- m_video_env_q = new Clibvideoqueue(REC_COMMON_VIDEO_ENV_SHM_SNAPSHOT_QUEUE);
- m_video_opt_q = new Clibvideoqueue(REC_COMMON_VIDEO_OPT_SHM_SNAPSHOT_QUEUE);
- }
- CSmartPointer<IEntityFunction> spFunc = GetFunction();
- int i = 0;
- m_arrListener.Init(4);
- spFunc->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, MOD_EVENT_MEDIACONTROLLER_FINISHED_CAPTURE_ENV);
- spFunc->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, MOD_EVENT_MEDIACONTROLLER_FINISHED_CAPTURE_OPT);
- spFunc->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, MOD_EVENT_MEDIACONTROLLER_FINISHED_CAPTURE_ENVOPT);
- spFunc->SubscribeLog(m_arrListener[i++], this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_MOD_ASSISCHAN_STARTED_SUCCESS,NULL,false);
- return Error_Succeed;
- }
- void OnStarted()
- {
- m_pChannelClient = new ChannelClient(this);
- if (Error_Succeed == ConnectAssistChannel()) {
- m_bConnectAssist = TRUE;
- }
- }
- ErrorCodeEnum __OnClose(ErrorCodeEnum preOperationError)
- {
- LOG_FUNCTION();
- CSmartPointer<IEntityFunction> spFunction = GetFunction();
- for (int i = 0; i < m_arrListener.GetCount(); ++i)
- {
- spFunction->UnsubscribeLog(m_arrListener[i]);
- }
- if (preOperationError != Error_Succeed)
- return preOperationError;
- if (m_pChannelClient) {
- m_pChannelClient->GetFunction()->CloseSession();
- m_pChannelClient = NULL;
- }
- if (NULL != m_video_env_q) {
- delete m_video_env_q;
- m_video_env_q = NULL;
- }
- if (NULL != m_video_opt_q) {
- delete m_video_opt_q;
- m_video_opt_q = NULL;
- }
- return Error_Succeed;
- }
- void WriteStamp(video_frame *srcfrm)
- {
- #ifdef RVC_OS_WIN
- __try {
- CImageFrame frm;
- frm.data = srcfrm->data[0];
- frm.width = srcfrm->width;
- frm.height = srcfrm->height;
- frm.framesize = srcfrm->width * srcfrm->height * 3;
- if (!SnapShot(&frm)) {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("write stamp failed!");
- }
- }
- __except (EXCEPTION_EXECUTE_HANDLER) {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("snapshot throw windows exception!");
- }
- #else
- CImageFrame frm;
- frm.data = srcfrm->data[0];
- frm.width = srcfrm->width;
- frm.height = srcfrm->height;
- frm.framesize = srcfrm->width * srcfrm->height * 3;
- if (!SnapShot(&frm)) {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("write stamp failed!");
- }
- #endif
- }
- void Capture(int rc)
- {
- video_frame *frm = NULL;
- if((rc == 0)||(rc==Error_TimeOut))
- {
- if (m_video_env_q && m_video_opt_q)
- {
- int combine_width = REC_COMMON_VIDEO_SNAPSHOT_WIDTH;
- int combine_height = REC_COMMON_VIDEO_SNAPSHOT_WIDTH + REC_COMMON_VIDEO_SNAPSHOT_HEIGHT;
- frm = video_frame_new(combine_width, combine_height, VIDEO_FORMAT_RGB24);
- video_frame_fill_black(frm);
- // get env snapshot
- {
- video_frame tmp_frm = {0};
- tmp_frm.data[0] = frm->data[0];
- tmp_frm.linesize[0] = frm->linesize[0];
- tmp_frm.format = frm->format;
- tmp_frm.width = REC_COMMON_VIDEO_SNAPSHOT_WIDTH;
- tmp_frm.height = REC_COMMON_VIDEO_SNAPSHOT_HEIGHT;
- DWORD time = m_video_env_q->GetLastFrameTime();
- y2k_time_t nowtime = y2k_time_now();
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d env now time is %d, get frame time is %d, time interval is %ds.", __FUNCTION__, __LINE__, nowtime, time, nowtime - time);
- if ((nowtime - time) < ENV_CAP_TIMEOUT)
- {
- m_video_env_q->GetVideo2(&tmp_frm, 0);
- }
- else
- {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the env snapshot videoqueque image timeout!");
- }
- }
- // get opt snapshot
- {
- video_frame tmp_frm = {0};
- tmp_frm.data[0] = frm->data[0] + frm->linesize[0] * REC_COMMON_VIDEO_SNAPSHOT_HEIGHT+(REC_COMMON_VIDEO_SNAPSHOT_WIDTH-REC_COMMON_VIDEO_SNAPSHOT_HEIGHT)/2*3;
- tmp_frm.linesize[0] = frm->linesize[0];
- tmp_frm.format = frm->format;
- tmp_frm.width = REC_COMMON_VIDEO_SNAPSHOT_HEIGHT;
- tmp_frm.height = REC_COMMON_VIDEO_SNAPSHOT_WIDTH;
- DWORD time = m_video_opt_q->GetLastFrameTime();
- y2k_time_t nowtime = y2k_time_now();
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d opt now time is %d, get frame time is %d, time interval is %ds.", __FUNCTION__, __LINE__, nowtime, time, nowtime - time);
- if ((nowtime - time) < OPT_CAP_TIMEOUT)
- {
- m_video_opt_q->GetVideo2(&tmp_frm, 0);
- }
- else
- {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the opt snapshot video queque image timeout!");
- }
- }
- }
- else if (m_video_env_q)
- {
- frm = video_frame_new(REC_COMMON_VIDEO_SNAPSHOT_WIDTH, REC_COMMON_VIDEO_SNAPSHOT_HEIGHT, VIDEO_FORMAT_RGB24);
- video_frame_fill_black(frm);
- video_frame tmp_frm = {0};
- tmp_frm.data[0] = frm->data[0];
- tmp_frm.linesize[0] = frm->linesize[0];
- tmp_frm.format = frm->format;
- tmp_frm.width = REC_COMMON_VIDEO_SNAPSHOT_WIDTH;
- tmp_frm.height = REC_COMMON_VIDEO_SNAPSHOT_HEIGHT;
- DWORD time = m_video_env_q->GetLastFrameTime();
- y2k_time_t nowtime = y2k_time_now();
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d env now time is %d, get frame time is %d, time interval is %ds.", __FUNCTION__, __LINE__, nowtime, time, nowtime - time);
- if ((nowtime - time) < ENV_CAP_TIMEOUT)
- {
- m_video_env_q->GetVideo2(&tmp_frm, 0);
- }
- else
- {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("the env snapshot video queque image timeout!");
- }
- }
- else
- {
- //assert(0); // not go here
- rc = -1;
- }
- #ifndef RVC_OS_WIN
- {
- //linux需翻转环境摄像头图像
- int size = frm->linesize[0] * frm->height;
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("size = %d, width= %d height= %d", size, frm->width, frm->height);
- RotationDown(frm->data[0], frm->width, REC_COMMON_VIDEO_SNAPSHOT_HEIGHT, 3);
- }
- #endif
- }
- jpeg2k_coded_image codec_image = {0};
- if((rc == 0)||(rc==Error_TimeOut))
- {
- WriteStamp(frm);
- jpeg2k_raw_image raw_image;
- raw_image.data = frm->data[0];
- raw_image.width = frm->width;
- raw_image.height = frm->height;
- raw_image.len = raw_image.width * raw_image.height * 3;
- rc = jpeg2k_encode(&raw_image, &codec_image, 10);
- }
- if ((rc == 0)||(rc==Error_TimeOut))
- {
- ChannelService_Send_Info Info;
- Info.compress = false;
- Info.encrypt = false;
- Info.type = ACM_TYPE_PHT;
- Info.id = 0;
- Info.sub_type = ACM_PHT_ANS | ACM_PHT_SNAPSHOT;
- Info.data.m_pData = (char *)codec_image.data;
- Info.data.m_iLength = codec_image.len;
- m_pChannelClient->Send(Info);
- jpeg2k_encode_free(&codec_image);
- }
- else
- {
- ChannelService_Send_Info Info;
- Info.compress = false;
- Info.encrypt = false;
- Info.type = ACM_TYPE_PHT;
- Info.id = 0;
- Info.sub_type = ACM_PHT_ANS | ACM_PHT_SNAPSHOT;
- Info.data.m_pData = (char *)&rc;
- Info.data.m_iLength = sizeof(rc);
- m_pChannelClient->Send(Info);
- }
- #if 0
- video_frame_save_bmpfile("snapshot_abc.bmp", frm);
- //video_frame_save_bmpfile("d:\\ab.bmp", &frm);
- #endif
- if (frm)
- video_frame_delete(frm);
- }
- ErrorCodeEnum StartCapture(int id)
- {
- if ((ePadtype == m_eDeviceType) || (eMobilePadType == m_eDeviceType) || (eDesk2SType == m_eDeviceType)){
- m_video_env_q = new Clibvideoqueue(REC_COMMON_VIDEO_ENV_SHM_SNAPSHOT_QUEUE);
- }
- else{ // == 2
- m_video_env_q = new Clibvideoqueue(REC_COMMON_VIDEO_ENV_SHM_SNAPSHOT_QUEUE);
- m_video_opt_q = new Clibvideoqueue(REC_COMMON_VIDEO_OPT_SHM_SNAPSHOT_QUEUE);
- }
- if (!m_video_env_q && !m_video_opt_q) {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("cannot start capture!"); // never go here
- return Error_Unexpect;
- }
- if (m_dwCapture) {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("already start capture!");
- return Error_Duplication;
- }
- //触发对应的摄像头进行图像采集
- if (m_video_env_q && m_video_opt_q)
- {
- LogEvent(Severity_Middle, MOD_EVENT_SNAPSHOT_START_CAPTURE_ENVOPT, "agent start capture env and opt camera picture!");
- }
- else if (m_video_env_q)
- {
- LogEvent(Severity_Middle, MOD_EVENT_SNAPSHOT_START_CAPTURE_ENV, "agent start capture env camera picture!");
- }
- else if (m_video_opt_q)
- {
- LogEvent(Severity_Middle, MOD_EVENT_SNAPSHOT_START_CAPTURE_OPT, "agent start capture opt camera picture!");
- }
- m_dwCapture = SP::Module::Comm::RVCGetTickCount();
- GetFunction()->SetTimer(1, this, 2000);
- return Error_Succeed;
- }
- void StopCapture()
- {
- GetFunction()->KillTimer(1);
- m_dwCapture = 0;
- }
- DeviceTypeEnum RvcGetDeviceType()
- {
- DeviceTypeEnum eType = eStand2sType;
- CSmartPointer<IEntityFunction> spFunction = GetFunction();
- CSystemStaticInfo stStaticinfo;
- spFunction->GetSystemStaticInfo(stStaticinfo);
- if (_stricmp(stStaticinfo.strMachineType, "RVC.Stand1SPlus") == 0) {
- eType = eStand1SPlusType;
- }
- else if (stricmp(stStaticinfo.strMachineType, "RVC.PAD") == 0) {
- if (stricmp(stStaticinfo.strSite, "CMB.FLB") == 0) {
- eType = eMobilePadType;
- }
- else {
- eType = ePadtype;
- }
- }
- else if (stricmp(stStaticinfo.strMachineType, "RVC.Desk2S") == 0) {
- eType = eDesk2SType;
- WORD nMajor = stStaticinfo.MachineVersion.GetMajor();
- WORD nMinor = stStaticinfo.MachineVersion.GetMinor();
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("MachineVersion is %d.%d", nMajor, nMinor);
- if (2 == nMajor) {
- eType = eDesk2SIntegratedType;
- }
- }
- else if (stricmp(stStaticinfo.strMachineType, "RPM.Stand1S") == 0) {
- eType = eRpm1sType;
- }
- else if (stricmp(stStaticinfo.strMachineType, "RVC.Desk1S") == 0) {
- eType = eDesk1SType;
- }
- else {
- eType = eStand2sType;
- }
- if (eType >= 0 && eType < sizeof(Device_Type_Table) / sizeof(char*)) {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("device type is %s.", Device_Type_Table[eType]);
- }
- return eType;
- }
- virtual void OnTimeout(DWORD dwTimerID)
- {
- if (1 == dwTimerID) {
- Capture(Error_TimeOut);
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("timeout!");
- GetFunction()->KillTimer(dwTimerID);
- m_dwCapture = 0;
- }
- else if (2 == dwTimerID) {
- if (FALSE == m_bConnectAssist) {
- if (Error_Succeed == ConnectAssistChannel()) {
- m_bConnectAssist = TRUE;
- }
- }
- if (TRUE == m_bConnectAssist) {
- GetFunction()->KillTimer(2);
- }
- }
- }
- virtual void OnLog(const CAutoArray<CUUID> &SubIDs, const CUUID nLogID,const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
- const DWORD dwSysError,const DWORD dwUserCode,const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
- const CAutoArray<DWORD> &Param, const char *pszEntityName, const char *pszModuleName,const char *pszMessage, const linkContext& pLinkInfo)
- {
- if (dwUserCode == MOD_EVENT_MEDIACONTROLLER_FINISHED_CAPTURE_ENVOPT ||
- dwUserCode == MOD_EVENT_MEDIACONTROLLER_FINISHED_CAPTURE_OPT ||
- dwUserCode == MOD_EVENT_MEDIACONTROLLER_FINISHED_CAPTURE_ENV)
- {
- DWORD dwNow = SP::Module::Comm::RVCGetTickCount();
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("capture duration:%dms", dwNow - m_dwCapture);
- Capture(Error_Succeed);
- StopCapture();
- }
- else if (LOG_EVT_MOD_ASSISCHAN_STARTED_SUCCESS == dwUserCode)
- {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("recv LOG_EVT_MOD_ASSISCHAN_STARTED_SUCCESS");
- Sleep(975);
- if (m_pChannelClient != NULL){
- m_pChannelClient->GetFunction()->CloseSession();
- m_pChannelClient = NULL;
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Close AssistChannel Session ");
- m_bConnectAssist = FALSE;
- }
- if (Error_Succeed == ConnectAssistChannel()) {
- m_bConnectAssist = TRUE;
- }
- else {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("start timer for reconnect to assist channel.");
- GetFunction()->SetTimer(2, this, 3370);
- }
- }
- }
- private:
- // we use root.ini Video section config to decide camera count
- ErrorCodeEnum DecideCameraCount(int &nCount)
- {
- CSmartPointer<IEntityFunction> spFunction = GetFunction();
- CSmartPointer<IConfigInfo> spConfig;
- ErrorCodeEnum Error = spFunction->OpenConfig(Config_Root, spConfig);
- if (Error == Error_Succeed)
- {
- CSimpleStringA strVideoEnv;
- CSimpleStringA strVideoOpt;
- SpIniMappingTable table;
- nCount = 0;
- table.AddEntryString("Video", "EnvCamera", strVideoEnv, "$");
- table.AddEntryString("Video", "OptCamera", strVideoOpt, "$");
- Error = table.Load(spConfig);
- if (Error == Error_Succeed)
- {
- if (strVideoEnv.GetLength() > 1)
- nCount++;
- if (strVideoOpt.GetLength() > 1)
- nCount++;
- }
- }
- return Error;
- }
- ErrorCodeEnum ConnectAssistChannel()
- {
- if (m_pChannelClient == NULL){
- m_pChannelClient = new ChannelClient(this);
- }
-
- ErrorCodeEnum Error = m_pChannelClient->Connect();
- if (Error_Succeed != Error){
- m_pChannelClient = NULL;
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("AssistChannelClient connect fail!");
- return Error;
- }
- else {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("AssistChannelClient connect success!");
- }
- if (Error_Succeed == Error){
- ChannelService_BeginRecv_Sub Sub;
- Sub.type = ACM_TYPE_PHT;
- Error = m_pChannelClient->BeginRecv(Sub);
- if (Error_Succeed != Error){
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginRecv ACM_TYPE_PHT fail!");
- m_pChannelClient->GetFunction()->CloseSession();
- m_pChannelClient = NULL;
- return Error;
- }
- else {
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("BeginRecv ACM_TYPE_PHT success!");
- }
- }
- return Error;
- }
- private:
- Clibvideoqueue *m_video_env_q;
- Clibvideoqueue *m_video_opt_q;
- ChannelClient *m_pChannelClient;
- CUUID m_uuidCaptureTimer;
- DWORD m_dwCapture;
- DeviceTypeEnum m_eDeviceType;
- CAutoArray<CUUID> m_arrListener;
- BOOL m_bConnectAssist;
- };
- void ChannelClient::OnMessage( ErrorCodeEnum Error, ChannelService_Packet_Info &Msg, CSmartPointer<IReleasable> pData )
- {
- LOG_FUNCTION();
- if (Error == Error_Succeed) {
- CPhotoCaptureEntity *pEntity = static_cast<CPhotoCaptureEntity*>(m_pEntityBase);
- int cat = ACM_PHT_CAT(Msg.sub_type);
- if (cat == ACM_PHT_REQ)
- {
- Error = pEntity->StartCapture(Msg.id);
- if (Error)
- {
- pEntity->Capture(Error);
- }
- }
- else
- {
- _ASSERT(0);
- }
- }
- }
- ChannelClient::ChannelClient( CPhotoCaptureEntity *pEntity ) : ChannelService_ClientBase(pEntity)
- {
- }
- SP_BEGIN_ENTITY_MAP()
- SP_ENTITY(CPhotoCaptureEntity)
- SP_END_ENTITY_MAP()
|