Codebase list gource / f5099bc
Imported Upstream version 0.23 Andrew Caudwell 14 years ago
11 changed file(s) with 76 addition(s) and 47 deletion(s). Raw diff Collapse all Expand all
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
05 0.22:
16 * Fixed Mercurial log order.
27
5151 Begin at some position in the log (between 0.0 and 1.0).
5252
5353 --stop-position POSITION
54 Stop at some position.
54 Stop (exit) at some position in the log (does not work with STDIN).
5555
5656 --stop-on-idle
5757 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
5965 -a, --auto-skip-seconds SECONDS
6066 Automatically skip to next entry if nothing happens for a specified number of seconds.
6167
7379
7480 -b, --background FFFFFF
7581 Background colour in hex.
76
77 --loop
78 Loop back to the start of the log when the end is reached.
7982
8083 --date-format FORMAT
8184 Specify display date string (strftime format).
220223 You can create a video of Gource using the --output-ppm-stream option. This creates an uncompressed sequence of
221224 screenshots in PPM format which can then be processed by another program (such as ffmpeg) to produce a video file.
222225
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
226229
227230 Interface:
228231
00 #! /bin/sh
11 # 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.
33 #
44 # Report bugs to <acaudwell@gmail.com>.
55 #
573573 # Identity of this package.
574574 PACKAGE_NAME='Gource'
575575 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'
578578 PACKAGE_BUGREPORT='acaudwell@gmail.com'
579579
580580 ac_unique_file="src/main.h"
12151215 # Omit some internal or obsolete options to make the list less imposing.
12161216 # This message is too long to be a string in the A/UX 3.1 sh.
12171217 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.
12191219
12201220 Usage: $0 [OPTION]... [VAR=VALUE]...
12211221
12841284
12851285 if test -n "$ac_init_help"; then
12861286 case $ac_init_help in
1287 short | recursive ) echo "Configuration of Gource 0.22:";;
1287 short | recursive ) echo "Configuration of Gource 0.23:";;
12881288 esac
12891289 cat <<\_ACEOF
12901290
13871387 test -n "$ac_init_help" && exit $ac_status
13881388 if $ac_init_version; then
13891389 cat <<\_ACEOF
1390 Gource configure 0.22
1390 Gource configure 0.23
13911391 generated by GNU Autoconf 2.61
13921392
13931393 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
14011401 This file contains any messages produced by compilers while
14021402 running configure, to aid debugging if configure makes a mistake.
14031403
1404 It was created by Gource $as_me 0.22, which was
1404 It was created by Gource $as_me 0.23, which was
14051405 generated by GNU Autoconf 2.61. Invocation command line was
14061406
14071407 $ $0 $@
97979797 # report actual input values of CONFIG_FILES etc. instead of their
97989798 # values after options handling.
97999799 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
98019801 generated by GNU Autoconf 2.61. Invocation command line was
98029802
98039803 CONFIG_FILES = $CONFIG_FILES
98409840 _ACEOF
98419841 cat >>$CONFIG_STATUS <<_ACEOF
98429842 ac_cs_version="\\
9843 Gource config.status 0.22
9843 Gource config.status 0.23
98449844 configured by $0, generated by GNU Autoconf 2.61,
98459845 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
98469846
22
33 AC_PREREQ(2.61)
44
5 AC_INIT(Gource, 0.22, [acaudwell@gmail.com])
5 AC_INIT(Gource, 0.23, [acaudwell@gmail.com])
66 AC_CONFIG_SRCDIR([src/main.h])
77
88 AC_CANONICAL_HOST
2222 Begin at some position in the log (between 0.0 and 1.0).
2323 .TP
2424 \fB \-\-stop\-position POSITION\fR
25 Stop at some position.
25 Stop (exit) at some position in the log (does not work with STDIN).
2626 .TP
2727 \fB \-\-stop\-on\-idle\fR
2828 Stop on break in activity. May be combined with \-\-stop\-position.
2929 .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
3036 \fB\-a, \-\-auto\-skip\-seconds SECONDS\fR
3137 Automatically skip to next entry if nothing happens for a specified number of seconds.
3238 .TP
4450 .TP
4551 \fB\-b, \-\-background FFFFFF\fR
4652 Background colour in hex.
47 .TP
48 \fB\-\-loop\fR
49 Loop back to the start of the log when the end is reached.
5053 .TP
5154 \fB\-\-date\-format FORMAT\fR
5255 Specify display date string (strftime format).
200203 You can create a video of Gource using the \-\-output\-ppm\-stream option. This creates an uncompressed sequence of
201204 screenshots in PPM format which can then be processed by another program (such as ffmpeg) to produce a video file.
202205
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
207210
208211 .SH INTERFACE
209212 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).
897897 drawDirName(dirfont);
898898 }
899899
900 if(frustum.boundsInFrustum(quadItemBounds)) {
900 if(!(gGourceHideFilenames||gGourceHideFiles) && frustum.boundsInFrustum(quadItemBounds)) {
901901 for(std::list<RFile*>::iterator it = files.begin(); it!=files.end(); it++) {
902902 RFile* f = *it;
903903 f->drawName();
1616
1717 #include "file.h"
1818
19 float gGourceFileDiameter = 8.0;
20 float gGourceMaxFileIdle = 60.0;
19 float gGourceFileDiameter = 8.0;
20 float gGourceMaxFileIdle = 60.0;
21 bool gGourceHideFiles = false;
2122 bool gGourceHideFilenames = false;
2223
2324 std::vector<RFile*> gGourceRemovedFiles;
8484 extern float gGourceMaxFileIdle;
8585 extern float gGourceFileDiameter;
8686 extern bool gGourceHideFilenames;
87 extern bool gGourceHideFiles;
8788
8889 extern std::vector<RFile*> gGourceRemovedFiles;
8990
1919 float gGourceAutoSkipSeconds = 3.0;
2020 bool gGourceFileLoop = false;
2121 bool gGourceHideTree = false;
22 bool gGourceHideFiles = false;
2322 bool gGourceHideUsernames = false;
2423 bool gGourceHideDate = false;
2524 bool gGourceDisableBloom = false;
137136 printf(" -f Fullscreen\n\n");
138137 printf(" -p, --start-position POSITION Begin at some position in the log (0.0-1.0)\n");
139138 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
141143 printf(" -a, --auto-skip-seconds SECONDS Auto skip to next entry if nothing happens\n");
142144 printf(" for a number of seconds (default: 3)\n");
143145 printf(" -s, --seconds-per-day SECONDS Speed in seconds per day (default: 4)\n");
150152 printf(" --default-user-image IMAGE Default user image file\n");
151153 printf(" --colour-images Colourize user images\n\n");
152154
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");
158157 printf(" --git-branch Get the git log of a particular branch\n");
159158 printf(" --git-log-command Show git log command used by gource\n");
160159 printf(" --cvs-exp-command Show cvs-exp.pl log command used by gource\n");
323322
324323 start_position = 0.0;
325324 stop_position = 0.0;
325
326 stop_on_idle=false;
327 stop_position_reached=false;
328 stop_at_end=false;
326329
327330 paused = false;
328331 first_read = true;
823826 }
824827
825828 last_percent = 0.0;
826 stop_on_idle = false;
827 stop_position_reached = true;
828829
829830 files.clear();
830831
898899 start_position = percent;
899900 }
900901
902 void Gource::setStopAtEnd(bool stop_at_end) {
903 this->stop_at_end = stop_at_end;
904 }
905
901906 void Gource::setStopOnIdle(bool stop_on_idle) {
902907 this->stop_on_idle = stop_on_idle;
903908 }
904909
905910 void Gource::setStopPosition(float percent) {
906911 stop_position = percent;
907 stop_position_reached = false;
908912 }
909913
910914 bool Gource::canSeek() {
950954 slider.setPercent(last_percent);
951955 }
952956
957 bool is_finished = commitlog->isFinished();
958
953959 //see if we have reached the end and should exit
954960 //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
956964 stop_position_reached = true;
957965
958966 //if not stopping on idle exit immediately
11891197 if(idle_users==users.size()) {
11901198 idle_time += dt;
11911199
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;
11941202
11951203 } else {
11961204 idle_time = 0;
16611669 //draw bloom
16621670 drawBloom(frustum, dt);
16631671
1664 if(!(gGourceHideFiles || gGourceHideFilenames)) {
1665 root->drawNames(font,frustum);
1666 }
1672 root->drawNames(font,frustum);
16671673
16681674 if(!(gGourceHideUsernames || gGourceHideUsers)) {
16691675 for(std::map<std::string,RUser*>::iterator it = users.begin(); it!=users.end(); it++) {
1717 #ifndef GOURCE_H
1818 #define GOURCE_H
1919
20 #define GOURCE_VERSION "0.22"
20 #define GOURCE_VERSION "0.23"
2121
2222 #ifdef _WIN32
2323 #include "windows.h"
7979 float last_percent;
8080 float time_scale;
8181
82 bool stop_at_end;
8283 bool stop_on_idle;
8384 bool stop_position_reached;
8485
188189 void setCameraMode(bool track_users);
189190 void setStopPosition(float percent);
190191 void setStartPosition(float percent);
192 void setStopAtEnd(bool stop_at_end);
191193 void setStopOnIdle(bool stop_on_idle);
192194 void setFrameExporter(FrameExporter* exporter, int video_framerate);
193195 void showSplash();
210212 extern bool gGourceHideUsernames;
211213 extern bool gGourceDisableBloom;
212214 extern bool gGourceHideDate;
213 extern bool gGourceHideFiles;
214215 extern bool gGourceHideTree;
215216 extern bool gGourceDisableProgress;
216217 extern bool gGourceFileLoop;
3434 float start_position = 0.0;
3535 float stop_position = 0.0;
3636 bool stop_on_idle = false;
37 bool stop_at_end = false;
3738
3839 std::string logfile = ".";
3940
360361 continue;
361362 }
362363
364 if(args == "--stop-at-end") {
365
366 stop_at_end = true;
367
368 continue;
369 }
370
363371 if(args == "--stop-on-idle") {
364372
365373 stop_on_idle = true;
600608 if(start_position>0.0) gource->setStartPosition(start_position);
601609 if(stop_position>0.0) gource->setStopPosition(stop_position);
602610
611 gource->setStopAtEnd(stop_at_end);
603612 gource->setStopOnIdle(stop_on_idle);
604613
605614 if(exporter!=0) gource->setFrameExporter(exporter, video_framerate);