We know LiveNVR can get a snapshot of the information, the previous article also explains how LiveNVR is a snapshot
Here we use another method being snapped
Process
The ability to obtain equipment Capabilities
The ability to obtain equipment, and can get to the URI Media and PTZ using Media's URI, can take a snapshot of
_tds__GetCapabilities* capabilities = soap_new__tds__GetCapabilities(proxyDevice, -1);
tt__CapabilityCategory* category = new tt__CapabilityCategory;
capabilities->Category = category;
*(capabilities->Category) = tt__CapabilityCategory__All;
_tds__GetCapabilitiesResponse* response = soap_new__tds__GetCapabilitiesResponse(proxyDevice, -1);
if (SOAP_OK == proxyDevice->GetCapabilities(capabilities, response))
{
if (response->Capabilities)
{
//Media URI: response->Capabilities->Media->XAddr;
//PTZ URI: response->Capabilities->PTZ->XAddr;
}
}
Gets Media Profile
Get Profile token can acquire corresponding snapshot
_trt__GetProfiles* getProfiles = soap_new__trt__GetProfiles(proxyMedia, -1);
_trt__GetProfilesResponse* response = soap_new__trt__GetProfilesResponse(proxyMedia, -1);
if (SOAP_OK == proxyMedia->GetProfiles(getProfiles, response))
{
int size = response->__sizeProfiles;
for (int i = 0; i < size; ++i)
{
if (response->Profiles[i])
{
//Media Profile Token: response->Profiles[i]->token;
//一般设备包含多个Profile Token,包含主码流、子码流、第三码流
}
}
}
Take a snapshot of the access address
Snapshots access address is typically HTTP address, you can GET to the snapshot files through the HTTP address
MediaBindingProxy* mediaProxy = new MediaBindingProxy;
mediaProxy->soap_endpoint = mediaUrl.c_str();
if (!security(mediaProxy, username, password))
{
delete mediaProxy;
return result;
}
_trt__GetSnapshotUri* snap = soap_new__trt__GetSnapshotUri(mediaProxy, -1);
_trt__GetSnapshotUriResponse* response = soap_new__trt__GetSnapshotUriResponse(mediaProxy, -1);
snap->ProfileToken = const_cast<char*>(profile.c_str());
if (SOAP_OK == mediaProxy->GetSnapshotUri(snap, response))
{
if (response->MediaUri && response->MediaUri->Uri)
{
//response->MediaUri->Uri
//快照地址
}
}
if (response)
soap_delete__trt__GetSnapshotUriResponse(mediaProxy, response);
if (snap)
soap_delete__trt__GetSnapshotUri(mediaProxy, snap);
return result;
About LiveNVR
LiveNVR network camera through a simple channel configuration, the traditional industry, which monitor network camera HD IP Camera, NVR equipment having access to the RTSP protocol output LiveNVR, LiveNVR these audio and video data can be video sources is a pull converter as RTMP / HLS, full platform terminal H5 live (Web, Android, iOS), and LiveNVR able to live on a live video source data to a third party CDN network, internet-scale distribution;
For more information
Live Streaming Internet Security -QQ exchange group: 615 081 503
GB GB28181 no plug-ins LiveGBS-QQ exchange group: 947 137 753
Mail: [email protected]
WEB:www.liveqing.com
Tel: 189-5515-0114 (the same micro-channel)
Copyright © LiveQing.com 2016-2019