Справочное Руководство для IQinVision iq510

Скачать
Страница из 60
 
Page 28 of 60 
6. Serverpush Stream 
Server push is a method for sending updating data to a web page. The camera sends streaming images as 
server push streams of JPEG images separated by HTML tags using multipart MIME encoding.  The camera 
will continue sending image data as fast as it is allowed until the HTTP connection is closed.  
6.1. Serverpush stream format 
The camera will deliver a server push image stream in response to requests for the image file: 
http://<camera_ip>/now.jpg?snap=spush 
Image modifiers may be added as described in the next section. 
The data returned by the camera is formatted as a series of JPEG images separated by HTML tags. The HTTP 
response from camera will look like: 
HTTP/1.0 200 OK 
Cache-Control: no-cache 
Content-Type: multipart/x-mixed-replace; boundary=--ImageSeparator 
 
--ImageSeparator 
Content-Type: image/jpeg 
Content-Length: <nnnnn> 
 
<JPEG Image> 
 
--ImageSeparator 
Content-Type: image/jpeg 
Content-Length: <nnnnn> 
 
<JPEG Image> 
 
--ImageSeparator 
Content-Type: image/jpeg 
Content-Length: <nnnnn> 
 
<JPEG Image> 
 
--ImageSeparator 
The camera will continue sending image data as fast as it is allowed until the http (TCP) connection is closed. 
6.2. Requesting a serverpush stream 
URI modifiers can be added to modify the image that is retrieved by the HTTP request, without having to 
change the camera’s configuration. For example, to retrieve the current image downsampled by a factor of 2, 
use the following URL: 
http://<camera_ip>/now.jpg?ds=2 
Note: 
URLs are specified in the form now.jpg?x=y&a=b&c=d. 
The modifiers supported by each camera family will documented in the product specific chapters.