News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

WebCam

Started by Beshr, August 24, 2006, 12:25:17 PM

Previous topic - Next topic

Beshr

Hi ALL

Is there is anyway to show my webcam in my MASM Application
If there is any way to do it without any DLL please tell it first!!

:dance: :dance: :dance: :dance: :dance:

PBrennick

Beshr,
MASM can do anything you want, that is not the problem.  The problem is how.  You need to contact the maker of your WebCam to see if they have have a set of APIs that can be used to access the WebCam from your programming environment.  Do not tell them it is assembly, say C++, if they ask or you risk scaring them away.  As far as accessing the cam without using a DLL, my guess is you should forget that idea because the APIs would be useless to you as you would have to write the drivers yourself.  Stick with the APIs if they exist.  If they have nothing to offer, it will be a tough go for you.

Good luck, keep us posted,
Paul
The GeneSys Project is available from:
The Repository or My crappy website

Tedd

Haven't looked into it, but I'd check to see whether DirectShow has anything to offer. I'm pretty sure there will be a 'standard' interface to access a webcam, it's just a matter of finding it :bdg
No snowflake in an avalanche feels responsible.

Beshr

thx!
i want to use API because i heard that they'll be faster!!
dll are fast! but API is faster!!
is that right!?!
:dazzled: :dazzled:

Tedd

In short, the API functions come from DLLs. So, no, not really.
(The only 'speedup' between using an api function and your own dll is that your dll will not have been loaded yet, but the dll containing the api functions may already have. But apart from this initial loading, there should not be any difference.)
No snowflake in an avalanche feels responsible.

dsouza123

An image viewing program I have used will connect to my webcam using twain32,
it will display video and capture snapshot images.

The program didn't come with the webcam, and worked with a previous webcam
I had from a different manufacturer.

Search for information on using twain_32.dll twain.dll or twain32 source code.

P1

Scronty has some source you can learn from:
http://www.scrontsoft.com/win32asm/webcamapp.zip

Make sure Phil gets some credit.

Regards,  P1  :8)

Mark Jones

Also note that some webcams have a frame-rate limit, so even if you could access it faster, it might not make any difference. Realistically, any API you could use should be thousands of times faster than the camera, so I would not worry about making your own code. Use a .dll if it exists, it will save you a lot of time and energy. :U
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Vortex

QuoteThis application shows how to access webcam in Windows.
Written by Marcus Araujo.

http://flatassembler.net/examples/fasmcam.zip

stanhebben

I found a lot of information at http://www.twain.org , but didn't use it myself. (not yet)

Mark Jones

Interesting. I tried to port that code to MASM syntax, and found the API calls in VFW32.INC, but there is no VFW32.DLL on my system. There is however a MSVFW32.DLL. Investigating...
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

P1

Quote from: Mark Jones on August 24, 2006, 09:15:09 PMbut there is no VFW32.DLL on my system. There is however a MSVFW32.DLL.
We have gone over this before.  We need to update MASM with the new msvfw32 files.

Regards,  P1  :8)

Mark Jones

MSVFW32.DLL doesn't seem to have all the same APIs in it that AVICAP32.DLL does. So I made import libraries for AVICAP32.DLL and a sample project. I cannot test it as I don't have a webcam. I do know however, that the save-bitmap function is not working. I have to go, perhaps someone else can finish this.

[attachment deleted by admin]
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

Siekmanski

Hello

This is an example that uses vfw32.lib and saves a bitmap
I did test your avicap32.lib, it works OK.
( my proggy uses "capGetDriverDescription" which is not in your lib )

Regards, Siekmanski

[attachment deleted by admin]

dedndave

i have seen a number of these, lately:
Quote[attachment deleted by admin]

is there like a secret password or something to access them ?