拍照移到PhoneDevice

hdrplus
陈曦 7 months ago
parent f6d5f38bfc
commit a15a0f6ed6

@ -1406,6 +1406,19 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
mPath = path;
mOsds = osds;
#ifdef USING_N938
if (photoInfo.mediaType == 0) {
// CameraPhotoCmd(time(NULL), channel, MOVE_PRESETNO, 0, type);
// std::this_thread::sleep_for(std::chrono::seconds(2));
time_t ts = time(NULL);
CameraPhotoCmd(ts, photoInfo.channel, 0, 6, 0);
TakePTZPhotoCb(2, photoInfo);
}
return true;
#else
NdkCamera::CAMERA_PARAMS params;
memset(&params, 0, sizeof(params));
@ -1558,6 +1571,7 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
}
return res;
#endif
}
bool CPhoneDevice::CloseCamera()
@ -3242,6 +3256,7 @@ bool CPhoneDevice::OpenSensors(int sensortype)
#ifndef USING_N938
#ifndef USING_PLZ
GpioControl::setInt(CMD_SET_485_EN_STATE, 1);
#else
GpioControl::setInt(CMD_SET_485_ENABLE, 1);
#endif
@ -3359,3 +3374,4 @@ bool CPhoneDevice::CloseSensors(int sensortype)
}
return 0;
}

@ -221,6 +221,7 @@ public:
virtual int GetIceData(ICE_INFO *iceInfo, ICE_TAIL *icetail, SENSOR_PARAM *sensorParam);
virtual bool OpenSensors(int sensortype);
virtual bool CloseSensors(int sensortype);
// bool CapturePhoto(unsigned char channel, unsigned char type);
bool GetNextScheduleItem(uint32_t tsBasedZero, uint32_t scheduleTime, vector<uint32_t>& items);
@ -274,6 +275,17 @@ protected:
return false;
}
inline bool TakePTZPhotoCb(int result, const IDevice::PHOTO_INFO& photoInfo) const
{
if (m_listener != NULL)
{
std::vector<IDevice::RECOG_OBJECT> objects;
return m_listener->OnPTZPhotoTaken(result, photoInfo);
}
return false;
}
void QueryPowerInfo(std::map<std::string, std::string>& powerInfo);
std::string QueryCpuTemperature();

Loading…
Cancel
Save