Schonwieder Webcam
Übersicht

![]() |
StarwarBetreff: Schonwieder Webcam |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi Blitzer,
Ich versuch schon seit längeren ein Bild mit meiner Logitch Webcam aufzunehmen. Nur leider klappt das nicht wirklich. Das Program verabschiedet sich nach "Print 3" mit einem simple "blitzcc hat einen Fehler festgestellt". Code: [AUSKLAPPEN] Const WS_CHILD = $40000000 Const WS_VISIBLE = $10000000 Const SWP_NOMOVE = $2 Const SWP_NOZORDER = $4 Const HWND_BOTTOM = 1 Const WM_USER = $400 Const WM_CAP_START = WM_USER Const WM_CAP_GET_CAPSTREAMPTR = WM_CAP_START + 1 Const WM_CAP_SET_CALLBACK_ERROR = WM_CAP_START + 2 Const WM_CAP_SET_CALLBACK_STATUS = WM_CAP_START + 3 Const WM_CAP_SET_CALLBACK_YIELD = WM_CAP_START + 4 Const WM_CAP_SET_CALLBACK_FRAME = WM_CAP_START + 5 Const WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_CAP_START + 6 Const WM_CAP_SET_CALLBACK_WAVESTREAM = WM_CAP_START + 7 Const WM_CAP_GET_USER_DATA = WM_CAP_START + 8 Const WM_CAP_SET_USER_DATA = WM_CAP_START + 9 Const WM_CAP_DRIVER_CONNECT = WM_CAP_START + 10 Const WM_CAP_DRIVER_DISCONNECT = WM_CAP_START + 11 Const WM_CAP_DRIVER_GET_NAME = WM_CAP_START + 12 Const WM_CAP_DRIVER_GET_VERSION = WM_CAP_START + 13 Const WM_CAP_DRIVER_GET_CAPS = WM_CAP_START + 14 Const WM_CAP_FILE_SET_CAPTURE_FILE = WM_CAP_START + 20 Const WM_CAP_FILE_GET_CAPTURE_FILE = WM_CAP_START + 21 Const WM_CAP_FILE_ALLOCATE = WM_CAP_START + 22 Const WM_CAP_FILE_SAVEAS = WM_CAP_START + 23 Const WM_CAP_FILE_SET_INFOCHUNK = WM_CAP_START + 24 Const WM_CAP_FILE_SAVEDIB = WM_CAP_START + 25 Const WM_CAP_EDIT_COPY = WM_CAP_START + 30 Const WM_CAP_SET_AUDIOFORMAT = WM_CAP_START + 35 Const WM_CAP_GET_AUDIOFORMAT = WM_CAP_START + 36 Const WM_CAP_DLG_VIDEOFORMAT = WM_CAP_START + 41 Const WM_CAP_DLG_VIDEOSOURCE = WM_CAP_START + 42 Const WM_CAP_DLG_VIDEODISPLAY = WM_CAP_START + 43 Const WM_CAP_GET_VIDEOFORMAT = WM_CAP_START + 44 Const WM_CAP_SET_VIDEOFORMAT = WM_CAP_START + 45 Const WM_CAP_DLG_VIDEOCOMPRESSION = WM_CAP_START + 46 Const WM_CAP_SET_PREVIEW = WM_CAP_START + 50 Const WM_CAP_SET_OVERLAY = WM_CAP_START + 51 Const WM_CAP_SET_PREVIEWRATE = WM_CAP_START + 52 Const WM_CAP_SET_SCALE = WM_CAP_START + 53 Const WM_CAP_GET_STATUS = WM_CAP_START + 54 Const WM_CAP_SET_SCROLL = WM_CAP_START + 55 Const WM_CAP_GRAB_FRAME = WM_CAP_START + 60 Const WM_CAP_GRAB_FRAME_NOSTOP = WM_CAP_START + 61 Const WM_CAP_SEQUENCE = WM_CAP_START + 62 Const WM_CAP_SEQUENCE_NOFILE = WM_CAP_START + 63 Const WM_CAP_SET_SEQUENCE_SETUP = WM_CAP_START + 64 Const WM_CAP_GET_SEQUENCE_SETUP = WM_CAP_START + 65 Const WM_CAP_SET_MCI_DEVICE = WM_CAP_START + 66 Const WM_CAP_GET_MCI_DEVICE = WM_CAP_START + 67 Const WM_CAP_STOP = WM_CAP_START + 68 Const WM_CAP_ABORT = WM_CAP_START + 69 Const WM_CAP_SINGLE_FRAME_OPEN = WM_CAP_START + 70 Const WM_CAP_SINGLE_FRAME_CLOSE = WM_CAP_START + 71 Const WM_CAP_SINGLE_FRAME = WM_CAP_START + 72 Const WM_CAP_PAL_OPEN = WM_CAP_START + 80 Const WM_CAP_PAL_SAVE = WM_CAP_START + 81 Const WM_CAP_PAL_PASTE = WM_CAP_START + 82 Const WM_CAP_PAL_AUTOCREATE = WM_CAP_START + 83 Const WM_CAP_PAL_MANUALCREATE = WM_CAP_START + 84 hwin = CreateWindow ("Webcam",50,50,1024,768,0,13) time = CreateTimer (0.5) capcan=CreateCanvas (20,20,640,480,hwin) Print 1 SetStatusText (hwin,"Inizialisieren...") prozessor$ = GetEnv$("PROCESSOR_IDENTIFIER") prozessorlevel$ = GetEnv$("PROCESSOR_LEVEL") SetStatusText (hwin,"Inizialisieren... Prozessor: "+prozessor$ + " (Level: " + prozessorlevel$ +")") ;HideGadget hwin Print 2 capcanX = CreateCanvas (20,20,0,0,hwin) hWndC = QueryObject(hwin,1) hWndC_API = capCreateCaptureWindow("cap",WS_CHILD Or WS_VISIBLE,20,20,640,480,hWndC,0) Print 3 api_SendMessage(hWndC_API,WM_CAP_DRIVER_CONNECT,0,0) Print 4 api_SendMessage(hWndC_API,WM_CAP_SET_SCALE,False,0) Print 5 api_SendMessage(hWndC_API,WM_CAP_SET_PREVIEW,True,0) Print 6 api_SendMessage(hWndC_API,WM_CAP_SET_PREVIEWRATE,1,0) ;apiSendMessage(hWndC_API,WM_CAP_DLG_VIDEOSOURCE,0,0) ; will allow you to select the device you want to capture from. ;apiSendMessage(hWndC_API,WM_CAP_DLG_VIDEOFORMAT,0,0) ; this will bring up the capture device video format Print 7 SetStatusText (hwin,"Bereit") Repeat ;--------------------------------------------------------------------- .main ev = WaitEvent() DebugLog "Event: " + ev Select ev Case $803 Goto ende End Select ;--------------------------------------------------------------------- Forever .ende api_SendMessage(hWndC_API,WM_CAP_DRIVER_DISCONNECT,0,0) End Weiß jemand worans liegt? Ich verzeifle ![]() Danke für Antworten. |
||
ChristianK |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hat hWndC_API einen gültigen Wert, nachdem das Fenster erstellt wurde? | ||
AdvanceLcd
Intel Core 2 Duo 3.2 GHz, 4 GB RAM, GeForce 8800 GTX | MacBook Pro 15,4″ Intel Core 2 Duo 2.4 GHz, 2 GB RAM, GeForce 8600M GT |
![]() |
Starwar |
![]() Antworten mit Zitat ![]() |
---|---|---|
Jop hats.
Code: [AUSKLAPPEN] api_SendMessage(hWndC_API,WM_CAP_DRIVER_CONNECT,0,0) Da liegt der Fehler WM_CAP_DRIVER_CONNECT ist 1034. Vielleciht hilft das. Ich hab mal Pannos exe geteste, das funzt. Ich schaff es aber nicht das Codebeispiel von B3D nach B zu konvertieren ![]() ~Edit~ Liegts vielleicht hieran: Code: [AUSKLAPPEN] hWndC = QueryObject(hwin,1) hWndC hat zwar einen gültigen Wert, aber man kann ja nie wissen ~Edit 2~ Ich glaub es liegt an meiner Webcam (Logitech QuickCam Web im Lego Desing ![]() |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group