Regulars table & Café | | | | - Page 1 - |
| Frank Abbing | functions the with all Webcam-Besitzern? |
| | | | |
| | | | | - Page 1 - |
| ByteAttack | | | | | |
| | GDL | by me gehs hold unfortunately net.
Hello Georg |
| | | | |
| | Jac de Lad | functions, but one must, How with whom others, already awfully rumhampeln, so the thing what registered. my TV-ticket won't with aufgelistet. |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 12/19/07 ▲ |
| |
| | Frank Abbing |
The hand becomes well gepixelt, but only if I tappt im dunkeln quick move reacted the program hereon.
Yes, correctly.. so is it too correctly.
functions, but one must, How with whom others, already awfully rumhampeln, so the thing what registered.
presently is the attitude not sonderlich sensitive chosen. then is it so integrally to wish. your could The different values Yes time durchprobieren.
thanks on The industrious Tester. here, How promised, the Source. CompileMarkSeparation {$cleq}
{$res icon G:Iconsglyt_smallCommonICO16x16views_16_h.ico}
Declare capdll&,capwindow&,rect#,wx&,wy&,bereich#,num&,fcopy#
Declare x&,y&,breite&,hoehe&,positionx&,positiony&,text$,listbox&
Dim rect#,20
Dim bereich#,1024
Dim fcopy#,64
DEF capCreateCaptureWindow(8) ! avicap32.dll,capCreateCaptureWindowA
DEF capGetDriverDescription(5) ! avicap32.dll,capGetDriverDescriptionA
Kamera-Konstanten
Def &WM_Capstart 1024
Def &WM_CAP_DRIVER_CONNECT 1034
Def &WM_CAP_DRIVER_DISCONNECT 1035
Def &WM_CAP_DRIVER_GET_NAME 1036
Def &WM_CAP_DRIVER_GET_VERSION 1037
Def &WM_CAP_SET_CALLBACK_FRAME 1029
Def &WM_CAP_FILE_SET_CAPTURE_FILE 1044
Def &WM_CAP_FILE_GET_CAPTURE_FILE 1045
Def &WM_CAP_FILE_SAVEAS 1047
Def &WM_CAP_FILE_SAVEDIB 1049
Def &WM_CAP_SET_AUDIOFORMAT 1059
Def &WM_CAP_GET_AUDIOFORMAT 1060
Def &WM_CAP_DLG_VIDEOFORMAT 1065
Def &WM_CAP_DLG_VIDEOSOURCE 1066
Def &WM_CAP_DLG_VIDEODISPLAY 1067
Def &WM_CAP_GET_VIDEOFORMAT 1068
Def &WM_CAP_SET_VIDEOFORMAT 1069
Def &WM_CAP_DLG_VIDEOCOMPRESSION 1070
Def &WM_CAP_SET_PREVIEW 1074
Def &WM_CAP_SET_OVERLAY 1075
Def &WM_CAP_SET_PREVIEWRATE 1076
Def &WM_CAP_SET_SCALE 1077
Def &WM_CAP_SET_SCROLL 1079
Def &WM_CAP_GRAB_FRAME 1084
Def &WM_CAP_GRAB_FRAME_NOSTOP 1085
Def &WM_CAP_SEQUENCE 1086
Def &WM_CAP_SEQUENCE_NOFILE 1087
Def &WM_CAP_SET_SEQUENCE_SETUP 1088
Def &WM_CAP_GET_SEQUENCE_SETUP 1089
Def &WM_CAP_SET_MCI_DEVICE 1090
Def &WM_CAP_GET_MCI_DEVICE 1091
Def &WM_CAP_STOP 1092
Def &WM_CAP_ABORT 1093
AsmInclude
.data
nurso dd 0
lastcount dd 0
phdc dd 0
pwnd dd 0
lwnd dd 0
starten dd 0
text1 dd 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
text2 db Bewegung registriert in Stärke ,0
text3 dd 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
text4 db Messung wurde gestartet. Bewegungen ab einer Stärke von 250 werden gemeldet. Wert einstellbar,0
text5 db .,0
text6 db :,0
text7 db Uhr.,0
text8 db 0,0
.code
Framebuffer-Callback-Routine
Wird durchlaufen, wann immer Videofenster aktualisiert werden muß.
FrameProc PROC hWnd:DWORD, lpVHdr:DWORD
LOCAL hdc:HDC
LOCAL bmpinfo:BITMAPINFO
LOCAL hBitmap:HBITMAP
LOCAL memory:DWORD
LOCAL bytes:DWORD
LOCAL rc:RECT
LOCAL breite:DWORD
LOCAL hoehe:DWORD
LOCAL xx:DWORD
LOCAL yy:DWORD
LOCAL stime:SYSTEMTIME
.if hWnd == 0
xor eax, eax
ret
.endif
pushall
invoke SendMessage,hWnd,1068,44,addr bmpinfo ;WM_CAP_GET_VIDEOFORMAT
lea edx,bmpinfo
mov eax,[edx+4]
mov breite,eax
mov edx,[edx+8]
mov hoehe,edx
mul edx
mov edx,3
mul edx
mov bytes,eax
invoke SendMessage,hWnd,1054,0,0 ;WM_CAP_EDIT_COPY
invoke CreateCompatibleDC,phdc
mov hdc,eax
.if eax
invoke OpenClipboard,pwnd
invoke GetClipboardData,CF_BITMAP
mov hBitmap,eax
mov eax,bytes
invoke GlobalAlloc,GMEM_FIXED+GMEM_ZEROINIT,eax
mov memory,eax
.if eax
lea edx,bmpinfo
mov eax,40
mov [edx],eax ;Size
mov eax,breite
mov [edx+4],eax ;Width
xor eax,eax
sub eax,hoehe
mov [edx+8],eax ;-Height
mov ax,1
mov [edx+12],ax ;Planes
mov ax,24
mov [edx+14],ax ;BitCount
invoke GetDIBits,hdc,hBitmap,0,hoehe,memory,addr bmpinfo,DIB_RGB_COLORS
xor esi,esi ;counter
mov xx,79
mov yy,59
mov edx,memory
mov edi,edx
schleife1:
xor eax,eax
xor ebx,ebx
mov bl,[edx]
add eax,ebx
mov bl,[edx+1]
add eax,ebx
mov bl,[edx+2]
add eax,ebx
mov bl,[edx+3]
add eax,ebx
mov bl,[edx+4]
add eax,ebx
mov bl,[edx+5]
add eax,ebx
mov bl,[edx+6]
add eax,ebx
mov bl,[edx+7]
add eax,ebx
mov bl,[edx+8]
add eax,ebx
mov bl,[edx+9]
add eax,ebx
mov bl,[edx+10]
add eax,ebx
mov bl,[edx+11]
add eax,ebx
mov bl,[edx+960]
add eax,ebx
mov bl,[edx+960+1]
add eax,ebx
mov bl,[edx+960+2]
add eax,ebx
mov bl,[edx+960+3]
add eax,ebx
mov bl,[edx+960+4]
add eax,ebx
mov bl,[edx+960+5]
add eax,ebx
mov bl,[edx+960+6]
add eax,ebx
mov bl,[edx+960+7]
add eax,ebx
mov bl,[edx+960+8]
add eax,ebx
mov bl,[edx+960+9]
add eax,ebx
mov bl,[edx+960+10]
add eax,ebx
mov bl,[edx+960+11]
add eax,ebx
mov bl,[edx+1920]
add eax,ebx
mov bl,[edx+1920+1]
add eax,ebx
mov bl,[edx+1920+2]
add eax,ebx
mov bl,[edx+1920+3]
add eax,ebx
mov bl,[edx+1920+4]
add eax,ebx
mov bl,[edx+1920+5]
add eax,ebx
mov bl,[edx+1920+6]
add eax,ebx
mov bl,[edx+1920+7]
add eax,ebx
mov bl,[edx+1920+8]
add eax,ebx
mov bl,[edx+1920+9]
add eax,ebx
mov bl,[edx+1920+10]
add eax,ebx
mov bl,[edx+1920+11]
add eax,ebx
mov bl,[edx+2880]
add eax,ebx
mov bl,[edx+2880+1]
add eax,ebx
mov bl,[edx+2880+2]
add eax,ebx
mov bl,[edx+2880+3]
add eax,ebx
mov bl,[edx+2880+4]
add eax,ebx
mov bl,[edx+2880+5]
add eax,ebx
mov bl,[edx+2880+6]
add eax,ebx
mov bl,[edx+2880+7]
add eax,ebx
mov bl,[edx+2880+8]
add eax,ebx
mov bl,[edx+2880+9]
add eax,ebx
mov bl,[edx+2880+10]
add eax,ebx
mov bl,[edx+2880+11]
add eax,ebx
push edx
xor edx,edx
mov ebx,48
div ebx
pop edx
.if al>=96
mov al,255
inc esi
.else
mov al,0
.endif
mov [edx],al
mov [edx+1],al
mov [edx+2],al
mov [edx+3],al
mov [edx+4],al
mov [edx+5],al
mov [edx+6],al
mov [edx+7],al
mov [edx+8],al
mov [edx+9],al
mov [edx+10],al
mov [edx+11],al
mov [edx+960],al
mov [edx+960+1],al
mov [edx+960+2],al
mov [edx+960+3],al
mov [edx+960+4],al
mov [edx+960+5],al
mov [edx+960+6],al
mov [edx+960+7],al
mov [edx+960+8],al
mov [edx+960+9],al
mov [edx+960+10],al
mov [edx+960+11],al
mov [edx+1920],al
mov [edx+1920+1],al
mov [edx+1920+2],al
mov [edx+1920+3],al
mov [edx+1920+4],al
mov [edx+1920+5],al
mov [edx+1920+6],al
mov [edx+1920+7],al
mov [edx+1920+8],al
mov [edx+1920+9],al
mov [edx+1920+10],al
mov [edx+1920+11],al
mov [edx+2880],al
mov [edx+2880+1],al
mov [edx+2880+2],al
mov [edx+2880+3],al
mov [edx+2880+4],al
mov [edx+2880+5],al
mov [edx+2880+6],al
mov [edx+2880+7],al
mov [edx+2880+8],al
mov [edx+2880+9],al
mov [edx+2880+10],al
mov [edx+2880+11],al
add edx,12
dec xx
cmp xx,0
jge schleife1
mov edx,edi
add edx,3840
mov edi,edx
mov xx,79
dec yy
cmp yy,0
jge schleife1
mov eax,lastcount
sub eax,esi
m2m lastcount,esi
.if SIGN?
neg eax
.endif
.if starten>3
.if eax>=250 ;Bewegungsmelder Grenzwert (250) erreicht
mov text3,0
push eax
invoke GetLocalTime,addr stime
xor eax,eax
mov ax,stime.wHour
invoke dwtoa,eax,addr text1
invoke lstrlen,addr text1
.if eax==1
invoke lstrcat,addr text3,addr text8
.endif
invoke lstrcat,addr text3,addr text1
invoke lstrcat,addr text3,addr text6
xor eax,eax
mov ax,stime.wMinute
invoke dwtoa,eax,addr text1
invoke lstrlen,addr text1
.if eax==1
invoke lstrcat,addr text3,addr text8
.endif
invoke lstrcat,addr text3,addr text1
invoke lstrcat,addr text3,addr text6
xor eax,eax
mov ax,stime.wSecond
invoke dwtoa,eax,addr text1
invoke lstrlen,addr text1
.if eax==1
invoke lstrcat,addr text3,addr text8
.endif
invoke lstrcat,addr text3,addr text1
invoke lstrcat,addr text3,addr text7
pop eax
invoke dwtoa,eax,addr text1
invoke lstrcat,addr text3,addr text2
invoke lstrcat,addr text3,addr text1
invoke lstrcat,addr text3,addr text5
invoke SendMessage,lwnd,LB_ADDSTRING,0,addr text3
invoke SendMessage,lwnd,LB_GETCOUNT,0,0
dec eax
invoke SendMessage,lwnd,LB_SETTOPINDEX,eax,0
invoke Beep,3000,25
.endif
.elseif starten==3
invoke SendMessage,lwnd,LB_ADDSTRING,0,addr text4
.endif
inc starten
invoke SetDIBitsToDevice,phdc,328,0,breite,hoehe,0,0,0,hoehe,memory,addr bmpinfo,DIB_RGB_COLORS
invoke GlobalFree,memory
.endif
invoke CloseClipboard
invoke DeleteDC,hdc
.endif
popall
mov eax, 1
ret
FrameProc ENDP
AsmEnd
Proc GetCaptureDriverList
Declare Treiber$,Version$,Zaehler%
ClearList
WhileNot zaehler%=9 reicht fuer 9 Treiber, mehr erlaubt das System nicht.
Treiber$=Space$(80)
Version$=Space$(80)
If capGetDriverDescription(Zaehler%,ADDR(Treiber$),80,ADDR(Version$),80) > 0
AddString Trim$(Treiber$)
Endif
Inc Zaehler%
EndWhile
EndProc
capdll&=UseDll(avicap32.dll)
Windowtitle Bitte Kamera-Treiber wählen.
Windowstyle 512 | 26
Window %maxx,0-320,240
Cls GetSysColor(15)
Usefont MS Sans Serif,10,0,0,0,0
SetDialogFont 1
listbox&=Create(ListBox, %hwnd,0, 8, 8, 320, 160)
GetCaptureDriverList
MoveListToList(listbox&)
x&=GetCount(listbox&)
If x&
GetClientRect(%hwnd,rect#)
wx&=320-Long(rect#,8)-Long(rect#,0)
wy&=240-Long(rect#,12)-Long(rect#,4)
SetWindowPos %hwnd=(%maxx/2-160),(%maxy/2-80)-(320+16+wx&),(160+16+wy&)
While 1
WaitInput
If %key=3
Break
EndIf
Endwhile
num&=GetCurSel(listbox&)
case num&<0:num&=0
DestroyWindow(listbox&)
SetWindowPos %hwnd=%maxx,0-320,240
Windowtitle Cap Thief, Webcam-Bewegungsmelder © 2007 http://frabbing.de
Control(STATIC, Originaler Datenstream, $54000301, 0, 240, 320, 20, %hwnd, 2001, %hInstance, $00000000)
Control(STATIC, Echtzeit-manipulierte Daten, $54000301, 328, 240, 320, 20, %hwnd, 2002, %hInstance, $00000000)
listbox&=Create(ListBox, %hwnd, 0, 8, 260, 632, 192)
Kamerafenster erstellen
capwindow&=capCreateCaptureWindow(0,WS_CHILD | WS_VISIBLE,0,0,320,240,%Hwnd,0)
If SendMessage(capwindow&,&WM_CAP_DRIVER_CONNECT,num&,0)
Videoformat zur Wiederherstellung sichern
Clear fcopy#
SendMessage(capwindow&,&WM_CAP_GET_VIDEOFORMAT,44,fcopy#)
Neues Videoformat setzen
Clear bereich#
Long bereich#,0=40
Long bereich#,4=320
Long bereich#,8=240
Word bereich#,12=1
Word bereich#,14=24
Long bereich#,20=320*240*3
SendMessage(capwindow&,&WM_CAP_SET_VIDEOFORMAT,44,bereich#)
Kamera ausrichten und einschalten
SendMessage(capwindow&,&WM_CAP_SET_PREVIEWRATE,1,0)
Sendmessage(capwindow&,&WM_CAP_SET_SCALE,1,0)
SendMessage(capwindow&,&WM_CAP_SET_PREVIEW,1,0)
Sendmessage(capwindow&,&WM_CAP_SET_OVERLAY,0,0)
AsmStart SCall1(capwindow&,%hdc,%hwnd,listbox&)
m2m phdc,para2
m2m pwnd,para3
m2m lwnd,para4
invoke SendMessage,para1,1029,0,addr FrameProc ;WM_CAP_SET_CALLBACK_FRAME
AsmEnd
GetClientRect(%hwnd,rect#)
wx&=320-Long(rect#,8)-Long(rect#,0)
wy&=240-Long(rect#,12)-Long(rect#,4)
SetWindowPos %hwnd=(%maxx/2-320),(%maxy/2-220)-(320+320+8+wx&),(440+20+wy&)
While 1
WaitInput
Case %key=2:Break
Endwhile
Videoformat wiederherstellen
SendMessage(capwindow&,&WM_CAP_SET_VIDEOFORMAT,44,fcopy#)
SendMessage(capwindow&,&WM_CAP_SET_PREVIEW,0,0)
SendMessage(capwindow&,&WM_CAP_DRIVER_DISCONNECT,0,0)
Else
MessageBox(Eine Verbindung zur Kamera ist
derzeit nicht möglich.,Information:,64)
EndIf
DestroyWindow(capwindow&)
DestroyWindow(%hwnd)
Else
MessageBox(Im System wurde keine
Kamera gefunden.,EndIf
FreeDll capdll&
Dispose rect#
Dispose area#
Dispose fcopy#
End
XPIA becomes yet these Macros for base.inc need: CompileMarkSeparation |
| | | | |
| | Christian Eichler | Frank, sorry for late response. by me funktionniert it neither, the left Window remaining simply Black. The Kamera funktonniert, in the Explorer becomes one Image displayed !
mfg Christian E |
| | | Debian Lenny, Intel Celeron 2,8 Ghz, 768 MB Ram && Win XP Pro, Intel C2D 1,66Ghz, 2 GB Ram ... PROFAN² 6.6 | 12/19/07 ▲ |
| |
| | Frank Abbing | thanks Christian! you have now Yes whom Source and could yourself on The Search to the cause weg. Dass only one Program at the same time on The Cam grab can, do you know Yes? |
| | | | |
| | | | - Page 2 - |
| | | ...I objectively as peinliche Windowseigenschaft feel... |
| | | | |
| | Christian Eichler | Frank Abbing
Dass only one Program at the same time on The Cam grab can, do you know Yes?
Yes, this is me deliberate ... I Have already attention, that only one Program The Cam uses |
| | | Debian Lenny, Intel Celeron 2,8 Ghz, 768 MB Ram && Win XP Pro, Intel C2D 1,66Ghz, 2 GB Ram ... PROFAN² 6.6 | 12/19/07 ▲ |
| |
| | Rolf Koch | by me under Vista runs it How greased. however but only if enough light in the game is. If it To dark is, then reacted the Tool not movement. normal? |
| | | | |
| | Frank Abbing |
If it To dark is, then reacted the Tool not movement. normal?
my Webcam has 6 small shine... No, Rolf. The Lichtempfindlichkeit position You on this place the Codes one: CompileMarkSeparation attempt time others values (0-255) in lieu of of 96. |
| | | | |
| | Jac de Lad | my has 4, but the are schweinehell... |
| | | Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE) Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP | 12/19/07 ▲ |
| |
| | Michael Wodrich | | | | Programmieren, das spannendste Detektivspiel der Welt. | 12/20/07 ▲ |
| |
|
AnswerThemeninformationenthis Topic has 9 subscriber: |
|