Two Instances from one Webcam - c#

I am new at DirectShow and found one example to capture when i ran two instances of this app it throws exceptions like camera is already in use.I having a requirement that the same camera will be shared by two Applications.
Is it possible to acheive this using any filters
Thanks in advance

DirectShow web cameras are typically exclusive use resources, applications cannot share them. One solution is to use a virtual camera software that creates a virtual device available to many apps, backed by real devices. Or, you can also implement the sharing yourself.
See also:
Why does Windows only allow one application to access the webcam?
Is there a way to create a duplicate device of webcam?

Related

Is it possible to use both windows phone cameras at the same time?

While trying to use both cameras for windows phone app i am not able to display both cameras at the same time..
one of them freeze when the other is working. i used the same code that has been given for reference here:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/hh202956(v=vs.105).aspx
any suggestion or code that shows an example of it?
This scenario is not supported by the API. Opening an additional instance of the camera will close the previous one.
However, to behave nicely with battery usage, you should explicitly .Dispose the device as soon as you are done with it (instead of relying on the auto-close behavior).
(Note that some hardware actually shares resources between the FFC and the BFC, so even if the API allowed for it, it is still unlikely to work with the current version of the OS).
refer this link
http://social.msdn.microsoft.com/Forums/wpapps/en-US/cdefd4cb-94f8-4d98-a4b4-7671606815c6/can-i-use-frontcamera-and-primary-camera-at-the-same-time
but in the phone like S4 it is possible
refer this link
http://www.wpxbox.com/dual-shot-camera-apps-wp/

Run different applications on 2 monitors

I have this C# project I'm working on, where I need to launch some videos on the second monitor and my application on the main monitor.
Is this possible to be done in C#? Launch some videos on monitor 2 in full screen and launch my application windows in full screen also.
So basically, I need to know how can select a specific screen and do something on it also how can I make an application launch in full screen.
It should actually be possible using Direct3D i think, while not having done this myself.
You should be able to identify your monitors, and do the appropriate work on each of them.
In your case I would create two different Direct3D Devices with each it's own resources (sharing resources between two different Devices doesn't seem to be possible).
Here are some Direct3D Samples on MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb153298(v=vs.85).aspx
And here you can find a way to creat a Direct3D Device on MSDN too:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb153258(v=vs.85).aspx

Multiple applications on the same kinect device

Is is possible to have multiple applications which are using the same kinect device?
Multiple applications can't use same Kinect device as one app can only request one Kinect sensor. You can however choose one of the ways listed below
Use multiple Kinects so each app uses separate Kinect
Use single Kinect for one of the app and share data across applications using inter-process communication
Multiple applications cannot share the device itself however using Kinect Service you can build one application that can act as a bridge between two apps sharing the color, skeletal, and depth data. The only thing you won't be able to do out of the box is tilt the Kinect.
Another work around is to have multiple applications or windows tied to one project using a separate Kinect class to provide access to the SDK functions.

Duplicate camera stream

I need to make a program that would allow me to capture camera stream with my 2 other programs simultaneously. Basically I need the functionality that ManyCams (http://www.manycam.com/) offers.
How can I do this? I'm interested in a free c++ library, or some C#/C++ .net solution.
well, one easy step will be "share" rather than "duplicate" camera streams, your application can capture camera streams then provide api to share it between multiple applications. OpenCV worth a look.
I'm not sure but you probably need to have good understanding of how hardware work and know how to develop a driver for it. What you should do is to get the graphic from usb device's driver and use what you get from your camera as input source for your own virtual camera drivers.

Audio capturing in C#

I have a MAYA 44 USB sound card and would like to interface it with C#. I want to record from the provided microphones and produce a data array.
I have found examples when using the internal sound card from my laptop but when it comes to external it does not quite work.
Has anyone every connected the above sound card with C# please?
Have you had a look at the DirectSound API (Windows only though, I think). Might provide what you're after.
On how to record audio with C# in general there are already multiple threads on SO, so I won't talk about that.
I see two possible causes for your program which have different solutions:
You need to change which audio sources are muted in the windows volume control ("sndvol32.exe /R")
When opening the audio device there are multiple devices. And you're simply opening device 0 instead of enumerating them and perhaps choosing another one. The external sound-card might appear as a second device.

Categories

Resources