sauvageonnes
This commit is contained in:
		
							parent
							
								
									7e0f2f87dd
								
							
						
					
					
						commit
						9b8a30f0b7
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -39,6 +39,7 @@ v4l2/grabvidseq | ||||
| v4l2/*.o | ||||
| v4l2/*.ppm | ||||
| v4l2/video-infos | ||||
| v4l2/nc-camcontrol | ||||
| 
 | ||||
| tools/fimg2png | ||||
| tools/fimg2pnm | ||||
|  | ||||
| @ -424,7 +424,7 @@ semblent cohérents avec la notion d'image flottante. | ||||
| Certains d'entre eux, les plus simples, sont disponibles. | ||||
| Les autres sont à imaginer. | ||||
| 
 | ||||
| \begin{figure} | ||||
| \begin{figure}[h] | ||||
| \input{cos01.tex}				% XXX XXX XXX  | ||||
| \caption{Correcteur cos01} | ||||
| \end{figure} | ||||
| @ -449,7 +449,7 @@ de contraste, il y a quelques explication en page \pageref{exemplefunc}. | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| \begin{figure} | ||||
| \begin{figure}[h] | ||||
| \input{cos010.tex}				% XXX XXX XXX  | ||||
| \caption{Correcteur cos010} | ||||
| \end{figure} | ||||
| @ -1160,6 +1160,10 @@ l'\textsc{api} de \textsc{v4l2}, et donc, que ce que raconte | ||||
| ce logiciel doit être pris avec des pincettes. En particulier | ||||
| la liste des résolutions disponibles. | ||||
| 
 | ||||
| \subsection{nc-camcontrol} | ||||
| 
 | ||||
| Ajustement \textsl{Brightness Contrast Saturation Hue\dots} | ||||
| 
 | ||||
| % ------------------------------------------------------------------- | ||||
| \section{À l'extérieur} | ||||
| 
 | ||||
|  | ||||
| @ -2,8 +2,9 @@ | ||||
| 
 | ||||
| COPT = -Wall -fpic -g -no-pie -DDEBUG_LEVEL=0 | ||||
| DEPS = ../floatimg.h  ../libfloatimg.a Makefile | ||||
| LOBJ = funcs.o v4l2_pr_structs.o | ||||
| 
 | ||||
| all:	grabvidseq t video-infos | ||||
| all:	grabvidseq t video-infos nc-camcontrol | ||||
| 
 | ||||
| t:	t.c Makefile ${DEPS} funcs.o v4l2_pr_structs.o | ||||
| 	gcc ${COPT} $< funcs.o v4l2_pr_structs.o ../libfloatimg.a -o $@ | ||||
| @ -21,8 +22,10 @@ grabvidseq: grabvidseq.c ${DEPS} rgb2fimg.o | ||||
| 	gcc ${COPT} $<  rgb2fimg.o ../libfloatimg.a -lpnglite -lz -lm -lv4l2 -o $@ | ||||
| 
 | ||||
| video-infos: video-infos.c Makefile funcs.o v4l2_pr_structs.o | ||||
| 	gcc -Wall -g $<  funcs.o v4l2_pr_structs.o ../libfloatimg.a -o $@ | ||||
| 	gcc -Wall -g $<  ${LOBJ} ../libfloatimg.a -o $@ | ||||
| 
 | ||||
| nc-camcontrol: nc-camcontrol.c Makefile funcs.o v4l2_pr_structs.o | ||||
| 	gcc -Wall -g $<  ${LOBJ} ../libfloatimg.a -o $@ | ||||
| 
 | ||||
| #		---------------
 | ||||
| #		external things
 | ||||
|  | ||||
| @ -88,6 +88,10 @@ if (-1 == fd) { | ||||
| 
 | ||||
| dev_name = strdup(device);		/* XXX */ | ||||
| 
 | ||||
| if (verbosity) { | ||||
| 	fprintf(stderr, "device '%s' opened as #%d\n", device, fd); | ||||
| 	} | ||||
| 
 | ||||
| return fd; | ||||
| } | ||||
| /* --------------------------------------------------------------------- */ | ||||
|  | ||||
							
								
								
									
										55
									
								
								v4l2/nc-camcontrol.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								v4l2/nc-camcontrol.c
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | ||||
| /*
 | ||||
|  *		tests pour capturer les webcams | ||||
|  */ | ||||
| 
 | ||||
| #include  <stdio.h> | ||||
| #include  <stdlib.h> | ||||
| #include  <unistd.h> | ||||
| #include  <math.h> | ||||
| #include  <string.h> | ||||
| #include  <sys/ioctl.h> | ||||
| #include  <errno.h> | ||||
| #include  <inttypes.h> | ||||
| #include  <linux/videodev2.h> | ||||
| 
 | ||||
| #include  "../floatimg.h" | ||||
| 
 | ||||
| #include  "v4l2_pr_structs.h" | ||||
| #include  "funcs.h" | ||||
| 
 | ||||
| int		verbosity; | ||||
| 
 | ||||
| /* --------------------------------------------------------------------- */ | ||||
| void help(int n) | ||||
| { | ||||
| 
 | ||||
| puts("camera controls"); | ||||
| puts("\t-d bla\t\tselect video device"); | ||||
| 
 | ||||
| exit(0); | ||||
| } | ||||
| /* --------------------------------------------------------------------- */ | ||||
| int main(int argc, char *argv[]) | ||||
| { | ||||
| int		foo, opt; | ||||
| int		etype = 0; | ||||
| char		*device = "/dev/video0"; | ||||
| char		*title = NULL; | ||||
| int		K = 0; | ||||
| 
 | ||||
| while ((opt = getopt(argc, argv, "d:e:hK:lT:v")) != -1) { | ||||
| 	switch(opt) { | ||||
| 		case 'd':	device = optarg;	break; | ||||
| 		case 'e':	etype = atol(optarg);	break; | ||||
| 		case 'h':	help(0);		break; | ||||
| 		case 'K':	K = atol(optarg);	break; | ||||
| 		// case 'l':	liste_des_devices(0);	break;
 | ||||
| 		case 'v':	verbosity++;		break; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| return 0; | ||||
| } | ||||
| /* --------------------------------------------------------------------- */ | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user