summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2010-09-09 20:26:22 (GMT)
committer Jaromil <jaromil@dyne.org>2010-09-09 20:26:22 (GMT)
commit979b00e4576f343f2aa63f3f2be94bc43c90d3d7 (patch)
treec0d09a0850b01b0cff8c455582964061c02eaa72
parent082d2d62f85602999563e73ac11adcce8473819c (diff)
removed size and norm settings
V4L2 doesn't supports these settings (yet?) couldn't find how to change the size of grabbed video, also in freej... maybe there is an external application for that?
-rw-r--r--hasciicam.112
-rw-r--r--hasciicam.c23
2 files changed, 6 insertions, 29 deletions
diff --git a/hasciicam.1 b/hasciicam.1
index ff02539..ac5f235 100644
--- a/hasciicam.1
+++ b/hasciicam.1
@@ -7,8 +7,6 @@ hasciicam \- (h)ascii for the masses!
[ \fB-m \fImode\fR ]
[ \fB-d \fIdevice\fR ]
[ \fB-i \fIinput\fR ]
-[ \fB-n \fInorm\fR ]
-[ \fB-s \fIsize\fR ]
[ \fB-o \fIoutput\fR ]
[ \fB-f \fI:user%pass@host:/dir\fR ]
[ \fBrendering\-options\fR ]
@@ -48,12 +46,6 @@ Use specified capture device. Default is \fB/dev/video\fP.
.IP "-i --input"
Selects the \fBdevice\fP's input channel to be used for grabbing frames. Default is \fB1\fP.
.B
-.IP "-n --norm"
-Selects video format to be used on tuner: \fBpal\fP | \fBntsc\fP | \fBsecam\fP | \fBauto\fP. Default is \fBauto\fP.
-.B
-.IP "-s --size"
-Sets rendered ascii frames size to \fBWxH\fP characters. Grabbed frame size is computed from this value, resulting into (W<<1)x(H<<1). Default is \fB96x72\fP, or the minimum grabbing size supported by the device if greater.
-.B
.IP "-o --aafile"
Defines the file where to save rendered ascii, overwrited every \fIrefresh\fP seconds. Default is \fBhasciicam.html\fP when in \fBhtml\fP mode, \fBhasciicam.txt\fP when in \fBtext\fP mode (unuseful when in \fBlive\fP mode).
.B
@@ -94,9 +86,9 @@ Specifies the foreground color to be used in the form of a \fIhex RGB triplet\fR
.SH EXAMPLES
.B hasciicam -m html -o watchme.html
.br
-puts your \fIhtml\fP formatted ascii into watchme.html
+puts your \fIhtml\fP formatted ascii into watchme.html - then just open it with your favourite browser.
.br
-.B hasciicam -m text -s79x24 -o ~/.plan
+.B hasciicam -m text -o ~/.plan
.br
puts your ascii into your local .plan (fingercam)
.B hasciicam -m html -S 2 -o index.html -f :jaromil%sasuchen@dyne.org:korova
diff --git a/hasciicam.c b/hasciicam.c
index 2e43935..ceba266 100644
--- a/hasciicam.c
+++ b/hasciicam.c
@@ -73,8 +73,7 @@ char *help =
"-m --mode mode: live|html|text - default live\n"
"-d --device video grabbing device - default /dev/video\n"
"-i --input input channel number - default 1\n"
-"-n --norm norm: pal|ntsc|secam|auto - default auto\n"
-"-s --size ascii image size WxH - default 96x72\n"
+//"-s --size ascii image size WxH - default 96x72\n"
"-o --aafile dumped file - default hasciicam.[txt|html]\n"
"-f --ftp ie: :user%pass@host:dir - default none\n"
"-D --daemon run in background - default foregrond\n"
@@ -99,8 +98,7 @@ const struct option long_options[] = {
{"mode", required_argument, NULL, 'm'},
{"device", required_argument, NULL, 'd'},
{"input", required_argument, NULL, 'i'},
- {"norm", required_argument, NULL, 'n'},
- {"size", required_argument, NULL, 's'},
+// {"size", required_argument, NULL, 's'},
{"aafile", required_argument, NULL, 'o'},
{"ftp", required_argument, NULL, 'f'},
{"daemon", no_argument, NULL, 'D'},
@@ -121,7 +119,7 @@ const struct option long_options[] = {
{0, 0, 0, 0}
};
-char *short_options = "hHvqm:d:i:n:s:f:DS:a:r:o:b:c:g:IB:F:O:Q:U:G:";
+char *short_options = "hHvqm:d:i:f:DS:a:r:o:b:c:g:IB:F:O:Q:U:G:";
/* default configuration */
int quiet = 0;
@@ -130,7 +128,6 @@ int useftp = 0;
int inputch = 0;
int daemon_mode = 0;
int invert = 0;
-int norm = VIDEO_MODE_AUTO;
struct geometry {
int w, h, size;
@@ -516,18 +513,6 @@ config_init (int argc, char *argv[]) {
exit (1);
}
break;
- case 'n':
- if (strcmp (optarg, "pal") == 0)
- norm = VIDEO_MODE_PAL;
- else if (strcmp (optarg, "ntsc") == 0)
- norm = VIDEO_MODE_NTSC;
- else if (strcmp (optarg, "secam") == 0)
- norm = VIDEO_MODE_SECAM;
- else if (strcmp (optarg, "auto") == 0)
- norm = VIDEO_MODE_AUTO;
- else
- fprintf (stderr, "!! invalid video norm selected, using auto\n");
- break;
case 's':
{
@@ -719,7 +704,7 @@ main (int argc, char **argv) {
setuid (uid);
setgid (gid);
- fprintf (stderr, "Ascii size is %dx%d\n", aa_geo.w, aa_geo.h);
+ fprintf (stderr, "Ascii size is %dx%d\n", aw, ah);
switch (mode)
{