Fenster mit Webcam (AVICAP32.DLL) ruckelt bei Bewegung?!

Anfängerfragen zum Programmieren mit PureBasic.
Benutzeravatar
Delle
Beiträge: 1130
Registriert: 10.05.2005 22:48

Fenster mit Webcam (AVICAP32.DLL) ruckelt bei Bewegung?!

Beitrag von Delle »

Hallo,

weiß jemand warum das Fenster ruckelt wenn man es bewegt?

Habe hier immerhin 2,2 GHz und wunder mich ziemlich...

Code: Alles auswählen

#WM_CAP_START = #WM_USER 

#WM_CAP_SET_CALLBACK_ERROR = #WM_CAP_START + 2 
#WM_CAP_SET_CALLBACK_STATUS = #WM_CAP_START + 3 
#WM_CAP_SET_CALLBACK_YIELD = #WM_CAP_START + 4 
#WM_CAP_SET_CALLBACK_FRAME = #WM_CAP_START + 5 
#WM_CAP_SET_CALLBACK_VIDEOSTREAM = #WM_CAP_START + 6 
#WM_CAP_SET_CALLBACK_WAVESTREAM = #WM_CAP_START + 7 

#WM_CAP_DRIVER_CONNECT = #WM_USER + 10 
#WM_CAP_DRIVER_DISCONNECT = #WM_USER + 11 
#WM_CAP_DRIVER_GET_CAPS = #WM_CAP_START + 14 

#WM_CAP_DLG_VIDEOFORMAT = #WM_CAP_START + 41 
#WM_CAP_DLG_VIDEOSOURCE = #WM_CAP_START + 42 
#WM_CAP_DLG_VIDEODISPLAY = #WM_CAP_START + 43 

#WM_CAP_SET_PREVIEW = #WM_CAP_START + 50 
#WM_CAP_SET_PREVIEWRATE = #WM_CAP_START + 52 
#WM_CAP_GET_STATUS = #WM_CAP_START + 54 

#WM_CAP_FILE_SAVEDIB = #WM_USER + 25 
#WM_CAP_SET_SCALE = #WM_USER + 53 

#WM_CAP_SET_CALLBACK_CAPCONTROL = #WM_CAP_START + 85 

hWnd = OpenWindow(0, 0, 0, 400, 400, "",#PB_Window_SystemMenu) 

CreateGadgetList(WindowID(0)) 

If OpenLibrary(0, "AVICAP32.DLL") 

hWebcam = CallFunction(0, "capCreateCaptureWindowA", "", #WS_VISIBLE + #WS_CHILD, 10, 10, 380, 380, hwnd, 0) 

SendMessage_(hWebcam, #WM_CAP_DRIVER_CONNECT , 0 , 0) 
SendMessage_(hWebcam, #WM_CAP_SET_SCALE , 1 , 0) 
SendMessage_(hWebcam, #WM_CAP_SET_PREVIEWRATE , 1 , 0) 
SendMessage_(hWebcam, #WM_CAP_SET_PREVIEW , 1 , 0) 
SendMessage_(hwebcam, #WM_CAP_FILE_SAVEDIB , 1 , 0) 

Repeat 
Event = WindowEvent() 
Select Event 
Case #PB_Event_CloseWindow 
Quit = 1 
EndSelect 
Until Quit = 1 
SendMessage_(hWebcam, #WM_CAP_SET_PREVIEW , 0, 0) 
SendMessage_(hWebcam, #WM_CAP_DRIVER_DISCONNECT, "BLUBBER", 0) 
CloseWindow(0) 
CloseLibrary(0) 
EndIf 
End 
; ExecutableFormat=Windows 
; EOF
[/code]
PB 6.21 | Win 11
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

Das Problem hab ich mit meiner TV-Software die der Karte beilag seit einiger
Zeit, ich denke mal das ein Windows-Update schuld haben könnte.
Seit wann das so ist kann ich aber nicht sagen, da ich meist eine andere
Software für die Karte nutze, die wohl nicht auf die DLL aufsetzt.
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Benutzeravatar
Delle
Beiträge: 1130
Registriert: 10.05.2005 22:48

Beitrag von Delle »

Was hast Du für eine Cam?

Habe die LogiTech QuickCam und mit deren Software "QuickCapture" ruckelt es komischerweise nicht...
PB 6.21 | Win 11
Benutzeravatar
ts-soft
Beiträge: 22292
Registriert: 08.09.2004 00:57
Computerausstattung: Mainboard: MSI 970A-G43
CPU: AMD FX-6300 Six-Core Processor
GraKa: GeForce GTX 750 Ti, 2 GB
Memory: 16 GB DDR3-1600 - Dual Channel
Wohnort: Berlin

Beitrag von ts-soft »

Keine CAM, TV-Karte, macht doch keine Unterschied. DVB-T
PureBasic 5.73 LTS | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Nutella hat nur sehr wenig Vitamine. Deswegen muss man davon relativ viel essen.
Bild
Antworten