|
|
@ -160,7 +160,7 @@ bool YuShiCtrl::TakePhoto(uint8_t streamID, std::vector<uint8_t>& img)
|
|
|
|
// Yu Shi
|
|
|
|
// Yu Shi
|
|
|
|
char url[128] = { 0 };
|
|
|
|
char url[128] = { 0 };
|
|
|
|
int streamSid = 0; // should put into config
|
|
|
|
int streamSid = 0; // should put into config
|
|
|
|
snprintf(url, sizeof(url), "/LAPI/V1.0/Channels/%u/Media/Video/Streams/%d/Snapshot", (uint32_t)streamID, streamSid);
|
|
|
|
snprintf(url, sizeof(url), "http://%s/LAPI/V1.0/Channels/%u/Media/Video/Streams/%d/Snapshot", m_ip.c_str(), (uint32_t)streamID, streamSid);
|
|
|
|
|
|
|
|
|
|
|
|
int nRet = DoGetRequest(url, HTTP_AUTH_TYPE_DIGEST, m_userName.c_str(), m_password.c_str(), m_netHandle, img, &m_lastErrorCode);
|
|
|
|
int nRet = DoGetRequest(url, HTTP_AUTH_TYPE_DIGEST, m_userName.c_str(), m_password.c_str(), m_netHandle, img, &m_lastErrorCode);
|
|
|
|
return nRet == 0;
|
|
|
|
return nRet == 0;
|
|
|
|