Comment récupérer les images d'une Webcam ?
Comment récupérer les images d'une Webcam ?
Salut
J'aimerai savoir comment faire pour recuperer les images d'une webcam (eyetoy PS2) brancher sur un port usb du PC .
Si quelqu'un a une solution ...
Merci beaucoup
@+Léo
J'aimerai savoir comment faire pour recuperer les images d'une webcam (eyetoy PS2) brancher sur un port usb du PC .
Si quelqu'un a une solution ...
Merci beaucoup
@+Léo
si tu veux jète un oeil ici :
http://www.icamplay.com/
c'est une dll pour faire ce que tu veux, réalisée en purebasic je crois !
sinon j'ai des exemples mais assez longs et difficiles si tu débutes.
il faut en tout les cas utiliser la librairie - avicap32.dll -
http://www.icamplay.com/
c'est une dll pour faire ce que tu veux, réalisée en purebasic je crois !
sinon j'ai des exemples mais assez longs et difficiles si tu débutes.
il faut en tout les cas utiliser la librairie - avicap32.dll -
sinon essayes çà :
et dis moi si il y au moins un driver de reconnu...
Code : Tout sélectionner
capId.l = OpenLibrary(#PB_Any,"avicap32.dll")
If capId <> #Null
lName.l=255
pName.s=Space(lName)
lVer.l=255
pVer.s=Space(lName)
For i=0 To 9
If CallFunction(capId,"capGetDriverDescriptionA",i,pName,lName,pVer,lVer)
Debug pName
Debug pVer
EndIf
Next
CloseLibrary(capId)
EndIf
ben !! il existe une fontion " Couleur = Point(x, y) "
qui permetrai simplement de regarder si les pixel de certain coin de l'image ont changé !!
mais pour toute l'image ce serai peut etre un peut long !! faut voir
sinon oui l'a comparaison mot par mot est faisable !!
mais tu sais , tu devrai pouvoir y arriver aussi !!!
ha ! et un system multitache sous dark ! (si si! ) pour aider DARKSPIKE qui voulais refaire tout un system d'exploitation
je lui ai montré les principe de base et il a devellopé son idée !!
on arrivait a gerer 2 fenetres je crois ! avec des taches differentes dedans
ont avais fait ça en db 1 car la pro n'existait mem pas !
je pense qu'il avait continué un peut apres ma colaboration
le problem n'est pas d'analyser l'image !!
le probleme pour moi est de la recuperer a la volée a partir d'une camera!!!
je doit dire que je me suis pas trop interresser a ça !!
mais c'est interressant !!
mais j'ai pas de camera !!

voici ce que donnait le multitache en dark !!
attention c'etait la premiere base !!! et ça ramme !!
qui permetrai simplement de regarder si les pixel de certain coin de l'image ont changé !!
mais pour toute l'image ce serai peut etre un peut long !! faut voir
sinon oui l'a comparaison mot par mot est faisable !!
mais tu sais , tu devrai pouvoir y arriver aussi !!!
ben j'ai surtout fait mon synthe vocal et un explorateur de fichier pour le dark et la premiere version de mon casse brique !! -<< mais je l'ai jamais diffusé !!Dobro il me semble qu'avant tu faisait pas mal de trucs en DarkBasic avec les images

ha ! et un system multitache sous dark ! (si si! ) pour aider DARKSPIKE qui voulais refaire tout un system d'exploitation
je lui ai montré les principe de base et il a devellopé son idée !!

on arrivait a gerer 2 fenetres je crois ! avec des taches differentes dedans
ont avais fait ça en db 1 car la pro n'existait mem pas !
je pense qu'il avait continué un peut apres ma colaboration
le problem n'est pas d'analyser l'image !!
le probleme pour moi est de la recuperer a la volée a partir d'une camera!!!
je doit dire que je me suis pas trop interresser a ça !!
mais c'est interressant !!
mais j'ai pas de camera !!


voici ce que donnait le multitache en dark !!
attention c'etait la premiere base !!! et ça ramme !!

Code : Tout sélectionner
rem ****Début du programme****
dim fenetres(2,2) : rem déclaration du tableau des propriétés des fenêtres
hide mouse : rem je cache le curseur de la souris
rem choix de la profondeur des couleurs
rem compromis joli dégradé/performances
rem c'est pour le fun!
print "Couleurs:"
print " 1. 32bits/pixel"
print " 2. 24bits/pixel"
print " 3. 16bits/pixel"
print " "
input " ->",a
if a=1 then set display mode 800,600,32
if a=2 then set display mode 800,600,24
if a=3 then set display mode 800,600,16
hide mouse :rem je recache le curseur
sync on :rem c'est moi ki gere l'affichage
sync rate 60 :rem limitation d'images/seconde
rem dégradé de fond
cls
center text 400,295,"Chargement..."
sync
for e=1 to 800
ink rgb(e/3.15,0,0),0
line e,0,e,600
next e
ink rgb(255,255,255),0
set cursor 10,20
print "- Remerciements à DOBRO pour ses idées -"
set cursor 10,570
print "Cliquez sur l'intitulé de la fenêtre pour la déplacer"
rem mise en place des variables
fenetres(0,0)=3 :rem position x de la tache 1
fenetres(0,1)=80 :rem position y de la tache 1
fenetres(1,0)=400 :rem position x de la tache 2
fenetres(1,1)=80 :rem position y de la tache 3
fenetres(0,2)=1 :rem priorité de la tache 1
fenetres(1,2)=2 :rem priorité de la tache 2
get image 1,0,0,800,600 : rem sauvegarde du fond
gosub fenetre1
gosub fenetre2
show mouse
sync
rem *** Boucle principale
do
remstart
le principe utilisé ici ne marche que pour 2 fenetres
pour d'autres fenêtres, il fô utiliser 2 boucle
FOR ... Next, une avec les priorités, l'autre
avec les fenêtres, apres il fô faire un test
pour voir kel programme va tourner
un truc du genre:
FOR priorité=0 to 10
FOR tache=0 to 10
if tableau_fenetres(tache,n°)=priorité then gosub tâche
NEXT
NEXT priorité
ah oui, au fait, il fô savoire ke c tjr la derniere
tâche ki va être affiché en premier-plan...
remend
rem déplacement des fenetres par rapport aux priorités
if fenetres(1,2)=1 then gosub deplace_fenetre2
if fenetres(0,2)=1 then gosub deplace_fenetre1
if fenetres(1,2)=2 then gosub deplace_fenetre2
if fenetres(0,2)=2 then gosub deplace_fenetre1
rem appel des taches
if fenetres(0,2)=2 then gosub fenetre1
if fenetres(1,2)=2 then gosub fenetre2
if fenetres(0,2)=1 then gosub fenetre1
if fenetres(1,2)=1 then gosub fenetre2
sync
loop
fenetre1:
rem appel de le fonction fenetre
if fenetres(0,2)=1 then ink rgb(200,200,200),0
if fenetres(0,2)=2 then ink rgb(125,125,125),0
box fenetres(0,0),fenetres(0,1),fenetres(0,0)+300,fenetres(0,1)+150
fenetre(fenetres(0,0),fenetres(0,1),fenetres(0,0)+300,fenetres(0,1)+150,"Tâche 1")
set cursor fenetres(0,0)+10,fenetres(0,1)+60
rem affichage de l'heure
ink 0,0
print "Heure :" + get time$()
ink rgb(255,255,255),0
return
fenetre2:
rem appel de le fonction fenetre
if fenetres(1,2)=1 then ink rgb(200,200,200),0
if fenetres(1,2)=2 then ink rgb(125,125,125),0
box fenetres(1,0),fenetres(1,1),fenetres(1,0)+300,fenetres(1,1)+150
fenetre(fenetres(1,0),fenetres(1,1),fenetres(1,0)+300,fenetres(1,1)+150,"Tâche 2")
set cursor fenetres(1,0)+10,fenetres(1,1)+60
rem affichage du nombre d'images par seconde
ink 0,0
print "Images par seconde :",screen fps()
ink rgb(255,255,255),0
return
rem *** SUB permettant de déplacer la fenêtre 1
deplace_fenetre1:
if fenexit(fenetres(0,0),fenetres(0,1))=5
paste image 1,0,0
fenetres(0,2)=1
fenetres(1,2)=2
originex=fenetres(0,0)-mousex()
originey=fenetres(0,1)-mousey()
rem boucle de test pour la souris
while mouseclick()=1
paste image 1,0,0
rem déplacement de la fenêtre
fenetres(0,0)=originex+mousex()
fenetres(0,1)=originey+mousey()
rem test pour que la fenêtre ne dépasse pas de l'écran
if fenetres(0,0)<3 then fenetres(0,0)=3
if fenetres(0,1)<23 then fenetres(0,1)=23
if fenetres(0,0)>800-303 then fenetres(0,0)=800-303
if fenetres(0,1)>600-153 then fenetres(0,1)=600-153
rem appel des taches
gosub fenetre2
gosub fenetre1
sync
endwhile
endif
return
rem *** SUB permettant de déplacer la fenêtre 2
deplace_fenetre2:
if fenexit(fenetres(1,0),fenetres(1,1))=5
paste image 1,0,0
fenetres(1,2)=1
fenetres(0,2)=2
originex=fenetres(1,0)-mousex()
originey=fenetres(1,1)-mousey()
while mouseclick()=1
paste image 1,0,0
fenetres(1,0)=originex+mousex()
fenetres(1,1)=originey+mousey()
if fenetres(1,0)<3 then fenetres(1,0)=3
if fenetres(1,1)<23 then fenetres(1,1)=23
if fenetres(1,0)>800-303 then fenetres(1,0)=800-303
if fenetres(1,1)>600-153 then fenetres(1,1)=600-153
gosub fenetre1
gosub fenetre2
sync
endwhile
endif
return
end
rem fonction qui permet d'afficher une fenêtre
rem /!\ x1 doit être scrictement inférieur à x2
rem et y1 doit être scrictement inférieur à y2
function fenetre(x1,y1,x2,y2,desc$)
resultat=0
rem intérieur de la bordure de la fenêtre
ink rgb(255,255,255),0
line x1,y1,x2,y1
line x1,y1,x1,y2
line x2,y1,x2,y2
line x1,y2,x2,y2
ink rgb(255,255,255),0
box x1,y1-10,x1+10,y1
box x1+27,y1-20,x1+25+158,y1
ink rgb(20,10,5),0
rem diminue l'intitulé si il est trop long
if len(desc$)>19 then desc$=left$(desc$,15)+" ..."
text x1+29,y1-18,desc$
if mousex()<x1+12 and mousex()>x1-1 and mousey()<y1-1 and mousey()>y1-10 and mouseclick()>0 then resultat=mouseclick()
ink rgb(255,255,255),0
endfunction resultat
rem fonction de test par rapport aux deux premières coordonées
rem elle renvoie mousex() pour le bouton qui ferme la fenêtre
rem elle renvoie 4+mousex() pour l'intitulé
function fenexit(x1,y1)
resultat=0
if mousex()<x1+12 and mousex()>x1-1 and mousey()<y1-1 and mousey()>y1-10 and mouseclick()>0 then resultat=mouseclick()
if mousex()<x1+25+158 and mousex()>x1+25 and mousey()<y1-1 and mousey()>y1-20 and mouseclick()>0 then resultat=4+mouseclick()
endfunction resultat
Dernière modification par Backup le dim. 08/août/2004 19:54, modifié 1 fois.
sur le forum anglais il y a plein de codes pour webcam mais aucun ne marche !
Peut etre que tu ariveras à les corriger ?
regarde celui là , il me semble bien :
joindre le code suivant dans le meme dossier au nom de avicapincs.pb
Peut etre que tu ariveras à les corriger ?
regarde celui là , il me semble bien :
Code : Tout sélectionner
IncludeFile "avicapincs.pb"
; -----------------------------------------------------------------------------
; D E M O . . .
; -----------------------------------------------------------------------------
OpenAviLibrary ()
If OpenWindow (0, #CW_USEDEFAULT, #CW_USEDEFAULT, 300, 0, #PB_Window_SystemMenu, "Video Capture [initialising...]")
CreateMenu (0, WindowID ())
MenuTitle ("&File")
MenuItem (0, "&About")
MenuBar ()
MenuItem (1, "E&xit")
MenuTitle ("&Control")
MenuItem (2, "&Start")
MenuItem (3, "&Display")
MenuItem (4, "&Format")
MenuItem (5, "S&ource")
MenuItem (6, "Co&mpression")
MenuBar ()
MenuItem (7, "&Preview")
SetMenuItemState (0, 7, #TRUE)
; Create and init capture window, using current window as parent (required)...
StartCaptureWindow (WindowID ())
ResizeWindow (capWidth + (GetSystemMetrics_ (#SM_CXBORDER) * 2), capHeight + (GetSystemMetrics_ (#SM_CYBORDER) * 2))
SetWindowText_ (WindowID (), "Video Capture")
; [Need to grey out menu items not supported...]
If dlgSource = 0
DisableMenuItem (5, #TRUE)
EndIf
If dlgFormat = 0
DisableMenuItem (4, #TRUE)
EndIf
If dlgDisplay = 0
DisableMenuItem (3, #TRUE)
EndIf
Repeat
e = WaitWindowEvent ()
Select e
Case #PB_Event_CloseWindow
Goto Quit
Case #PB_EventMenu
Select EventMenuID ()
Case 0
MessageRequester ("Video Capture", "Ported to PureBasic by James @ hi-toro.com," + Chr (10) + "from original Visual Basic source by EJ Bantz." + Chr (10) + Chr (10) + "Copyright: None, use and distribute freely.", #MB_ICONINFORMATION | #MB_TASKMODAL)
Case 1
Goto Quit
Case 2
Start_Click ()
Case 3
Display_Click ()
Case 4
Format_Click ()
ResizeWindow (capWidth, capHeight)
Case 5
Source_Click ()
Case 6
Compression_Click ()
Case 7
Preview_Click ()
SetMenuItemState (0, 7, gPreviewStatus)
EndSelect
EndSelect
ForEver
EndIf
Quit:
EndCaptureWindow (0)
CloseAviLibrary ()
End
Code : Tout sélectionner
; -----------------------------------------------------------------------------
; ORIGINAL VB TEXT...
; -----------------------------------------------------------------------------
;* Author: E. J. Bantz Jr.
;* Copyright: None, use and distribute freely ...
;* E-Mail: ejbantz@usa.net
;* Web: http://www.inlink.com/~ejbantz
; [ Ported to PureBasic by James @ hi-toro.com ]
; -----------------------------------------------------------------------------
; Some extra PB procedures...
; -----------------------------------------------------------------------------
; Show fatal error message, end program...
Procedure FatalError (error$)
If error$ = "": error$ = "Undefined error... outta here!": EndIf
MessageRequester ("Program error -- aborting...", error$, #MB_ICONWARNING | #MB_SYSTEMMODAL)
End
EndProcedure
; Open avicap32.dll as PB library number 0...
Procedure OpenAviLibrary ()
If OpenLibrary (0, "avicap32.dll") = 0
FatalError ("Can't open avicap32.dll!")
EndIf
EndProcedure
; Close avicap32.dll -- crashes...!
Procedure CloseAviLibrary ()
; CloseLibrary (0) ; Close avicap32.dll -- causes crash/freeze!
EndProcedure
; Function undefined in PB -- uses avicap32.dll to create capture window (returns handle)...
Procedure.l capCreateCaptureWindowA (lpszWindowName$, dwStyle.l, x.l, y.l, nWidth.l, nHeight.b, hWndParent.l, nId.l)
ProcedureReturn CallFunction (0, "capCreateCaptureWindowA", lpszWindowName$, dwStyle, x, y, nWidth, nHeight, hWndParent, nId)
EndProcedure
; Function undefined in PB -- uses avicap32.dll to get [default?] capture device name. Places
; name and version strings into memory pointers defined when calling...
Procedure.b capGetDriverDescriptionA (wDriver.b, *lpszName, cbName.l, *lpszVer, cbVer.l)
CallFunction (0, "capGetDriverDescriptionA", wDriver, *lpszName, cbName, *lpszVer, cbVer)
EndProcedure
;// ------------------------------------------------------------------
;// Windows API Constants / Types / Declarations
;// ------------------------------------------------------------------
#WM_USER = $400
#WS_CHILD = $40000000
#WS_VISIBLE = $10000000
#SWP_NOMOVE = $2
#SWP_NOZORDER = $4
#HWND_BOTTOM = 1
;// ------------------------------------------------------------------
;// Window Messages WM_CAP... which can be sent to an AVICAP window
;// ------------------------------------------------------------------
;// Defines start of the message range
#WM_CAP_START = #WM_USER
#WM_CAP_GET_CAPSTREAMPTR = #WM_CAP_START + 1
#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_GET_USER_DATA = #WM_CAP_START + 8
#WM_CAP_SET_USER_DATA = #WM_CAP_START + 9
#WM_CAP_DRIVER_CONNECT = #WM_CAP_START + 10
#WM_CAP_DRIVER_DISCONNECT = #WM_CAP_START + 11
#WM_CAP_DRIVER_GET_NAME = #WM_CAP_START + 12
#WM_CAP_DRIVER_GET_VERSION = #WM_CAP_START + 13
#WM_CAP_DRIVER_GET_CAPS = #WM_CAP_START + 14
#WM_CAP_FILE_SET_CAPTURE_FILE = #WM_CAP_START + 20
#WM_CAP_FILE_GET_CAPTURE_FILE = #WM_CAP_START + 21
#WM_CAP_FILE_ALLOCATE = #WM_CAP_START + 22
#WM_CAP_FILE_SAVEAS = #WM_CAP_START + 23
#WM_CAP_FILE_SET_INFOCHUNK = #WM_CAP_START + 24
#WM_CAP_FILE_SAVEDIB = #WM_CAP_START + 25
#WM_CAP_EDIT_COPY = #WM_CAP_START + 30
#WM_CAP_SET_AUDIOFORMAT = #WM_CAP_START + 35
#WM_CAP_GET_AUDIOFORMAT = #WM_CAP_START + 36
#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_GET_VIDEOFORMAT = #WM_CAP_START + 44
#WM_CAP_SET_VIDEOFORMAT = #WM_CAP_START + 45
#WM_CAP_DLG_VIDEOCOMPRESSION = #WM_CAP_START + 46
#WM_CAP_SET_PREVIEW = #WM_CAP_START + 50
#WM_CAP_SET_OVERLAY = #WM_CAP_START + 51
#WM_CAP_SET_PREVIEWRATE = #WM_CAP_START + 52
#WM_CAP_SET_SCALE = #WM_CAP_START + 53
#WM_CAP_GET_STATUS = #WM_CAP_START + 54
#WM_CAP_SET_SCROLL = #WM_CAP_START + 55
#WM_CAP_GRAB_FRAME = #WM_CAP_START + 60
#WM_CAP_GRAB_FRAME_NOSTOP = #WM_CAP_START + 61
#WM_CAP_SEQUENCE = #WM_CAP_START + 62
#WM_CAP_SEQUENCE_NOFILE = #WM_CAP_START + 63
#WM_CAP_SET_SEQUENCE_SETUP = #WM_CAP_START + 64
#WM_CAP_GET_SEQUENCE_SETUP = #WM_CAP_START + 65
#WM_CAP_SET_MCI_DEVICE = #WM_CAP_START + 66
#WM_CAP_GET_MCI_DEVICE = #WM_CAP_START + 67
#WM_CAP_STOP = #WM_CAP_START + 68
#WM_CAP_ABORT = #WM_CAP_START + 69
#WM_CAP_SINGLE_FRAME_OPEN = #WM_CAP_START + 70
#WM_CAP_SINGLE_FRAME_CLOSE = #WM_CAP_START + 71
#WM_CAP_SINGLE_FRAME = #WM_CAP_START + 72
#WM_CAP_PAL_OPEN = #WM_CAP_START + 80
#WM_CAP_PAL_SAVE = #WM_CAP_START + 81
#WM_CAP_PAL_PASTE = #WM_CAP_START + 82
#WM_CAP_PAL_AUTOCREATE = #WM_CAP_START + 83
#WM_CAP_PAL_MANUALCREATE = #WM_CAP_START + 84
;// Following added post VFW 1.1
#WM_CAP_SET_CALLBACK_CAPCONTROL = #WM_CAP_START + 85
;// Defines end of the message range
#WM_CAP_END = #WM_CAP_SET_CALLBACK_CAPCONTROL
;// ------------------------------------------------------------------
;// Structures
;// ------------------------------------------------------------------
Structure CAPDRIVERCAPS
wDeviceIndex.l ; // Driver index in system.ini
fHasOverlay.l ; // Can device overlay?
fHasDlgVideoSource.l ; // Has Video source dlg?
fHasDlgVideoFormat.l ; // Has Format dlg?
fHasDlgVideoDisplay.l ; // Has External out dlg?
fCaptureInitialized.l ; // Driver ready to capture?
fDriverSuppliesPalettes.l ; // Can driver make palettes?
hVideoIn.l ; // Driver In channel
hVideoOut.l ; // Driver Out channel
hVideoExtIn.l ; // Driver Ext In channel
hVideoExtOut.l ; // Driver Ext Out channel
EndStructure
Structure CAPSTATUS
uiImageWidth.l ;// Width of the image
uiImageHeight.l ;// Height of the image
fLiveWindow.l ;// Now Previewing video?
fOverlayWindow.l ;// Now Overlaying video?
fScale.l ;// Scale image to client?
ptScroll.POINT ;// Scroll position
fUsingDefaultPalette.l ;// Using default driver palette?
fAudioHardware.l ;// Audio hardware present?
fCapFileExists.l ;// Does capture file exist?
dwCurrentVideoFrame.l ;// # of video frames cap;td
dwCurrentVideoFramesDropped.l ;// # of video frames dropped
dwCurrentWaveSamples.l ;// # of wave samples cap;td
dwCurrentTimeElapsedMS.l ;// Elapsed capture duration
hPalCurrent.l ;// Current palette in use
fCapturingNow.l ;// Capture in progress?
dwReturn.l ;// Error value after any operation
wNumVideoAllocated.l ;// Actual number of video buffers
wNumAudioAllocated.l ;// Actual number of audio buffers
EndStructure
Structure CAPTUREPARMS
dwRequestMicroSecPerFrame.l ;// Requested capture rate
fMakeUserHitOKToCapture.l ;// Show "Hit OK to cap" dlg?
wPercentDropForError.l ;// Give error msg if > (10%)
fYield.l ;// Capture via background task?
dwIndexSize.l ;// Max index size in frames (32K)
wChunkGranularity.l ;// Junk chunk granularity (2K)
fUsingDOSMemory.l ;// Use DOS buffers?
wNumVideoRequested.l ;// # video buffers, If 0, autocalc
fCaptureAudio.l ;// Capture audio?
wNumAudioRequested.l ;// # audio buffers, If 0, autocalc
vKeyAbort.l ;// Virtual key causing abort
fAbortLeftMouse.l ;// Abort on left mouse?
fAbortRightMouse.l ;// Abort on right mouse?
fLimitEnabled.l ;// Use wTimeLimit?
wTimeLimit.l ;// Seconds to capture
fMCIControl.l ;// Use MCI video source?
fStepMCIDevice.l ;// Step MCI device?
dwMCIStartTime.l ;// Time to start in MS
dwMCIStopTime.l ;// Time to stop in MS
fStepCaptureAt2x.l ;// Perform spatial averaging 2x
wStepCaptureAverageFrames.l ;// Temporal average n Frames
dwAudioBufferSize.l ;// Size of audio bufs (0 = default)
fDisableWriteCache.l ;// Attempt to disable write cache
EndStructure
Structure CAPINFOCHUNK
fccInfoID.l ;// Chunk ID, "ICOP" for copyright
lpData.l ;// pointer to data
cbData.l ;// size of lpData
EndStructure
Structure VIDEOHDR
lpData.l ;// address of video buffer
dwBufferLength.l ;// size, in bytes, of the Data buffer
dwBytesUsed.l ;// see below
dwTimeCaptured.l ;// see below
dwUser.l ;// user-specific data
dwFlags.l ;// see below
dwReserved.l[3] ;// reserved; do not use}
EndStructure
;// ------------------------------------------------------------------
;// String IDs from status and error callbacks
;// ------------------------------------------------------------------
#IDS_CAP_BEGIN = 300 ;/* "Capture Start" */
#IDS_CAP_END = 301 ;/* "Capture End" */
#IDS_CAP_INFO = 401 ;/* "%s" */
#IDS_CAP_OUTOFMEM = 402 ;/* "Out of memory" */
#IDS_CAP_FILEEXISTS = 403 ;/* "File ;%s; exists -- overwrite it?" */
#IDS_CAP_ERRORPALOPEN = 404 ;/* "Error opening palette ;%s;" */
#IDS_CAP_ERRORPALSAVE = 405 ;/* "Error saving palette ;%s;" */
#IDS_CAP_ERRORDIBSAVE = 406 ;/* "Error saving frame ;%s;" */
#IDS_CAP_DEFAVIEXT = 407 ;/* "avi" */
#IDS_CAP_DEFPALEXT = 408 ;/* "pal" */
#IDS_CAP_CANTOPEN = 409 ;/* "Cannot open ;%s;" */
#IDS_CAP_SEQ_MSGSTART = 410 ;/* "Select OK to start capture\nof video sequence\nto %s." */
#IDS_CAP_SEQ_MSGSTOP = 411 ;/* "Hit ESCAPE or click to end capture" */
#IDS_CAP_VIDEDITERR = 412 ;/* "An error occurred while trying to run VidEdit." */
#IDS_CAP_READONLYFILE = 413 ;/* "The file ;%s; is a read-only file." */
#IDS_CAP_WRITEERROR = 414 ;/* "Unable to write to file ;%s;.\nDisk may be full." */
#IDS_CAP_NODISKSPACE = 415 ;/* "There is no space to create a capture file on the specified device." */
#IDS_CAP_SETFILESIZE = 416 ;/* "Set File Size" */
#IDS_CAP_SAVEASPERCENT = 417 ;/* "SaveAs: %2ld%% Hit Escape to abort." */
#IDS_CAP_DRIVER_ERROR = 418 ;/* Driver specific error message */
#IDS_CAP_WAVE_OPEN_ERROR = 419 ;/* "Error: Cannot open the wave input device.\nCheck sample size, frequency, and channels." */
#IDS_CAP_WAVE_ALLOC_ERROR = 420 ;/* "Error: Out of memory for wave buffers." */
#IDS_CAP_WAVE_PREPARE_ERROR = 421 ;/* "Error: Cannot prepare wave buffers." */
#IDS_CAP_WAVE_ADD_ERROR = 422 ;/* "Error: Cannot add wave buffers." */
#IDS_CAP_WAVE_SIZE_ERROR = 423 ;/* "Error: Bad wave size." */
#IDS_CAP_VIDEO_OPEN_ERROR = 424 ;/* "Error: Cannot open the video input device." */
#IDS_CAP_VIDEO_ALLOC_ERROR = 425 ;/* "Error: Out of memory for video buffers." */
#IDS_CAP_VIDEO_PREPARE_ERROR = 426 ;/* "Error: Cannot prepare video buffers." */
#IDS_CAP_VIDEO_ADD_ERROR = 427 ;/* "Error: Cannot add video buffers." */
#IDS_CAP_VIDEO_SIZE_ERROR = 428 ;/* "Error: Bad video size." */
#IDS_CAP_FILE_OPEN_ERROR = 429 ;/* "Error: Cannot open capture file." */
#IDS_CAP_FILE_WRITE_ERROR = 430 ;/* "Error: Cannot write to capture file. Disk may be full." */
#IDS_CAP_RECORDING_ERROR = 431 ;/* "Error: Cannot write to capture file. Data rate too high or disk full." */
#IDS_CAP_RECORDING_ERROR2 = 432 ;/* "Error while recording" */
#IDS_CAP_AVI_INIT_ERROR = 433 ;/* "Error: Unable to initialize for capture." */
#IDS_CAP_NO_FRAME_CAP_ERROR = 434 ;/* "Warning: No frames captured.\nConfirm that vertical sync interrupts\nare configured and enabled." */
#IDS_CAP_NO_PALETTE_WARN = 435 ;/* "Warning: Using default palette." */
#IDS_CAP_MCI_CONTROL_ERROR = 436 ;/* "Error: Unable to access MCI device." */
#IDS_CAP_MCI_CANT_STEP_ERROR = 437 ;/* "Error: Unable to step MCI device." */
#IDS_CAP_NO_AUDIO_CAP_ERROR = 438 ;/* "Error: No audio data captured.\nCheck audio card settings." */
#IDS_CAP_AVI_DRAWDIB_ERROR = 439 ;/* "Error: Unable to draw this data format." */
#IDS_CAP_COMPRESSOR_ERROR = 440 ;/* "Error: Unable to initialize compressor." */
#IDS_CAP_AUDIO_DROP_ERROR = 441 ;/* "Error: Audio data was lost during capture, reduce capture rate." */
;/* status string IDs */
#IDS_CAP_STAT_LIVE_MODE = 500 ;/* "Live window" */
#IDS_CAP_STAT_OVERLAY_MODE = 501 ;/* "Overlay window" */
#IDS_CAP_STAT_CAP_INIT = 502 ;/* "Setting up for capture - Please wait" */
#IDS_CAP_STAT_CAP_FINI = 503 ;/* "Finished capture, now writing frame %ld" */
#IDS_CAP_STAT_PALETTE_BUILD = 504 ;/* "Building palette map" */
#IDS_CAP_STAT_OPTPAL_BUILD = 505 ;/* "Computing optimal palette" */
#IDS_CAP_STAT_I_FRAMES = 506 ;/* "%d frames" */
#IDS_CAP_STAT_L_FRAMES = 507 ;/* "%ld frames" */
#IDS_CAP_STAT_CAP_L_FRAMES = 508 ;/* "Captured %ld frames" */
#IDS_CAP_STAT_CAP_AUDIO = 509 ;/* "Capturing audio" */
#IDS_CAP_STAT_VIDEOCURRENT = 510 ;/* "Captured %ld frames (%ld dropped) %d.%03d sec." */
#IDS_CAP_STAT_VIDEOAUDIO = 511 ;/* "Captured %d.%03d sec. %ld frames (%ld dropped) (%d.%03d fps). %ld audio bytes (%d,%03d sps)" */
#IDS_CAP_STAT_VIDEOONLY = 512 ;/* "Captured %d.%03d sec. %ld frames (%ld dropped) (%d.%03d fps)" */
Procedure.b capSetCallbackOnError (lwnd.l, lpProc.l)
capSetCallbackOnError = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_ERROR, 0, lpProc)
EndProcedure
Procedure.b capSetCallbackOnStatus (lwnd.l, lpProc.l)
capSetCallbackOnStatus = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_STATUS, 0, lpProc)
EndProcedure
Procedure.b capSetCallbackOnYield (lwnd.l, lpProc.l)
capSetCallbackOnYield = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_YIELD, 0, lpProc)
EndProcedure
Procedure.b capSetCallbackOnFrame (lwnd.l, lpProc.l)
capSetCallbackOnFrame = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_FRAME, 0, lpProc)
EndProcedure
Procedure.b capSetCallbackOnVideoStream (lwnd.l, lpProc.l)
capSetCallbackOnVideoStream = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_VIDEOSTREAM, 0, lpProc)
EndProcedure
Procedure.b capSetCallbackOnWaveStream (lwnd.l, lpProc.l)
capSetCallbackOnWaveStream = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_WAVESTREAM, 0, lpProc)
EndProcedure
Procedure.b capSetCallbackOnCapControl (lwnd.l, lpProc.l)
capSetCallbackOnCapControl = SendMessage_ (lwnd, #WM_CAP_SET_CALLBACK_CAPCONTROL, 0, lpProc)
EndProcedure
Procedure.b capSetUserData (lwnd.l, lUser.l)
capSetUserData = SendMessage_ (lwnd, #WM_CAP_SET_USER_DATA, 0, lUser)
EndProcedure
Procedure.l capGetUserData (lwnd.l)
capGetUserData = SendMessage_ (lwnd, #WM_CAP_GET_USER_DATA, 0, 0)
EndProcedure
Procedure.b capDriverConnect (lwnd.l, i.b)
capDriverConnect = SendMessage_ (lwnd, #WM_CAP_DRIVER_CONNECT, i, 0)
EndProcedure
Procedure.b capDriverDisconnect (lwnd.l)
capDriverDisconnect = SendMessage_ (lwnd, #WM_CAP_DRIVER_DISCONNECT, 0, 0)
EndProcedure
Procedure.b capDriverGetName (lwnd.l, szName.l, wSize.b)
capDriverGetName = SendMessage_ (lwnd, YOURCONSTANTMESSAGE, wSize, szName)
EndProcedure
Procedure.b capDriverGetVersion (lwnd.l, szVer.l, wSize.b)
capDriverGetVersion = SendMessage_ (lwnd, #WM_CAP_DRIVER_GET_VERSION, wSize, szVer)
EndProcedure
Procedure.b capDriverGetCaps (lwnd.l, s.l, wSize.b)
capDriverGetCaps = SendMessage_ (lwnd, #WM_CAP_DRIVER_GET_CAPS, wSize, s)
EndProcedure
Procedure.b capFileSetCaptureFile (lwnd.l, szName.l)
capFileSetCaptureFile = SendMessage_ (lwnd, #WM_CAP_FILE_SET_CAPTURE_FILE, 0, szName)
EndProcedure
Procedure.b capFileGetCaptureFile (lwnd.l, szName.l, wSize.b)
capFileGetCaptureFile = SendMessage_ (lwnd, #WM_CAP_FILE_SET_CAPTURE_FILE, wSize, szName)
EndProcedure
Procedure.b capFileAlloc (lwnd.l, dwSize.l)
capFileAlloc = SendMessage_ (lwnd, #WM_CAP_FILE_ALLOCATE, 0, dwSize)
EndProcedure
Procedure.b capFileSaveAs (lwnd.l, szName.l)
capFileSaveAs = SendMessage_ (lwnd, #WM_CAP_FILE_SAVEAS, 0, szName)
EndProcedure
Procedure.b capFileSetInfoChunk (lwnd.l, lpInfoChunk.l)
capFileSetInfoChunk = SendMessage_ (lwnd, #WM_CAP_FILE_SET_INFOCHUNK, 0, lpInfoChunk)
EndProcedure
Procedure.b capFileSaveDIB (lwnd.l, szName.l)
capFileSaveDIB = SendMessage_ (lwnd, #WM_CAP_FILE_SAVEDIB, 0, szName)
EndProcedure
Procedure.b capEditCopy (lwnd.l)
capEditCopy = SendMessage_ (lwnd, #WM_CAP_EDIT_COPY, 0, 0)
EndProcedure
Procedure.b capSetAudioFormat (lwnd.l, s.l, wSize.b)
capSetAudioFormat = SendMessage_ (lwnd, #WM_CAP_SET_AUDIOFORMAT, wSize, s)
EndProcedure
Procedure.l capGetAudioFormat (lwnd.l, s.l, wSize.b)
capGetAudioFormat = SendMessage_ (lwnd, #WM_CAP_GET_AUDIOFORMAT, wSize, s)
EndProcedure
Procedure.l capGetAudioFormatSize (lwnd.l)
capGetAudioFormatSize = SendMessage_ (lwnd, #WM_CAP_GET_AUDIOFORMAT, 0, 0)
EndProcedure
Procedure.b capDlgVideoFormat (lwnd.l)
capDlgVideoFormat = SendMessage_ (lwnd, #WM_CAP_DLG_VIDEOFORMAT, 0, 0)
EndProcedure
Procedure.b capDlgVideoSource (lwnd.l)
capDlgVideoSource = SendMessage_ (lwnd, #WM_CAP_DLG_VIDEOSOURCE, 0, 0)
EndProcedure
Procedure.b capDlgVideoDisplay (lwnd.l)
capDlgVideoDisplay = SendMessage_ (lwnd, #WM_CAP_DLG_VIDEODISPLAY, 0, 0)
EndProcedure
Procedure.b capDlgVideoCompression (lwnd.l)
capDlgVideoCompression = SendMessage_ (lwnd, #WM_CAP_DLG_VIDEOCOMPRESSION, 0, 0)
EndProcedure
Procedure.l capGetVideoFormat (lwnd.l, s.l, wSize.b)
capGetVideoFormat = SendMessage_ (lwnd, #WM_CAP_GET_VIDEOFORMAT, wSize, s)
EndProcedure
Procedure.l capGetVideoFormatSize (lwnd.l)
capGetVideoFormatSize = SendMessage_ (lwnd, #WM_CAP_GET_VIDEOFORMAT, 0, 0)
EndProcedure
Procedure.b capSetVideoFormat (lwnd.l, s.l, wSize.b)
capSetVideoFormat = SendMessage_ (lwnd, #WM_CAP_SET_VIDEOFORMAT, wSize, s)
EndProcedure
Procedure.b capPreview (lwnd.l, f.b)
capPreview = SendMessage_ (lwnd, #WM_CAP_SET_PREVIEW, f, 0)
EndProcedure
Procedure.b capPreviewRate (lwnd.l, wMS.b)
capPreviewRate = SendMessage_ (lwnd, #WM_CAP_SET_PREVIEWRATE, wMS, 0)
EndProcedure
Procedure.b capOverlay (lwnd.l, f.b)
capOverlay = SendMessage_ (lwnd, #WM_CAP_SET_OVERLAY, f, 0)
EndProcedure
Procedure.b capPreviewScale (lwnd.l, f.b)
capPreviewScale = SendMessage_ (lwnd, #WM_CAP_SET_SCALE, f, 0)
EndProcedure
Procedure.b capGetStatus (lwnd.l, s.l, wSize.b)
capGetStatus = SendMessage_ (lwnd, #WM_CAP_GET_STATUS, wSize, s)
EndProcedure
Procedure.b capSetScrollPos (lwnd.l, lpP.l)
capSetScrollPos = SendMessage_ (lwnd, #WM_CAP_SET_SCROLL, 0, lpP)
EndProcedure
Procedure.b capGrabFrame (lwnd.l)
capGrabFrame = SendMessage_ (lwnd, #WM_CAP_GRAB_FRAME, 0, 0)
EndProcedure
Procedure.b capGrabFrameNoStop (lwnd.l)
capGrabFrameNoStop = SendMessage_ (lwnd, #WM_CAP_GRAB_FRAME_NOSTOP, 0, 0)
EndProcedure
Procedure.b capCaptureSequence (lwnd.l)
capCaptureSequence = SendMessage_ (lwnd, #WM_CAP_SEQUENCE, 0, 0)
EndProcedure
Procedure.b capCaptureSequenceNoFile (lwnd.l)
capCaptureSequenceNoFile = SendMessage_ (lwnd, #WM_CAP_SEQUENCE_NOFILE, 0, 0)
EndProcedure
Procedure.b capCaptureStop (lwnd.l)
capCaptureStop = SendMessage_ (lwnd, #WM_CAP_STOP, 0, 0)
EndProcedure
Procedure.b capCaptureAbort (lwnd.l)
capCaptureAbort = SendMessage_ (lwnd, #WM_CAP_ABORT, 0, 0)
EndProcedure
Procedure.b capCaptureSingleFrameOpen (lwnd.l)
capCaptureSingleFrameOpen = SendMessage_ (lwnd, #WM_CAP_SINGLE_FRAME_OPEN, 0, 0)
EndProcedure
Procedure.b capCaptureSingleFrameClose (lwnd.l)
capCaptureSingleFrameClose = SendMessage_ (lwnd, #WM_CAP_SINGLE_FRAME_CLOSE, 0, 0)
EndProcedure
Procedure.b capCaptureSingleFrame (lwnd.l)
capCaptureSingleFrame = SendMessage_ (lwnd, #WM_CAP_SINGLE_FRAME, 0, 0)
EndProcedure
Procedure.b capCaptureGetSetup (lwnd.l, s.l, wSize.b)
capCaptureGetSetup = SendMessage_ (lwnd, #WM_CAP_GET_SEQUENCE_SETUP, wSize, s)
EndProcedure
Procedure.b capCaptureSetSetup (lwnd.l, s.l, wSize.b)
capCaptureSetSetup = SendMessage_ (lwnd, #WM_CAP_SET_SEQUENCE_SETUP, wSize, s)
EndProcedure
Procedure.b capSetMCIDeviceName (lwnd.l, szName.l)
capSetMCIDeviceName = SendMessage_ (lwnd, #WM_CAP_SET_MCI_DEVICE, 0, szName)
EndProcedure
Procedure.b capGetMCIDeviceName (lwnd.l, szName.l, wSize.b)
capGetMCIDeviceName = SendMessage_ (lwnd, #WM_CAP_GET_MCI_DEVICE, wSize, szName)
EndProcedure
Procedure.b capPaletteOpen (lwnd.l, szName.l)
capPaletteOpen = SendMessage_ (lwnd, #WM_CAP_PAL_OPEN, 0, szName)
EndProcedure
Procedure.b capPaletteSave (lwnd.l, szName.l)
capPaletteSave = SendMessage_ (lwnd, #WM_CAP_PAL_SAVE, 0, szName)
EndProcedure
Procedure.b capPalettePaste (lwnd.l)
capPalettePaste = SendMessage_ (lwnd, #WM_CAP_PAL_PASTE, 0, 0)
EndProcedure
Procedure.b capPaletteAuto (lwnd.l, iFrames.b, iColor.l)
capPaletteAuto = SendMessage_ (lwnd, #WM_CAP_PAL_AUTOCREATE, iFrames, iColors)
EndProcedure
Procedure.b capPaletteManual (lwnd.l, fGrab.b, iColors.l)
capPaletteManual = SendMessage_ (lwnd, #WM_CAP_PAL_MANUALCREATE, fGrab, iColors)
EndProcedure
Procedure.l MyFrameCallback (lwnd.l, lpVHdr.l)
DefType.VIDEOHDR VideoHeader
;//Fill VideoHeader with data at lpVHdr
RtlMoveMemory_ (@VideoHeader, lpVHdr, SizeOf (VIDEOHDR))
;// Make room for data
Dim VideoData (VideoHeader\dwBytesUsed)
;//Copy data into the array
RtlMoveMemory_ (@VideoData (0), VideoHeader\lpData, VideoHeader\dwBytesUsed)
EndProcedure
Procedure.l MyYieldCallback (lwnd.l)
; Debug.Print "Yield"
EndProcedure
Procedure.l MyErrorCallback (lwnd.l, iID.l, ipstrStatusText.l)
If iID = 0
ProcedureReturn 0
EndIf
; DefType.s sStatusText
; DefType.s usStatusText
;Convert the Pointer to a real VB String
; sStatusText = Space$ (255) ;// Make room for message
;lStrCpy StrPtr (sStatusText), ipstrStatusText ;// Copy message into String
; PokeS (@sStatusText, PeekS (ipstrStatusText))
; sStatusText = Left (sStatusText, InStr (sStatusText, Chr$ (0)) - 1) ;// Only look at left of null
; ^^^ Not needed? PB should sort that, I think...
; usStatusText = StrConv (sStatusText, vbUnicode) ;// Convert Unicode
;Debug.Print "Error: ", usStatusText, iID
EndProcedure
Procedure.l MyStatusCallback (lwnd.l, iID.l, ipstrStatusText.l)
If iID = 0
ProcedureReturn 0
EndIf
; Dim sStatusText As String
; Dim usStatusText As String
; ;// Convert the Pointer to a real VB String
; sStatusText = String$ (255, 0) ;// Make room for message
; lStrCpy StrPtr (sStatusText), ipstrStatusText ;// Copy message into String
; sStatusText = Left$ (sStatusText, InStr (sStatusText, Chr$ (0)) - 1) ;// Only look at left of null
; usStatusText = StrConv (sStatusText, vbUnicode) ;// Convert Unicode
; Debug.Print "Status: ", usStatusText, iID
EndProcedure
Procedure.l MyVideoStreamCallback (lwnd.l, lpVHdr.l)
; Beep ;// Replace this with your code!
EndProcedure
Procedure.l MyWaveStreamCallback (lwnd.l, lpVHdr.l)
; Debug.Print "WaveStream"
EndProcedure
Global gPreviewStatus: gPreviewStatus = #TRUE ; Status of 'Preview' option...
Global lwndC.l ; ' Handle to the Capture Windows
Global lNFrames.l ; ' Number of frames captured
Global dlgSource.l: dlgSource = #True
Global dlgFormat.l: dlgFormat = #True
Global dlgDisplay.l: dlgDisplay = #True
Global capWidth, capHeight
Procedure ResizeCaptureWindow (lwnd.l)
DefType.CAPSTATUS capstat
;// Get the capture window attributes .. width and height
capGetStatus (lwnd, @capstat, SizeOf (CAPSTATUS))
;// Resize the capture window to the capture sizes
SetWindowPos_ (lwnd, #HWND_BOTTOM, 0, 0, capstat\uiImageWidth, capstat\uiImageHeight, #SWP_NOMOVE | #SWP_NOZORDER)
capWidth = capstat\uiImageWidth
capHeight = capstat\uiImageHeight
EndProcedure
Procedure StartCaptureWindow (parentwindow.l)
*lpszName = AllocateMemory (100)
*lpszVer = AllocateMemory (100)
DefType.CAPDRIVERCAPS Caps
;//Create Capture Window
capGetDriverDescriptionA (0, lpszName, 100, lpszVer, 100) ;// Retrieves driver info
name$ = PeekS (lpszName)
lwndC = capCreateCaptureWindowA (name$, #WS_CHILD | #WS_VISIBLE, 0, 0, 160, 120, parentwindow, 0)
;// Connect the capture window to the driver
capDriverConnect (lwndC, 0)
;// Get the capabilities of the capture driver
capDriverGetCaps (lwndC, @Caps, SizeOf (CAPDRIVERCAPS))
;// If the capture driver does not support a dialog, grey it out
;// in the menu bar.
If Caps\fHasDlgVideoSource = 0
dlgSource = False
EndIf
If Caps\fHasDlgVideoFormat = 0
dlgFormat = False
EndIf
If Caps\fHasDlgVideoDisplay = 0
dlgDisplay = False
EndIf
;// Set the video stream callback function
capSetCallbackOnVideoStream (lwndC, @MyVideoStreamCallback ())
capSetCallbackOnFrame (lwndC, @MyFrameCallback ())
;// Set the preview rate in milliseconds
capPreviewRate (lwndC, 66)
;// Start previewing the image from the camera
capPreview (lwndC, #True)
;// Resize the capture window to show the whole image
ResizeCaptureWindow (lwndC)
EndProcedure
Procedure EndCaptureWindow (Cancel.b)
;// Disable all callbacks
capSetCallbackOnError (lwndC, #Null)
capSetCallbackOnStatus (lwndC, #Null)
capSetCallbackOnYield (lwndC, #Null)
capSetCallbackOnFrame (lwndC, #Null)
capSetCallbackOnVideoStream (lwndC, #Null)
capSetCallbackOnWaveStream (lwndC, #Null)
capSetCallbackOnCapControl (lwndC, #Null)
EndProcedure
Procedure Compression_Click ()
capDlgVideoCompression (lwndC)
EndProcedure
Procedure Display_Click ()
capDlgVideoDisplay (lwndC)
EndProcedure
Procedure Format_Click ()
capDlgVideoFormat (lwndC)
ResizeCaptureWindow (lwndC)
EndProcedure
Procedure Preview_Click ()
If gPreviewStatus
gPreviewStatus = #False
Else
gPreviewStatus = #True
EndIf
capPreview (lwndC, gPreviewStatus)
EndProcedure
Procedure Source_Click ()
capDlgVideoSource (lwndC)
EndProcedure
Procedure Start_Click ()
lNFrames = 0
capCaptureSequenceNoFile (lwndC)
EndProcedure
au debut du listing il y a :
"OpenAviLibrary ()" signifie que cette librairie est utilisée !!
or il faut la recuperer quelque part !!
je sais pas ou !! fait une recherche ou tu a pris ce code !! ...
sinon tu pourra pas utiliser ceci !!
ps : ceci explique le message d'erreur a coup sur !!
en fait il sagit surement de "avicap32.dll" qu'il te faut !! (moi je l'ai pas !!)
Code : Tout sélectionner
IncludeFile "avicapincs.pb"
; -----------------------------------------------------------------------------
; D E M O . . .
; -----------------------------------------------------------------------------
OpenAviLibrary ()
"OpenAviLibrary ()" signifie que cette librairie est utilisée !!
or il faut la recuperer quelque part !!
je sais pas ou !! fait une recherche ou tu a pris ce code !! ...
sinon tu pourra pas utiliser ceci !!

ps : ceci explique le message d'erreur a coup sur !!
en fait il sagit surement de "avicap32.dll" qu'il te faut !! (moi je l'ai pas !!)
ha ba oui je l'ai dans mon system !!
bon je vien de voi l'erreur c'est qu'il ne trouve pas de nom de Driver
de capture a priori !!
moi c'est normal j'ai pas de camera !!
si tu veut plus qu'il plante a cause de ça
tu remplace la ligne 607
par
ça plantera plus mais tu sera pas plus avancé , sans driver de camera present sur ton system 

bon je vien de voi l'erreur c'est qu'il ne trouve pas de nom de Driver
de capture a priori !!

moi c'est normal j'ai pas de camera !!
si tu veut plus qu'il plante a cause de ça
tu remplace la ligne 607
Code : Tout sélectionner
name$ = PeekS (lpszName)
Code : Tout sélectionner
;name$ = PeekS (lpszName)
name$="coucou"

Dernière modification par Backup le dim. 08/août/2004 20:57, modifié 1 fois.