Beispiel #1
0
inline BOOL StorFactory::StopHdfsRecord(s32 nIndex)
{
    CameraParam pParam;
    StorFactoryCameraChangeData change;
    if (nIndex <=0 || nIndex >= STOR_FACTORY_CAMERA_ID_MAX)
    {
        return FALSE;
    }
    GetCameraParamById(pParam, nIndex);
    if (pParam.m_Conf.data.conf.HdfsRecording == 0)
    {
        return TRUE;
    }

    Lock();
    pParam.m_Conf.data.conf.HdfsRecording = 0;
    m_CameraParamMap[nIndex] = pParam;
    m_Conf.UpdateCameraData(nIndex, pParam.m_Conf);
    if (m_CameraMap[nIndex] != NULL)
    {
        m_CameraMap[nIndex]->SetHdfsRecord(FALSE);
        m_CameraMap[nIndex]->StopHdfsRecord();
    }
    UnLock();
    change.id = nIndex;
    change.type = STOR_FACTORY_CAMERA_RECORDING_OFF;
    CallCameraChange(change);
    return TRUE;
}
Beispiel #2
0
inline BOOL Factory::StopHdfsRecord(astring nIndex)
{
#if 0
    CameraParam pParam;
    FactoryCameraChangeData change;

    GetCameraParamById(pParam, nIndex);
    if (pParam.m_Conf.data.conf.HdfsRecording == 0)
    {
        return TRUE;
    }

    Lock();
    pParam.m_Conf.data.conf.HdfsRecording = 0;
    m_CameraParamMap[nIndex] = pParam;
    m_Conf.UpdateCameraData(nIndex, pParam.m_Conf);
    if (m_CameraMap[nIndex] != NULL)
    {
        m_CameraMap[nIndex]->SetHdfsRecord(FALSE);
        m_CameraMap[nIndex]->StopHdfsRecord();
    }
    UnLock();
    change.id = nIndex;
    change.type = FACTORY_CAMERA_RECORDING_OFF;
    CallCameraChange(change);
#endif
    return TRUE;
}
Beispiel #3
0
inline BOOL StorFactory::UpdateCameraGroup(s32 nIndex, s32 nGroup)
{
    CameraParam pParam;
    StorFactoryCameraChangeData change;
    if (nIndex <=0 || nIndex >= STOR_FACTORY_CAMERA_ID_MAX)
    {
        return FALSE;
    }
    GetCameraParamById(pParam, nIndex);
    if (pParam.m_Conf.data.conf.GroupId == nGroup)
    {
        return TRUE;
    }

    Lock();
    pParam.m_Conf.data.conf.GroupId = nGroup;
    m_CameraParamMap[nIndex] = pParam;
    m_Conf.UpdateCameraData(nIndex, pParam.m_Conf);
    UnLock();
    change.id = nIndex;
    change.type = STOR_FACTORY_CAMERA_GROUP_CHANGE;
    CallCameraChange(change);
    return TRUE;
}