Webcam code Avicap32.dll need help
BlitzPlus Forums/BlitzPlus Programming/Webcam code Avicap32.dll need help
| ||
This code works in Purebasic without a problem. Its pretty simple but i want to port it to Blitzplus or even Blitz3d if possible. It uses Avicap32.dll built in to most windows platforms. Some help would be much appreciated. #WM_CAP_START = #WM_USER #WM_CAP_SET_CALLBACK_FRAME = #WM_CAP_START + 5 #WM_CAP_DRIVER_CONNECT = #WM_CAP_START + 10 #WM_CAP_SET_OVERLAY = #WM_CAP_START + 51 #WM_CAP_SET_PREVIEW = #WM_CAP_START + 50 #WM_CAP_SET_PREVIEWRATE = #WM_CAP_START + 52 #WM_CAP_SET_SCALE = #WM_CAP_START + 53 OpenWindow(0,0,0,320,240,"cam",#PB_Window_SystemMenu|#PB_Window_WindowCentered) If OpenLibrary(0,"avicap32.dll") hWndC = CallFunctionFast(GetFunction(0,"capCreateCaptureWindowA"),"cap",#WS_CHILD|#WS_VISIBLE,0,0,320,240,WindowID(0),1) EndIf SendMessage_(hWndC, #WM_CAP_DRIVER_CONNECT, 0, 0) SendMessage_(hWndC, #WM_CAP_SET_SCALE, #True, 0) SendMessage_(hWndC, #WM_CAP_SET_PREVIEW, #True, 0) SendMessage_(hWndC, #WM_CAP_SET_PREVIEWRATE, 24, 0) Repeat Select WaitWindowEvent() Case #PB_Event_CloseWindow Break EndSelect ForEver End |
| ||
www.plasma.art-fx.org/lastmethyl.rar |