#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <sys/time.h>
#include <time.h>
#include <syslog.h>
#include <sys/mman.h>
#include <string.h>
#include <errno.h>
#include <math.h>
#include "imageaccess.h"
#include "dma2jpeg.h"
#include "dma2bmp.h"
#include "lasercalc.h"
#include "vrml303.h"
#include "qtime.h"
#include <asm/elphel/autoexp.h>
#include <asm/elphel/hist.h>
#include <asm/elphel/fpgaconfa.h>
#include <asm/elphel/c313a.h>
#include <asm/elphel/ext353.h>
#include <netinet/ip.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <poll.h>
#include <pthread.h>
#include <asm/atomic.h>
Include dependency graph for ccam.c:
Go to the source code of this file.
Data Structures | |
struct | exif_desc_t |
struct | trig_desc_t |
struct | prof_t |
struct | key_value |
Defines | |
#define | SLOG "ccam.cgi" |
#define | USE_MMAP |
#define | SOCKETBUF_SIZE 4096 |
#define | D(x) |
#define | DD(x) |
#define | D5(x) |
#define | D6(x) |
#define | QRY_MAXPARAMS 64 |
#define | MAX_TIMEOUT 5 |
#define | SENSOR_W 1280 |
#define | SENSOR_H 1024 |
#define | HTML_SENSOR_JS 1 |
#define | HTML_SENSOR_HTML 2 |
#define | HTML_BEAM_JS 3 |
#define | HTML_BEAM_HTML 4 |
#define | HTML_STATE_JS 5 |
#define | HTML_STATE_HTML 6 |
#define | HTML_ACQUIRE 7 |
#define | HTML_RESET 8 |
#define | XML_SENSOR 10 |
#define | XML_BEAM 11 |
#define | XML_STATE 12 |
#define | XML_ACQUIRE 13 |
#define | XML_RESET 14 |
#define | HIST_SIZE 256 * 4 * 4 |
#define | GAMMA_SIZE 256 * 4 * 2 |
#define | MAP_OPTIONS MAP_SHARED |
#define | USEHTTP10(x) |
#define | MAXIMAGEWIDTH 2048 |
#define | USEBUFFERSIZE 1024 |
#define | MAXIMAGEWIDTH 2048 |
#define | CCAM_SPARE_MEM 100000 |
#define | CCAM_MAX_NUM_FRAMES 16384 |
#define | STREAMER_CONF_RUN "/var/state/streamer.conf"; |
#define | STREAMER_CONF_STOP "/etc/streamer.conf"; |
#define | GAMMA_START 0x400 |
#define | HIST_LEN 256 * 4 * 4 |
#define | GAMMA_LEN 256 * 4 * 2 |
Functions | |
void * | bcast_trigger_f (void *ptr) |
void | prof_start (void) |
void | prof_time (const char *m) |
void | prof_next (const char *m) |
void | bcast_trigger (void) |
int | process_get (int data_fd, unsigned long filesize, char *data_mem, long *filepos) |
int | hexdigit (char c) |
int | unescape (char *s, int l) |
int | accumData (int ifd, const char *bufFileName) |
int | frameShr (const char *fn, int shft) |
int | frameSub (const char *sfn, const char *dfn) |
int | processCal (const char *wfn, const char *bfn, const char *cfn) |
int | imageCorr (int ImageWidth, const char *dfn, const char *bfn, const char *cfn, const char *ImgFileName) |
int | send_buf_image (int ImageWidth, int ImageHeight, int Quality, int Contrast, int Color, int bayerOrient, int Depth, const char *pseudo, const char *ImgFileName, const char *bufFileName) |
int | send_immed_image (int ImageWidth, int ImageHeight, int Quality, int Contrast, int Color, int bayerOrient, int Depth, const char *pseudo, const char *ImgFileName) |
int | parseQuery (struct key_value *params, char *qry) |
char * | paramValue (struct key_value *params, char *skey) |
int | optionPresent (struct key_value *params, char *skey, char c) |
void | printDocumentLine (const char *name, const char *value, int format) |
int | send_html_data (const char *devfn, const char *dmafn, int mode, int refreshPeriod, const char *onLoad, const char *javaScript) |
int | set_fpga_time (int seconds, int useconds) |
int | processImage (struct key_value *params, const char *ImgFileName, const char *bufFileName, const char *pc_par, int iq_par, int gd_par, int html_par, int htmlr_par, const char *htmll_par, const char *htmlj_par, int vrml_par, int vrmlm_par, int vrmld_par, int vrmlb_par, int vrmli_par, int vrmlf_par, int vrmll_par, int vrmlo_par, int vrmlz_par) |
int | calcWhiteBalance (int thrsh, int min_pixels, float diffGains[3]) |
int | programFPN (const char *backgroundFileName, const char *calibrationFileName, const char *FPNFileName, int fpns, int fpnm, int fat_zero) |
int | send_jpegfile_image (const char *ImgFileName) |
int | send_hardware_image (const char *ImgFileName, int cache) |
int | send_quicktime (const char *ImgFileName, const char *qtSourceFileName, const char *headerFileName, int nrep, int safe, int sample_dur) |
int | send_quicktime_clip (const char *ImgFileName, const char *qtSourceFileName, const char *headerFileName, int qcmd, int tscale) |
void | printStreamerParameters (int fmode) |
int | setCamPars (int devfd, int n_bf, char *cp, char *vp) |
int | sendLastFrame (int cache) |
void | debug_write (char *filename, int linenum, const char *dbgstr) |
int | main (int argc, char *argv[]) |
Variables | |
char ** | environ |
exif_desc_t | exif_desc |
trig_desc_t | trig_desc |
atomic_t | accept_trigger |
prof_t | prof |
key_value | gparams [QRY_MAXPARAMS+1] |
autoexp_t | autoexp |
static char * | error304 |
#define CCAM_MAX_NUM_FRAMES 16384 |
#define GAMMA_LEN 256 * 4 * 2 |
#define HIST_LEN 256 * 4 * 4 |
#define HTML_ACQUIRE 7 |
#define HTML_BEAM_HTML 4 |
#define HTML_BEAM_JS 3 |
#define HTML_RESET 8 |
#define HTML_SENSOR_HTML 2 |
#define HTML_SENSOR_JS 1 |
#define HTML_STATE_HTML 6 |
#define HTML_STATE_JS 5 |
#define MAX_TIMEOUT 5 |
#define MAXIMAGEWIDTH 2048 |
#define SLOG "ccam.cgi" |
*************************************************************************** ! File: ccam.c ! Copyright (C) 2002-2007 Elphel, Inc ! -----------------------------------------------------------------------------** ! ! This program is free software: you can redistribute it and/or modifyF ! it under the terms of the GNU General Public License as published by ! the Free Software Foundation, either version 3 of the License, or ! (at your option) any later version. ! ! This program is distributed in the hope that it will be useful, ! but WITHOUT ANY WARRANTY; without even the implied warranty of ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License ! along with this program. If not, see <http://www.gnu.org/licenses/>. ! -----------------------------------------------------------------------------** !
Definition at line 229 of file ccam.c.
Referenced by main().
#define SOCKETBUF_SIZE 4096 |
Definition at line 237 of file ccam.c.
Referenced by process_get(), send_hardware_image(), send_quicktime(), send_quicktime_clip(), and sendLastFrame().
#define STREAMER_CONF_RUN "/var/state/streamer.conf"; |
Referenced by printStreamerParameters().
#define STREAMER_CONF_STOP "/etc/streamer.conf"; |
Referenced by printStreamerParameters().
#define USEBUFFERSIZE 1024 |
Definition at line 582 of file ccam.c.
Referenced by accumData(), frameShr(), frameSub(), processCal(), and programFPN().
#define USEHTTP10 | ( | x | ) |
Definition at line 475 of file ccam.c.
Referenced by send_buf_image(), send_hardware_image(), send_immed_image(), send_jpegfile_image(), send_quicktime(), send_quicktime_clip(), and sendLastFrame().
#define XML_ACQUIRE 13 |
#define XML_BEAM 11 |
#define XML_RESET 14 |
#define XML_SENSOR 10 |
#define XML_STATE 12 |
void bcast_trigger | ( | void | ) |
Definition at line 410 of file ccam.c.
References accept_trigger, bcast_trigger_f(), trig_desc_t::enable_ping, trig_desc_t::id, memset(), trig_desc_t::number, trig_desc_t::port_in, trig_desc_t::timeout, and trig_desc.
Referenced by main().
void* bcast_trigger_f | ( | void * | ptr | ) |
Definition at line 337 of file ccam.c.
References accept_trigger, exif_desc, exif_desc_t::image_id, memset(), trig_desc_t::port_out, and trig_desc.
Referenced by bcast_trigger().
Definition at line 2083 of file ccam.c.
References autoexp, AUTOEXP_DEV_NAME, autoexp_t::exp, GAMMA_LEN, HIST_LEN, IOC_AUTOEXP_GET, memcpy(), and TABLES_LEN.
Referenced by main(), PHP_FUNCTION(), and setCamPars().
void debug_write | ( | char * | filename, | |
int | linenum, | |||
const char * | dbgstr | |||
) |
******************************************************************************************************************** ! _time=t (ms) will try to set current system time (if it was not set already. _stime - will always set) ! if any of html, htmlr, htmll or htmlj are present will genmerate html page instead of an image ! html= not present)- picture as before (or vrml) ! 0 - nothing ! 1 - all sensor parameters as javaScript ! 2 - all sensor parameters as html ! 3 - beam data as javaScript ! 4 - beam data as html ! 5 - state (5 -picture ready) as javaScript ! 6 - state (5 -picture ready) as html ! 7 - start image acquisition (option "s" or "t" should be present) ! 8 - reset waiting for trigger ! 10 - all sensor parameters as XML ! 11 - beam data as XML ! 12 - state (5 -picture ready) as XML ! 13 - start image acquisition (option "s" or "t" should be present), return XML ! 14 - reset waiting for trigger, return XML
! htmlr=n - Refresh each n seconds ! htmll=(escape) - command executed onLoad in <body> tag ! htmlj=(escape) - include *.js javaScript file
! vrmld - decimation to make a grid (>=8 for full frame) (default = 16) ! vrmlb - number of individual blocks in each x/y (default=2) ! vrmlm - maximal pixel. 1023 - full scale, less - increase contrast, 0 - automatic (default =1023)
! vrmli - indentation (default=1) ! vrmlf - format - 0 - integer, 1 - one digit after "." (default 0) ! vrmll - number of countours to build (default = 32) ! vrmlo - options for isolines - e - elevated, f - flat (default=ef) ! vrmlz - 0..9 output (gzip) compression level (0 - none, 1 - fastest, default - 6, best -9) ! fpns - 0..3 fpga background subtraction: ! 0 - none, ! 1 (fine) - subtract 8-bit FPN from 10-bit pixel ! 2 - multiply FPN by 2 before subtracting ! 3 - multiply FPN by 4 before subtracting (full scale) ! note: negative result is replaced by 0, decrease FPN data before applying for "fat 0" ! fpnm - muliply by inverse sensitivity (sensitivity correction) mode: ! 0 - no correction ! 1 - fine (+/- 12.5%) ! 2 - medium (+/- 25%) ! 3 - maximal (+/- 50%) ! pc - pseudo color string. Applies to monochrome images and vrml
! any of vrml* specified - vrml instead of a picture/html ! ! background measurement/subtraction will (now) work only with 10-bit images ! gd = "digital gain" 0..5 (software) ! iq = 0..100 - jpeg quality, "-1" - BMP non-compressed, "-2" - BMP RLE compressed ! byr =0..3 Overwite Bayer phase shift, =4 - use calculated by driver.
! vw - virtual frame width
! vh - virtual frame height
! wl = 0..1288 - left ! wt = 0..1032 - top ! ww = 1..1288 - width ! wh = 1..1032 - height ! pfh - photofinish mode strip height (0 - normal mode, not photofinish). In this mode each frame will consist of multiple pfh-high horizontal (camera should be oriented 90 deg. to make vertical) strips, and no extra lines will be added to the frames for demosaic for now: +65536 - timestamp for normal frames, +131072 - timestamps for photo-finish mode ! ts - time stamp mode: 0 - none, 1 - in upper-left corner, 2 - added to the right of the image (photo-finish mode)
! fsd - frame sync delay (in lines) from the beginning of a frame (needed in photofinish mode - 3 lines?)
! dh = 1 2 4 - decimation horizontal (both) MT9T001 dh= 1,2,3,4,5,6,7,8 ! dv - decimation vertical MT9T001 dv= 1,2,3,4,5,6,7,8 ! bh - binning horizontal or both (MT9T001 - 1<bh<=dh<=8, has some on-chip problems) ! bv - binning vertical (MT9T001 - 1<bh<=dh<=8, has some on-chip problems) ! bit - pixel depth (10/4/8) ! shl - shift left (FPGA in 8 and 4-bit modes) - obsolete ! clk - MCLK divisor - 80MHz/(2..129) - obsolete?
! fclk - 0-127 - fpga (compressor) clock (MHz) ! sclk - 0-127 - sensor clock (MHz) - will be limited by sensor driver ! xtra - number of pixel-cycles needed for compressor between frames - debugging only
! gr = 0..63 - analog gain red (or mono) ! gg = 0..63 - analog gain green (or green-"red" line) ! gb = 0..63 - analog gain blue ! ggb = 0..63 - analog gain green ("blue" line - ZR32212 only) ! bg = n - calculate background 1-2-4..16 times (does not need option s/t/v) ! parameters for "instant on" quicktime ! qfr = n - number of frames to send in a quicktime clip ! qpad = % to leave for the frame size to grow (initial size 1-st frame * (100- 1.5*qpad)/100 ! qdur = frame duration in 1/600 of a second ! parameters for quicktime clips (send after shooting) ! qsz = n - clip size in KB (w/o headers) (<=0 will use "instant on") - will be obsolete ! qcmd= (mandatory for videoclip) 1 - start constant compression of all acquired frames 2 - stop constant compression. 3 - acquire the whole buffer and stop 4 - read movie from buffer 6 (and 5?) - stop, then read 7 - acquire buffer, then read
! qts = t - playback time/real time
! gam=gamma - gamma correction (gamma value 0.13..10) ! pxl=00 lowest pixel value (on 8-bit scale) before table to be mapped to zero output value ! pxh=255 hioghest pixel value (on 8-bit scale) before table to be mapped to 255 output value
! fps= xx.xx - desired fps (will truncate to 0.01 fps) See fpsm below ! fpslm = 0..3 - fps limit mode: 0 - do not control fps 1 - limit fps (not higher than) 2 - limit fps - not lower than (not used) 3 - maintain fps (both limits at once) ! hist=n - read frame from "history" applies only to rereading from memory after acquisition of a clip n<=0 - from the end of clip (0 - last), n>0 - from the start (1 - first)
! e = 0..60000 - exposure (1 msec step) ! csb= 0..710 - color saturation blue (%) ! csr= 0..562 - color saturation red (%)
hl - histogram top (all histogram parameters will be made even by truncating, all written derectly to FPGA - no shadows yet) ht - histogram left hw - histogram width hh - histogram height if ((vp=paramValue(gparams, "csb"))) ioctl(devfd, _CCCMD(CCAM_WPARS , P_COLOR_SATURATION_BLUE ), strtol (vp,&cp,10)); if ((vp=paramValue(gparams, "csr"))) ioctl(devfd, _CCCMD(CCAM_WPARS , P_COLOR_SATURATION_RED ), strtol (vp,&cp,10));
! opt = string of 1-character options: ! h - use hardware compression ! c - color mode ! j - (overwrites color mode) - jp4/google mode ! x - flip x ! y - flip y ! p - test pattern (ramp) ! f - test pattern (ramp) fpga ! b - buffer file ! m - restart exposure after sending ! if none of "st" is present - "reload mode" (all but iq and gd ignored) ! s - software trigger ! t - external trigger ! v - video mode - will be obsolete soon (for now will only tell it is not "reload") ! g - use background image - will be obsolete ! q - sent quicktime movie ! u - updates (some) parameters "on the fly", returns 1x1 pix dummy image ! * - unlock "in use" ! +,-,!,@ - will explain later ! ! - if "u!" do everything as real image, just send xml ! w - wait for stop done (now only with qcmd=2) !=============================================================================================================================
Definition at line 2447 of file ccam.c.
Referenced by main().
int frameSub | ( | const char * | sfn, | |
const char * | dfn | |||
) |
Definition at line 653 of file ccam.c.
References dfd, memset(), read, USEBUFFERSIZE, and write.
Referenced by processCal().
int hexdigit | ( | char | c | ) |
Definition at line 25 of file unescape.c.
Definition at line 2456 of file ccam.c.
References _CCCMD, accumData(), bcast_trigger(), calcWhiteBalance(), CAMSEQ_DONE, CAMSEQ_OFF, CAMSEQ_READY, CAMSEQ_RUN, CAMSEQ_SINGLE, CAMSEQ_STOP, CCAM_MAX_NUM_FRAMES, CCAM_RPARS, CCAM_WPARS, CMOSCAM_IOCTYPE, copyQuery, D5, debug_write(), trig_desc_t::enable, trig_desc_t::enable_ping, error304, FPGACONF_WRITEREG, frameShr(), gparams, HTML_ACQUIRE, HTML_RESET, int, IO_CCAM_JPEG, IO_CCAM_JPEG_QUALITY, IO_CCAM_MONITOR_SEQ, IO_CCAM_SET_EXT_EXPOSURE, JPEG_CMD_ACQUIRE, JPEG_CMD_CATCHUP, JPEG_CMD_FORGET, JPEG_CMD_GET, JPEG_CMD_RESET, JPEG_CMD_RESTORE_RP, JPEG_CMD_SAVE_RP, method, optionPresent(), P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_BGFRAME, P_BITS, P_DONTCARE, P_FPNM, P_FPNS, P_UPDATE, paramValue(), parseQuery(), trig_desc_t::port_in, trig_desc_t::port_out, processImage(), prof_next(), prof_start(), programFPN(), qtSourceFileName, query, read, send_hardware_image(), send_jpegfile_image(), send_quicktime(), send_quicktime_clip(), sendLastFrame(), set_fpga_time(), setCamPars(), SLOG, stderr, time, trig_desc, unescape(), uri, XML_ACQUIRE, and XML_RESET.
Definition at line 1734 of file ccam.c.
References paramValue().
Referenced by main(), processImage(), and setCamPars().
char* paramValue | ( | struct key_value * | params, | |
char * | skey | |||
) |
void printDocumentLine | ( | const char * | name, | |
const char * | value, | |||
int | format | |||
) |
Definition at line 1396 of file ccam.c.
Referenced by printStreamerParameters(), and send_html_data().
void printStreamerParameters | ( | int | fmode | ) |
Definition at line 1405 of file ccam.c.
References buf, e, fd, printDocumentLine(), STREAMER_CONF_RUN, and STREAMER_CONF_STOP.
Referenced by send_html_data().
Definition at line 534 of file ccam.c.
References SOCKETBUF_SIZE, and stdout.
Referenced by send_buf_image(), and send_jpegfile_image().
int processCal | ( | const char * | wfn, | |
const char * | bfn, | |||
const char * | cfn | |||
) |
int processImage | ( | struct key_value * | params, | |
const char * | ImgFileName, | |||
const char * | bufFileName, | |||
const char * | pc_par, | |||
int | iq_par, | |||
int | gd_par, | |||
int | html_par, | |||
int | htmlr_par, | |||
const char * | htmll_par, | |||
const char * | htmlj_par, | |||
int | vrml_par, | |||
int | vrmlm_par, | |||
int | vrmld_par, | |||
int | vrmlb_par, | |||
int | vrmli_par, | |||
int | vrmlf_par, | |||
int | vrmll_par, | |||
int | vrmlo_par, | |||
int | vrmlz_par | |||
) |
Definition at line 1739 of file ccam.c.
References _CCCMD, CCAM_RPARS, error304, export_vrml(), optionPresent(), P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_BAYER, P_BITS, P_COLOR, send_buf_image(), send_html_data(), and send_immed_image().
Referenced by main().
void prof_next | ( | const char * | m | ) |
Definition at line 392 of file ccam.c.
References prof_t::count, prof, and prof_t::tv.
Referenced by main().
void prof_start | ( | void | ) |
Definition at line 378 of file ccam.c.
References prof_t::count, prof, and prof_t::tv.
Referenced by main().
void prof_time | ( | const char * | m | ) |
int send_buf_image | ( | int | ImageWidth, | |
int | ImageHeight, | |||
int | Quality, | |||
int | Contrast, | |||
int | Color, | |||
int | bayerOrient, | |||
int | Depth, | |||
const char * | pseudo, | |||
const char * | ImgFileName, | |||
const char * | bufFileName | |||
) |
Definition at line 751 of file ccam.c.
References dma2bmp(), dma2jpeg(), MAP_OPTIONS, MAX_TIMEOUT, process_get(), stderr, time, and USEHTTP10.
Referenced by processImage().
Definition at line 1042 of file ccam.c.
References D6, e, exif, EXIF_IOC_SUBSEC_OR_SET, EXIF_IOC_TIME_GET, EXIF_IOC_TIME_OR_SET, EXIF_IOC_TIME_SET, EXT_JPEG_MMAP_DESC, read, SOCKETBUF_SIZE, stderr, stdout, trailer, and USEHTTP10.
Referenced by main().
int send_html_data | ( | const char * | devfn, | |
const char * | dmafn, | |||
int | mode, | |||
int | refreshPeriod, | |||
const char * | onLoad, | |||
const char * | javaScript | |||
) |
Definition at line 1461 of file ccam.c.
References _CCCMD, beam_params::ar, beam_params::az, calculateBeamParams(), CCAM_RPARS, CMOSCAM_IOCTYPE, beam_params::d, beam_params::dx, beam_params::dxe, beam_params::dy, beam_params::dye, HTML_ACQUIRE, HTML_BEAM_HTML, HTML_BEAM_JS, HTML_RESET, HTML_SENSOR_HTML, HTML_SENSOR_JS, HTML_STATE_HTML, HTML_STATE_JS, IO_CCAM_MONITOR_SEQ, P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_AUXCM, P_BAYER, P_BGFRAME, P_BIN_HOR, P_BIN_VERT, P_BITS, P_BSCALE, P_CLK_FPGA, P_CLK_SENSOR, P_COLOR, P_COLOR_SATURATION_BLUE, P_COLOR_SATURATION_RED, P_DCM_HOR, P_DCM_VERT, P_EXPOS, P_FATZERO, P_FLIP, P_FP100S, P_FPGA_XTRA, P_FPNM, P_FPNS, P_FPSLM, P_FRAME, P_FRAMESYNC_DLY, P_GAINB, P_GAING, P_GAINGB, P_GAINR, P_GAMMA, P_IMAGE_SIZE, P_JPEG_WP, P_LPR, P_MCLK, P_OVERLAP, P_PAGE_ACQ, P_PAGE_READ, P_PERIOD, P_PF_HEIGHT, P_PIXEL_HIGH, P_PIXEL_LOW, P_QUALITY, P_RSCALE, P_SENSOR, P_SENSOR_HEIGHT, P_SENSOR_WIDTH, P_SHIFTL, P_TRIG, P_TRIGGERED, P_VEXPOS, P_VIDEO, P_VIRT_HEIGHT, P_VIRT_WIDTH, P_VIRTTRIG, P_WOI_HEIGHT, P_WOI_LEFT, P_WOI_TOP, P_WOI_WIDTH, printDocumentLine(), printStreamerParameters(), beam_params::s2x, beam_params::s2y, SENSOR_KAC1310, SENSOR_MASK, SENSOR_ZR32112, SENSOR_ZR32212, beam_params::SQ, stderr, beam_params::SxQ, beam_params::SxxQ, beam_params::sxy, beam_params::SxyQ, beam_params::SyQ, beam_params::SyyQ, beam_params::xc, XML_ACQUIRE, XML_BEAM, XML_RESET, XML_SENSOR, XML_STATE, and beam_params::yc.
Referenced by processImage().
int send_immed_image | ( | int | ImageWidth, | |
int | ImageHeight, | |||
int | Quality, | |||
int | Contrast, | |||
int | Color, | |||
int | bayerOrient, | |||
int | Depth, | |||
const char * | pseudo, | |||
const char * | ImgFileName | |||
) |
Definition at line 923 of file ccam.c.
References dma2bmp(), dma2jpeg(), stderr, and USEHTTP10.
Referenced by processImage().
int send_jpegfile_image | ( | const char * | ImgFileName | ) |
Definition at line 845 of file ccam.c.
References MAP_OPTIONS, MAX_TIMEOUT, process_get(), stderr, time, and USEHTTP10.
Referenced by main().
int send_quicktime | ( | const char * | ImgFileName, | |
const char * | qtSourceFileName, | |||
const char * | headerFileName, | |||
int | nrep, | |||
int | safe, | |||
int | sample_dur | |||
) |
Definition at line 1122 of file ccam.c.
References _CCCMD, CCAM_RPARS, CMOSCAM_IOCTYPE, framesize, IO_CCAM_JPEG, IO_CCAM_JPEG_QUALITY, JPEG_CMD_ACQUIRE, JPEG_CMD_CATCHUP, JPEG_CMD_FORGET, memset(), P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_QUALITY, qtime(), read, samplesPerChunk, SOCKETBUF_SIZE, stderr, stdout, timescale, and USEHTTP10.
Referenced by main().
int send_quicktime_clip | ( | const char * | ImgFileName, | |
const char * | qtSourceFileName, | |||
const char * | headerFileName, | |||
int | qcmd, | |||
int | tscale | |||
) |
Definition at line 1266 of file ccam.c.
References _CCCMD, CAMSEQ_JPEG, CAMSEQ_RUN, CAMSEQ_SINGLE, CAMSEQ_STOP, CCAM_DMA_CMD_STOP, CCAM_MAX_NUM_FRAMES, CCAM_RPARS, CMOSCAM_IOCTYPE, IO_CCAM_DMA, IO_CCAM_JPEG, IO_CCAM_MONITOR_SEQ, IO_CCAM_SET_EXT_EXPOSURE, JPEG_CMD_FORGET, JPEG_CMD_FRAMES, JPEG_CMD_JUST_STOP, JPEG_CMD_RESTORE_RP, JPEG_CMD_SAVE_RP, JPEG_CMD_START, JPEG_CMD_STOP, P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_CLK_SENSOR, P_PERIOD, qtime(), read, sample_dur, samplesPerChunk, SOCKETBUF_SIZE, stderr, stdout, timescale, and USEHTTP10.
Referenced by main().
Definition at line 2202 of file ccam.c.
References _CCCMD, buff_size, ccam_dma_buf, CCAM_MMAP_META, CCAM_RPARS, CMOSCAM_IOCTYPE, free(), HeadFileName, IO_CCAM_MONITOR_SEQ, ioctl_fd, malloc(), MAP_OPTIONS, memcpy(), P_JPEG_WP, read, SOCKETBUF_SIZE, stdout, trailer, and USEHTTP10.
Referenced by main().
Definition at line 1807 of file ccam.c.
References _CCCMD, bscale, calcWhiteBalance(), CCAM_RPARS, CCAM_WPARS, gb, gg, ggb, gparams, gr, optionPresent(), P_ACTUAL_HEIGHT, P_ACTUAL_WIDTH, P_BAYER, P_BGFRAME, P_BIN_HOR, P_BIN_VERT, P_BITS, P_BSCALE, P_CLK_FPGA, P_CLK_SENSOR, P_COLOR, P_COLOR_SATURATION_BLUE, P_COLOR_SATURATION_RED, P_DCM_HOR, P_DCM_VERT, P_EXPOS, P_FLIP, P_FP100S, P_FPGA_XTRA, P_FPNM, P_FPNS, P_FPSLM, P_FRAMESYNC_DLY, P_GAINB, P_GAING, P_GAINGB, P_GAINR, P_GAMMA, P_MCLK, P_OVERLAP, P_PAGE_ACQ, P_PF_HEIGHT, P_PIXEL_HIGH, P_PIXEL_LOW, P_QUALITY, P_RSCALE, P_SHIFTL, P_TRIG, P_UPDATE, P_VEXPOS, P_VIRT_HEIGHT, P_VIRT_WIDTH, P_VIRTTRIG, P_WOI_HEIGHT, P_WOI_LEFT, P_WOI_TOP, P_WOI_WIDTH, paramValue(), rscale, and sens.
Referenced by main().
atomic_t accept_trigger |
char** environ |
char* error304 [static] |
Initial value:
"HTTP/1.0 304 Not Modified\n" "Content-Length: 0\n" "Content-Type: image/jpeg\n" "Pragma: no-cache\n\n"
Definition at line 529 of file ccam.c.
Referenced by main(), and processImage().
struct exif_desc_t exif_desc |
Referenced by bcast_trigger_f(), ext353__ioctl(), and ext_make_jpeg_header().
Referenced by prof_next(), prof_start(), and prof_time().
struct trig_desc_t trig_desc |
Referenced by bcast_trigger(), bcast_trigger_f(), and main().