aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/pwcview
diff options
context:
space:
mode:
authorkwm <kwm@FreeBSD.org>2010-01-24 02:09:50 +0800
committerkwm <kwm@FreeBSD.org>2010-01-24 02:09:50 +0800
commit0aee1cccb167722d8d60c1ab5c004d4be9e7a9d6 (patch)
treefce5a5c8c4813ad632bf8c7c09946689e9ea8183 /multimedia/pwcview
parentef343d7dc849e97b13e8969f6612618173b60f0a (diff)
downloadfreebsd-ports-gnome-0aee1cccb167722d8d60c1ab5c004d4be9e7a9d6.tar.gz
freebsd-ports-gnome-0aee1cccb167722d8d60c1ab5c004d4be9e7a9d6.tar.zst
freebsd-ports-gnome-0aee1cccb167722d8d60c1ab5c004d4be9e7a9d6.zip
Add support for more resolutions.
Submitted by: Jung-uk Kim <jkim@FreeBSD.org> Approved by: maintainer
Diffstat (limited to 'multimedia/pwcview')
-rw-r--r--multimedia/pwcview/Makefile1
-rw-r--r--multimedia/pwcview/files/patch-pwcview.c48
2 files changed, 42 insertions, 7 deletions
diff --git a/multimedia/pwcview/Makefile b/multimedia/pwcview/Makefile
index 77c556d691f1..e5011fcf201f 100644
--- a/multimedia/pwcview/Makefile
+++ b/multimedia/pwcview/Makefile
@@ -7,6 +7,7 @@
PORTNAME= pwcview
PORTVERSION= 1.4.1
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://raaf.atspace.org/ \
http://www.selasky.org/hans_petter/video4bsd/releases/ \
diff --git a/multimedia/pwcview/files/patch-pwcview.c b/multimedia/pwcview/files/patch-pwcview.c
index 19691c8f2e19..af76831dbdf5 100644
--- a/multimedia/pwcview/files/patch-pwcview.c
+++ b/multimedia/pwcview/files/patch-pwcview.c
@@ -1,5 +1,5 @@
---- pwcview.c.orig 2010-01-14 18:40:49.000000000 +0100
-+++ pwcview.c 2010-01-14 18:57:19.000000000 +0100
+--- pwcview.c.orig 2007-10-09 03:23:58.000000000 -0400
++++ pwcview.c 2010-01-22 17:09:20.000000000 -0500
@@ -37,11 +37,8 @@
#ifndef NOGUI
#include <SDL.h>
@@ -377,7 +377,41 @@
jpeg_stdio_dest(cinfo, outfile);
jpeg_start_compress(cinfo, TRUE);
-@@ -1218,7 +1217,7 @@
+@@ -1041,7 +1040,10 @@
+ }
+ #endif
+
+-#define PSZ_MAX 6
++#ifdef PSZ_MAX
++#undef PSZ_MAX
++#endif
++#define PSZ_MAX 10
+ struct {
+ char *name;
+ int width;
+@@ -1052,7 +1054,11 @@
+ { "qcif", 176, 144 },
+ { "sif", 320, 240 },
+ { "cif", 352, 288 },
+- { "vga", 640, 480 }
++ { "vga", 640, 480 },
++ { "svga", 800, 600 },
++ { "xga", 1024, 768 },
++ { "sxga", 1280, 1024 },
++ { "uxga", 1600, 1200 }
+ };
+
+ int usage()
+@@ -1184,7 +1190,7 @@
+ break;
+
+ if(i == PSZ_MAX) {
+- fprintf(stderr,"Invalid size, valid sizes: sqcif, qsif, qcif, sif, cif, vga\n");
++ fprintf(stderr,"Invalid size, valid sizes: sqcif, qsif, qcif, sif, cif, vga, svga, xga, sxga, uxga\n");
+ return 1;
+ }
+ break;
+@@ -1218,7 +1224,7 @@
vw.flags = fps << PWC_FPS_SHIFT;
imgsize = (vw.width * vw.height * 3)/2;
@@ -386,7 +420,7 @@
if(errno == EBUSY)
fprintf(stderr,"Failed to access webcam: Device in use\n");
else {
-@@ -1236,17 +1235,17 @@
+@@ -1236,17 +1242,17 @@
}
fcntl(fd,F_SETFD,FD_CLOEXEC);
@@ -407,7 +441,7 @@
fprintf(stderr,"Failed to set webcam to: %dx%d (%s) at %d fps (%s)\n",
vw.width,vw.height,sizes[i].name,fps,strerror(errno));
exit(1);
-@@ -1254,12 +1253,12 @@
+@@ -1254,12 +1260,12 @@
fprintf(stderr,"Webcam set to: %dx%d (%s) at %d fps\n",vw.width,vw.height,sizes[i].name,fps);
if(headless && snapcnt == 0 && motionrecord == 0) { /* Done */
@@ -422,7 +456,7 @@
probe.type >= 720 && probe.type <= 740)
snapbtn = 1;
}
-@@ -1327,7 +1326,7 @@
+@@ -1327,7 +1333,7 @@
timerid = SDL_AddTimer(interval,cbtimer,NULL);
}
#endif
@@ -431,7 +465,7 @@
int snap = y[0] & 0x01;
if(!frozen && size != imgsize) {
if(size != -1) {
-@@ -1498,7 +1497,7 @@
+@@ -1498,7 +1504,7 @@
if(size != 0)
perror("Error reading from webcam");