Imported Upstream version 0.23
Andrew Caudwell
14 years ago
0 | 0.23: | |
1 | * Hiding filenames no longer hides directory names. | |
2 | * Fixed --stop-on-idle option. | |
3 | * Added --stop-at-end option (more intuitive than --stop-position 1.0). | |
4 | ||
0 | 5 | 0.22: |
1 | 6 | * Fixed Mercurial log order. |
2 | 7 |
51 | 51 | Begin at some position in the log (between 0.0 and 1.0). |
52 | 52 | |
53 | 53 | --stop-position POSITION |
54 | Stop at some position. | |
54 | Stop (exit) at some position in the log (does not work with STDIN). | |
55 | 55 | |
56 | 56 | --stop-on-idle |
57 | 57 | Stop on break in activity. May be combined with --stop-position. |
58 | ||
58 | ||
59 | --stop-at-end | |
60 | Stop (exit) at the end of the log / stream. | |
61 | ||
62 | --loop | |
63 | Loop back to the start of the log when the end is reached. | |
64 | ||
59 | 65 | -a, --auto-skip-seconds SECONDS |
60 | 66 | Automatically skip to next entry if nothing happens for a specified number of seconds. |
61 | 67 | |
73 | 79 | |
74 | 80 | -b, --background FFFFFF |
75 | 81 | Background colour in hex. |
76 | ||
77 | --loop | |
78 | Loop back to the start of the log when the end is reached. | |
79 | 82 | |
80 | 83 | --date-format FORMAT |
81 | 84 | Specify display date string (strftime format). |
220 | 223 | You can create a video of Gource using the --output-ppm-stream option. This creates an uncompressed sequence of |
221 | 224 | screenshots in PPM format which can then be processed by another program (such as ffmpeg) to produce a video file. |
222 | 225 | |
223 | The below command line will create a video at 60fps in x264 format (assumes you have ffmpeg with x264 support): | |
224 | ||
225 | gource --output-ppm-stream - | ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 gource.mp4 | |
226 | The below command line will create a video at 60fps in x264 format, stopping at the end of the log (assumes you have ffmpeg with x264 support): | |
227 | ||
228 | gource --stop-at-end --output-ppm-stream - | ffmpeg -y -b 3000K -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 gource.mp4 | |
226 | 229 | |
227 | 230 | Interface: |
228 | 231 |
0 | 0 | #! /bin/sh |
1 | 1 | # Guess values for system-dependent variables and create Makefiles. |
2 | # Generated by GNU Autoconf 2.61 for Gource 0.22. | |
2 | # Generated by GNU Autoconf 2.61 for Gource 0.23. | |
3 | 3 | # |
4 | 4 | # Report bugs to <acaudwell@gmail.com>. |
5 | 5 | # |
573 | 573 | # Identity of this package. |
574 | 574 | PACKAGE_NAME='Gource' |
575 | 575 | PACKAGE_TARNAME='gource' |
576 | PACKAGE_VERSION='0.22' | |
577 | PACKAGE_STRING='Gource 0.22' | |
576 | PACKAGE_VERSION='0.23' | |
577 | PACKAGE_STRING='Gource 0.23' | |
578 | 578 | PACKAGE_BUGREPORT='acaudwell@gmail.com' |
579 | 579 | |
580 | 580 | ac_unique_file="src/main.h" |
1215 | 1215 | # Omit some internal or obsolete options to make the list less imposing. |
1216 | 1216 | # This message is too long to be a string in the A/UX 3.1 sh. |
1217 | 1217 | cat <<_ACEOF |
1218 | \`configure' configures Gource 0.22 to adapt to many kinds of systems. | |
1218 | \`configure' configures Gource 0.23 to adapt to many kinds of systems. | |
1219 | 1219 | |
1220 | 1220 | Usage: $0 [OPTION]... [VAR=VALUE]... |
1221 | 1221 | |
1284 | 1284 | |
1285 | 1285 | if test -n "$ac_init_help"; then |
1286 | 1286 | case $ac_init_help in |
1287 | short | recursive ) echo "Configuration of Gource 0.22:";; | |
1287 | short | recursive ) echo "Configuration of Gource 0.23:";; | |
1288 | 1288 | esac |
1289 | 1289 | cat <<\_ACEOF |
1290 | 1290 | |
1387 | 1387 | test -n "$ac_init_help" && exit $ac_status |
1388 | 1388 | if $ac_init_version; then |
1389 | 1389 | cat <<\_ACEOF |
1390 | Gource configure 0.22 | |
1390 | Gource configure 0.23 | |
1391 | 1391 | generated by GNU Autoconf 2.61 |
1392 | 1392 | |
1393 | 1393 | Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, |
1401 | 1401 | This file contains any messages produced by compilers while |
1402 | 1402 | running configure, to aid debugging if configure makes a mistake. |
1403 | 1403 | |
1404 | It was created by Gource $as_me 0.22, which was | |
1404 | It was created by Gource $as_me 0.23, which was | |
1405 | 1405 | generated by GNU Autoconf 2.61. Invocation command line was |
1406 | 1406 | |
1407 | 1407 | $ $0 $@ |
9797 | 9797 | # report actual input values of CONFIG_FILES etc. instead of their |
9798 | 9798 | # values after options handling. |
9799 | 9799 | ac_log=" |
9800 | This file was extended by Gource $as_me 0.22, which was | |
9800 | This file was extended by Gource $as_me 0.23, which was | |
9801 | 9801 | generated by GNU Autoconf 2.61. Invocation command line was |
9802 | 9802 | |
9803 | 9803 | CONFIG_FILES = $CONFIG_FILES |
9840 | 9840 | _ACEOF |
9841 | 9841 | cat >>$CONFIG_STATUS <<_ACEOF |
9842 | 9842 | ac_cs_version="\\ |
9843 | Gource config.status 0.22 | |
9843 | Gource config.status 0.23 | |
9844 | 9844 | configured by $0, generated by GNU Autoconf 2.61, |
9845 | 9845 | with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" |
9846 | 9846 |
2 | 2 | |
3 | 3 | AC_PREREQ(2.61) |
4 | 4 | |
5 | AC_INIT(Gource, 0.22, [acaudwell@gmail.com]) | |
5 | AC_INIT(Gource, 0.23, [acaudwell@gmail.com]) | |
6 | 6 | AC_CONFIG_SRCDIR([src/main.h]) |
7 | 7 | |
8 | 8 | AC_CANONICAL_HOST |
22 | 22 | Begin at some position in the log (between 0.0 and 1.0). |
23 | 23 | .TP |
24 | 24 | \fB \-\-stop\-position POSITION\fR |
25 | Stop at some position. | |
25 | Stop (exit) at some position in the log (does not work with STDIN). | |
26 | 26 | .TP |
27 | 27 | \fB \-\-stop\-on\-idle\fR |
28 | 28 | Stop on break in activity. May be combined with \-\-stop\-position. |
29 | 29 | .TP |
30 | \fB \-\-stop\-at\-end\fR | |
31 | Stop (exit) at the end of the log / stream. | |
32 | .TP | |
33 | \fB \-\-loop\fR | |
34 | Loop back to the start of the log when the end is reached. | |
35 | .TP | |
30 | 36 | \fB\-a, \-\-auto\-skip\-seconds SECONDS\fR |
31 | 37 | Automatically skip to next entry if nothing happens for a specified number of seconds. |
32 | 38 | .TP |
44 | 50 | .TP |
45 | 51 | \fB\-b, \-\-background FFFFFF\fR |
46 | 52 | Background colour in hex. |
47 | .TP | |
48 | \fB\-\-loop\fR | |
49 | Loop back to the start of the log when the end is reached. | |
50 | 53 | .TP |
51 | 54 | \fB\-\-date\-format FORMAT\fR |
52 | 55 | Specify display date string (strftime format). |
200 | 203 | You can create a video of Gource using the \-\-output\-ppm\-stream option. This creates an uncompressed sequence of |
201 | 204 | screenshots in PPM format which can then be processed by another program (such as ffmpeg) to produce a video file. |
202 | 205 | |
203 | The below command line will create a video at 60fps in x264 format (assumes you have ffmpeg with x264 support): | |
204 | ||
205 | .ti 10 | |
206 | gource \-\-output-ppm-stream \- | ffmpeg \-y \-b 3000K \-r 60 \-f image2pipe \-vcodec ppm \-i \- \-vcodec libx264 gource.mp4 | |
206 | The below command line will create a video at 60fps in x264 format, stopping at the end of the log (assumes you have ffmpeg with x264 support): | |
207 | ||
208 | .ti 10 | |
209 | gource \-\-stop\-at\-end \-\-output\-ppm\-stream \- | ffmpeg \-y \-b 3000K \-r 60 \-f image2pipe \-vcodec ppm \-i \- \-vcodec libx264 gource.mp4 | |
207 | 210 | |
208 | 211 | .SH INTERFACE |
209 | 212 | The time shown in the top left of the screen is set initially from the first log entry read and is incremented according to the simulation speed (\-\-seconds\-per\-day). |
897 | 897 | drawDirName(dirfont); |
898 | 898 | } |
899 | 899 | |
900 | if(frustum.boundsInFrustum(quadItemBounds)) { | |
900 | if(!(gGourceHideFilenames||gGourceHideFiles) && frustum.boundsInFrustum(quadItemBounds)) { | |
901 | 901 | for(std::list<RFile*>::iterator it = files.begin(); it!=files.end(); it++) { |
902 | 902 | RFile* f = *it; |
903 | 903 | f->drawName(); |
16 | 16 | |
17 | 17 | #include "file.h" |
18 | 18 | |
19 | float gGourceFileDiameter = 8.0; | |
20 | float gGourceMaxFileIdle = 60.0; | |
19 | float gGourceFileDiameter = 8.0; | |
20 | float gGourceMaxFileIdle = 60.0; | |
21 | bool gGourceHideFiles = false; | |
21 | 22 | bool gGourceHideFilenames = false; |
22 | 23 | |
23 | 24 | std::vector<RFile*> gGourceRemovedFiles; |
84 | 84 | extern float gGourceMaxFileIdle; |
85 | 85 | extern float gGourceFileDiameter; |
86 | 86 | extern bool gGourceHideFilenames; |
87 | extern bool gGourceHideFiles; | |
87 | 88 | |
88 | 89 | extern std::vector<RFile*> gGourceRemovedFiles; |
89 | 90 |
19 | 19 | float gGourceAutoSkipSeconds = 3.0; |
20 | 20 | bool gGourceFileLoop = false; |
21 | 21 | bool gGourceHideTree = false; |
22 | bool gGourceHideFiles = false; | |
23 | 22 | bool gGourceHideUsernames = false; |
24 | 23 | bool gGourceHideDate = false; |
25 | 24 | bool gGourceDisableBloom = false; |
137 | 136 | printf(" -f Fullscreen\n\n"); |
138 | 137 | printf(" -p, --start-position POSITION Begin at some position in the log (0.0-1.0)\n"); |
139 | 138 | printf(" --stop-position POSITION Stop at some position\n"); |
140 | printf(" --stop-on-idle Stop on break in activity\n\n"); | |
139 | printf(" --stop-on-idle Stop on break in activity\n"); | |
140 | printf(" --stop-at-end Stop at end of the log\n"); | |
141 | printf(" --loop Loop at the end of the log\n\n"); | |
142 | ||
141 | 143 | printf(" -a, --auto-skip-seconds SECONDS Auto skip to next entry if nothing happens\n"); |
142 | 144 | printf(" for a number of seconds (default: 3)\n"); |
143 | 145 | printf(" -s, --seconds-per-day SECONDS Speed in seconds per day (default: 4)\n"); |
150 | 152 | printf(" --default-user-image IMAGE Default user image file\n"); |
151 | 153 | printf(" --colour-images Colourize user images\n\n"); |
152 | 154 | |
153 | printf(" --loop Loop when the end of the log is reached\n\n"); | |
154 | ||
155 | printf(" --date-format FORMAT Specify display date string (strftime format)\n\n"); | |
156 | ||
157 | printf(" --log-format FORMAT Specify format of log (git,cvs,custom)\n"); | |
155 | printf(" --date-format FORMAT Specify display date string (strftime format)\n"); | |
156 | printf(" --log-format FORMAT Specify format of log (git,cvs,custom)\n"); | |
158 | 157 | printf(" --git-branch Get the git log of a particular branch\n"); |
159 | 158 | printf(" --git-log-command Show git log command used by gource\n"); |
160 | 159 | printf(" --cvs-exp-command Show cvs-exp.pl log command used by gource\n"); |
323 | 322 | |
324 | 323 | start_position = 0.0; |
325 | 324 | stop_position = 0.0; |
325 | ||
326 | stop_on_idle=false; | |
327 | stop_position_reached=false; | |
328 | stop_at_end=false; | |
326 | 329 | |
327 | 330 | paused = false; |
328 | 331 | first_read = true; |
823 | 826 | } |
824 | 827 | |
825 | 828 | last_percent = 0.0; |
826 | stop_on_idle = false; | |
827 | stop_position_reached = true; | |
828 | 829 | |
829 | 830 | files.clear(); |
830 | 831 | |
898 | 899 | start_position = percent; |
899 | 900 | } |
900 | 901 | |
902 | void Gource::setStopAtEnd(bool stop_at_end) { | |
903 | this->stop_at_end = stop_at_end; | |
904 | } | |
905 | ||
901 | 906 | void Gource::setStopOnIdle(bool stop_on_idle) { |
902 | 907 | this->stop_on_idle = stop_on_idle; |
903 | 908 | } |
904 | 909 | |
905 | 910 | void Gource::setStopPosition(float percent) { |
906 | 911 | stop_position = percent; |
907 | stop_position_reached = false; | |
908 | 912 | } |
909 | 913 | |
910 | 914 | bool Gource::canSeek() { |
950 | 954 | slider.setPercent(last_percent); |
951 | 955 | } |
952 | 956 | |
957 | bool is_finished = commitlog->isFinished(); | |
958 | ||
953 | 959 | //see if we have reached the end and should exit |
954 | 960 | //the next time all users are idle |
955 | if(stop_position > 0.0 && (commitlog->isFinished() || last_percent >= stop_position)) { | |
961 | if( stop_at_end && is_finished | |
962 | || stop_position > 0.0 && commitlog->isSeekable() && (is_finished || last_percent >= stop_position)) { | |
963 | ||
956 | 964 | stop_position_reached = true; |
957 | 965 | |
958 | 966 | //if not stopping on idle exit immediately |
1189 | 1197 | if(idle_users==users.size()) { |
1190 | 1198 | idle_time += dt; |
1191 | 1199 | |
1192 | //stop_on_idle is set and stop_position_reached | |
1193 | if(stop_on_idle && stop_position_reached) appFinished = true; | |
1200 | //if stop_on_idle is set and either no stop condition is set or the condition has been reached, exit | |
1201 | if(stop_on_idle && (stop_position == 0.0f && !stop_at_end || stop_position_reached)) appFinished = true; | |
1194 | 1202 | |
1195 | 1203 | } else { |
1196 | 1204 | idle_time = 0; |
1661 | 1669 | //draw bloom |
1662 | 1670 | drawBloom(frustum, dt); |
1663 | 1671 | |
1664 | if(!(gGourceHideFiles || gGourceHideFilenames)) { | |
1665 | root->drawNames(font,frustum); | |
1666 | } | |
1672 | root->drawNames(font,frustum); | |
1667 | 1673 | |
1668 | 1674 | if(!(gGourceHideUsernames || gGourceHideUsers)) { |
1669 | 1675 | for(std::map<std::string,RUser*>::iterator it = users.begin(); it!=users.end(); it++) { |
17 | 17 | #ifndef GOURCE_H |
18 | 18 | #define GOURCE_H |
19 | 19 | |
20 | #define GOURCE_VERSION "0.22" | |
20 | #define GOURCE_VERSION "0.23" | |
21 | 21 | |
22 | 22 | #ifdef _WIN32 |
23 | 23 | #include "windows.h" |
79 | 79 | float last_percent; |
80 | 80 | float time_scale; |
81 | 81 | |
82 | bool stop_at_end; | |
82 | 83 | bool stop_on_idle; |
83 | 84 | bool stop_position_reached; |
84 | 85 | |
188 | 189 | void setCameraMode(bool track_users); |
189 | 190 | void setStopPosition(float percent); |
190 | 191 | void setStartPosition(float percent); |
192 | void setStopAtEnd(bool stop_at_end); | |
191 | 193 | void setStopOnIdle(bool stop_on_idle); |
192 | 194 | void setFrameExporter(FrameExporter* exporter, int video_framerate); |
193 | 195 | void showSplash(); |
210 | 212 | extern bool gGourceHideUsernames; |
211 | 213 | extern bool gGourceDisableBloom; |
212 | 214 | extern bool gGourceHideDate; |
213 | extern bool gGourceHideFiles; | |
214 | 215 | extern bool gGourceHideTree; |
215 | 216 | extern bool gGourceDisableProgress; |
216 | 217 | extern bool gGourceFileLoop; |
34 | 34 | float start_position = 0.0; |
35 | 35 | float stop_position = 0.0; |
36 | 36 | bool stop_on_idle = false; |
37 | bool stop_at_end = false; | |
37 | 38 | |
38 | 39 | std::string logfile = "."; |
39 | 40 | |
360 | 361 | continue; |
361 | 362 | } |
362 | 363 | |
364 | if(args == "--stop-at-end") { | |
365 | ||
366 | stop_at_end = true; | |
367 | ||
368 | continue; | |
369 | } | |
370 | ||
363 | 371 | if(args == "--stop-on-idle") { |
364 | 372 | |
365 | 373 | stop_on_idle = true; |
600 | 608 | if(start_position>0.0) gource->setStartPosition(start_position); |
601 | 609 | if(stop_position>0.0) gource->setStopPosition(stop_position); |
602 | 610 | |
611 | gource->setStopAtEnd(stop_at_end); | |
603 | 612 | gource->setStopOnIdle(stop_on_idle); |
604 | 613 | |
605 | 614 | if(exporter!=0) gource->setFrameExporter(exporter, video_framerate); |