* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _LARGEFILE64_SOURCE
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
...
...
@@ -23,6 +23,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/sendfile.h>
#include <sys/stat.h>
#include <time.h>
#include <string.h>
...
...
@@ -66,6 +67,23 @@
#define GLOBALPARS_SNGL(x) (globalPars[(x)-FRAMEPAR_GLOBALS]) ///< should work in drivers and applications, First 32 parameter values are not erased with initGlobalPars
#endif
intcumulHistImage(// returns number of pixels
uint16_t*src,
int*offs,
intlen,
intwidth,
intheight,
inttelem,
intbin_shift,
inthist_size,
inthist_min,
int*hist16,// if null, will only calculate *sum_val, *mn and *mx
longlong*sum_val,
int*mn,
int*mx
);
/**
* @struct file_set
* This structure holds a set of file names and file descriptors corresponding to
...
...
@@ -110,6 +128,8 @@ struct file_set {
intsensor_port;
inttimestamp_name;
intbase_chn;
char*ssd_name;
intssd_fd;// SSD raw disk file descriptor
// data to convert TIFF to 8-bit uncompressed bmp for quick preview
// int tiff_mn;
// int tiff_mx;
...
...
@@ -120,7 +140,7 @@ struct file_set {
};
staticstructfile_setfiles[SENSOR_PORTS];
staticcharssd_name[256];
unsignedlong*ccam_dma_buf;
chartrailer[TRAILER_SIZE]={0xff,0xd9};
constchar*circbuf_fnames[]={
...
...
@@ -217,7 +237,9 @@ const char url_args[] = "This server supports sequence of commands entered in th
"tiff_auto=[value] may preceed tiff_convert and calculate and set min/max for conversion using tiff_stat internally.\n"
" Value is a 2-digit decimal, low digit applies to cut from the lower (cold) values, high digit - to cut from the high (hot) ones:\n"
" Value 0 - use asolute min/max values, 1 - 0.1%% to 100.0%%, 10 - 0%% to 99.9%%, 22 - from 0.5%% to 99.5%%, 03 - from 1%% to 100%%,\n"
" Value 24 - from 5%% to 99.5%%, 55 - 10%% to 90%%.\n";
" Value 24 - from 5%% to 99.5%%, 55 - 10%% to 90%%.\n"
"read raw SSD data (device provided in command line, such as 'imgsrv -p 2323 -s /dev/sda2')"
"ssdO...O:C...C - send raw SSD data at byte offset O...O, count C...C bytes";