use your eg. webcam with new tpc's ...
download:
http://jukullmann.homepage.t-online.de/dbpcap.zip
rem get cap driver name
rem get cap driver version
rem set cap driver
sync on : sync : disable escapekey
for i = 0 to 9
` capture driver name
n$ = get cap driver name(i)
if n$ <> ""
print n$
` capture driver version
print get cap driver version(i)
endif
next id
print
print "Select Cap Driver (0-9): ";
sync
repeat
k$ = inkey$()
i = val(k$)
until len(k$)
print i
sync
` set new driver
set cap driver i
wait key
end
--------------------------------------------------------------------
rem create cap window
rem position cap window
rem resize cap window
rem show cap window
rem hide cap window
rem delete cap window
sync on : sync : disable escapekey
` preview window xpos, ypos
` preview rate 15 fps
create cap window 160, 120
wait 3000
` new window xpos, ypos
position cap window 160, 120
wait 3000
` new window widht, height
resize cap window 320, 240
wait 3000
repeat
t = timer() and 1000
if t < 500
` hide preview
hide cap window
else
` show preview
show cap window
endif
until scancode()
` delete preview
delete cap window
end
--------------------------------------------------------------------
rem save cap frame
rem get cap image width
rem get cap image height
sync on : sync : disable escapekey
create cap window 0, 0
` true frame width
w = get cap image width()
` true frame height
h = get cap image height()
resize cap window w, h
wait key
save cap frame "frame.bmp"
delete cap window
end
Quote: "
dbpcap.dll v1.0 (c)ode by Jukuma (FREEWARE)
copy the dbpcap.dll file into your "plugins-user" folder
eg. ../Dark Basic Software/Dark Basic Professional/Compiler/plugins-user
copy the dbpcap.ini file into your "keywords" folder
eg. ../Dark Basic Software/Dark Basic Professional/Editor/Keywords
new command list:
GET CAP DRIVER NAME *example: sourcecap_driver.dba
GET CAP DRIVER VERSION *example: sourcecap_driver.dba
SET CAP DRIVER *example: sourcecap_driver.dba
CREATE CAP WINDOW *example: sourcecap_window.dba
POSITION CAP WINDOW *example: sourcecap_window.dba
RESIZE CAP WINDOW *example: sourcecap_window.dba
SHOW CAP WINDOW *example: sourcecap_window.dba
HIDE CAP WINDOW *example: sourcecap_window.dba
DELETE CAP WINDOW *example: sourcecap_window.dba
SET CAP PREVIEW *example: sourcecap_preview.dba
SET CAP PREVIEW RATE *example: sourcecap_preview.dba
OPEN CAP VIDEO COMPRESSION *example: sourcecap_dialog.dba
OPEN CAP VIDEO DISPLAY *example: sourcecap_dialog.dba
OPEN CAP VIDEO FORMAT *example: sourcecap_dialog.dba
OPEN CAP VIDEO SOURCE *example: sourcecap_dialog.dba
GET CAP DRIVER VIDEO DISPLAY *example: sourcecap_dialog.dba
GET CAP DRIVER VIDEO FORMAT *example: sourcecap_dialog.dba
GET CAP DRIVER VIDEO SOURCE *example: sourcecap_dialog.dba
SAVE CAP Frame *example: sourcecap_frame.dba
OPEN CAP FILE *example: sourcecap_file.dba
CLOSE CAP FILE *example: sourcecap_file.dba
GET CAP IMAGE WIDTH *example: sourcecap_frame.dba
GET CAP IMAGE HEIGHT *example: sourcecap_frame.dba
GET CAP FRAME *example: sourcecap_file.dba
GET CAP FRAMES DROPPED *example: sourcecap_file.dba
GET CAP TIMER *example: sourcecap_file.dba
"