From: pradeep_TP on
Hi all,

Recently I came across a software that can emulate a web camera. It is by
the name virtualcamera and seems to be a very famous software. I did not find
any other software which can do the same thing. It seems its some kind of
magic!.

I have installed a TV Tuner Card and Web cam on my PC. My yahoo messenger
detects both these as valid WebCams. When i installed virtualWebCam i saw
yahoo nicely detected that as well. I want to create a similar software on my
own and want to know how far i can get with it.

Does anyone have any good suggestions for me about where to start. I will
drop the idea altogher if you say upfront that it can only be created by big
companies with 'black box' information on the same. I am want an honest reply
from expereinced developers about this.

My summarised questions are as follows

1) whether is it possible for a single developer for me to do this.
2) I have fair knowledge of Visual C++ and good knowledge of C#.
3) Is it a task in the context of device driver programming.

Thanks all
pradeep_tp

From: Cat on
1) Anything is possible.
2) It will probably be a bit of a challenge, then.
3) It's one way of doing it, but I don't think it is the only way. In
fact, I wouldn't do it that way myself.

My experience with something like this is limited, but what I have done
is create a program that can capture the uncompressed Webcam video
streams right before it is compressed for transmission over the
network. (This was done by hooking VFW.)

I can suggest that before you attempt to emulate a webcam, that you try
to use one. As far as I can see, there are two main interfaces used
nowadays for Webcams under Windows: VFW (Video for Windows) and
DirectShow. VFW is somewhat old and deprecated, but still present in
Windows and used by some applications. I found a couple example capture
programs on Codeproject:
With DirectShow:
http://www.codeproject.com/directx/LiveVideo.asp
http://www.codeproject.com/csharp/webcamservice.asp (C#)
http://www.codeproject.com/audio/DXCapture.asp

With VFW:
http://www.codeproject.com/webservices/webcam.asp (take a look at the
"Server" component, CWebCap.cpp)

Good luck,
-Cat

From: pradeep_TP on
Hello Cat,

Thank you for showing interest in this thread. I have already gone through
all the codes that are available in codeproject, but all of them only discuss
about how to capture the images from the video. None of the articles
discusses about creating something like a web cam on device driver level. Why
i m emphasizing on the device driver part is because when i checked the files
installed by the software, i find that there is a file with extension .sys
which is a driver file. Moreover I can see it installed as a driver in the
dever drivers list under "sound, video, game controls".

I am interested in that part, i.e how do you emulate a device. Even though a
web camera is not present physically, the software has been able to emulate
the device and other applications, like yahoo IM, detected it as a device
which can give video outputs.

Thanks
pradeep_tp

"Cat" wrote:

> 1) Anything is possible.
> 2) It will probably be a bit of a challenge, then.
> 3) It's one way of doing it, but I don't think it is the only way. In
> fact, I wouldn't do it that way myself.
>
> My experience with something like this is limited, but what I have done
> is create a program that can capture the uncompressed Webcam video
> streams right before it is compressed for transmission over the
> network. (This was done by hooking VFW.)
>
> I can suggest that before you attempt to emulate a webcam, that you try
> to use one. As far as I can see, there are two main interfaces used
> nowadays for Webcams under Windows: VFW (Video for Windows) and
> DirectShow. VFW is somewhat old and deprecated, but still present in
> Windows and used by some applications. I found a couple example capture
> programs on Codeproject:
> With DirectShow:
> http://www.codeproject.com/directx/LiveVideo.asp
> http://www.codeproject.com/csharp/webcamservice.asp (C#)
> http://www.codeproject.com/audio/DXCapture.asp
>
> With VFW:
> http://www.codeproject.com/webservices/webcam.asp (take a look at the
> "Server" component, CWebCap.cpp)
>
> Good luck,
> -Cat
>
>
From: Anonymous on
In the ddk you will find usbintel, this is source code of intel webcam.
If you can understand this code then you are plain sailing
to write the emulator.

"pradeep_TP" <pradeepTP(a)discussions.microsoft.com> wrote in message
news:1A9CDCD4-F2A4-42FE-9C08-49F188D935C5(a)microsoft.com...
> Hello Cat,
>
> Thank you for showing interest in this thread. I have already gone through
> all the codes that are available in codeproject, but all of them only
discuss
> about how to capture the images from the video. None of the articles
> discusses about creating something like a web cam on device driver level.
Why
> i m emphasizing on the device driver part is because when i checked the
files
> installed by the software, i find that there is a file with extension .sys
> which is a driver file. Moreover I can see it installed as a driver in the
> dever drivers list under "sound, video, game controls".
>
> I am interested in that part, i.e how do you emulate a device. Even though
a
> web camera is not present physically, the software has been able to
emulate
> the device and other applications, like yahoo IM, detected it as a device
> which can give video outputs.
>
> Thanks
> pradeep_tp
>
> "Cat" wrote:
>
> > 1) Anything is possible.
> > 2) It will probably be a bit of a challenge, then.
> > 3) It's one way of doing it, but I don't think it is the only way. In
> > fact, I wouldn't do it that way myself.
> >
> > My experience with something like this is limited, but what I have done
> > is create a program that can capture the uncompressed Webcam video
> > streams right before it is compressed for transmission over the
> > network. (This was done by hooking VFW.)
> >
> > I can suggest that before you attempt to emulate a webcam, that you try
> > to use one. As far as I can see, there are two main interfaces used
> > nowadays for Webcams under Windows: VFW (Video for Windows) and
> > DirectShow. VFW is somewhat old and deprecated, but still present in
> > Windows and used by some applications. I found a couple example capture
> > programs on Codeproject:
> > With DirectShow:
> > http://www.codeproject.com/directx/LiveVideo.asp
> > http://www.codeproject.com/csharp/webcamservice.asp (C#)
> > http://www.codeproject.com/audio/DXCapture.asp
> >
> > With VFW:
> > http://www.codeproject.com/webservices/webcam.asp (take a look at the
> > "Server" component, CWebCap.cpp)
> >
> > Good luck,
> > -Cat
> >
> >


From: Cat on
Generally, I stay away from kernel-mode as much as possible, the reason
being that crashes in kernel-mode are a lot more time-consuming to
debug than in usermode, where you can simply attach a debugger,
terminate the process, etc.

That's why I was pointing toward a user-mode solution. If, however, you
genuinely need the device to show up in Device Manager, etc., etc.,
then indeed kernel-mode seems like the only solution.

Good luck,
-Cat