video capture in blitz ?

Blitz3D Forums/Blitz3D Programming/video capture in blitz ?

b32(Posted 2006) [#1]
Does anybody know how to preview a capture source in Blitz ? I want to connect a common camera to my PCTV capture card and display the input on the background of a 3d application.


markcw(Posted 2006) [#2]
does this help?

http://www.blitzbasic.com/Community/posts.php?topic=61763


b32(Posted 2006) [#3]
Yes, it was very helpful. Thanks a lot!
After a few tries, I got this code to run with my webcam. I can't capture onto an image, but it opens an extra window and displays the capture preview on it. In case someone wants to run this, you need the .decls as described at the end of the program:

If you want to grab a frame to blitz, use:
Const WM_CAP_EDIT_COPY = WM_CAP_START + 30
ApiSendMessage hWndC, WM_CAP_EDIT_COPY, 0, 0
And use MarkCW's PasteFromClipBoard function.