pouët.net

Go to bottom

.kkapture 0.01 - demo capturing made easy (hopefully)

category: code [glöplog]
29,97 FPS
added on the 2009-10-11 16:20:18 by Salinga Salinga
k, i'll check.
added on the 2009-10-11 16:21:23 by Salinga Salinga
Okay, no glitches if only the WAV is rendered. Good to know, so if I have problems there I can create the soundfile seperatly. :-)
added on the 2009-10-11 19:53:35 by Salinga Salinga
A tip for those with a similar problem as I have: You can accelerate the rendering of the soundfile by setting the FPS to a low value because kkapture plays the demo at the set FPS if no videostream is created.
added on the 2009-10-11 20:32:56 by Salinga Salinga
kkapture 1.00 (yes, that's a 1 in front of the decimal point!) coming up soon.

good news: lots of problems fixed. my tests so far indicate that this one really is pretty much rock solid, and i've added some features that should really make a difference. notably, kkapture can now deal with processes that spawn other processes. i can now finally kkapture borg!
bad news: right now, borg.exe seems to think that the proper response to being kkaptured is this:
Code:sys: DeleteFileW("/pagefile.sys") sys: DeleteFileW("/Program Files/Common Files/Microsoft Shared/ink/Alphabet.xml") sys: DeleteFileW("/Program Files/Common Files/Microsoft Shared/ink/ar-SA/tipresx.dll.mui") sys: RemoveDirectoryW("/Program Files/Common Files/Microsoft Shared/ink/ar-SA") sys: DeleteFileW("/Program Files/Common Files/Microsoft Shared/ink/bg-BG/tipresx.dll.mui") sys: RemoveDirectoryW("/Program Files/Common Files/Microsoft Shared/ink/bg-BG") sys: DeleteFileW("/Program Files/Common Files/Microsoft Shared/ink/chslm.lex.bin") sys: DeleteFileW("/Program Files/Common Files/Microsoft Shared/ink/chslm.wdic2.bin") sys: DeleteFileW("/Program Files/Common Files/Microsoft Shared/ink/chtlm.lex.bin")

and so on - yes, it actually tries to delete every file and directory on the disk. trying to work out WHY it does this. meanwhile, BOO HISS to the alambik coders; whatever the cause, this is NOT acceptable application behavior :). and a good thing i debug kkapture on a separate machine that has no important data on it whatsoever - lost a couple of savegames and a windows installation, that's it.
added on the 2010-03-07 19:53:18 by ryg ryg
wtf :)
added on the 2010-03-07 21:08:28 by supah supah
Woot!
added on the 2010-03-07 21:09:23 by torus torus
what...the...hell!
It's called borg. If you mess with it, it messes with you...
added on the 2010-03-07 22:33:22 by raer raer
..resistance is futile!
added on the 2010-03-07 22:34:21 by kbi kbi
okay, found it. turns out alambik wasn't doing anything evil, i hereby wish to formally retract my earlier comment. :)

i think from now on i'll refer to this one as "the stack smashing bug from hell".

what happens is that alambik first depacks a bunch of files into a temp directory, runs the player (waiting for it to exit), then deletes the temp files (and the temp directory) again. it does this by calling CreateProcess, then WaitForSingleObject to wait for it to finish, then doing something like this:

Code:recursiveClean(tempDir); // ... static void recursiveClean(const char *curDir) { char buffer[_MAX_PATH]; struct _finddata_t info; sprintf(buffer,"%s/*",curDir); intptr_t handle = _findfirst(buffer,&info); if(handle != -1) { do { if(info.name[0] == '.') continue; sprintf(buffer,"%s/%s",curDir,info.name); if(info.attrib & _A_SUBDIR) recursiveClean(buffer); else remove(buffer); } while(_findnext(handle,&info) == 0); _findclose(handle); } _rmdir(curDir); }

looks ok to you? yeah, to me too. except due to the bug i just fixed, the start of tempDir got overwritten - with a 0 byte. _findfirst("/*") and then delete all of it recursively? uh oh.

so, how did my stupid stack-smashing code look? stupid fixed-size c string buffers without length checking? using memset to clear a local array with the wrong size? too-clever-by-half pointer kung-fu?

[x] none of the above. here's the diff:
Code:-static BOOL Mine_CreateProcess(LPCTSTR appName,LPTSTR cmdLine,LPSECURITY_ATTRIBUTES processAttr, +static BOOL __stdcall Mine_CreateProcess(LPCTSTR appName,LPTSTR cmdLine,LPSECURITY_ATTRIBUTES processAttr,


congratulations, you're officially one of the most unpleasant calling convention mismatches EVER.

in other news: some more testing and then kkapture 1.00 :)
added on the 2010-03-08 00:24:17 by ryg ryg
One more good example why software should not try to delete a whole directory.
__stdcall is the new rm -f /
added on the 2010-03-08 00:34:01 by ponce ponce
ryg: out of curiosity, can the new kkapture handle Blackout 9L? Would be nice to have a video version of it as the windowing & video/audio playback & timing routines are rather interesting in Droid's vj software (which blackout uses).
added on the 2010-03-08 10:34:11 by pommak pommak
pommak: perhaps it would be easier for droid to make a video dump from the sources, then?
added on the 2010-03-08 11:04:26 by kusma kusma
kkapture 1.00 released. woo-hoo!

enjoy. and tell me if you find bugs :)

pommak: if it uses weird timing code, it's probably easier to just plug in the standalone AVI writer code than to use kkapture. i'm not going to add any weird workarounds to the timing code, it's intricate enough as it is.
added on the 2010-03-13 01:46:56 by ryg ryg
You da man!

I'm gonna try "Fall equals winter" now, as usual... :)
added on the 2010-03-13 03:02:30 by raer raer
Hmmm. Not working. I get an hourglass cursor on a white screen and my desktop background in the avi file...
Checked the GDI function.
added on the 2010-03-13 03:42:38 by raer raer
Please please please make it a option to turn off [or adjust the threshold!] of the "application is hammering timer calls, advancing time" feature. A lot of recent demos are loosing 50% of their frames from this. They work fine in 0.09.
added on the 2010-04-05 18:24:33 by micksam7 micksam7
[And by 'a lot' I mean darwinism and agenda in particular]
added on the 2010-04-05 18:30:38 by micksam7 micksam7
ryg, kkapture is totally awesome but still fails on http://pouet.net/prod.php?which=3301 ... not sure what's going on but whatever I do it just hangs.
added on the 2010-04-07 22:49:33 by ector ector
micksam: oops. will make this configurable.
added on the 2010-04-08 01:16:33 by ryg ryg
Oh also, kkapture totally doesn't hook http://pouet.net/prod.php?which=54606 - Absolutely no clue why, sound still plays through and everything :)
added on the 2010-04-08 07:31:43 by micksam7 micksam7
thanks vor 1.0! it now works with java stuff :D
added on the 2010-04-08 07:38:50 by pandur pandur
micksam7: I assume the problems with PC-04 are related to .net, because I heard other .net demos aren't working, too.
By the way, I didn't have any trouble kkapturing "agenda" with v1.0.
added on the 2010-04-08 10:27:38 by KeyJ KeyJ

login

Go to top