I am using the TcpVideoViewer to retrieve live feed from milestone and broadcast it as motion jpeg url.
This integration is working as suspected but when the camera has masking , I get the lock image attached .
My goal is to retrieve the masked live stream from the camera.
I modified the FormatConnect
method to the below:
private string FormatConnect()
{
string sendBuffer;
if (_token == "BASIC")
{
sendBuffer = string.Format(
"<?xml version=\"1.0\" encoding=\"utf-8\"?><methodcall><requestid>0</requestid>" +
"<methodname>connect</methodname><username>{0}</username><password>{1}</password>" +
"<cameraid>{2}</cameraid><alwaysstdjpeg>yes</alwaysstdjpeg>" +
"<clientcapabilities>" +
"<privacymask>yes</privacymask>" +
"<privacymaskversion>1</privacymaskversion>" +
"<multipartdata>no</multipartdata >" +
"<datarestriction>yes</datarestriction >" +
"</clientcapabilities>" +
"</methodcall>\r\n\r\n",
XmlEscapeGt127(_user), XmlEscapeGt127(_pwd), _cameraGuid);
}
else
{
sendBuffer = string.Format(
"<?xml version=\"1.0\" encoding=\"utf-8\"?><methodcall><requestid>0</requestid>" +
"<methodname>connect</methodname><username>gaby</username><password>g</password>" +
"<cameraid>{0}</cameraid><alwaysstdjpeg>yes</alwaysstdjpeg>" +
"<transcode><allframes>yes</allframes></transcode>" + // Add this line to get all frames in a GOP transcoded
"<connectparam>id={1}&connectiontoken={2}" +
"</connectparam>"+
"<clientcapabilities>" +
"<privacymask>yes</privacymask>" +
"<privacymaskversion>1</privacymaskversion>" +
"<multipartdata>no</multipartdata >" +
"<datarestriction>yes</datarestriction >" +
"</clientcapabilities>" +
"</methodcall>\r\n\r\n",
_cameraGuid, _cameraGuid, _token);
}
return sendBuffer;
}
according to the bellow url
https://doc.developer.milestonesys.com/html/reference/protocols/imageserver_request_response.html
now I can see the live stream but without the masking.
Can the TcpVideoViewer be modifed in any way to make this possible ?
Best regards,’
Gaby