|
-
Jan 15th, 2004, 02:03 PM
#1
Thread Starter
Frenzied Member
digital camera - TWAIN?
Hi,
I'm using the capCreateCaptureWindowA API to display video from a digital camera (works fine). A customer sent me an email asking me "does your program uses twain drivers, VFW or WMD to load images from the camera?".
I am 'thinking' the answer is TWAIN, but I have no clue what VFW or WMD is. Is there anyone out there that can answer this question for me??
Thanks in advance!
-
Jan 15th, 2004, 03:20 PM
#2
Possibly:
Video For Windows (VFW)
Windows Driver Model (WDM)
Industry standard software interface such as Multimedia Control Interface (MCI), Video for Window (VFW), and Windows Driver Model (WDM).
Edit: Is it WMD or WDM?
More:
Microsoft Windows VFW Video Capture
Microsoft Windows WDM Video Capture
Bruce.
Last edited by Bruce Fox; Feb 23rd, 2004 at 06:48 PM.
-
Jan 15th, 2004, 03:25 PM
#3
Thread Starter
Frenzied Member
Do you know which one that API uses though? That is the important question. I found it on planet-source-code a long time ago. I really don't understand any of this stuff...
here is the 'connect' function, which might help answer the question for someone who knows what they are talking about.
VB Code:
Private Function Connect() As Boolean
Dim lpszName As String * 100
Dim lpszVer As String * 100
Dim Caps As CAPDRIVERCAPS
'//Create Capture Window
capGetDriverDescriptionA 0, lpszName, 100, lpszVer, 100 '// Retrieves driver info
lwndC = capCreateCaptureWindowA(lpszName, WS_CAPTION Or WS_THICKFRAME Or WS_VISIBLE Or WS_CHILD, _
ScaleX(2000, vbTwips, vbPixels), _
ScaleX(100, vbTwips, vbPixels), _
100, _
120, _
Me.hWnd, 0)
'// Set title of window to name of driver
SetWindowText lwndC, lpszName
'// Set the video stream callback function
capSetCallbackOnStatus lwndC, AddressOf MyStatusCallback
capSetCallbackOnError lwndC, AddressOf MyErrorCallback
'// Connect the capture window to the driver
If capDriverConnect(lwndC, 0) Then
'/////
'// Only do the following if the connect was successful.
'// if it fails, the error will be reported in the call
'// back function.
'/////
'// Get the capabilities of the capture driver
capDriverGetCaps lwndC, VarPtr(Caps), Len(Caps)
'// If the capture driver does not support a dialog, grey it out
'// in the menu bar.
' If Caps.fHasDlgVideoSource = 0 Then mnuSource.Enabled = False
' If Caps.fHasDlgVideoFormat = 0 Then mnuFormat.Enabled = False
' If Caps.fHasDlgVideoDisplay = 0 Then mnuDisplay.Enabled = False
'// Turn Scale on
capPreviewScale lwndC, True
'// 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
Connect = True
Else
Connect = False
End If
End Function
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|