swick / glc

glc is an ALSA & OpenGL capture tool for Linux.
https://github.com/nullkey/glc/wiki
7 stars 5 forks source link

-s (autostart recording) does not work #3

Open swick opened 12 years ago

swick commented 12 years ago
$glc-capture -s -l test.log -o test.glc sh -c "cd ~/.wine/drive_c/The\ Elder\ Scrolls\ V-\ Skyrim/ && wine TESV.exe" >/dev/null 2>&1
$cat test.log
[   0.06s       file error ] can't lock file: Die Ressource ist zur Zeit nicht verfügbar (11)
[   0.06s       main error ] can't start capturing: Die Ressource ist zur Zeit nicht verfügbar (11)

starting with the shortcut works fine

ghost commented 12 years ago

The same problem here:

$ glc-capture --start --pulseaudio --fps=24 --out=glc-test wine gta_sa.exe --log=0

[ 0.24s file error ] can't lock file: Recurso temporariamente indisponível (11) [ 0.24s main error ] can't start capturing: Recurso temporariamente indisponível (11)

This happens only in some applications. Starting without --start and recording with shift+f8 works

swick commented 12 years ago

The problem is that LD_PRELOAD starts glc in every child proccess (which uses a overridden function). Wine starts a lot child proccesses (wine-preloader) and glc locks the *.glc file in the wrong proccess. There is no way to know if the current proccess is the one you want to record (at least no way that works automatically all the time) therefore glc should append a number to the filename if the file allready exists (filename.glc filename.glc.1 filename.glc.2 ...) I'm not 100% sure, though.