Add linux manpage and update main accordingly

This commit is contained in:
Bruno Herbelin
2022-03-19 21:24:42 +01:00
parent 5853495125
commit f27a88787d
2 changed files with 87 additions and 15 deletions

63
docs/vimix.1 Normal file
View File

@@ -0,0 +1,63 @@
.\"Created by Bruno Herbelin
.TH vimix 1 "March 2022" "0.7.0" "vimix manpage"
.SH NAME
vimix \- Video live mixer
..SH SYNOPSIS
.B vimix
.RI [ OPTIONS ]
.RI [ FILE ]
.br
.SH DESCRIPTION
.B vimix
performs graphical mixing and blending of several movie clips and computer generated graphics, with image processing effects in real-time.
Its intuitive and hands-on user interface gives direct control on image opacity and shape for producing live graphics during concerts or VJ-ing sessions.
The output image is typically projected full-screen on an external monitor or a projector, but can be streamed live (SRT) or recorded (no audio).
.SH OPTIONS
.TP
.BR \-V ", " \-\^\-version
Output the version number of
.B vimix
and exit.
.TP
.BR \-C ", " \-\^\-clean
Clean the user stored preferences of
.B vimix
and exit.
.TP
.BR \-T ", " \-\^\-test
Perform a minimal rendering test and exit.
.SH FILE
Launches
.B vimix
and tries to open the provided session file (.mix extension).
.SH "SEE ALSO"
.SS "Regular Manual Pages"
.BR gst-launch-1.0 (1),
.BR gst-inspect-1.0 (1)
.SS "Documentation"
A user manual and tutorials are available online (https://github.com/brunoherbelin/vimix/wiki).
.SH BUGS
.SS "Reporting bugs"
Report bugs and issues on github (https://github.com/brunoherbelin/vimix).
.SH COPYRIGHT
GPL3+ license
.PP
Copyright (c) 2022 Bruno Herbelin
.PP
This document is part of the vimix software.

View File

@@ -64,26 +64,35 @@ int main(int argc, char *argv[])
// one extra argument is given
if (argc == 2) {
std::string argument(argv[1]);
if (argument == "--clean" || argument == "-c") {
// clean start if requested : Save empty settings before loading
Settings::Save();
return 0;
}
else if (argument == "--version" || argument == "-v") {
if (argument[0] == '-') {
if (argument == "--clean" || argument == "-C") {
// clean start if requested : Save empty settings before loading
Settings::Save();
fprintf(stderr, "%s: clean OK\n", APP_NAME);
return 0;
}
else if (argument == "--version" || argument == "-V") {
#ifdef VIMIX_VERSION_MAJOR
fprintf(stderr, "%s %d.%d.%d\n", APP_NAME, VIMIX_VERSION_MAJOR, VIMIX_VERSION_MINOR, VIMIX_VERSION_PATCH);
fprintf(stderr, "%s: version %d.%d.%d\n", APP_NAME, VIMIX_VERSION_MAJOR, VIMIX_VERSION_MINOR, VIMIX_VERSION_PATCH);
#else
fprintf(stderr, "%s\n", APP_NAME);
fprintf(stderr, "%s\n", APP_NAME);
#endif
return 0;
}
else if (argument == "--test" || argument == "-t") {
if ( !Rendering::manager().init() ) {
fprintf(stderr, "%s Failed\n", APP_NAME);
return 0;
}
else if (argument == "--test" || argument == "-T") {
if ( !Rendering::manager().init() ) {
fprintf(stderr, "%s: test Failed\n", APP_NAME);
return 1;
}
fprintf(stderr, "%s: test OK\n", APP_NAME);
return 0;
}
else {
fprintf(stderr, "%s: unrecognized option '%s'\n"
"Usage: %s [-V, --version][-T, --test][-C, --clean][FILE]\n",
APP_NAME, argument.c_str(), APP_NAME);
return 1;
}
fprintf(stderr, "%s OK\n", APP_NAME);
return 0;
}
else {
// try to open the file