summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Klemkow <j.klemkow@wemelug.de>2013-02-01 14:19:06 +0100
committerJan Klemkow <j.klemkow@wemelug.de>2013-02-01 14:19:06 +0100
commitc050f52cba0b72fb5759e88b41db8bd700cd9bc3 (patch)
tree5519e0ba2482b3c40d5da6f6c894e73b990e0995 /src
parent34e92408409a777d4697180a3cce09fc1f4cafb5 (diff)
downloadadvtime-c050f52cba0b72fb5759e88b41db8bd700cd9bc3.tar.gz
advtime-c050f52cba0b72fb5759e88b41db8bd700cd9bc3.tar.bz2
advtime-c050f52cba0b72fb5759e88b41db8bd700cd9bc3.zip
add help flag and improve help message
Diffstat (limited to 'src')
-rw-r--r--src/cuttime.c6
-rw-r--r--src/overlap.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/cuttime.c b/src/cuttime.c
index 4b1a494..29c8735 100644
--- a/src/cuttime.c
+++ b/src/cuttime.c
@@ -22,12 +22,13 @@ static void
usage(void)
{
fprintf(stderr,
- "cuttime [-adfs] FILE\n"
+ "cuttime [-adfhs] FILE\n"
"\n"
"OPTIONS\n"
"\t-a\tcalculate average color of a frame\n"
"\t-d\tcalculate difference betweenprev and next frame\n"
"\t-f\tprint frame number\n"
+ "\t-h\tprint this help message\n"
"\t-s\tsave frame from detected cut\n");
exit(EXIT_FAILURE);
@@ -44,7 +45,7 @@ main(int argc, char **argv)
double diff = 0.0, old_diff = 0.0;
char filename[BUFSIZ];
- while ((ch = getopt(argc, argv, "adfs")) != -1) {
+ while ((ch = getopt(argc, argv, "adfsh")) != -1) {
switch (ch) {
case 'a':
average_flag = 1;
@@ -58,6 +59,7 @@ main(int argc, char **argv)
case 's':
showcut_flag = 1;
break;
+ case 'h':
default:
usage();
/* NOTREACHED */
diff --git a/src/overlap.c b/src/overlap.c
index 207a306..9af4e46 100644
--- a/src/overlap.c
+++ b/src/overlap.c
@@ -10,10 +10,11 @@
static void
usage(void)
{
- fprintf(stderr, "overlap [OPTIONS] FIRST_VIDEO SECOND_VIDEO\n"
+ fprintf(stderr, "overlap [-dh] [-t DURATION] FIRST_VIDEO SECOND_VIDEO\n"
"\n"
"OPTIONS\n"
"\t-d\tprint diff for every frame\n"
+ "\t-h\tprint this help message\n"
"\t-t\tmax duration to find overlap in milliseconds\n"
"\t\t(default 60000 = 1 min)\n");
@@ -34,7 +35,7 @@ main(int argc, char **argv)
int64_t min_diff_time = 0; /* dts at overlaping frame */
double min_diff, diff = 0.0;
- while ((ch = getopt(argc, argv, "dt")) != -1) {
+ while ((ch = getopt(argc, argv, "dth")) != -1) {
switch (ch) {
case 'd':
diff_flag = 1; /* print diff of every frame */
@@ -42,6 +43,7 @@ main(int argc, char **argv)
case 't':
duration = strtol(optarg, NULL, 10);
break;
+ case 'h':
default:
usage();
/* NOTREACHED */