ActiveX question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ActiveX question

Bruno Brasesco
Hi,

It is possible to use the ActiveX Control Browser to obtain images from
a web cam ?

I'm using Dolphin ActiveX to do this, but MS capture image model it's
semms a little complicated.

But i'm trying to find out all DLL (and other files) that participates
in  this process. Then build wrappers around them.

There's a lot to search:
* IMediaControl is one of them (quartz.dll).

Regards Bruno


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX question

Martin Rubi
> It is possible to use the ActiveX Control Browser to obtain images from
> a web cam ?

Yes, it is. I have done some experiments with direct show (not related to
webcams though), but most of the DirectShow code was in a dll, not in
Dolphin. However, I think it could be done entirely from Dolphin, and I
would prefer so, I just didn't have the time.

> I'm using Dolphin ActiveX to do this, but MS capture image model it's
> semms a little complicated.

Does this Dolphin's ActiveX wrapper includes support for DirectShow as well
?

> But i'm trying to find out all DLL (and other files) that participates
> in  this process. Then build wrappers around them.
>
> There's a lot to search:
> * IMediaControl is one of them (quartz.dll).

I would say I would gladly help you, but I'm not all that familiar with
DirectShow myself, although some of my coworkers are. If you have links to
tutorials and how tos (probably there are a lot for C++), we could start
from there. I will search some myself, but it would be in my spare time (not
a lot these days).

I think such a library in Dolphin would be a nice thing to have.

Bset regards.
Martin


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX question

Christopher J. Demers
In reply to this post by Bruno Brasesco
"Bruno" <[hidden email]> wrote in message
news:434d0761$[hidden email]...
>
> It is possible to use the ActiveX Control Browser to obtain images from a
> web cam ?
>
> I'm using Dolphin ActiveX to do this, but MS capture image model it's
> semms a little complicated.
...

I did some image capture experiments a long while ago.  I got some stuff
working using WIA.  I imported WIAVIDEOLib (in wiavideo.dll) via the ActiveX
wizard.  I was then able to cobble together the following workspace script
that let me save JPG's from the webcam.  I was really just poking around,
but it might give you a starting point.  I think I decided that WIA was not
going to be powerful enough for what I had in mind, and I never did have the
time to properly explore better performing capture options.  I also looked
at WIALib (in WIASCR.DLL), I think I was able to get some device properties
from it.  The code bellow works for me, you will need to change the name of
the video device, or use a different method.

==============
shell := Shell show.
vc := WIAVIDEOLibIWiaVideo new.
vc imagesDirectory: 'C:\Temp\images'.
vc previewVisible.
vc createVideoByName: 'Logitech QuickCam Pro 4000' hwndParent: shell view
handle bStretchToFitParent: false bAutoBeginPlayback: true.
"vc resizeVideo: 1."
vc takePicture.
vc destroyVideo.
==============

I would be very interested if someone can come up with an easy way to
capture an image from a video stream efficiently in Dolphin.

Chris


Reply | Threaded
Open this post in threaded view
|

Re: ActiveX question

Martin Rubi
In reply to this post by Bruno Brasesco
Hello.

In http://www.bokonon.com.ar/other/other.html I have put a package with a
very small example for capturing video from a webcam, and grabbing images
from it using DirectShow.
I have used 2 different filter graphs to do so, but only one of them can
grab frames.

Please, keep in mind that:
- I'm still not familiar with DirectShow
- I don't claim the examples to be well designed (I don't claim anything
I've done to be well designed, actually). I have found that DS architecture
is so generic (which can be a good thing) that it's a bother to do the
simplest things (which is not that good). If you come up with a decent way
to deal with it, I would be grateful if you share it
- I may be missing a lot of things, such a releasing resources properly.
That is, it may be leaking resources (hopefully not)

Regards
Martin