flat assembler
Message board for the users of flat assembler.

Index > Windows > Webcam

Author
Thread Post new topic Reply to topic
Crewl-T6



Joined: 24 Mar 2009
Posts: 1
Crewl-T6 24 Mar 2009, 16:35
Hi there.

I'm kinda new to asm. i read some papers on fasm and masm and i want to build an app.

This is the app i want to make:
a webcam application which stores HQ (best possible) from a cam and compress it in packages.

what will be the best way to do it?
take single images (30/sec ?) and then merge then someway?

I'm starting with this opensource example:
FASMCam
Post 24 Mar 2009, 16:35
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 24 Mar 2009, 19:08
To capture the actual webcam, your best bet is to use DirectShow since most of the webcam drivers have support for that. DirectShow is a set of objects that provide a COM interface. I would do that in C++/ATL, but if you really want to go with the asm route (and there have been crazy enough people to do that), there is extensive COM macro and header support for FASM - just search the board or the Internet. Actually for this particular application, you don't need to implement many interfaces (just a "buffer grabber interface" I think), but mostly call into DirectShow, which is not so tedious with asm.

To compress into packages - can you clarify that? Do you want to make a full-motion file (like an MPEG or AVI or whatever)? Or just a series of images? For full-motion files, your best bet again is to use DirectShow. You can build a full graph that takes video from a webcam and pumps into a video encoder. Then just tell DirectShow to "run" the graph. For series of images, you will probably need to run the encoder yourself (use IJG or IJPEG libraries) from the bitmap data you receive in your "sample grabber" object.

Can you point to the FASMCam example please? I would like to take a look.
Post 24 Mar 2009, 19:08
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 24 Mar 2009, 19:15
I'll do: http://flatassembler.net/examples/fasmcam.zip

I confess I didn't know of this example before and in fact Google didn't help. Is Google-bot forbidden on the www sub-domain too?
Post 24 Mar 2009, 19:15
View user's profile Send private message Reply with quote
comrade



Joined: 16 Jun 2003
Posts: 1150
Location: Russian Federation
comrade 25 Mar 2009, 03:05
This example uses the deprecated video capture APIs... DirectShow is a better way to go. Although there is a DirectShow/VCM adapter so you can use a DirectShow driver with these APIs Smile
Post 25 Mar 2009, 03:05
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.