Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Webcam Code for DB Pro - using standart windows DLLs

Author
Message
Manson_NS
19
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 12th Aug 2004 10:18 Edited at: 12th Aug 2004 10:26
This wont take much explaining, as it's quite straight forward.
However:
To use this code, you must make a file called 'c:\out.txt" - containing one line: "c:\img.dib"

This is due to a problem with parsing the line 'c:\img.dib' into the memory, and having the handle to where we threw it. This is a stupid way to go about it, but I couldn't think of anything else, as I'm all burned out right now.

Anyway, with that file, it should work.
BTW: The lagging is due to the image beeing saved to the disk 'per frame' - a thing which can be improved as well (using the clipboard)

Please share whatever you come up with based on this code.

Kohaku
20
Years of Service
User Offline
Joined: 3rd May 2004
Location: The not very United Kingdom
Posted: 12th Aug 2004 14:44
Thats great.

Infra-Dark
Bring the 20 liners back!
#coding, like coding, but with a #
Manson_NS
19
Years of Service
User Offline
Joined: 4th May 2004
Location: Denmark
Posted: 13th Aug 2004 16:40 Edited at: 13th Aug 2004 16:47
Damn, I just noticed how easy it was to get rid of the 'c:\out.txt'
Wondering why I didn't check this first, something must have prevented it from working the first time,,, Anyway, A much better code, right here, which will work 'as is' with no extra work.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Aug 2004 04:53
Doesn't work for me. After I select the drive '0', it says "DB.exe has generated errors and will now be closed". I'm using win2kpro, and I did change the paths for the dll's appropriately.

"eureka" - Archimedes
Ilya
20
Years of Service
User Offline
Joined: 10th Aug 2003
Location:
Posted: 14th Aug 2004 06:12
Works fine for me.
But when I exit, it crashes.

-Ilya
Dot Merix
20
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 12th Sep 2004 07:58
I aswell can get it to work, but it crashes as soon as i exit.

- Merix

Athlon xp 2400+, 1.0GB Ram, Radeon 9800PRO 128mb
Turoid
20
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 12th Sep 2004 08:10
same for me as phealax

Do you need a complete FPS engine ?? well here it is:
http://forum.thegamecreators.com/?m=forum_view&t=38869&b=6&p=0
Manic
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 13th Sep 2004 20:12
i imagine the reason that this crashes on exit is that it doesn't destroy the capture window and stop the video stream properly.

i tried simply deleting the dlls (in DB, not for real! ) and while that stopped the crash, the window just stayed open.

I've been looking into this myself for a while now (unsuccessfully) so i'm gonna have a play with this code, and try to set up a proper call back function (there's a much better way of capturing the info than this - no offence Manson). and try to make it stop the stream and close the capture window.

Manic

I don't have a sig, live with it.
B1rD
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location:
Posted: 24th Sep 2004 22:13
Is there a way to use this in DBC?
I've been trying some things, but when i start it, the screen is getting black.. and after a couple of seconds, it just returns to the editor :S
B1rD
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location:
Posted: 24th Sep 2004 22:19
k, i made it so far (ignore the prev. post)

only the same errors as the rest. It crashes when i exit, and i get an error "Image does nog exist."

Login to post a reply

Server time is: 2024-05-04 00:39:56
Your offset time is: 2024-05-04 00:39:56