Permalink
Browse files

Initial checkin: current state of kkapture 0.08

  • Loading branch information...
0 parents commit 1b22ed8f8cd6ffd1df9bf34ce2a156549a304d17 @rygorous committed Feb 8, 2009
Showing with 9,212 additions and 0 deletions.
  1. +11 −0 CONTRIBUTORS.txt
  2. +213 −0 LICENSE.txt
  3. +99 −0 changelog.txt
  4. +25 −0 kkapture.sln
  5. +714 −0 kkapture/kkapture.cpp
  6. +175 −0 kkapture/kkapture.rc
  7. +238 −0 kkapture/kkapture.vcproj
  8. +65 −0 kkapture/kkapture.vcproj.RYG.fg.user
  9. +36 −0 kkapture/resource.h
  10. +23 −0 kkapture/stdafx.cpp
  11. +29 −0 kkapture/stdafx.h
  12. +288 −0 kkapturedll/audio_resample.cpp
  13. +59 −0 kkapturedll/audio_resample.h
  14. +875 −0 kkapturedll/avi_videoencoder_dshow.cpp
  15. +60 −0 kkapturedll/avi_videoencoder_dshow.h
  16. +391 −0 kkapturedll/avi_videoencoder_vfw.cpp
  17. +57 −0 kkapturedll/avi_videoencoder_vfw.h
  18. +157 −0 kkapturedll/bmp_videoencoder.cpp
  19. +51 −0 kkapturedll/bmp_videoencoder.h
  20. +342 −0 kkapturedll/kkapturedll.vcproj
  21. +65 −0 kkapturedll/kkapturedll.vcproj.RYG.fg.user
  22. +279 −0 kkapturedll/main.cpp
  23. +80 −0 kkapturedll/main.h
  24. +223 −0 kkapturedll/mt_proxy_videoencoder.cpp
  25. +54 −0 kkapturedll/mt_proxy_videoencoder.h
  26. +1,392 −0 kkapturedll/sound.cpp
  27. +33 −0 kkapturedll/sound.h
  28. +23 −0 kkapturedll/stdafx.cpp
  29. +44 −0 kkapturedll/stdafx.h
  30. +546 −0 kkapturedll/timing.cpp
  31. +35 −0 kkapturedll/timing.h
  32. +105 −0 kkapturedll/util.cpp
  33. +59 −0 kkapturedll/util.h
  34. +342 −0 kkapturedll/video.cpp
  35. +64 −0 kkapturedll/video.h
  36. +266 −0 kkapturedll/video_direct3d8.cpp
  37. +302 −0 kkapturedll/video_direct3d9.cpp
  38. +888 −0 kkapturedll/video_directdraw.cpp
  39. +248 −0 kkapturedll/video_opengl.cpp
  40. +48 −0 kkapturedll/videocapturetimer.h
  41. +59 −0 kkapturedll/videoencoder.cpp
  42. +55 −0 kkapturedll/videoencoder.h
  43. +94 −0 working_demos.txt
@@ -0,0 +1,11 @@
+OFFICIAL PROJECT HOMEPAGE:
+ http://www.farbrausch.de/~fg/kkapture
+
+MAINTAINER AND PROJECT LEAD:
+ Fabian "ryg/farbrausch" Giesen
+ http://www.farbrausch.de/~fg
+
+CONTRIBUTORS:
+ Tammo "kb" Hinrichs Parts of the D3D8 code in v0.02
+ Bernhard "bartman" Wodok AVI splitting, resolution bugfix in v0.04
+ Joern "manx" Heusipp waveout-bugfix in v0.04
@@ -0,0 +1,213 @@
+ The Artistic License
+ Version 2.0beta5, October 2001
+
+ Copyright (C) 2000, 2001 Larry Wall, Bradley M. Kuhn.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+This copyright license states the terms under which a given free software
+Package may be copied, modified and/or redistributed, while the
+Originator(s) maintain some artistic control over the future development of
+that Package (at least as much artistic control as can be given under
+copyright law while still making the Package open source and free software).
+
+This license is bound by copyright law, and thus it legally applies only to
+works which the copyright holder has permitted copying, distribution or
+modification under the terms of the Artistic License, Version 2.0.
+
+You are reminded that You are always permitted to make arrangements wholly
+outside of a given copyright license directly with the copyright holder(s)
+of a given Package. If the terms of this license impede your ability to
+make full use of the Package, You are encouraged to contact the copyright
+holder(s) and seek a different licensing arrangement.
+
+
+ Definitions
+
+"Package" refers to the collection of files distributed by the
+ Originator(s), and derivatives of that collection of files created
+ through textual modification.
+
+"Standard Version" refers to the Package if it has not been modified, or has
+ been modified only in ways suggested by the
+ Originator(s).
+
+"Modified Version" refers to the Package, if it has been changed by You via
+ textual modification of the source code, and such changes
+ were not suggested by the Originator(s).
+
+"Originator" refers to the author(s) and/or copyright holder(s) of the
+ Standard Version of the Package.
+
+"You" and "Your" refers to any person who would like to copy, distribute, or
+ modify the Package.
+
+"Distribution Fee" is any fee that You charge for providing a copy of this
+ Package to another party. It does not refer to licensing
+ fees.
+
+"Freely Available" means that:
+
+ (a) no fee is charged for the right to use the item (though a
+ Distribution Fee may be charged).
+
+ (b) recipients of the item may redistribute it under the same
+ conditions they received it.
+
+ (c) If the item is a binary, object code, bytecode, the complete
+ corresponding machine-readable source code is included with the
+ item.
+
+
+ Permission for Use and Modification Without Redistribution
+
+ (1) You are permitted to use the Standard Version and create and use
+ Modified Versions for any purpose without restriction, provided that
+ you do not redistribute the Modified Version to others outside of your
+ company or organization.
+
+
+ Permissions for Redistribution of the Standard Version
+
+ (2) You may make available verbatim copies of the source code of the
+ Standard Version of this Package in any medium without restriction,
+ either gratis or for a Distribution Fee, provided that you duplicate
+ all of the original copyright notices and associated disclaimers. At
+ Your discretion, such verbatim copies may or may not include compiled
+ bytecode, object code or binary versions of the corresponding source
+ code in the same medium.
+
+ (3) You may apply any bug fixes, portability changes, and other
+ modifications made available from any of the Originator(s). The
+ resulting modified Package will still be considered the Standard
+ Version, and may be copied, modified and redistributed under the terms
+ of the original license of the Standard Version as if it were the
+ Standard Version.
+
+
+ Permissions for Redistribution of Modified Versions of the Package as Source
+
+ (4) You may modify your copy of the source code of this Package in any way
+ and distribute that Modified Version (either gratis or for a
+ Distribution Fee, and with or without a corresponding binary, bytecode
+ or object code version of the Modified Version) provided that You
+ clearly indicate what changes You made to the Package, and provided
+ that You do at least ONE of the following:
+
+ (a) make the Modified Version available to the Originator(s) of the
+ Standard Version, under the exact license of the Standard
+ Version, so that the Originator(s) may include your modifications
+ into the Standard Version (at their discretion).
+
+ (b) modify any installation scripts and procedures so that
+ installation of the Modified Version will never conflict with an
+ installation of the Standard Version, include for each program
+ installed by the Modified Version clear documentation describing
+ how it differs from the Standard Version, and rename your
+ Modified Version so that the name is substantially different from
+ the Standard Version.
+
+ (c) permit and encourage anyone who receives a copy of the Modified
+ Version to make your modifications Freely Available in some
+ specific way.
+
+ If Your Modified Version is in turn derived from a Modified Version
+ made by a third party, then You are still required to ensure that Your
+ Modified Version complies with the requirements of this license.
+
+
+ Permissions for Redistribution of Non-Source Versions of Package
+
+ (5) You may distribute binary, object code, bytecode or other non-source
+ versions of the Standard Version of the Package, provided that you
+ include complete instructions on where to get the source code of the
+ Standard Version. Such instructions must be valid at the time of Your
+ distribution. If these instructions, at any time while You are
+ carrying our such distribution, become invalid, you must provide new
+ instructions on demand or cease further distribution. If You cease
+ distribution within thirty days after You become aware that the
+ instructions are invalid, then You do not forfeit any of Your rights
+ under this license.
+
+ (6) You may distribute binary, object code, bytecode or other non-source
+ versions of a Modified Version provided that You do at least ONE of
+ the following:
+
+ (a) include a copy of the corresponding source code for the Modified
+ Version under the terms indicated in (4).
+
+ (b) ensure that the installation of Your non-source Modified Version
+ does not conflict in any way with an installation of the Standard
+ Version, include for each program installed by the Modified
+ Version clear documentation describing how it differs from the
+ Standard Version, and rename your Modified Version so that the
+ name is substantially different from the Standard Version.
+
+ (c) ensure that the Modified Version includes notification of the
+ changes made from the Standard Version, and offer to provide
+ machine-readable source code (under a license that permits making
+ that source code Freely Available) of the Modified Version via
+ mail order.
+
+
+ Permissions for Inclusion of the Package in Aggregate Works
+
+ (7) You may aggregate this Package (either the Standard Version or
+ Modified Version) with other packages and distribute the resulting
+ aggregation provided that You do not charge a licensing fee for the
+ Package. Distribution Fees are permitted, and licensing fees for
+ other packages in the aggregation are permitted. Your permission to
+ distribute Standard or Modified Versions of the Package is still
+ subject to the other terms set forth in other sections of this
+ license.
+
+ (8) In addition to the permissions given elsewhere by this license, You
+ are also permitted to link Modified and Standard Versions of this
+ Package with other works and distribute the result without
+ restriction, provided You have produced binary program(s) that do not
+ overtly expose the interfaces of the Package. This includes
+ permission to embed the Package in a larger work of your own without
+ exposing a direct interface to the Package. This also includes
+ permission to build stand-alone binary or bytecode versions of your
+ scripts that require the Package, but do not otherwise give the casual
+ user direct access to the Package itself.
+
+
+ Items That are Never Considered Part of a Modified Version Package
+
+ (9) Works (including, but not limited to, subroutines and scripts) that
+ you have linked or aggregated with the Package that merely extend or
+ make use of the Package, but are not intended to cause the Package to
+ operate differently from the Standard Version, do not, by themselves,
+ cause the Package to be a Modified Version. In addition, such works
+ are not considered parts of the Package itself, and are not bound by
+ the terms of the Package's license.
+
+
+ Acceptance of License and Disclaimer of Warranty
+
+ (10) You are not required to accept this License, since you have not signed
+ it. However, nothing else grants you permission to copy, modify or
+ distribute the Standard or Modified Versions of the Package. These
+ actions are prohibited by copyright law if you do not accept this
+ License. Therefore, by copying, modifying or distributing Standard
+ and Modified Versions of the Package, you indicate your acceptance of
+ the license of the Package.
+
+
+ (11) Disclaimer of Warranty:
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT UNLESS REQUIRED BY
+ LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER OR CONTRIBUTOR
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,99 @@
+version 0.08:
+* "frame rate" edit control now supports arbitrary positive decimal ("12.3456") and fractional ("60000/1001") framerates
+
+version 0.07:
+* "frame timed out" now mentions *which* frame was skipped (if you want to check whether the video is fine or if it causes problems)
+* if kkapture is being debugged, main.cpp now gives you time to attach the debugger to the target demo aswell.
+ (this is the deluxe version of a hack i've been using for ages - thought it might be useful for others trying to debug, too :)
+* fixed some bugs in the cleanup code that may have caused crashes after recording was complete.
+* waveOutGetPosition now even accepts wrong size specifications for MMTIME struct as long as they're big enough (helps candystall)
+* ddraw code temp surface handling should now be more stable (helps with moral hard candy)
+* seeding of all timers now synchronized. helps with demos that mix timing values returned from independent sources (not a good idea!!!).
+ in any case, fixes problems with ante dominum.
+* "power down after completion" switch
+
+version 0.06b:
+* now default to vfw video encoder on new installations.
+* "fairlight hack" switch now explicit due to request - turn it on for track one and possibly other flt demos, otherwise leave it off.
+ (was implicitly on in all versions from 0.05 upwards)
+* more new startup instrumentation fixes (yaay!)
+
+version 0.06:
+* magic exit key (ctrl+break) improved: now uses lowlevel hook, should always work now.
+* d3d8 capture fixes: r08028, nature v2.0 work now.
+* vfw .avi writer can now also handle format changes while the demo is running
+* should now work with demos that use FMODEx: at least first offence works fine now.
+* now automatically advances time if frames take too long.
+ fixes a LOT of demos that do busy waits somewhere, including:
+ - frameskool by equinox
+ - mupe by playpsyco
+ - abstinens by keyboards
+ - noumenon by andromeda
+ and probably a lot of other demos too.
+
+ how to use: check "Enable automatic frameskip on timeout".
+ the two timeout values define how much time the application has to render
+ the first/subsequent frames; if it takes longer, kkapture will skip a
+ frame and write a log message. lower timeouts mean faster kkapturing for
+ apps that explicitly perform waits every frame, but the lower you set those
+ values, the higher the risk that kkapture will drop a frame just because
+ rendering took a tad longer than expected. so be careful!
+
+version 0.05b:
+* IDirectSoundBuffer::SetFrequency handling fixed (affects onwards, 2^5 by traction)
+* debug force-windowed code for d3d9 removed :)
+
+version 0.05:
+* small bugfix in dshow video encoder (thanks malc)
+* "new startup instrumentation" button now actually does something :)
+* startup instrumentation code now less picky about executable files
+* startup instrumentation now works when first instr. is call/jmp (helps with several demos)
+* added dc/rendering context tracking for opengl (fixes problem with animal attraction)
+* synchronization policy changed in dsound code (fixes problems with mega hilter expansion pack, maybe some threading issues too?)
+* old fallback gdi capture code removed (not required anymore and it never worked properly anyway)
+
+version 0.04:
+* switched to visual c++ 2005 express edition
+* "new startup interception" that works on 64bit host machines (always on on 64bit, default off on 32bit)
+* kkapturing on 64bit host machines works now
+* kkapture is now under the artistic license v2.0beta5
+* small waveout code fix by manx included (thanks)
+* automatic segmenting code for avi-vfw encoder by bartman included (thanks to you too :)
+* automatically disables VSync during recording for most supported APIs (improves capturing speed somewhat)
+* basic SetTimer support (i'm not particularly happy with it)
+* improved resolution determination for opengl demos
+* magic exit key: press ctrl+break to safely abort a capture.
+* writes (approximate) capturing frame rate on exit
+* small fix in doneTiming() to make sure no waits are currently active when timing is deinitialized
+* improvements in d3d8/9 reference handling code
+* support for demos that initialize/deinitialize the graphics API several times
+
+version 0.04alpha:
+* some performance improvements for directdraw capturing
+* several bugfixes
+* new directshow-based avi writer, currently the only one available (0.04 final will have both the old and new avi writer)
+* automatic audio resampling (required for dshow, currently converts everything to 16bit 44.1kHz stereo)
+
+version 0.03:
+* waveout capturing finally works (now that was one stupid bug)
+* directdraw/old d3d support (both software and hardware)
+* kkapture now sets the executables' directory as current working dir before starting
+* "skip silence" option added (required for e.g. fr-08); currently only works for
+ directsound
+* "make sleeps last one frame" option added (required for some old BASS and FMOD
+ versions to work correctly)
+* the .bmp/.wav writer now compensates for frames at the beginning without sound
+* capture audio/capture video flags
+
+version 0.02:
+* direct xvid/divx encoding works now.
+* windowed capture support for both opengl and d3d - beware, some demos do not use correct window sizes in windowed mode, so you get e.g. a 630x472 capture for a 640x480 demo - most video codecs don't like sizes that aren't multiples of 4.
+* opengl capturing bugfix - on swapbuffers(), frames were accidentially advanced twice.
+* some QueryPerformanceCounter-related fixes.
+* vastly improved Direct3D9 capture speed.
+* Direct3D8 support (co-written by kb/farbrausch).
+* .bmp/.wav output added (uncompressed highres captures easily hit the avifile 4gb limit).
+* lots of tiny fixes here and there.
+
+version 0.01:
+* initial release; still missing d3d8, ddraw support, waveout completely untested.
@@ -0,0 +1,25 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual C++ Express 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kkapturedll", "kkapturedll\kkapturedll.vcproj", "{8212119F-DBE1-4DA5-80A9-67FDE9A4CBD3}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kkapture", "kkapture\kkapture.vcproj", "{DBA35513-DE77-4FE9-8B71-C483946E76FF}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8212119F-DBE1-4DA5-80A9-67FDE9A4CBD3}.Debug|Win32.ActiveCfg = Debug|Win32
+ {8212119F-DBE1-4DA5-80A9-67FDE9A4CBD3}.Debug|Win32.Build.0 = Debug|Win32
+ {8212119F-DBE1-4DA5-80A9-67FDE9A4CBD3}.Release|Win32.ActiveCfg = Release|Win32
+ {8212119F-DBE1-4DA5-80A9-67FDE9A4CBD3}.Release|Win32.Build.0 = Release|Win32
+ {DBA35513-DE77-4FE9-8B71-C483946E76FF}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DBA35513-DE77-4FE9-8B71-C483946E76FF}.Debug|Win32.Build.0 = Debug|Win32
+ {DBA35513-DE77-4FE9-8B71-C483946E76FF}.Release|Win32.ActiveCfg = Release|Win32
+ {DBA35513-DE77-4FE9-8B71-C483946E76FF}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
Oops, something went wrong.

0 comments on commit 1b22ed8

Please sign in to comment.