none
Load avshws sample in multiple applications RRS feed

  • Question

  • I'm testing avshws sample project from WinDDK. The sample camera, when installed, can be loaded in only one application at time.

    I want to be able to load it in multiple applications simultaneously. Does anybody know what should be done to support this? 

    Thursday, April 14, 2016 3:33 PM

Answers

  • What are you actually trying to accomplish here?  A web camera streams to one application at a time.  Think about the issues this would present.  If application 1 wants 640x480 but application 2 wants 800x600, who wins?  What if application 1 wants to change the brightness, or mirror the image?

    There is a product called ManyCam that can take a web camera stream and turn it into multiple streams.  You might investigate that.  Basically, what they do is create 16 different filters (avshws registers only one).  The code in CCaptureDevice is common to all the instances, so they buffer some frames in the device and ship them out to the various pins.


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Thursday, April 14, 2016 8:58 PM
  • Well, I think you just summed up what you need to do.  An AVStream driver consists of one device, with one or more filters, each of which has one or more pins.  You'll need to fetch your video frame in the device, since that's common to all.  You'll have to figure out how to do the buffering, since the filter pins will be asking for data at different times.

    It's not easy.  Splitcam does this job, and it's free.


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Friday, April 15, 2016 8:21 PM

All replies

  • What are you actually trying to accomplish here?  A web camera streams to one application at a time.  Think about the issues this would present.  If application 1 wants 640x480 but application 2 wants 800x600, who wins?  What if application 1 wants to change the brightness, or mirror the image?

    There is a product called ManyCam that can take a web camera stream and turn it into multiple streams.  You might investigate that.  Basically, what they do is create 16 different filters (avshws registers only one).  The code in CCaptureDevice is common to all the instances, so they buffer some frames in the device and ship them out to the various pins.


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Thursday, April 14, 2016 8:58 PM
  • Basically, I need to modify avshws to work similar to ManyCam WebCam. So, in avshws I need to register more different filters, which can read different images or generate different output images and ship them to the output pin. The output needs to be different because it will be shown to different users.

    Friday, April 15, 2016 7:58 AM
  • Well, I think you just summed up what you need to do.  An AVStream driver consists of one device, with one or more filters, each of which has one or more pins.  You'll need to fetch your video frame in the device, since that's common to all.  You'll have to figure out how to do the buffering, since the filter pins will be asking for data at different times.

    It's not easy.  Splitcam does this job, and it's free.


    Tim Roberts, Driver MVP Providenza & Boekelheide, Inc.

    Friday, April 15, 2016 8:21 PM